/* Inset groups, clear hierarchy and predictable sheets for the six-line tool. */
@media screen {
  body.bushi-refined {
    --paper:#101214;--card:#1c1f22;--ink:#f4f5f6;--ink2:#c0c6cb;--ink3:#929ba2;
    --hair:#ffffff0d;--hair2:#ffffff1f;--cin:#a8dfd0;--cin-soft:#263b35;
    --xq-state-selected:#31443e;--xq-state-text:#e4f7ef;--xq-state-accent:#a8dfd0;
    --xq-state-surface:#252e2c;--xq-state-border:#586a63;--xq-state-focus:#a8dfd066;
    font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
    background:var(--paper);letter-spacing:0;
  }
  .bushi-refined button,.bushi-refined input,.bushi-refined select,.bushi-refined textarea { letter-spacing:0; }
  .bushi-refined button { transition:background-color .16s ease,color .16s ease,opacity .16s ease; }
  .bushi-refined button:active:not(:disabled) { opacity:.74; }
  .bushi-refined .body-pad { padding:0 20px calc(158px + env(safe-area-inset-bottom)); }
  .bushi-refined .cast-intro { padding:24px 0 22px; }
  .bushi-refined .cast-intro h1 { font-size:32px;line-height:1.2;font-weight:700;letter-spacing:-.6px; }
  .bushi-refined .cast-intro p { margin-top:8px;font-size:14px;line-height:1.5;color:var(--ink3); }
  .bushi-refined .sec-hd { margin:23px 2px 12px; }
  .bushi-refined .sec-hd .t { font-size:17px;font-weight:600;letter-spacing:0; }
  .bushi-refined .sec-hd .s { color:var(--ink3);font-size:12px; }
  html body.bushi-refined .cast-settings { gap:0;padding:0 16px;margin:0;border:0;border-radius:20px;background:var(--card); }
  html body.bushi-refined .cast-settings .time-card { padding:12px 0 14px;background:none; }
  html body.bushi-refined .cast-settings .cast-time-row { gap:4px 8px; }
  html body.bushi-refined .cast-settings .cast-time-row label { color:var(--ink2);font-size:14px; }
  html body.bushi-refined .cast-settings .mobile-now { min-height:44px;padding:0 0 0 10px;background:none;color:var(--cin);font-size:13px; }
  html body.bushi-refined .cast-settings .cast-time-row #inpTime { min-height:46px;padding:8px 12px;border:0;border-radius:10px;background:#ffffff09;font-size:16px;line-height:1.5;font-weight:400;color:var(--ink); }
  html body.bushi-refined .cast-yong-field { min-height:58px;grid-template-columns:84px minmax(0,1fr);gap:8px;border-top:1px solid var(--hair); }
  html body.bushi-refined .cast-yong-field>span { font-size:14px;color:var(--ink2); }
  html body.bushi-refined .cast-yong-field .choice-trigger { padding:7px 0 7px 8px;justify-content:flex-end;color:var(--cin);font-size:15px; }
  .bushi-refined .cast-calendar summary { min-height:48px;font-size:13px;color:var(--ink3); }
  .bushi-refined .cast-calendar-body .row,.bushi-refined .cast-calendar-body .note { font-size:13px; }
  html body.bushi-refined .cast-setup #mobileSettingsShortcut { min-height:68px;margin-top:12px;padding:12px 16px;border:0;border-radius:18px;background:var(--card); }
  html body.bushi-refined #mobileSettingsShortcut strong { font-size:15px;font-weight:500; }
  html body.bushi-refined #mobileSettingsSummary { margin-top:3px;font-size:12px;color:var(--ink3); }
  html body.bushi-refined #mobileSettingsShortcut i { color:var(--ink3);display:flex;align-items:center; }
  .bushi-refined .ui-icon { display:block;width:22px;height:22px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round; }
  html body.bushi-refined .seg { position:static;margin:24px 0 0;padding:4px;gap:4px;border:0;border-radius:13px;background:#ffffff08; }
  html body.bushi-refined .seg button { min-height:44px;font-size:14px;border-radius:10px;color:var(--ink3); }
  html body.bushi-refined .seg button.on,html body.bushi-refined .tabs button.on,html body.bushi-refined .subseg button.on { background:#3b4143!important;color:#fff!important;box-shadow:0 2px 5px #0003!important; }
  .bushi-refined .yao-list { border:0;border-radius:20px;background:var(--card);overflow:hidden;margin-top:0; }
  .bushi-refined .yao-row { grid-template-columns:44px minmax(0,1fr);gap:8px;min-height:60px;padding:0 16px;border-bottom:1px solid var(--hair); }
  .bushi-refined .yao-row .pos { font-size:15px;letter-spacing:0;font-weight:500; }
  .bushi-refined .yao-row .pos .idx { font-size:10px;margin-top:2px;color:var(--ink3); }
  .bushi-refined .yao-row .pv { display:none; }
  .bushi-refined .choice-trigger { display:flex;align-items:center;gap:12px;min-height:48px;width:100%;padding:8px 4px 8px 8px;border:0;border-radius:10px;background:transparent;color:var(--ink);font-size:16px;text-align:left;cursor:pointer; }
  .bushi-refined .choice-trigger>span:first-child { flex:1;min-width:0; }
  .bushi-refined .choice-trigger .ui-icon { width:16px;height:16px;color:var(--ink3); }
  .bushi-refined .choice-trigger.is-empty { color:var(--ink3); }
  .bushi-refined .choice-trigger:disabled { opacity:.7;cursor:default; }
  .bushi-refined .yao-row .choice-trigger { display:grid;grid-template-columns:56px minmax(72px,1fr) 16px;gap:10px; }
  .bushi-refined .line-symbol { display:flex;align-items:center;justify-content:center;width:72px;min-height:20px;flex:none;position:relative; }
  .bushi-refined .yao-row .line-symbol { width:100%; }
  .bushi-refined .line-stroke { display:flex;gap:4px;width:44px;flex:none; }
  .bushi-refined .line-symbol i { flex:1;height:5px;border-radius:2px;background:var(--ink2); }
  .bushi-refined .line-symbol.moving i { background:#e6ab8d; }
  .bushi-refined .line-symbol.empty i { background:#ffffff23; }
  .bushi-refined .line-motion { position:absolute;left:calc(50% + 27px);top:50%;transform:translateY(-50%);width:16px;height:16px;fill:none;stroke:#e6ab8d;stroke-width:1.8;stroke-linecap:round; }
  .bushi-refined #scrQi .cta { margin-top:14px;gap:12px; }
  .bushi-refined .cta .btn-ghost { border:0;border-radius:12px;background:#ffffff05;color:var(--ink2);font-size:13px; }
  .bushi-refined #formStatus { height:1px;width:1px;overflow:hidden;position:absolute;clip-path:inset(50%); }
  html body.bushi-refined .btn-primary { background:var(--cin);color:#11261f;min-height:50px;border:0;border-radius:14px;font-weight:600;letter-spacing:0; }
  html body.bushi-refined .btn-primary:disabled { background:#2c3134;color:#899299; }
  html body.bushi-refined #mobileCastDock { bottom:calc(66px + env(safe-area-inset-bottom));padding:9px 20px 12px;gap:7px;border:0;background:#101214eb;box-shadow:none;backdrop-filter:blur(22px);-webkit-backdrop-filter:blur(22px); }
  .bushi-refined #mobileCastStatus { font-size:12px;min-height:18px;color:var(--ink3); }
  html body.bushi-refined #mobileNav { grid-template-columns:repeat(5,minmax(0,1fr));padding:5px 8px calc(5px + env(safe-area-inset-bottom));min-height:66px;border-top:1px solid #ffffff0c;background:#1a1d20eb;backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px); }
  html body.bushi-refined #mobileNav button { min-height:55px;border-radius:12px;gap:5px;background:transparent!important;color:var(--ink3);font-size:10px;letter-spacing:0; }
  html body.bushi-refined #mobileNav button[aria-current="page"] { color:var(--cin)!important; }
  .bushi-refined .mobile-nav-icon { font-size:0;line-height:1; }
  .bushi-refined .mobile-nav-icon .ui-icon { width:23px;height:23px; }
  .bushi-refined .coin-panel,.bushi-refined .number-panel { margin-top:16px;padding:20px 16px;border:0;border-radius:20px; }
  .bushi-refined .coin { background:#303a35;color:#cee8da;border-color:#536659;border-radius:50%;box-shadow:inset 0 0 0 5px #1d2924; }
  .bushi-refined .coin.back { background:#a3c5ac;color:#15271d; }
  .bushi-refined .subseg { border-radius:12px;padding:4px;background:#121416; }
  .bushi-refined .subseg button { border-radius:9px;font-size:13px; }
  .bushi-refined .number-preview { padding:14px;border:0;background:#ffffff06;border-radius:12px;font-size:13px; }
  .bushi-refined .hint { font-size:13px;line-height:1.7; }
  .bushi-refined #scrParams { background:var(--paper); }
  .bushi-refined .mobile-params-body { padding:0 20px 28px; }
  .bushi-refined .mobile-param-intro { font-size:14px;color:var(--ink3);line-height:1.7; }
  .bushi-refined .case-details { border:0;border-radius:20px;overflow:hidden;background:var(--card); }
  .bushi-refined #scrParams .case-details>summary { display:none; }
  .bushi-refined .case-body { padding:18px; }
  .bushi-refined .field { gap:8px; }
  .bushi-refined .field>span { font-size:14px;letter-spacing:0;font-weight:500; }
  .bushi-refined .field textarea,.bushi-refined .field input,.bushi-refined .field>.choice-trigger { background:#ffffff06;border:1px solid var(--hair);border-radius:12px;padding:12px;font-size:16px; }
  .bushi-refined .field-note { font-size:13px;line-height:1.75; }
  .bushi-refined .topbar { background:var(--paper);border:0;padding:0 20px; }
  .bushi-refined .topbar .title { font-family:inherit;font-size:18px;letter-spacing:0; }
  .bushi-refined .topbar .back { color:var(--cin);font-size:15px; }
  .bushi-refined .topbar .side .chip { font-size:11px; }
  .bushi-refined .tabs { padding:5px;background:#232629;border:0;border-radius:13px;margin:6px 20px;width:auto;gap:4px; }
  .bushi-refined .tabs button { border:0;background:none;min-height:44px;border-radius:9px;font-size:14px;color:var(--ink3);letter-spacing:0; }
  .bushi-refined .mobile-result-tools { gap:4px;padding:10px 20px 0; }
  .bushi-refined .mobile-result-tools button { border:0;font-size:13px;color:var(--cin); }
  .bushi-refined .panel { padding:16px 20px calc(90px + env(safe-area-inset-bottom)); }
  .bushi-refined .panel .card { border:0;border-radius:20px; }
  .bushi-refined .gua-cols { gap:12px; }
  .bushi-refined .gua-col { border:0;background:var(--card);border-radius:18px; }
  .bushi-refined .gua-col.ben { background:#24302b;border:0;box-shadow:inset 0 0 0 1px #a8dfd022; }
  .bushi-refined .gname { letter-spacing:0;font-size:15px; }
  .bushi-refined .tag.shi,.bushi-refined .ty-rail .ty.ti,.bushi-refined .gtab button.on { background:#31443e;color:#d9f3e7;border:0; }
  .bushi-refined .evidence-overview,.bushi-refined .evidence-grid { gap:10px; }
  .bushi-refined .evidence-block,.bushi-refined .gao { background:#ffffff04;border:0;border-radius:14px; }
  .bushi-refined .evidence-list,.bushi-refined .tkb { font-size:14px;line-height:1.8; }
  .bushi-refined .evidence-hd { font-size:12px; }
  .bushi-refined .meta2 { padding:18px;gap:16px; }
  .bushi-refined .meta-left .t1 { font-size:17px; }
  .bushi-refined .gz-col .h { font-size:12px; }
  .bushi-refined .rel th,.bushi-refined table.main th { background:#252a2d; }
  .bushi-refined table.main td { height:66px; }
  .bushi-refined .tbl-wrap { border:0;border-radius:18px; }
  .bushi-refined details.tk,.bushi-refined details.evidence-details { border-color:var(--hair); }
  .bushi-refined details.tk>summary,.bushi-refined details.evidence-details>summary { min-height:48px;padding-block:14px;font-size:14px;line-height:1.5; }
  .bushi-refined .mask { z-index:300;background:#0009;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px); }
  body.bushi-refined.sheet-open .xunq-site-header { pointer-events:none; }
  html body.bushi-refined .sheet { z-index:310;display:flex;flex-direction:column;max-height:86dvh;width:100%;max-width:620px;padding:0;background:#222629;border:1px solid #ffffff15;border-bottom:0;border-radius:26px 26px 0 0;box-shadow:0 -12px 64px #0005;overflow:hidden; }
  .bushi-refined .sheet .grip { flex:none;width:34px;height:5px;background:#737b80;border-radius:4px;margin:10px auto 0; }
  .bushi-refined .sheet:not(.on) { pointer-events:none; }
  .bushi-refined .sheet-head { display:flex;align-items:center;gap:16px;flex:none;padding:18px 22px 20px;border-bottom:1px solid var(--hair); }
  .bushi-refined .sheet-head>div { flex:1;min-width:0; }
  .bushi-refined .sheet .cat { color:var(--ink3);font-size:12px;letter-spacing:0;margin:0 0 5px; }
  .bushi-refined .sheet .tt { font-family:inherit;font-size:22px;line-height:1.3;letter-spacing:0;margin:0; }
  html body.bushi-refined .sheet .close { position:static;display:grid;place-items:center;width:44px;min-width:44px;height:44px;min-height:44px;padding:0;margin:0;border:0;border-radius:50%;background:#ffffff0d;color:var(--ink2); }
  .bushi-refined .sheet .bd { min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:20px 22px calc(26px + env(safe-area-inset-bottom));font-size:15px;line-height:1.85; }
  .bushi-refined .sheet .bd p+p { margin-top:14px; }
  .bushi-refined .sheet .bd .subblk { margin-top:20px;padding-top:16px;border-top:1px solid var(--hair);font-size:15px;color:var(--ink); }
  .bushi-refined .sheet .bd .kong-note { color:var(--ink2);background:#ffffff05;font-size:13px; }
  .bushi-refined .archive-empty { text-align:center;padding:28px 16px;margin-top:16px;background:#ffffff05;border-radius:16px;font-size:14px; }
  .bushi-refined .archive-item { padding:10px 0;gap:14px; }
  .bushi-refined .archive-open b { font-size:16px;letter-spacing:0;font-family:inherit; }
  .bushi-refined .archive-open span { font-size:12px;line-height:1.7;white-space:normal; }
  .bushi-refined .archive-delete { border:0;background:#ffffff07;color:#efa9a0;border-radius:50%; }
  .bushi-refined .archive-actions,.bushi-refined .share-actions { gap:10px; }
  .bushi-refined .archive-actions .btn-ghost,.bushi-refined .share-actions .btn-ghost { min-height:48px;border:0;background:#ffffff09;color:var(--cin);font-size:14px;border-radius:13px; }
  .bushi-refined .archive-actions .archive-clear { color:#efa9a0; }
  .bushi-refined .share-summary { max-height:220px;overflow:auto;border:0;background:#15181a;border-radius:14px;font-size:13px;padding:16px; }
  .bushi-refined .share-note { font-size:12px; }
  .bushi-refined .share-preview { margin-top:16px;border-radius:14px;background:#ffffff05;overflow:hidden; }
  .bushi-refined .share-preview summary { display:flex;align-items:center;min-height:48px;padding:10px 14px;font-size:14px;color:var(--ink2);cursor:pointer; }
  .bushi-refined .share-preview .share-summary { max-height:200px;margin:0;border-radius:0; }
  .bushi-refined .share-actions { display:flex;flex-direction:column;gap:1px;overflow:hidden;border-radius:14px;background:#ffffff05; }
  .bushi-refined .share-actions .btn-ghost { display:flex;align-items:center;gap:14px;justify-content:flex-start;padding:12px 16px;min-height:52px;border-radius:0;background:transparent;border-bottom:1px solid var(--hair); }
  .bushi-refined .share-actions .btn-ghost:last-child { border-bottom:0; }
  .bushi-refined .archive-delete { display:grid;place-items:center; }
  .bushi-refined .choice-sheet { position:fixed;inset:auto 0 0;margin:0 auto;width:100%;max-width:560px;max-height:88dvh;padding:0;border:1px solid #ffffff16;border-bottom:0;border-radius:26px 26px 0 0;background:#222629;color:var(--ink);overflow:hidden;box-shadow:0 -12px 64px #0005; }
  .bushi-refined .choice-sheet::backdrop { background:#0009;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px); }
  .bushi-refined .choice-sheet[open] { display:flex;flex-direction:column;animation:sheet-arrive .2s ease-out; }
  .bushi-refined .choice-sheet header { display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid var(--hair); }
  .bushi-refined .choice-sheet h2 { font-size:19px;font-weight:600;margin:0; }
  .bushi-refined .choice-cancel { min-height:44px;border:0;background:transparent;color:var(--cin);font-size:16px;padding:8px 0 8px 14px; }
  .bushi-refined .choice-reference { display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none;min-height:48px;padding:10px 22px;border:0;border-bottom:1px solid var(--hair);background:transparent;color:var(--cin);font-size:13px;text-align:left; }
  .bushi-refined .choice-reference .ui-icon { width:16px;height:16px; }
  .bushi-refined .choice-options { display:flex;flex-direction:column;gap:4px;padding:10px 12px calc(18px + env(safe-area-inset-bottom));overflow:auto;overscroll-behavior:contain; }
  .bushi-refined .choice-option { display:flex;align-items:center;gap:16px;min-height:58px;padding:12px;border:0;border-radius:14px;background:transparent;color:var(--ink);font-size:17px;text-align:left; }
  .bushi-refined .choice-option[aria-pressed="true"] { background:#34483f;color:#e4f7ed; }
  .bushi-refined .choice-option .choice-label { flex:1; }
  .bushi-refined .choice-option small { display:block;margin-top:3px;font-size:12px;color:var(--ink3); }
  .bushi-refined .choice-option .check-icon { color:var(--cin);visibility:hidden; }
  .bushi-refined .choice-option[aria-pressed="true"] .check-icon { visibility:visible; }
  .bushi-refined .toast { background:#d4ece2;color:#13271f;font-size:14px;letter-spacing:0; }
  .bushi-refined .compliance-footer { display:none; }
  body.bushi-refined.choice-open { overflow:hidden; }
  .bushi-refined .reference-intro { font-size:14px;color:var(--ink2);margin:0 0 16px;line-height:1.7; }
  .bushi-refined .reference-search { width:100%;min-height:46px;margin-bottom:16px;padding:10px 12px;background:#ffffff07;border:1px solid var(--hair);border-radius:12px;color:var(--ink);font-size:16px; }
  .bushi-refined .reference-topics { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px; }
  .bushi-refined .reference-topic { min-height:76px;padding:12px;border:0;border-radius:14px;background:#ffffff07;color:var(--ink);text-align:left; }
  .bushi-refined .reference-topic strong { display:block;font-size:15px;font-weight:500; }
  .bushi-refined .reference-topic span { display:block;font-size:12px;color:var(--ink3);line-height:1.6;margin-top:4px; }
  .bushi-refined .reference-back { min-height:44px;border:0;background:none;color:var(--cin);font-size:14px;margin:0 0 12px; }
  .bushi-refined .reference-primary { margin-top:12px;padding:16px;border-radius:16px;background:#ffffff06; }
  .bushi-refined .reference-primary-head { display:flex;align-items:center;justify-content:space-between;gap:10px; }
  .bushi-refined .reference-primary h3 { font-size:17px; }
  .bushi-refined .reference-primary p { font-size:14px;color:var(--ink2);line-height:1.8;margin-top:6px; }
  .bushi-refined .reference-apply,.bushi-refined .reference-button { min-height:44px;padding:8px 12px;background:#34483f;border:0;border-radius:10px;font-size:13px;color:#def3e8; }
  .bushi-refined .reference-subtitle { margin:22px 0 10px;font-size:16px;color:var(--ink); }
  .bushi-refined .reference-notes { padding-left:20px;font-size:14px;color:var(--ink2);line-height:1.85; }
  .bushi-refined .reference-notes li+li { margin-top:9px; }
  @keyframes sheet-arrive { from { opacity:0;transform:translateY(18px); } to { opacity:1;transform:translateY(0); } }
}
@media screen and (min-width:800px) {
  .bushi-refined .app { max-width:1100px;padding:0 34px; }
  .bushi-refined .body-pad { padding-inline:0; }
  .bushi-refined .cast-intro { padding:34px 0 30px; }
  .bushi-refined .cast-intro h1 { font-size:36px; }
  .bushi-refined .cast-workspace { gap:32px;grid-template-columns:minmax(280px,.9fr) minmax(0,1.1fr); }
  .bushi-refined #yaoHd { margin:0 0 14px; }
  html body.bushi-refined #scrQi .cast-setup>.sec-hd:first-child { display:none; }
  .bushi-refined .yao-row { min-height:66px; }
  html body.bushi-refined #mobileNav { width:650px;max-width:calc(100% - 48px);bottom:16px;border:1px solid #ffffff13;border-radius:24px;padding:6px 12px; }
  html body.bushi-refined #mobileNav button { flex-direction:column;gap:5px;font-size:11px; }
  html body.bushi-refined #mobileCastDock { position:static;left:auto;right:auto;bottom:auto;transform:none;flex-direction:column;align-items:stretch;width:100%;max-width:none;margin:22px 0 0;border:0;border-radius:16px;padding:12px 0;background:transparent;backdrop-filter:none; }
  html body.bushi-refined #mobileCastDock .btn-primary { width:100%; }
  .bushi-refined #mobileCastStatus { text-align:left; }
  .bushi-refined .tabs { max-width:560px;width:100%;margin:10px auto; }
  .bushi-refined .panel { padding-inline:0; }
  html body.bushi-refined .sheet { top:50%;bottom:auto;max-height:min(80dvh,760px);border:1px solid #ffffff16;border-radius:26px;transform:translateY(calc(-50% + 24px));opacity:0;transition:opacity .18s ease,transform .18s ease; }
  html body.bushi-refined .sheet.on { transform:translateY(-50%);opacity:1; }
  .bushi-refined .sheet .grip { display:none; }
  .bushi-refined .sheet-head { padding:22px 26px; }
  .bushi-refined .sheet .bd { padding:22px 26px 28px; }
  .bushi-refined .choice-sheet { inset:50% 0 auto;transform:translateY(-50%);border:1px solid #ffffff16;border-radius:24px;max-height:80dvh; }
  .bushi-refined .choice-sheet[open] { animation:none; }
  .bushi-refined .mobile-params-body { max-width:680px;width:100%;margin:auto;padding-inline:0; }
}
@media screen and (max-width:359px) {
  .bushi-refined .body-pad,.bushi-refined .panel,.bushi-refined .mobile-params-body { padding-left:14px;padding-right:14px; }
  .bushi-refined .cast-intro h1 { font-size:29px; }
  html body.bushi-refined .seg button { font-size:12px; }
  .bushi-refined .yao-row { padding-inline:12px; }
  .bushi-refined .choice-trigger { font-size:15px;gap:9px; }
  .bushi-refined .sheet .bd { padding-inline:18px; }
  html body.bushi-refined #mobileNav button { font-size:10px; }
}
@media(prefers-reduced-motion:reduce) {
  .bushi-refined * { scroll-behavior:auto!important;animation:none!important;transition:none!important; }
}
@media(forced-colors:active) {
  .bushi-refined button:focus-visible { outline:2px solid Highlight!important; }
  .bushi-refined .choice-option[aria-pressed="true"] { outline:2px solid Highlight; }
  .bushi-refined .line-symbol i { background:CanvasText; }
}
/* Keep each hexagram line on one shared axis; labels occupy their own row. */
.bushi-refined .yao-stack{display:grid;grid-template-rows:8px 18px;gap:7px;align-content:center;justify-items:center;width:100%;min-height:44px}
.bushi-refined .yao-stack .yaoline{width:34px;height:8px;margin:0;flex:none}
.bushi-refined .yao-tags{display:flex;align-items:center;justify-content:center;gap:2px;min-height:18px;white-space:nowrap}
.bushi-refined .yao-tags .tag{margin:0;font-size:9px;padding:0 2px;line-height:13px}
.bushi-refined button.tap-cell.c-wood,.bushi-refined #panSub.c-wood,.bushi-refined .tap-cell.s-qinglong{color:var(--wood)}
.bushi-refined button.tap-cell.c-fire,.bushi-refined #panSub.c-fire,.bushi-refined .tap-cell.s-zhuque{color:var(--fire)}
.bushi-refined button.tap-cell.c-earth,.bushi-refined #panSub.c-earth,.bushi-refined .tap-cell.s-gouchen{color:var(--earth)}
.bushi-refined button.tap-cell.c-metal,.bushi-refined #panSub.c-metal,.bushi-refined .tap-cell.s-baihu{color:var(--metal)}
.bushi-refined button.tap-cell.c-water,.bushi-refined #panSub.c-water,.bushi-refined .tap-cell.s-xuanwu{color:var(--water)}
.bushi-refined .tap-cell.s-tengshe{color:#d7ad82}
/* All six columns remain visible; secondary labels never displace the line axis. */
@media screen {
  .bushi-refined table.main { width:100%;min-width:0;table-layout:fixed; }
  .bushi-refined .tbl-wrap::before { display:none; }
  .bushi-refined table.main th { white-space:nowrap; }
  .bushi-refined table.main td { position:relative;height:76px;padding:8px 2px;white-space:nowrap; }
  .bushi-refined table.main td>.tap-cell { position:absolute;top:8px;left:2px;width:calc(100% - 4px);min-width:0;min-height:44px;height:44px;padding:2px;white-space:nowrap; }
  .bushi-refined table.main td>.sub2 { position:absolute;bottom:7px;left:0;right:0;height:16px;line-height:16px;margin:0;text-align:center; }
  .bushi-refined table.main td>.tag { position:absolute;bottom:8px;left:50%;transform:translateX(-50%);margin:0;line-height:14px; }
  .bushi-refined table.main td:has(>.sub2)>.tag { left:auto;right:3px;transform:none; }
  .bushi-refined table.main td:has(>.tag)>.sub2 { padding-right:14px; }
  .bushi-refined table.main td>.empty-v { position:absolute;top:8px;left:0;right:0;height:44px;display:flex;align-items:center;justify-content:center; }
  .bushi-refined table.main .yao-stack { height:60px;min-height:60px;grid-template-rows:44px 16px;gap:0;align-items:center; }
  .bushi-refined table.main .yao-tags { gap:1px;min-height:16px; }
  .bushi-refined table.main .yao-tags .tag { padding:0 1px; }
  .bushi-refined table.main .yao-tags .tag.move { font-size:13px;line-height:14px;padding:0; }
  .bushi-refined .wx-row { display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px 4px;padding:12px; }
  .bushi-refined .wx-row>.lbl { grid-column:1 / -1; }
  .bushi-refined .wx-row .it { display:flex;align-items:center;justify-content:center;gap:4px;min-width:0;white-space:nowrap; }
  .bushi-refined .wx-row .dot { width:6px;height:6px;flex:none;margin:0; }
  .bushi-refined .wx-row .tap-cell { min-width:0;min-height:44px;padding:2px 0;white-space:nowrap; }
}
@media screen and (max-width:359px) {
  .bushi-refined table.main .yao-tags .tag { font-size:8px; }
  .bushi-refined table.main .yao-tags .tag.move { font-size:11px; }
}
html body.bushi-refined #mobileNav button:is([aria-current="page"],[aria-expanded="true"]){background:#ffffff0d!important;color:#d3e8dc!important;font-weight:600}
/* Six casting families share the same picker and native form state. */
.bushi-refined .method-family { display:grid;gap:8px;margin:18px 0 12px; }
.bushi-refined .seg[hidden],.bushi-refined .seg button[hidden],.bushi-refined .subseg[hidden] { display:none!important; }
.bushi-refined #extraMethodPanel[hidden],.bushi-refined #extraMethodPanel section[hidden] { display:none!important; }
.bushi-refined #extraMethodPanel { padding:18px;margin:0 0 18px;min-width:0; }
.bushi-refined #extraMethodPanel h3 { font-size:15px;margin:20px 0 10px; }
.bushi-refined #extraMethodPanel .field { min-width:0;margin-bottom:12px; }
.bushi-refined #extraMethodPanel input { width:100%;min-width:0;min-height:48px;box-sizing:border-box; }
.bushi-refined #extraMethodPanel .number-fields { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
.bushi-refined #extraMethodPanel .number-fields>.field { display:grid;grid-template-rows:auto 1fr;align-items:stretch; }
.bushi-refined #extraMethodPanel .choice-trigger { width:100%;min-width:0;height:auto;min-height:48px; }
.bushi-refined #extraMethodPanel .number-fields .choice-trigger { align-self:stretch;box-sizing:border-box; }
.bushi-refined #extraMethodPanel .choice-trigger>span { min-width:0;white-space:normal;line-height:1.5;text-align:left; }
.bushi-refined .stroke-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px;margin:16px 0; }
.bushi-refined .stroke-field>small { font-size:11px;line-height:1.5;color:var(--ui-muted,#aeb9b7); }
.bushi-refined #extraMethodPreview { white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8; }
.bushi-refined #extraMethodPreview.error { color:#eeb7a2; }
.bushi-refined .composition-preview { margin-top:18px;padding-top:16px;border-top:1px solid var(--hair); }
.bushi-refined .composition-status { font-size:14px;line-height:1.6;color:var(--cin);margin:0 0 12px; }
.bushi-refined .composition-table { width:100%;table-layout:fixed;border-collapse:collapse;font-size:13px;text-align:center; }
.bushi-refined .composition-table th,.bushi-refined .composition-table td { height:36px;padding:5px 2px;vertical-align:middle;border-bottom:1px solid var(--hair);text-align:center; }
.bushi-refined .composition-table thead th { color:var(--ink3);font-size:12px;font-weight:400; }
.bushi-refined .composition-table tbody th { font-weight:400;color:var(--ink2); }
.bushi-refined .composition-line { display:flex;gap:4px;width:40px;margin:auto; }
.bushi-refined .composition-line i { flex:1;height:5px;border-radius:2px;background:var(--ink2); }
.bushi-refined .composition-table .is-moving .composition-line i { background:#e6ab8d; }
.bushi-refined .composition-motion { white-space:nowrap;color:var(--ink3); }
.bushi-refined .is-moving .composition-motion { color:#e6ab8d; }
.bushi-refined .composition-legend { margin:12px 0 0; }
@media screen and (max-width:359px){
 .bushi-refined #extraMethodPanel .text-method-settings { grid-template-columns:minmax(0,1fr);gap:0; }
}
@media screen and (max-width:799px){
 html body.bushi-refined #mobileNav{left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));bottom:calc(8px + env(safe-area-inset-bottom));width:auto;max-width:520px;margin:0 auto;padding:5px;min-height:64px;border:0;border-radius:24px;transform:none;background:#1a2421;backdrop-filter:none;-webkit-backdrop-filter:none;background-clip:padding-box;box-shadow:0 8px 28px #0005}
 html body.bushi-refined #mobileNav button{border-radius:19px;min-height:54px;font-size:11px;gap:4px}
 html body.bushi-refined #mobileNav .ui-icon{width:20px;height:20px}
 html body.bushi-refined #mobileCastDock{bottom:calc(80px + env(safe-area-inset-bottom))}
}
