
  :root{
    --ink:#0d0a08;
    --lacquer:#7a2e24;
    --gold:#c9a15a;
    --ash:#9a8f80;
    --paper:#efe3cd;
  }
  *{box-sizing:border-box;margin:0;padding:0}
  html,body{height:100%;overflow:hidden;background:var(--ink);color:#ece2d3;
    font-family:"Songti SC","Noto Serif SC","Source Han Serif SC","SimSun",serif;
    -webkit-font-smoothing:antialiased}
  #c{position:fixed;inset:0;display:block;width:100%;height:100%;touch-action:none}

  .grain{position:fixed;inset:0;pointer-events:none;z-index:3;opacity:.28;mix-blend-mode:overlay;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E")}
  .vignette{position:fixed;inset:0;pointer-events:none;z-index:2;
    background:radial-gradient(120% 95% at 50% 38%,rgba(0,0,0,0) 38%,rgba(0,0,0,.68) 100%)}

  .ui{position:fixed;inset:0;z-index:5;pointer-events:none;display:flex;flex-direction:column;justify-content:space-between;
    padding:18px 16px calc(14px + env(safe-area-inset-bottom))}
  .top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
  .law{display:block;font-size:11px;letter-spacing:.22em;color:rgba(154,143,128,.9);margin-bottom:5px}
  #hallName{font-size:20px;font-weight:400;letter-spacing:.14em;color:#e8cf9e}
  .sub{margin-top:7px;font-size:12px;letter-spacing:.1em;color:rgba(196,185,168,.76);line-height:1.7}

  .right{display:flex;flex-direction:column;align-items:flex-end;gap:10px}
  #music{pointer-events:auto;width:44px;height:44px;display:grid;place-items:center;
    border:1px solid rgba(201,161,90,.32);background:rgba(18,14,11,.55);border-radius:2px;
    color:rgba(201,161,90,.9);cursor:pointer;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
  #music svg{width:18px;height:18px}
  .rec{text-align:right;font-size:11px;letter-spacing:.14em;color:rgba(154,143,128,.9);line-height:1.9}
  .rec b{font-weight:400;color:#e0c184;font-variant-numeric:tabular-nums}

  .bottom{display:flex;flex-direction:column;gap:11px;align-items:center}
  .acts{pointer-events:auto;width:100%;max-width:460px;display:grid;grid-template-columns:repeat(4,1fr);gap:7px}
  .act{height:46px;border:1px solid rgba(201,161,90,.38);background:rgba(18,14,11,.62);color:#cbc0ae;
    font-family:inherit;font-size:13px;letter-spacing:.04em;border-radius:2px;cursor:pointer;white-space:nowrap;
    -webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);
    transition:color .28s,border-color .28s,background .28s;-webkit-tap-highlight-color:transparent}
  .act:hover{border-color:rgba(201,161,90,.66);color:#ece2d0}
  .act[aria-pressed="true"]{color:#f4e0b4;border-color:rgba(201,161,90,.95);background:rgba(74,32,24,.75)}
  .act:focus-visible,#music:focus-visible,.sheet button:focus-visible{outline:1px solid #c9a15a;outline-offset:2px}

  .toast{position:fixed;left:50%;bottom:calc(116px + env(safe-area-inset-bottom));transform:translateX(-50%) translateY(6px);
    z-index:6;pointer-events:none;font-size:12px;letter-spacing:.14em;color:#e7d3a8;
    padding:8px 16px;border:1px solid rgba(201,161,90,.28);border-radius:2px;background:rgba(14,11,9,.72);
    opacity:0;transition:opacity .5s ease,transform .5s ease;white-space:nowrap}
  .toast.on{opacity:1;transform:translateX(-50%) translateY(0)}

  .hint{position:fixed;left:50%;bottom:calc(112px + env(safe-area-inset-bottom));transform:translateX(-50%);
    z-index:6;pointer-events:none;font-size:12px;letter-spacing:.14em;color:rgba(200,188,170,.72);
    padding:7px 14px;border:1px solid rgba(201,161,90,.2);border-radius:2px;background:rgba(14,11,9,.5);
    transition:opacity 1.2s ease;white-space:nowrap}
  .hint.out{opacity:0}

  /* 家族故事 */
  #story{position:fixed;inset:0;z-index:7;background:rgba(8,6,5,.78);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);
    display:flex;flex-direction:column;padding:0}
  #story[hidden]{display:none}
  .sheet{width:100%;max-width:620px;margin:0 auto;height:100%;display:flex;flex-direction:column;background:#100c09;border-left:1px solid rgba(201,161,90,.16);border-right:1px solid rgba(201,161,90,.16)}
  .sheet header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:22px 20px 16px;border-bottom:1px solid rgba(201,161,90,.18)}
  .sheet header h2{font-size:19px;font-weight:400;letter-spacing:.16em;color:#e8cf9e}
  .sheet header p{margin-top:6px;font-size:12px;letter-spacing:.1em;color:rgba(154,143,128,.9)}
  .sheet .close{width:44px;height:44px;flex:0 0 auto;border:1px solid rgba(201,161,90,.3);background:transparent;color:rgba(201,161,90,.9);font-family:inherit;font-size:13px;letter-spacing:.1em;cursor:pointer;border-radius:2px}
  .sheet .body{overflow-y:auto;-webkit-overflow-scrolling:touch;padding:22px 20px 40px}
  .sec-title{font-size:12px;letter-spacing:.22em;color:rgba(201,161,90,.8);margin:26px 0 14px;padding-bottom:8px;border-bottom:1px solid rgba(201,161,90,.14)}
  .sec-title:first-child{margin-top:0}

  .tl{display:grid;grid-template-columns:56px 16px 1fr;row-gap:20px;column-gap:8px;align-items:start}
  .tl .yr{font-size:12px;letter-spacing:.04em;color:rgba(201,161,90,.85);text-align:right;font-variant-numeric:tabular-nums;padding-top:2px}
  .tl .dot{justify-self:center;width:7px;height:7px;border-radius:50%;background:#c9a15a;margin-top:6px;position:relative}
  .tl .dot::after{content:'';position:absolute;left:3px;top:12px;width:1px;height:calc(100% + 0px);min-height:14px;background:rgba(201,161,90,.22)}
  .tl .txt{font-size:13px;line-height:1.85;color:rgba(220,208,190,.86)}
  .tl .txt strong{display:block;font-weight:400;color:#f0dfb8;margin-bottom:2px;letter-spacing:.04em}

  .kids{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
  .kid{display:flex;align-items:baseline;gap:8px;padding:10px 12px;border:1px solid rgba(201,161,90,.16);background:rgba(255,244,222,.02)}
  .kid em{font-style:normal;font-size:11px;letter-spacing:.1em;color:rgba(154,143,128,.9)}
  .kid span{font-size:14px;color:#e4d6bb;letter-spacing:.08em}

  .note{margin-top:26px;font-size:11px;line-height:1.9;color:rgba(154,143,128,.8);letter-spacing:.04em}

  #fail{position:fixed;inset:0;z-index:8;display:grid;place-items:center;padding:30px;background:#0d0a08;text-align:center}
  #fail[hidden]{display:none}
  #fail p{font-size:14px;line-height:2;color:rgba(196,185,168,.85);max-width:22em}
  #fail b{display:block;font-size:18px;font-weight:400;color:#e3c994;letter-spacing:.1em;margin-bottom:10px}

  @media (min-width:768px){
    .ui{padding:26px 30px calc(22px + env(safe-area-inset-bottom))}
    #hallName{font-size:24px}
    .acts{max-width:520px;gap:10px}
    .act{height:50px;font-size:15px}
    .sheet{margin:24px auto;height:calc(100% - 48px)}
    .kids{grid-template-columns:repeat(3,1fr)}
  }
  @media (max-height:520px){
    .sub{display:none}
    .act{height:42px}
  }
