@charset "UTF-8";
/* 花名测本地演示：纸色、墨色与朱砂色构成统一界面。 */
:root{--paper:#f7f5ef;--surface:#fffef9;--ink:#27392f;--muted:#747b71;--line:#dcded2;--accent:#9f4b36;--green:#3f6150;--soft:#eaf0e7;--serif:"STSong","Songti SC","SimSun",serif;--sans:"Microsoft YaHei","PingFang SC",sans-serif}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--sans);font-size:14px;line-height:1.65}button,input,select{font:inherit}button,a,input,select,summary{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:default;opacity:.42}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #a3b59a;outline-offset:4px}button{color:inherit}a{color:inherit}input,select{min-width:0}input[type=number]{appearance:textfield}input::-webkit-inner-spin-button{appearance:none}button,summary{touch-action:manipulation}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.skip-link{position:fixed;left:16px;top:-100px;z-index:9;padding:10px;background:var(--ink);color:white}.skip-link:focus{top:10px}.site-header{height:88px;max-width:1440px;margin:auto;padding:0 5%;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line)}.brand{display:flex;gap:12px;align-items:center;text-decoration:none;font:24px var(--serif);letter-spacing:.12em}.brand-seal{font:23px var(--serif);display:grid;place-items:center;width:37px;height:39px;border:1px solid var(--accent);color:var(--accent);border-radius:3px 7px 3px 6px;transform:rotate(-3deg)}.header-actions{display:flex;gap:25px}.text-button{border:0;background:transparent;padding:8px 0;color:var(--muted);font-size:12px}.text-button:hover{color:var(--accent)}.workspace{max-width:1440px;margin:0 auto;padding:40px 5% 80px;display:grid;grid-template-columns:310px minmax(0,1fr);gap:52px;align-items:start}.input-column{position:static}.mode-switch{display:flex;border:1px solid var(--line);border-radius:5px;padding:4px;margin:0 0 25px;gap:4px;background:#efefe7}.mode-switch label{flex:1;position:relative;cursor:pointer}.mode-switch input{position:absolute;opacity:0;inset:0;width:100%;height:100%;margin:0;cursor:pointer}.mode-switch span{display:block;text-align:center;padding:10px 5px;border-radius:3px;font-size:13px;color:var(--muted)}.mode-switch input:checked+span{background:var(--surface);color:var(--ink);box-shadow:0 1px 4px #24392d12}.mode-switch input:focus-visible+span{outline:2px solid var(--green)}.field{display:flex;flex-direction:column;gap:8px;margin:0 0 18px;font-size:12px;color:#5c695b;position:relative}.field input,.field select{width:100%;height:45px;border:1px solid var(--line);background:var(--surface);border-radius:4px;padding:0 12px;color:var(--ink);transition:border-color .18s}.field input:hover,.field select:hover{border-color:#9da88f}.field input:focus,.field select:focus{border-color:var(--green);outline:2px solid #47634e17;outline-offset:0}.field input::placeholder{color:#a0a599;font-size:12px}.field-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}.field-row.name-row{grid-template-columns:minmax(0,1fr);gap:0}.name-row input{font-family:var(--serif);font-size:22px}.optional{position:absolute;right:0;top:1px;font-size:10px;color:#90988c}.field-help{color:var(--muted);font-size:11px;line-height:1.8;margin:0 0 15px}.stroke-details{font-size:11px;margin-top:-7px}.stroke-details summary{cursor:pointer;color:var(--muted);padding:6px 0}.stroke-details summary span{float:right;color:var(--green);font-size:10px}.stroke-details[open] summary{margin-bottom:9px}.stroke-fields{display:flex;flex-wrap:wrap;gap:9px}.stroke-field{display:flex;align-items:center;border:1px solid var(--line);border-radius:4px;background:var(--surface);padding:4px 6px;gap:7px}.stroke-field span{font:19px var(--serif)}.stroke-field input{width:42px;border:0;border-left:1px solid var(--line);background:transparent;text-align:center;color:var(--green);font-size:12px;padding:2px}.stroke-field.missing{border-color:var(--accent)}.stroke-field.modified{border-color:#9ba77d}.form-divider{height:1px;background:var(--line);margin:25px 0}.input-with-action{position:relative}.input-with-action input{padding-right:54px;font-size:12px}.input-with-action button{position:absolute;right:6px;top:8px;font-size:11px;padding:4px 6px;background:#eef0e8;border:0;border-radius:3px}.primary-button{width:100%;height:49px;margin-top:10px;border:1px solid var(--ink);border-radius:4px;background:var(--ink);color:#f9f8ed;font-size:13px;letter-spacing:.1em;display:flex;align-items:center;justify-content:center;gap:38px;transition:background .18s,transform .18s}.primary-button:hover{background:#3b5344;transform:translateY(-1px)}.primary-button span{font-size:18px}.input-footnote{color:#8a9083;font-size:10px;line-height:1.9;margin:16px 0 0}.form-error{color:#9e3f31;background:#f6e9e3;border-left:2px solid #ac5d48;padding:10px 12px;font-size:12px}.result-column{min-width:0;border-left:1px solid var(--line);padding-left:38px;outline:none}.report-heading{display:flex;align-items:center;justify-content:space-between;margin:0 0 24px;gap:15px}.eyebrow{font-size:10px;letter-spacing:.13em;color:var(--muted);margin:0 0 8px}.report-heading h1{font:30px/1.3 var(--serif);letter-spacing:.07em;margin:0}.body-stamp{color:var(--accent);border:1px solid #bd8b76;padding:5px 10px;font:15px var(--serif);white-space:nowrap;writing-mode:vertical-rl;letter-spacing:.13em}.stale-note{font-size:11px;color:#936a2a;padding:8px 11px;background:#f1ead9;border-radius:3px}.hexagrams{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--line);background:var(--surface);border-radius:5px;overflow:hidden}.hexagram{padding:17px 12px 14px;text-align:center;position:relative}.hexagram+.hexagram{border-left:1px solid var(--line)}.hexagram-label{font-size:10px;letter-spacing:.12em;color:var(--muted);margin-bottom:6px}.hexagram h2{font:19px/1.5 var(--serif);margin:0}.hexagram-number{font:10px/1.5 Georgia,serif;color:#969c8e;letter-spacing:.08em}.hexagram-lines{width:92px;margin:17px auto 14px;display:flex;flex-direction:column;gap:7px}.hex-line{display:flex;width:68px;height:5px;position:relative;align-self:center;gap:13px}.hex-line span{height:5px;background:var(--element);flex:1;border:1px solid var(--element-border,var(--element));border-radius:1px}.hex-line.moving:after{content:"";position:absolute;right:-14px;top:-1px;width:6px;height:6px;border:1px solid var(--accent);border-radius:50%}.hexagram-parts{font-size:10px;color:#6b7566;display:flex;justify-content:center;gap:8px;flex-wrap:wrap}.hexagram-parts b{font-weight:400;font-size:9px;border:1px solid #b8c2b0;padding:0 3px;margin-left:2px;color:var(--green)}.hexagram-parts b.use{border-color:#d6c1b0;color:#977056}.calculation{font-size:11px;margin:15px 0 0;color:var(--muted)}.calculation summary{cursor:pointer;padding:5px 0}.calculation p{margin:6px 0;line-height:1.9}.calculation[open]{padding-bottom:10px}.report-tabs{display:flex;gap:30px;border-bottom:1px solid var(--line);margin-top:24px}.report-tabs button{padding:11px 0 12px;background:none;border:0;border-bottom:2px solid transparent;margin-bottom:-1px;color:#8c9487;font-size:13px}.report-tabs button[aria-selected=true]{color:var(--ink);border-bottom-color:var(--ink)}.tab-panel{padding-top:25px;animation:appear .3s ease}.section-title{font:19px/1.5 var(--serif);margin:0 0 10px}.section-lead{font-size:12px;color:#737e6e;margin:0 0 22px;line-height:1.9}.trait-block{padding:0 0 20px;margin:0 0 20px;border-bottom:1px solid var(--line)}.trait-block h3{font-size:11px;letter-spacing:.12em;font-weight:400;color:var(--green);margin:0 0 8px;display:flex;align-items:center;gap:8px}.trait-block h3:before{content:"";width:4px;height:4px;background:#719077;transform:rotate(45deg)}.trait-block p{font:15px/2 var(--serif);margin:0;color:#3d493e}.trait-block.caution h3{color:#9b7155}.trait-block.caution h3:before{background:#b08566}.trait-block.caution p{color:#685f52}.secondary-trait{border:1px solid var(--line);border-radius:4px;margin-top:18px;background:#f2f3eb;font-size:12px}.secondary-trait summary{padding:12px 14px;cursor:pointer}.secondary-trait div{padding:0 15px 12px;color:#67735f}.secondary-trait p{margin:9px 0;line-height:1.9}.source-note{font-size:10px;color:#939989;margin:15px 0 0;line-height:1.9}.report-footer{font-size:10px;color:#969c8f;margin-top:32px;padding-top:17px;border-top:1px solid var(--line);line-height:1.9}.fortune-limit{margin-bottom:20px;font-size:12px}.fortune-limit h3{font:18px var(--serif);margin:0 0 8px}.fortune-limit p{margin:6px 0;color:#66705f;line-height:1.95}.fortune-structure{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:20px 0}.fortune-structure>div{border-top:1px solid var(--line);padding:14px 0}.fortune-structure h4{font-weight:400;font-size:11px;margin:0 0 8px;color:#8a917f}.fortune-structure p{margin:0;font-size:12px;line-height:1.9}.fortune-structure strong{font-weight:500;color:var(--green)}.years-table-wrap{overflow:auto;margin-top:22px}.years-table{width:100%;border-collapse:collapse;text-align:left;font-size:11px;min-width:550px}.years-table th{font-weight:400;font-size:10px;color:#929a88;border-bottom:1px solid var(--line);padding:10px 7px;white-space:nowrap}.years-table td{padding:13px 7px;border-bottom:1px solid #e2e4d9;vertical-align:middle}.years-table tr.selected{background:#e9eee1}.years-table tr.opposed:not(.selected){background:#f7eee5}.years-table tr[data-year]{cursor:pointer}.years-table tr[data-year]:hover{background:#edf0e5}.year-button{background:none;border:0;padding:2px 0;color:var(--ink);text-decoration:underline;text-decoration-color:#bcc7af;text-underline-offset:4px}.year-age{font-size:10px;color:#8c9480}.relationship-cell{white-space:nowrap}.event-badge{font-size:9px;color:#9c593e;border:1px solid #c6a68e;padding:2px 4px;border-radius:2px;white-space:nowrap}.year-explorer{display:grid;grid-template-columns:220px minmax(0,1fr);gap:22px;margin-top:26px;padding:24px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.nine-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-top:1px solid #cdd3c3;border-left:1px solid #cdd3c3;align-self:start}.palace{min-height:83px;border-right:1px solid #cdd3c3;border-bottom:1px solid #cdd3c3;padding:7px 3px;text-align:center;position:relative}.palace.active{background:#dfe8d5;box-shadow:inset 0 0 0 1px #91a47e}.palace.body-palace:after{content:"体";position:absolute;right:4px;top:4px;color:var(--accent);font-size:9px}.palace.center{display:flex;align-items:center;justify-content:center;color:#828d77;font:14px var(--serif);letter-spacing:.16em;line-height:2}.palace-label{font-size:10px;color:#6e7964}.palace-glyph{font-size:23px;line-height:1.4;display:block;font-family:var(--serif)}.palace-years{display:flex;gap:3px;justify-content:center;flex-wrap:wrap}.palace-years button{font:9px Georgia,serif;border:0;background:none;padding:1px;color:#6e7964}.palace-years button.active{color:#974c35;font-weight:bold;text-decoration:underline;text-underline-offset:3px}.grid-caption{font-size:9px;text-align:center;color:#929a88;margin:7px 0 0}.year-detail .detail-kicker{font-size:10px;color:#8e987f;letter-spacing:.12em;margin:0 0 5px}.year-detail h3{font:22px var(--serif);margin:0 0 11px}.year-detail .detail-text{font:14px/1.95 var(--serif);margin:12px 0;color:#52604b}.detail-evidence{padding:0;margin:0;list-style:none;font-size:11px;color:#7a836e}.detail-evidence li{padding:4px 0;border-bottom:1px solid #e5e7de}.opposition-note{font-size:11px;line-height:1.9;color:#976449;border-left:2px solid #b28763;padding-left:10px;margin-top:12px}.empty-state{min-height:560px;display:flex;align-items:center;justify-content:center;flex-direction:column;color:#7c8773}.empty-state p{font:22px var(--serif);margin:20px 0 10px}.empty-state>span{font-size:11px;color:#9aa18f}.empty-lines{width:52px;display:flex;flex-direction:column;gap:8px}.empty-lines i{height:3px;background:#c1c8b4}.empty-lines i:nth-child(2){background:linear-gradient(to right,#c1c8b4 40%,transparent 40%,transparent 60%,#c1c8b4 60%)}dialog{border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--ink);width:min(680px,calc(100% - 32px));padding:26px 30px;max-height:85vh}dialog::backdrop{background:#1e2e25a6;backdrop-filter:blur(3px)}.dialog-heading{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding-bottom:15px}.dialog-heading h2{font:23px var(--serif);margin:0}.dialog-heading button{background:none;border:0;font-size:28px;line-height:1;padding:0 5px;color:#8b9580}.rules-content{font-size:12px;line-height:1.95}.rules-content h3{font-size:13px;font-weight:500;margin:21px 0 8px}.rules-content p{margin:7px 0;color:#6f7965}.noscript{margin:30px;padding:20px;background:white}.extension-note{font-size:11px;color:#8d7858;border-left:2px solid #c6b58b;padding:4px 10px;margin:0 0 20px}
.palace-lines{height:24px;margin:5px auto 4px;display:flex;flex-direction:column;gap:4px;justify-content:center}.palace-lines .hex-line{width:32px;height:3px;gap:6px}.palace-lines .hex-line span{height:3px}
@keyframes appear{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@media(min-width:1450px){.workspace{gap:68px;grid-template-columns:325px minmax(0,1fr)}.result-column{padding-left:46px}}
@media(max-width:1050px){.workspace{padding:30px 4%;gap:28px;grid-template-columns:280px minmax(0,1fr)}.site-header{padding:0 4%}.result-column{padding-left:25px}.year-explorer{grid-template-columns:190px minmax(0,1fr);gap:16px}.palace{min-height:78px}.hexagram{padding-left:5px;padding-right:5px}.hexagram h2{font-size:17px}.hexagram-parts{gap:4px}}
@media(max-width:780px){.site-header{height:73px;padding:0 6%}.brand{font-size:22px}.brand-seal{width:31px;height:34px;font-size:20px}.header-actions{gap:18px}.text-button{font-size:11px}.workspace{display:block;padding:27px 6% 60px}.input-column{position:static}.field-row{gap:15px}.field{margin-bottom:16px}.form-divider{margin:20px 0}.input-footnote{margin-bottom:0}.result-column{border-left:0;border-top:1px solid var(--line);padding:29px 0 0;margin-top:32px}.report-heading{margin-bottom:20px}.report-heading h1{font-size:27px}.hexagram h2{font-size:18px}.hexagram-lines{margin-top:18px;margin-bottom:16px}.hexagram{padding-top:15px;padding-bottom:16px}.report-tabs{margin-top:20px}.trait-block p{font-size:15px}.year-explorer{grid-template-columns:210px minmax(0,1fr);gap:20px}.empty-state{min-height:260px}.fortune-structure{gap:15px}.years-table-wrap{margin-left:-2px;margin-right:-2px}}
@media(max-width:480px){.header-actions{gap:14px}.workspace{padding-left:5%;padding-right:5%}.hexagram h2{font-size:17px}.hex-line{width:57px}.hexagram-lines{width:76px}.hexagram-parts{font-size:9px}.hexagram-label{font-size:9px}.hexagram-number{font-size:9px}.year-explorer{grid-template-columns:1fr;gap:22px}.nine-grid-wrap{width:250px;max-width:100%;margin:0 auto}.palace{min-height:87px}.year-detail h3{font-size:24px}.year-detail .detail-text{font-size:15px}.detail-evidence{font-size:12px}.fortune-structure{grid-template-columns:1fr;gap:0}.fortune-structure>div{padding:12px 0}.fortune-structure p{font-size:12px}.report-heading .eyebrow{letter-spacing:.05em}.field-help{font-size:11px}.report-tabs{gap:27px}dialog{padding:20px}.years-table{min-width:555px}.report-footer{font-size:10px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*:before,*:after{animation:none!important;transition:none!important}}
/* 桌面三块布局：顶部和左侧表单固定在视口内，仅结果区独立滚动。 */
@media screen and (min-width:781px){
  html{height:100%;overflow:hidden}
  body{height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:hidden}
  .site-header{width:100%;height:56px;flex:0 0 56px;margin:0 auto;padding:0 5%}
  .brand{font-size:22px;gap:10px}
  .brand-seal{width:29px;height:31px;font-size:19px}
  .workspace{width:100%;flex:1;min-height:0;margin:0 auto;padding:18px 5% 16px;grid-template-columns:280px minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:32px;align-items:stretch}
  .input-column{position:static;min-height:0;max-height:100%;align-self:start;padding-top:4px}
  .mode-switch{padding:3px;margin-bottom:14px}
  .mode-switch span{padding:7px 4px}
  .field{gap:5px;margin-bottom:12px}
  .field input,.field select{height:38px;padding:0 10px}
  .name-row input{font-size:20px}
  .field-row{gap:12px}
  .field-help{font-size:10px;line-height:1.65;margin-bottom:10px}
  .form-divider{margin:14px 0}
  .primary-button{height:40px;margin-top:4px}
  .input-footnote{font-size:10px;line-height:1.65;margin-top:10px}
  .form-error{margin:7px 0;padding:7px 9px;font-size:11px;line-height:1.55}
  .input-with-action input{padding-right:53px}
  .input-with-action button{top:5px}
  .result-column{min-height:0;height:100%;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;scrollbar-gutter:stable;padding:4px 12px 20px 28px;margin-top:0;scroll-padding:16px}
  .empty-state{height:100%;min-height:0}
}
/* 较矮的桌面窗口继续压缩表单间距，保留全部输入和提交按钮。 */
@media screen and (min-width:781px) and (max-height:760px){
  .site-header{height:48px;flex-basis:48px}
  .workspace{padding-top:12px;padding-bottom:12px}
  .mode-switch{margin-bottom:10px}
  .mode-switch span{padding:5px 4px}
  .field{gap:4px;margin-bottom:9px;font-size:11px}
  .field input,.field select{height:34px}
  .name-row input{font-size:18px}
  .form-divider{margin:10px 0}
  .field-help{margin-bottom:8px;line-height:1.55}
  .primary-button{height:36px;margin-top:3px}
  .input-footnote{margin-top:8px;font-size:9px;line-height:1.6}
  .input-with-action button{top:3px}
}
@media screen and (min-width:781px) and (max-height:600px){
  .mode-switch{margin-bottom:8px}
  .mode-switch span{padding:4px}
  .field{margin-bottom:7px;gap:3px}
  .field input,.field select{height:32px}
  .form-divider{margin:8px 0}
  .field-help{margin-bottom:6px;font-size:9px;line-height:1.5}
  .input-footnote{margin-top:6px;line-height:1.5}
  .primary-button{height:34px}
}
@media screen and (max-width:780px){.site-header{height:60px}}
/* 笔画在姓名下方常显，直接编辑，不占用浮层或折叠区域。 */
.stroke-details{margin-top:0}
.stroke-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 5px}
.stroke-heading h2{margin:0;font-size:14px;line-height:1.5;font-weight:400;color:#596b58}
#stroke-summary{font-size:13px;color:var(--green);white-space:nowrap}
.stroke-editor{position:static;padding:0;border:0;background:transparent;box-shadow:none;overflow:visible;max-height:none}
.stroke-editor .field-help{margin:0 0 7px}
.stroke-fields{gap:8px}
.stroke-field{padding:4px 5px;gap:4px}
.stroke-field span{font-size:21px}
.stroke-field input{width:32px;font-size:16px}
.stroke-editor #stroke-status{margin:6px 0 0}
#stroke-status:empty{display:none}
/* 屏幕阅读字号统一增大。 */
@media screen{
  body{font-size:16px}
  .text-button{font-size:14px;color:#606d5d}
  .mode-switch span{font-size:15px}
  .field{font-size:14px;line-height:1.5;gap:4px;margin-bottom:10px}
  .field input,.field select{font-size:16px;line-height:1.4}
  .field input::placeholder{font-size:14px;color:#7b8575}
  .name-row input{font-size:21px}
  .optional{font-size:12px;color:#737f6b}
  .field-help{font-size:12px;line-height:1.6;color:#65725e;margin-bottom:8px}
  .primary-button{font-size:16px}
  .input-footnote{font-size:12px;line-height:1.6;margin-top:8px;color:#727d68}
  .form-error{font-size:13px;line-height:1.6}
  .input-with-action input{font-size:15px}
  .input-with-action button{font-size:12px}
  .eyebrow{font-size:13px;color:#707c64;letter-spacing:.05em}
  .body-stamp{font-size:17px}
  .stale-note{font-size:13px}
  .hexagram-label{font-size:13px}
  .hexagram h2{font-size:22px}
  .hexagram-number{font-size:12px;color:#727e67}
  .hexagram-parts{font-size:13px;gap:8px}
  .hexagram-parts b{font-size:11px}
  .calculation{font-size:14px;color:#66745c}
  .report-tabs button{font-size:16px}
  .section-title{font-size:22px}
  .section-lead{font-size:15px;line-height:1.8;color:#65725d}
  .trait-block h3{font-size:14px;letter-spacing:.05em}
  .trait-block p{font-size:18px;line-height:1.9}
  .secondary-trait{font-size:14px}
  .source-note,.report-footer{font-size:12px;color:#707d63;line-height:1.8}
  .fortune-limit,.fortune-limit p{font-size:15px;line-height:1.85}
  .fortune-limit h3{font-size:21px}
  .fortune-structure h4{font-size:14px;color:#738063}
  .fortune-structure p{font-size:15px;line-height:1.85}
  .years-table{font-size:14px;line-height:1.7;min-width:670px}
  .years-table th{font-size:13px;color:#6c795f}
  .year-age{font-size:12px;color:#738065}
  .event-badge{font-size:11px}
  .palace-label{font-size:12px;color:#667358}
  .palace-years button{font-size:12px;padding:2px 1px}
  .palace{min-height:94px}
  .grid-caption{font-size:12px;color:#738063}
  .year-detail .detail-kicker{font-size:13px;color:#738063;letter-spacing:.05em}
  .year-detail h3{font-size:25px}
  .year-detail .detail-text{font-size:18px;line-height:1.85}
  .detail-evidence{font-size:14px;line-height:1.7;color:#65725a}
  .opposition-note{font-size:14px;line-height:1.8}
  .extension-note{font-size:13px;line-height:1.8}
  .empty-state p{font-size:26px}
  .empty-state>span{font-size:14px;color:#7c896c}
  .rules-content{font-size:15px;line-height:1.85}
  .rules-content h3{font-size:16px}
  .rules-content p{color:#5e6c54}
}
/* 字号放大后用间距而非微小文字保持桌面表单一屏可填。 */
@media screen and (min-width:1051px){.workspace{grid-template-columns:320px minmax(0,1fr)}}
@media screen and (min-width:781px){
  .mode-switch{margin-bottom:10px}
  .mode-switch span{padding:5px 4px}
  .field{gap:3px;margin-bottom:8px}
  .form-divider{margin:10px 0}
  .primary-button{height:42px;margin-top:3px}
  .input-with-action button{top:4px}
}
@media screen and (min-width:781px) and (max-height:760px){
  .field{font-size:13.5px;line-height:1.45;margin-bottom:6px}
  .field input,.field select{height:34px}
  .name-row input{font-size:20px}
  .mode-switch{margin-bottom:8px}
  .mode-switch span{padding:4px}
  .field-help{font-size:12px;line-height:1.5;margin-bottom:6px}
  .form-divider{margin:8px 0}
  .primary-button{height:38px}
  .input-footnote{font-size:11.5px;line-height:1.5;margin-top:6px}
  .stroke-heading{margin-bottom:4px}
  .stroke-editor .field-help{margin-bottom:5px}
}
@media screen and (min-width:781px) and (max-height:600px){
  .mode-switch{margin-bottom:6px}
  .field{font-size:13px;gap:2px;margin-bottom:5px}
  .field input,.field select{height:32px}
  .form-divider{margin:6px 0}
  .stroke-field{padding-top:3px;padding-bottom:3px}
  .primary-button{height:36px}
}
@media screen and (min-width:781px) and (max-height:540px){.input-footnote{display:none}}
@media screen and (max-width:480px){
  .hexagram h2{font-size:20px}
  .hexagram-parts{font-size:12px;gap:5px}
  .name-row input{font-size:21px}
}
/* 手机端明确说明表格的点击与横向滑动操作。 */
.years-table-hint{display:none}
@media screen and (max-width:780px){
  .years-table-hint{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;margin:20px 0 8px;font-size:13px;line-height:1.7;color:var(--green)}
  .years-table-hint .hint-secondary{font-size:12px;color:#707d63}
  .years-table-wrap{margin-top:0}
}
