/* 松风版界面：保留 V0.4 的所有剧情、手记与试玩记录入口。 */
:root {
  --ground:#172a25; --ink:#f1ead5; --muted:#c6c7aa; --gold:#e6c482;
  --jade:#a7d5bc; --paper-ink:#f1ead5; --paper-mute:#c0cbb1;
  --st:env(safe-area-inset-top,0px);
}
* { box-sizing:border-box; }
#app { isolation:isolate; touch-action:manipulation; }
#cv,#stickzone,#pad,#interact,#nearTalk { touch-action:none; }
.ov,.card,.atlas-card,#dlg,#dBody,#dOpts,#logp,#rec {
  touch-action:pan-y; -webkit-overflow-scrolling:touch; overscroll-behavior-y:contain;
}
button { min-width:44px; min-height:44px; }
button:disabled { cursor:default; opacity:.55; }
.px-dark,.px-paper,.px-gold,.px-opt,.px-optsel {
  border-image:none; border:1px solid #cbb77b80; image-rendering:auto;
  background:#1b362ae8; box-shadow:none; color:var(--ink);
}
.px-paper { background:#193227f5; border-color:#cbb77b; }
.px-gold,.px-optsel { background:#e5cc8d; border-color:#eedaa3; color:#24372a; }
.px-opt { background:#294735; border-color:#b5b38c80; }
.px-opt:hover,.ghost:hover { background:#375942; }
.px-gold:hover,.px-optsel:hover { background:#f0db9e; }
button:focus-visible { outline:3px solid #f0db9e; outline-offset:3px; }
.ic { width:26px; height:26px; }
.ic.s { width:24px; height:24px; }
.pnum { font:700 13px var(--sans); }

#status {
  left:calc(16px + var(--sl)); top:calc(13px + var(--st)); width:224px;
  padding:0; gap:9px; border:0; background:none; transform:none;
  filter:drop-shadow(0 2px 2px #142b2590);
}
.songfeng-seal {
  flex:none; width:37px; height:48px; margin-top:3px; display:grid; place-items:center;
  border:2px solid #d7c289; background:#223c32ed; font:25px var(--serif);
  box-shadow:inset 0 0 0 3px #20392e,inset 0 0 0 4px #b6a06b; transform:rotate(-3deg);
}
.songfeng-name { font-size:13px; font-weight:650; margin-bottom:3px; }
.songfeng-name small { font-size:10px; color:#dce0c5; font-weight:400; margin-left:4px; }
.bars { gap:4px; }
.brow { gap:5px; font-size:10px; }
.brow > span { width:22px; color:#e0e2c6; }
.brow .pbar { height:13px; }
.brow .pbar.mp { height:9px; }
.brow.stamina .pbar { height:6px; }
.pbar { border:1px solid #142a21; background:#182d24e6; box-shadow:0 0 0 1px #c6bb8744; }
.pbar > i { box-shadow:inset 0 2px #ffffff30; }
.pbar > i::after { display:none; }
.pbar > b { font:700 9px var(--sans); text-shadow:0 1px 1px #15281c; }
.stamina .pbar > b { font-size:0; }
#quest {
  left:calc(16px + var(--sl)); top:calc(84px + var(--st)); width:220px;
  padding:8px 10px; gap:3px; border:0; border-left:2px solid #d7c289a6;
  background:linear-gradient(90deg,#18382cdb,#18382c80 82%,transparent); text-shadow:0 1px 2px #153225;
}
.eyebrow { font-size:10px; color:#e4cd92; letter-spacing:1px; }
#qt { font:700 14px/1.4 var(--serif); }
#qs,#qo { font-size:11px; line-height:1.5; color:#e0e4c8; }
#quest { pointer-events:auto; cursor:pointer; }
#quest.collapsed { padding-top:5px; padding-bottom:5px; }
#quest.collapsed #qs,#quest.collapsed #qo { display:none; }
#region { top:calc(15px + var(--st)); padding:0; border:0; background:none; text-shadow:0 2px 3px #163322; }
#regionName { font:700 21px var(--serif); letter-spacing:4px; }
#regionHint { display:block; font-size:10px; margin-top:4px; color:#e0e4c6; }
.songfeng-tools {
  position:absolute; z-index:3; right:calc(15px + var(--sr)); top:calc(12px + var(--st));
  display:flex; align-items:flex-start; gap:8px;
}
#bMap { position:static; padding:2px; width:104px; min-height:70px; background:#1e4031d9; }
#bMap canvas { display:block; width:98px; height:42px; border:1px solid #dfc88b; }
#bMap span { display:block; font-size:10px; padding-top:4px; color:#e4dfbd; }
.songfeng-tool-stack { width:144px; display:flex; flex-direction:column; gap:5px; }
.songfeng-tool-row { display:flex; gap:6px; }
.sq { width:44px; height:44px; padding:0; border-radius:3px; background:#233c30d9; }
#bSound { flex-direction:column; gap:1px; font-size:14px; }
#bSound span { font-size:9px; line-height:10px; }
#bPause { font:22px var(--sans); }
#res { position:static; display:flex; flex-wrap:wrap; justify-content:flex-end; gap:4px; transform:none; }
.chip { height:44px; padding:0 5px; gap:3px; border:0; background:#18382ca6; }
.chip small { font-size:10px; font-weight:500; }
.chip .ic { width:20px; height:20px; }
#bBand { border:1px solid #cbb77b70; border-radius:3px; }
#mats { width:100%; height:auto; min-height:26px; font-size:10px; white-space:normal; line-height:1.4; }
#saved { top:calc(112px + var(--st)); right:calc(16px + var(--sr)); height:27px; padding:3px 6px; border:0; font-size:10px; }
#perf { top:calc(4px + var(--st)); font-size:10px; border:0; background:#15372dcc; padding:3px 8px; }
#saveError { max-width:min(560px,85%); top:calc(70px + var(--st)); border-radius:3px; }
#toasts { top:calc(86px + var(--st)); width:min(340px,calc(100% - 492px)); }
.toast { padding:7px 10px; font-size:12px; line-height:1.5; background:#19372aee; border:1px solid #cfba7a; }
#banner { top:calc(51px + var(--st)); border:0; box-shadow:none; background:#1b362ac9; padding:4px 16px; color:#f0dc9c; font-size:16px; letter-spacing:4px; }
#banner::before,#banner::after { display:none; }

#stickzone { top:85px; width:48%; }
#stick {
  width:112px; height:112px; margin:-56px 0 0 -56px; transform:none;
  border:2px solid #e8e7cb62; border-radius:50%; background:#15372d35;
  box-shadow:inset 0 0 0 7px #f2efd21c,0 2px 0 #0c211b30;
}
#stick::after { content:'移动'; position:absolute; top:116px; width:100%; text-align:center; font-size:10px; letter-spacing:3px; text-shadow:0 1px 3px #000; }
#knob { left:34px; top:34px; width:40px; height:40px; border:2px solid #e6e8cf95; border-radius:50%; background:#e0e5cb44; box-shadow:0 3px 8px #142f2833; }
#pad { width:220px; height:209px; right:calc(18px + var(--sr)); bottom:calc(19px + var(--sb)); transform:none; pointer-events:none; }
.rb {
  pointer-events:auto; border:2px solid #dfd5a1b8; background:#244535d9; padding:0;
  box-shadow:0 0 0 3px #233b2b80,inset 0 0 0 4px #e4d6a41c,0 4px 0 #17312370;
  color:#f1ead5; font-size:13px; text-shadow:0 1px 2px #102b21; image-rendering:auto;
}
.rb.atk { right:0; bottom:0; width:90px; height:90px; font-size:17px; background:#365344e8; border-color:#f1d394; }
.rb.sk { right:111px; bottom:83px; width:74px; height:74px; font-size:12px; background:#2c5c4be6; }
.rb.sk2 { right:12px; bottom:108px; width:74px; height:74px; }
.rb.dg { right:108px; bottom:0; width:68px; height:68px; }
.rb.sk .ic { width:25px; height:25px; }
.rb.sk small { color:#e0e1c4; font-size:9px; line-height:1.3; margin-top:2px; }
.rb .cd { inset:0; background:conic-gradient(#0d251ec7 var(--p,0%),transparent 0); }
.rb:active,.rb.press { transform:translateY(2px); background:#527854ef; }
.rb.hot { border-color:#f3df96; box-shadow:0 0 0 3px #d9c88155,inset 0 0 0 4px #e4d6a41c; }
.rb.low { opacity:.7; filter:saturate(.35); }
.tag { border:1px solid #b5b38c80; box-shadow:none; background:#294735e6; height:24px; padding:0 7px; font-size:11px; border-radius:2px; }
.tag.none { box-shadow:none; background:#223c30c9; color:#d1d7b9; }
.tag.red { box-shadow:none; background:#b8523c; color:#fff0cf; }
#orn { left:0; right:auto; top:0; bottom:auto; max-width:123px; }
.combo { right:5px; bottom:92px; font:italic 15px var(--serif); text-shadow:1px 1px #203b28; }
#interact { height:46px; min-width:132px; bottom:calc(17px + var(--sb)); padding:0 16px; gap:6px; font-size:14px; border-radius:3px; }
#nearTalk span { color:#24372a; background:#e5cc8d; border:1px solid #eedaa3; box-shadow:0 2px 4px #0e261a70; padding:5px 8px; font-size:11px; }
#combatHint { bottom:calc(80px + var(--sb)); max-width:35%; padding:6px 10px; font-size:11px; border:0; }
#bossbar { bottom:calc(9px + var(--sb)); width:min(280px,35%); padding:7px 10px; border:0; gap:5px; background:#19372ade; }
#bossbar .nm { font-size:14px; }
#bossbar .pbar { height:8px; }
#bossbar .pbar.thin { height:4px; }

#dlg { padding:18px; gap:18px; left:calc(16px + var(--sl)); right:calc(16px + var(--sr)); bottom:calc(12px + var(--sb)); max-height:calc(100% - 70px - var(--st) - var(--sb)); box-shadow:0 10px 40px #071d1460; }
#dlgL { gap:13px; }
#dFace { display:flex; width:68px; height:68px; border-color:#b5b38c55; background:#244432; }
#dWho { border:0; box-shadow:none; padding:0; background:none; color:#eed79d; font-size:18px; }
#dWho small { color:#bfcdb0; }
#dText { font:500 17px/1.7 var(--serif); }
#dNote { font-size:12px; font-weight:400; margin-top:6px; }
#dOpts { width:min(360px,43%); gap:7px; justify-content:flex-start; }
.opt { min-height:52px; padding:9px 12px; font-size:14px; line-height:1.5; border-radius:2px; }
.opt small { font-size:11px; line-height:1.5; color:inherit; opacity:.85; }
#logp { top:calc(65px + var(--st)); right:calc(16px + var(--sr)); max-height:calc(100% - 80px - var(--st) - var(--sb)); padding:12px 16px; width:min(460px,calc(100% - 32px - var(--sl) - var(--sr))); }
.lh { margin-bottom:9px; gap:10px; }
.lh b { font-size:19px; color:#e8d299; }
#logx { width:44px; height:44px; }
#logl { font-size:13px; font-weight:400; line-height:1.7; }
.sec { border-top:1px solid #b5b38c55; margin-top:16px; padding-top:12px; }
.mini { height:auto; min-height:44px; padding:9px 12px; font-size:13px; border-radius:2px; }
#rec { font-size:12px; max-height:210px; }
#testForm summary { min-height:44px; padding:10px 0; margin:0; }
#testForm input,#testForm select,#testForm textarea,#promptNote,#recTa { min-height:44px; font-size:14px; background:#e4e4c8; color:#223c2b; border:1px solid #a7b18c; border-radius:2px; touch-action:auto; }
.atlas-card { width:min(900px,100%); max-height:calc(var(--app-height,100dvh) - 32px - var(--st) - var(--sb)); padding:17px 22px; }
.atlas-card h2 { color:#e8d299; font-size:24px; }
.atlas-tabs { gap:7px; margin-bottom:12px; }
.atlas-tabs .mini,.atlas-card .lh .mini,.skill-actions .mini { min-height:44px; height:auto; }
.mapfull { border:1px solid #b5b38c80; max-height:230px; }
.maplegend { color:#c8d0b4; }
.skill-row { border-bottom:1px solid #b5b38c44; grid-template-columns:125px 1fr auto; }
.skill-row h3,.clue-row h3 { color:#ead59d; }
.skill-actions { flex-direction:column; gap:5px; }
.skill-actions button { min-height:44px; }
.clue-row { border-bottom:1px solid #b5b38c44; }

.ov { background:#0c251ba8; padding:calc(16px + var(--st)) max(20px,var(--sr)) calc(16px + var(--sb)) max(20px,var(--sl)); }
.card { padding:24px 28px; gap:12px; box-shadow:0 16px 80px #061c1470; }
.card h1,.card h2 { color:#f0e6c6; }
.card .sub { color:#d9c389; font:12px var(--serif); letter-spacing:3px; text-transform:none; }
.card p { font-weight:400; color:#d4d8bc; font-size:14px; }
.big,.ghost { min-height:44px; height:auto; padding:11px 20px; font-size:14px; border-radius:2px; }
.big { font-weight:650; }
.ghost { background:#223e2dcf; border-color:#b5b38c80; }
.hint { color:#bfcbb0; font-size:11px; line-height:1.6; }
#start .songfeng-intro { display:grid; grid-template-columns:210px 1fr; width:min(800px,100%); padding:0; gap:0; max-height:calc(var(--app-height,100dvh) - 32px - var(--st) - var(--sb)); background:#1b3228f5; overflow-y:auto; }
.songfeng-intro-heading { padding:28px 24px; background:#12291fac; border-right:1px solid #cbb77b44; display:flex; flex-direction:column; justify-content:center; }
#start h1 { font:700 46px/1.25 var(--serif); letter-spacing:4px; margin:16px 0; }
#start .songfeng-poem { font:13px/1.9 var(--serif); color:#c9cfb0; letter-spacing:1px; }
#start .cast { max-width:170px; margin-top:18px; }
.songfeng-intro-body { padding:28px; display:flex; flex-direction:column; gap:13px; }
#start .songfeng-lead { font:700 20px/1.5 var(--serif); color:#f0e6c6; }
#start p { font-size:13px; line-height:1.8; }
.keys { gap:5px 12px; font-size:11px; line-height:1.7; }
.keys dt { color:#f1dfad; }
.keys dd { color:#c7cfb4; }
.row { gap:8px; }
#start .songfeng-separate { font-size:10px; color:#a9b99c; line-height:1.6; }
#pauseMenu { z-index:9; }
.songfeng-pause { text-align:center; width:min(370px,100%); padding:26px 32px; gap:12px; }
.songfeng-pause h2 { font-size:34px; letter-spacing:5px; }
.songfeng-pause p { font-size:12px; margin-bottom:5px; }
#done .card { max-height:calc(var(--app-height,100dvh) - 32px - var(--st) - var(--sb)); overflow-y:auto; }
#rotate { z-index:25; background:#162e25f5; }

@media(max-height:500px) {
  #status { top:calc(10px + var(--st)); width:208px; }
  #quest { top:calc(79px + var(--st)); width:205px; padding:6px 9px; }
  #qt { font-size:13px; }
  #qs,#qo { font-size:10px; }
  #region { top:calc(12px + var(--st)); }
  #regionName { font-size:18px; }
  .songfeng-tools { top:calc(10px + var(--st)); gap:6px; }
  #pad { right:calc(15px + var(--sr)); bottom:calc(16px + var(--sb)); }
  #stick { width:104px; height:104px; margin:-52px 0 0 -52px; }
  #knob { left:30px; top:30px; }
  #stick::after { top:108px; }
  #dlg { padding:13px 15px; gap:13px; }
  #dFace { display:none; }
  #dText { font-size:14px; line-height:1.7; }
  #dWho { font-size:17px; }
  #dNote { font-size:11px; }
  .opt { font-size:13px; min-height:48px; padding:8px 10px; }
  .atlas-card { padding:12px 16px; }
  .atlas-card h2 { font-size:21px; }
  .atlas-tabs { margin-bottom:8px; }
  .skill-row { grid-template-columns:105px 1fr auto; padding:9px 0; }
  .skill-row h3 { font-size:17px; }
  .mapfull { max-height:165px; }
  #start .songfeng-intro { grid-template-columns:185px 1fr; width:min(740px,100%); }
  .songfeng-intro-heading { padding:20px 22px; }
  #start h1 { font-size:39px; margin:12px 0; }
  .songfeng-intro-body { padding:20px 24px; gap:10px; }
  #start .songfeng-lead { font-size:18px; }
  #start p { font-size:12px; line-height:1.7; }
  #start .cast { display:none; }
  #start .big,#start .ghost { min-height:44px; height:auto; font-size:14px; }
  .songfeng-pause { padding:20px 28px; gap:9px; }
  .songfeng-pause h2 { font-size:30px; }
}
@media(max-width:740px) {
  #status { left:calc(12px + var(--sl)); width:195px; }
  .songfeng-seal { width:31px; height:44px; font-size:23px; }
  .songfeng-name { font-size:12px; }
  .songfeng-name small { font-size:9px; }
  #quest { left:calc(12px + var(--sl)); width:195px; }
  #regionName { font-size:17px; letter-spacing:3px; }
  #regionHint { font-size:9px; }
  .songfeng-tools { right:calc(12px + var(--sr)); gap:5px; }
  #bMap { width:78px; min-height:65px; }
  #bMap canvas { width:72px; height:37px; }
  #bMap span { font-size:8px; }
  #pad { right:calc(12px + var(--sr)); bottom:calc(15px + var(--sb)); width:205px; height:194px; }
  .rb.atk { width:82px; height:82px; }
  .rb.sk { right:102px; bottom:77px; width:68px; height:68px; font-size:11px; }
  .rb.sk2 { right:10px; bottom:100px; }
  .rb.dg { right:99px; width:64px; height:64px; }
  #orn { font-size:10px; height:22px; max-width:110px; }
  #toasts { top:calc(79px + var(--st)); width:calc(100% - 452px); min-width:160px; }
  .toast { font-size:11px; padding:6px 8px; }
  #combatHint { max-width:30%; font-size:10px; }
  #interact { min-width:118px; font-size:13px; padding:0 12px; }
  #dlg { left:calc(12px + var(--sl)); right:calc(12px + var(--sr)); }
  #dOpts { width:43%; }
  #start .songfeng-intro { grid-template-columns:154px 1fr; }
  .songfeng-intro-heading { padding:19px; }
  #start h1 { font-size:33px; letter-spacing:3px; }
  #start .songfeng-poem { font-size:11px; }
  #start .sub { font-size:10px; letter-spacing:2px; }
  .songfeng-intro-body { padding:18px 21px; gap:9px; }
  #start .songfeng-lead { font-size:17px; }
  .keys { font-size:10px; }
  #start .songfeng-separate { font-size:9px; }
  .atlas-tabs .mini { font-size:12px; padding:8px; }
  .skill-row { grid-template-columns:90px 1fr auto; gap:8px; }
}
@media(prefers-reduced-motion:reduce) {
  .rb:active,.rb.press { transform:none; }
  #banner,#saved { transition:none; }
}

/* 场景与人物头像使用同一青绿、苔金色阶。 */
#dFace,#myFace { border:1px solid #c3bb8b; box-shadow:inset 0 0 0 2px #203e35; }
#dFace canvas,#myFace { image-rendering:pixelated; }
.atlas-card { background:#193b2df5; border-color:#b7b181; }
.atlas-tabs button[aria-selected="true"] { background:#ced3aa; color:#1c3c2c; }
#dWho small { color:#b9cbaf; }
#dFace { display:flex; width:56px; height:56px; align-self:flex-start; }
#dFace canvas { width:52px; height:52px; align-self:center; }
.mapfull { border:1px solid #a6b48a; background:#718956; }
@media (max-height:430px) {
  #dlgL { gap:10px; }
  #dFace { width:46px; height:46px; }
  #dFace canvas { width:42px; height:42px; }
}

/* 开始页在手机横屏放不下（#18）：触屏不显示键盘说明；矮屏收紧间距；仍超高时卡片内滚动，底部渐隐提示还有内容 */
@media (pointer:coarse) { #start .keys .kb { display:none; } }
@media (max-height:420px) {
  .songfeng-intro-heading { padding:14px 20px; }
  #start h1 { font-size:34px; margin:8px 0; }
  .songfeng-intro-body { padding:14px 20px; gap:7px; }
  #start .songfeng-lead { font-size:16px; line-height:1.4; }
  #start p { font-size:12px; line-height:1.6; }
  #start .row { gap:8px; }
  #start .big,#start .ghost { min-height:40px; padding-top:0; padding-bottom:0; }
}
#start .songfeng-intro { overscroll-behavior:contain; }
#start .songfeng-intro.more { -webkit-mask-image:linear-gradient(#000 calc(100% - 28px),#0004); mask-image:linear-gradient(#000 calc(100% - 28px),#0004); }
