@font-face { font-family: FuguiSerif; src: url('/assets/fonts/source-han-serif/SourceHanSerifCN-400.woff2') format('woff2'); font-display: swap; }
:root { color-scheme: light; --paper: #f8f8f3; --ink: #283c31; --muted: #697365; --line: #dce1d5; --forest: #2b4338; --sage: #e9ede2; --gold: #8c794a; background: var(--paper); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
::selection { background: #dbe5d0; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px max(22px, calc((100vw - 1080px) / 2)); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 15px; min-height: 42px; }
.brand img { width: 65px; height: 39px; object-fit: contain; }
.brand>span { border-left: 1px solid #ccd4c3; padding-left: 15px; font-size: 12px; letter-spacing: .1em; white-space: nowrap; }
.back { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; min-height: 44px; white-space: nowrap; }
main { max-width: 1000px; width: calc(100% - 48px); margin: 0 auto; }
.intro { padding: 58px 0 24px; }
.eyebrow { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 11px; letter-spacing: .13em; line-height: 1.8; }
.eyebrow::before { content: ''; height: 1px; width: 21px; background: var(--gold); flex: none; }
h1, h2 { font-family: FuguiSerif, "Songti SC", serif; font-weight: 400; }
h1 { font-size: clamp(29px, 4vw, 38px); line-height: 1.7; margin: 19px 0 14px; letter-spacing: .02em; }
.mobile-break { display: none; }
.intro-note, .hint { color: var(--muted); font-size: 12px; line-height: 1.9; }
.intro-note { font-size: 13px; }
.connection { border-top: 1px solid var(--line); padding: 14px 0 0; }
#shareMsg { margin: 0; font-size: 13px; line-height: 1.9; white-space: pre-line; overflow-wrap: anywhere; }
.connection-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.connection-actions:has(a[hidden]):has(button[hidden]) { display: none; }
.availability { color: var(--muted); background: var(--sage); border-left: 2px solid #9da98e; padding: 13px 17px; font-size: 12px; line-height: 1.9; margin: 18px 0 0; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 650px) minmax(0, 220px); gap: 70px; align-items: start; }
form, fieldset { min-width: 0; }
fieldset { border: 0; padding: 0; margin: 0; }
.editor-section { padding: 32px 0 30px; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 25px; }
.section-heading>span { font: 13px/1 FuguiSerif, "Songti SC", serif; color: var(--gold); }
.section-heading h2 { margin: 0; font-size: 22px; line-height: 1.6; }
.field { margin-top: 23px; }
.field:first-of-type { margin-top: 0; }
label { display: block; font-size: 14px; line-height: 1.8; }
.required, .optional { font-size: 10px; margin-left: 10px; font-weight: 400; color: var(--muted); }
.field .hint { margin: 5px 0 9px; }
input:not([type=checkbox]), textarea, select { width: 100%; max-width: 100%; display: block; padding: 12px 13px; min-height: 48px; color: var(--ink); background: #fcfcf8; border: 1px solid #cbd3c3; border-radius: 4px; font-size: 15px; line-height: 1.8; }
textarea { resize: vertical; }
select { text-overflow: ellipsis; padding-right: 30px; }
.field label+input, .field label+textarea, .field label+select { margin-top: 9px; }
input:disabled, textarea:disabled, select:disabled { opacity: .65; }
.hexagram { background: var(--sage); border-radius: 4px; padding: 17px 20px; margin-top: 20px; }
.hexagram .eyebrow { margin: 0; font-size: 10px; }
.hexagram p:last-child { margin: 10px 0 0; font: 16px/1.9 FuguiSerif, "Songti SC", serif; overflow-wrap: anywhere; }
.text-button { border: 0; padding: 10px 0; min-height: 44px; background: transparent; color: var(--forest); font-size: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 5px; }
.writing-note { position: sticky; top: 30px; margin-top: 40px; border-top: 1px solid var(--line); padding-top: 18px; }
.writing-note>p:not(.eyebrow) { font: 18px/1.9 FuguiSerif, "Songti SC", serif; }
.writing-note ul { font-size: 12px; line-height: 2; color: var(--muted); padding-left: 16px; }
.writing-note li { margin: 12px 0; }
.text-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 12px; }
.submit-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 15px; padding: 25px 0; }
.button { border: 1px solid var(--forest); border-radius: 4px; background: var(--forest); color: var(--paper); min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; font-size: 13px; line-height: 1.8; cursor: pointer; text-align: center; }
.button.secondary { color: var(--forest); background: transparent; border-color: #bcc7b1; }
.button:hover:not(:disabled) { filter: brightness(.95); }
.button:disabled { opacity: .45; cursor: default; }
.preview-panel, .result-panel { max-width: 700px; margin: 35px auto; }
.preview-panel>h2, .result-panel>h2 { font-size: 27px; line-height: 1.7; }
#sharePreview { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 15px 0 25px; overflow-wrap: anywhere; }
#sharePreview h3 { font: 400 23px/1.8 FuguiSerif, "Songti SC", serif; }
#sharePreview h4 { font-size: 12px; font-weight: 500; color: var(--muted); margin: 24px 0 8px; }
#sharePreview p { font-size: 14px; line-height: 2; white-space: pre-wrap; margin: 0; }
.consent { display: flex; align-items: flex-start; gap: 11px; margin: 22px 0; font-size: 12px; line-height: 2; }
.consent input { flex: none; width: 17px; height: 17px; margin: 3px 0 0; accent-color: var(--forest); }
.preview-actions, .result-actions { display: flex; flex-wrap: wrap; gap: 12px; }
#shareResultNote { font-size: 14px; line-height: 2; color: var(--muted); white-space: pre-line; }
.result-actions { margin-top: 25px; }
footer { max-width: 1000px; width: calc(100% - 48px); border-top: 1px solid var(--line); margin: 50px auto 0; padding: 25px 0 35px; font-size: 11px; color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 767px) {
  .site-header { padding: 12px 20px; gap: 10px; }
  .brand { gap: 11px; }
  .brand img { width: 56px; height: 34px; }
  .brand>span { padding-left: 11px; font-size: 11px; }
  main { width: calc(100% - 40px); }
  .intro { padding: 32px 0 18px; }
  h1 { font-size: 29px; line-height: 1.8; }
  .mobile-break { display: block; }
  .editor-layout { display: flex; flex-direction: column; gap: 0; }
  form { width: 100%; }
  .editor-section { padding: 28px 0; }
  .section-heading { margin-bottom: 20px; }
  .section-heading h2 { font-size: 21px; }
  input:not([type=checkbox]), textarea, select { font-size: 16px; }
  .writing-note { position: static; margin-top: 15px; width: 100%; }
  .writing-note>p:not(.eyebrow) { font-size: 17px; }
  .submit-bar { align-items: stretch; }
  .submit-bar .hint { width: 100%; margin: 0; }
  .submit-bar .button { width: 100%; }
  .preview-actions { flex-wrap: nowrap; }
  .preview-actions .button { padding-inline: 13px; flex: 1; }
  footer { width: calc(100% - 40px); margin-top: 30px; }
}
