/* 圣西罗页面样式（2026-10-07 新界面，照 preview/mock/mock.css 的设计稿）：深灰半透明面板、白字，唯一的强调色是米兰红；
   标题 Bebas Neue，正文 Inter，中文朱雀仿宋（Inter 没有汉字，汉字自动落到仿宋）。字号三档：--s 小、--m 中、标题大。 */
/* 三套字体的 @font-face 在 fonts.css 里（scripts/make_fonts.py 生成：字体裁小了，只下用得到的字） */
:root {
  --ink: #f2f2ee; --ink2: rgba(242, 242, 238, 0.62); --ink3: rgba(242, 242, 238, 0.34);
  --panel: rgba(16, 16, 19, 0.74); --panel2: rgba(16, 16, 19, 0.5); --line: rgba(255, 255, 255, 0.12);
  --red: #e30613; --gold: #f2c230; --s: 12px; --m: 15px; --top: 52px; --dw: 300px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #0b0b0d; color: var(--ink); overflow: hidden; font: var(--m)/1.5 'Inter', 'Fangsong', 'FangSong', 'Noto Sans SC', system-ui, sans-serif; }
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#labels { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.t1, .brand, .num, .card h3 { font-family: 'Bebas', 'Inter', sans-serif; font-weight: 400; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---- 顶栏 */
#topbar { position: fixed; left: 0; right: 0; top: 0; height: var(--top); display: flex; align-items: center; gap: 12px; padding: 0 16px; z-index: 11; pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 8, 10, 0.72), rgba(8, 8, 10, 0)); }
#topbar > * { pointer-events: auto; }
#topbar .brand { font-size: 24px; letter-spacing: 0.08em; }
/* 顶栏不折行：意大利语、英语的字长，挤的时候比赛那一格和钟那一格各自省略（自查截图里 SAN SIRO、比赛、钟都折成了两行） */
#topbar .brand { white-space: nowrap; flex-shrink: 0; } #topbar > * { flex-shrink: 0; } #topbar .sep { flex-shrink: 1; }
#matchchip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto !important; min-width: 60px; } #tbclock, #tbclock * { white-space: nowrap; }          /* 挤的时候只省略比赛那一格；钟那一格末尾是「离开球还有几分钟」，不能截 */
#topbar .sep { flex: 1; pointer-events: none; }
body.landing #topbar > :not(#langseg) { display: none; }
body.landing #topbar { justify-content: flex-end; }
#clock b { font-weight: 500; }
body.landing #drawer, body.landing #handle, body.landing #hint, body.landing #dock, body.landing #minimap { display: none; }
#matchchip[hidden] { display: none; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel2); backdrop-filter: blur(8px); }
.seg span { padding: 6px 14px; font-size: var(--s); color: var(--ink2); cursor: pointer; user-select: none; }
.seg span.on { background: var(--red); color: #fff; }
.chip { display: inline-block; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: var(--s); color: var(--ink2); cursor: pointer; user-select: none; background: var(--panel2); }
.chip.on { border-color: var(--red); color: var(--ink); background: rgba(227, 6, 19, 0.22); }
.tb { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); color: var(--ink); font: inherit; font-size: var(--s); cursor: pointer; backdrop-filter: blur(8px); }
.tb.on { background: var(--red); border-color: var(--red); color: #fff; }
.tb svg, #dock svg { width: 18px; height: 18px; }
#clock { font-variant-numeric: tabular-nums; }
/* 帧数显示（quality.js）：顶栏底下靠右的一小条 */
#fpsbox { position: fixed; right: 16px; top: calc(var(--top, 52px) + 6px); z-index: 7; padding: 3px 10px; border-radius: 7px; background: rgba(8, 8, 10, .55); color: var(--ink2); font-size: 12px; font-variant-numeric: tabular-nums; pointer-events: none; backdrop-filter: blur(6px); } #fpsbox[hidden] { display: none; } body.landing #fpsbox { display: none; }

/* ---- 右侧抽屉 */
#drawer { position: fixed; right: 0; top: var(--top); bottom: 0; width: var(--dw); padding: 14px 18px; background: var(--panel); backdrop-filter: blur(10px); border-left: 1px solid var(--line);
  overflow-y: auto; scrollbar-width: thin; z-index: 6; transform: translateX(100%); transition: transform .25s; }
body.drawer #drawer { transform: none; }
#handle { position: fixed; right: 0; top: 50%; width: 22px; height: 64px; margin-top: -32px; background: var(--panel); border: 1px solid var(--line); border-right: none; border-radius: 8px 0 0 8px;
  display: flex; align-items: center; justify-content: center; color: var(--ink2); cursor: pointer; z-index: 6; transition: right .25s; user-select: none; font-size: 18px; }
body.drawer #handle { right: var(--dw); }
#drawer h4 { margin: 14px 0 8px; font-size: var(--s); color: var(--ink2); font-weight: 500; letter-spacing: 0.1em; }
#drawer h4:first-child { margin-top: 0; }
#drawer .row { display: flex; flex-wrap: wrap; gap: 6px; }
#drawer button { font: inherit; font-size: var(--s); color: var(--ink2); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; cursor: pointer; transition: .15s; }
#drawer button:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.3); }
#drawer button.on { border-color: var(--red); color: var(--ink); background: rgba(227, 6, 19, 0.22); }
#drawer button:disabled { opacity: 0.5; }
.small { font-size: var(--s); color: var(--ink2); }
#drawer p { margin: 6px 0 0; line-height: 1.5; }
#drawer details { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 8px; }
#drawer summary { font-size: var(--s); color: var(--ink2); letter-spacing: 0.1em; cursor: pointer; }
.grp { border-top: 1px solid var(--line); padding: 6px 0 4px; }
.grp:first-child { border-top: 0; }
.grp > label { display: flex; align-items: center; gap: 8px; font-size: var(--s); color: var(--ink); cursor: pointer; }
.grp .subs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; margin: 4px 0 0 22px; }
.grp .subs label { display: flex; align-items: center; gap: 6px; color: var(--ink2); font-size: var(--s); cursor: pointer; }
input[type=checkbox] { accent-color: var(--red); width: 14px; height: 14px; margin: 0; }
.slider { display: flex; align-items: center; gap: 10px; margin-top: 8px; color: var(--ink2); font-size: var(--s); }
.slider input { flex: 1; accent-color: var(--red); }
.slider b { width: 52px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 500; }
#drawer footer { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 4px 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: var(--s); color: var(--ink3); }
#drawer footer a { color: var(--gold); text-decoration: none; }
#drawer footer a:hover { text-decoration: underline; }

/* ---- 尺寸和测量的标签 */
.tag { position: absolute; transform: translate(-50%, -50%); padding: 2px 7px; border-radius: 5px; white-space: nowrap;
  font-size: 12px; font-variant-numeric: tabular-nums; background: rgba(12, 13, 16, .82); border: 1px solid var(--line); color: var(--ink); }
.tag.dim { border-color: rgba(242, 194, 48, .6); color: #f5e3a6; }
.tag.meas { border-color: var(--red); color: #fff; background: rgba(227, 6, 19, .85); }

/* ---- 进门画面 */
#landing { position: fixed; inset: 0; z-index: 10; overflow: auto; transition: opacity .4s;
  background: linear-gradient(180deg, rgba(20, 24, 40, 0.55) 0%, rgba(40, 20, 30, 0.35) 55%, rgba(8, 8, 10, 0.78) 100%); }
#landing.hidden { opacity: 0; pointer-events: none; }
#landing .hero { position: absolute; left: 72px; top: 92px; }
#landing .t1 { font-size: 96px; letter-spacing: 0.04em; line-height: 0.95; }
body[data-lang=zh] #landing .t1 { font-size: 104px; letter-spacing: 0.08em; }
#landing .t2 { font-size: 16px; color: var(--ink2); letter-spacing: 0.22em; margin-top: 6px; }
#landing .line { font-size: 17px; color: var(--ink); letter-spacing: 0.12em; margin-top: 22px; opacity: 0.9; }
#landing .cards { position: absolute; left: 72px; top: 318px; display: flex; gap: 18px; }
.card .row { display: flex; gap: 8px; }
.card h3 .seen { margin-left: auto; font-style: normal; font-size: var(--s); color: var(--ink2); font-family: 'Inter', 'Fangsong', sans-serif; letter-spacing: 0.04em; }
.card { width: 300px; height: 190px; padding: 18px 20px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(10px); display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; }
.card.on { border-color: var(--red); box-shadow: 0 0 0 1px var(--red) inset; }
.card h3 { margin: 0; font-size: 34px; letter-spacing: 0.06em; display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.card h3 svg { width: 30px; height: 30px; }
.card h3 em { font-style: normal; font-size: var(--s); color: var(--ink2); font-family: 'Inter', sans-serif; letter-spacing: 0.1em; }
.card p { margin: 0; font-size: var(--s); color: var(--ink2); line-height: 1.6; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); color: var(--ink); font-size: var(--m); cursor: pointer; align-self: flex-start; user-select: none; }
.btn.on { background: var(--red); border-color: var(--red); color: #fff; }
.btn.off { opacity: 0.4; cursor: default; }
#landing .matches { position: absolute; left: 72px; top: 514px; width: 760px; }
#landing .matches .row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
#landing .side { position: absolute; right: 56px; top: 92px; width: 330px; padding: 18px 20px; background: var(--panel); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 10px; }
#landing .side h4 { margin: 0 0 12px; font-size: var(--s); color: var(--ink2); font-weight: 500; letter-spacing: 0.1em; }
.crest { display: flex; gap: 18px; align-items: flex-end; }
.cellgrid { width: 112px; height: 175px; }
.progress { display: flex; align-items: flex-end; gap: 14px; }
.progress + .progress { margin-top: 14px; }
.progress .num { font-size: 30px; line-height: 1; }
.progress .num span { font-size: var(--s); color: var(--ink2); font-family: 'Inter', sans-serif; }
.progress.gold .num { color: var(--gold); }
.progress .lab { font-size: var(--s); color: var(--ink2); }
.star { position: relative; width: 60px; height: 58px; }
.star img { position: absolute; left: 0; top: 0; width: 60px; height: 58px; opacity: 0.2; }
.star .fill { position: absolute; left: 0; bottom: 0; width: 60px; height: 0; overflow: hidden; }
.star .fill img { opacity: 1; top: auto; bottom: 0; }
.shirts { margin-top: 16px; display: flex; gap: 8px; }
.shirts i { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); display: flex; align-items: center; justify-content: center; opacity: 0.35; }
.shirts i.got { opacity: 1; border-color: rgba(255, 255, 255, 0.3); }
.shirts svg { width: 22px; height: 22px; stroke: none; }
#landing .side .small { margin-top: 12px; }
#landing .foot { position: absolute; left: 72px; bottom: 22px; font-size: var(--s); color: var(--ink3); }

/* ---- 载入条（进门画面底下；出错时也在这里） */
#loading { position: fixed; left: 50%; bottom: 60px; transform: translateX(-50%); z-index: 12; width: min(560px, 86vw); transition: opacity .5s; pointer-events: none; }
#loading.done { opacity: 0; }
#loading div { display: flex; flex-direction: column; gap: 6px; align-items: center; }
#loading span { font-size: var(--s); color: var(--ink2); text-align: center; }
#loading i { display: block; width: 100%; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
#loading i b { display: block; height: 100%; width: 0; background: var(--red); transition: width .3s; }

/* ---- 踢球 */
#kick { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); display: none; gap: 14px; align-items: center; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; z-index: 6; }
#kick.show { display: flex; }
#hit { width: 120px; height: 120px; cursor: crosshair; touch-action: none; }
#kcol { display: flex; flex-direction: column; gap: 10px; width: 220px; }
#pwrap { height: 16px; border-radius: 8px; background: rgba(255, 255, 255, .12); overflow: hidden; }
#pbar { height: 100%; width: 0; background: linear-gradient(90deg, #4bd964, #ffd24a 60%, #e0142a); }
#charge { padding: 10px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .2); background: var(--red); color: #fff; font: inherit; font-size: var(--m); cursor: pointer; user-select: none; }
#kmsg { position: fixed; left: 50%; top: 18%; transform: translateX(-50%); font: 90px/1 'Bebas', sans-serif; letter-spacing: 0.04em; color: #fff; text-shadow: 0 3px 14px rgba(0, 0, 0, .7); opacity: 0; transition: opacity .25s; pointer-events: none; z-index: 6; }
#kmsg.show { opacity: 1; }

/* ---- 沉浸模式：底下一排圆按钮、摇杆、小地图、提示 */
body.immersive #drawer, body.immersive #handle, body.immersive #kick { display: none; }
/* 走着踢球（kickabout.js）：小面板挪到底栏上面；球不在脚边的时候蓄力那一半发灰 */
body.immersive.kicking #kick.show { display: flex; left: auto; right: 18px; transform: none; bottom: 96px; padding: 8px 12px; } body.immersive.kicking #hit { width: 84px; height: 84px; } body.immersive.kicking #kcol { width: 170px; } #kick.far #kcol { opacity: .4; }
/* 游览模式飞低到草坪上：「踢两脚球」 */
#kickask { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); display: none; padding: 10px 22px; border-radius: 22px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; font-size: var(--m); cursor: pointer; z-index: 6; backdrop-filter: blur(6px); }
@media (min-width: 761px) { body.immersive #hint { max-width: max(170px, calc(50vw - 300px)); } }          /* 底栏按钮多的时候，右下角那行操作提示别伸到底栏底下去 */
@media (max-width: 760px) { body.immersive.kicking #kick.show { right: 8px; bottom: 118px; } }
#kickask.show { display: block; } #kickask.on { background: var(--red); border-color: var(--red); color: #fff; } #kick.show ~ #kickask { bottom: 184px; } body.kickon:not(.immersive) #hint { display: none; } body.immersive #kickask, body.landing #kickask { display: none; }
#dock { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); display: none; gap: 18px; padding: 10px 18px 6px; border-radius: 40px; background: rgba(8, 8, 10, 0.35); backdrop-filter: blur(6px); z-index: 5; }
body.immersive #dock { display: flex; }
#dock .rb { width: 58px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ink2); font-size: 11px; cursor: pointer; user-select: none; }
#dock .rb i { width: 52px; height: 52px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--ink); }
#dock .rb.on i { background: var(--red); border-color: var(--red); }
#dock svg { width: 22px; height: 22px; }
#stick { position: fixed; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.06); pointer-events: none; display: none; z-index: 6; }
#stick.show { display: block; }
#stick::before { content: ''; position: absolute; inset: 12px; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, 0.3); }          /* 虚线以外是快档 */
#stick.fast::before { border-color: var(--red); border-style: solid; }
#stickknob { position: absolute; left: 38px; top: 38px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, 0.75); }
#minimap { position: fixed; left: 18px; bottom: 18px; width: 176px; height: 176px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.35); display: none; z-index: 5; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5); }
body.immersive #minimap { display: block; } body.kickonly #maptag { display: none !important; } body.kickonly #minimap { cursor: default; }
/* 小地图点一下是传送地图（teleport.js）：角上一个小红钮提醒它能点 */
#minimap { cursor: pointer; } #maptag { position: fixed; left: 150px; bottom: 156px; width: 34px; height: 34px; border-radius: 50%; background: var(--red); border: 2px solid rgba(255, 255, 255, .85); display: none; align-items: center; justify-content: center; cursor: pointer; z-index: 5; box-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
#maptag svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 1.8; } body.immersive #maptag { display: flex; } body.landing #maptag { display: none; }
#tpmap { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(8, 8, 10, .62); backdrop-filter: blur(4px); } #tpmap[hidden] { display: none; }
#tpmap .box { width: min(600px, 94vw, calc(100vh - 150px)); background: rgba(18, 18, 21, .96); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 12px; color: var(--ink); }
#tpmap .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: var(--m); } #tpmap .top b { font-weight: 500; letter-spacing: .04em; } #tpmap .top .btn { font-size: var(--s); padding: 5px 14px; cursor: pointer; }
#tpmap .pic { position: relative; aspect-ratio: 1 / 1; } #tpmap svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; } #tpmap .pts { position: absolute; inset: 0; }
#tpmap .note { margin: 8px 2px 0; min-height: 2.9em; font-size: var(--s); line-height: 1.45; color: var(--ink2); }
#tpmap .tp { position: absolute; transform: translate(-50%, -50%); padding: 0; border: 0; background: none; color: #fff; font: inherit; font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
#tpmap .tp i { display: block; box-sizing: border-box; width: 17px; height: 17px; border-radius: 50%; background: #fff; border: 4px solid var(--red); box-shadow: 0 1px 6px rgba(0, 0, 0, .7); font-style: normal; transition: transform .12s; }
#tpmap .tp.num i { width: 23px; height: 23px; border: 2px solid #fff; background: var(--c, #666); color: #fff; font-size: 12px; font-weight: 600; line-height: 19px; text-align: center; }
#tpmap .tp span { position: absolute; white-space: nowrap; padding: 2px 7px; border-radius: 9px; background: rgba(8, 8, 10, .72); pointer-events: none; }
#tpmap .tp.r span { left: 22px; } #tpmap .tp.l span { right: 22px; } #tpmap .tp.t span { bottom: 21px; } #tpmap .tp.b span { top: 21px; }
#tpmap .tp:hover i, #tpmap .tp:focus-visible i { transform: scale(1.3); } #tpmap .tp:disabled { opacity: .28; cursor: default; } #tpmap .tp:disabled:hover i { transform: none; }
#tpmap .me { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #ffe800; border: 2px solid #111; box-shadow: 0 0 0 3px rgba(255, 232, 0, .35); pointer-events: none; }
#tpfade { position: fixed; inset: 0; background: #000; opacity: 0; transition: opacity .5s; z-index: 45; pointer-events: none; } #tpfade.on { opacity: 1; }
#hint.gone { opacity: 0; }          /* 操作提示亮五秒就淡掉，见 ui.js 的 hint() */
#hint { transition: opacity .5s; position: fixed; right: 18px; bottom: 18px; max-width: 46vw; padding: 6px 12px; border-radius: 8px; background: rgba(8, 8, 10, 0.45); color: var(--ink2); font-size: var(--s); z-index: 5; pointer-events: none; backdrop-filter: blur(6px); }
body.drawer:not(.immersive) #hint { right: calc(var(--dw) + 18px); }

/* ---- 比赛日：票（照真票 PRINT@HOME 的样子，白纸黑字红边）、官方分区图、排队、渐黑 */
#ticket { position: fixed; inset: 0; z-index: 9; display: grid; place-items: center; background: rgba(8, 8, 10, 0.55); backdrop-filter: blur(4px); }
#ticket[hidden] { display: none; }
.tk { width: min(640px, 94vw); background: #fff; color: #111; border-radius: 6px; padding: 18px 22px 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); font-family: 'Inter', 'Fangsong', sans-serif; }
.tk .head { display: flex; justify-content: space-between; font-weight: 700; color: var(--red); letter-spacing: 0.06em; font-size: 14px; border-bottom: 2px solid #111; padding-bottom: 8px; }
.tk .head .tt { color: #555; font-weight: 500; letter-spacing: 0.02em; }
.tk .teams { font-size: 28px; font-weight: 700; line-height: 1.1; margin: 12px 0 10px; letter-spacing: 0.01em; }
.tk .teams small { font-size: 16px; font-weight: 500; margin-left: 8px; }
.tk .cols { display: flex; border-top: 1px solid #ddd; padding: 8px 0; }
.tk .cols > div { flex: 1; padding: 0 8px; border-left: 1px solid #ddd; }
.tk .cols > div:first-child { padding-left: 0; border-left: none; }
.tk .cols i { display: block; font-style: normal; font-size: 10px; letter-spacing: 0.08em; color: var(--red); font-weight: 600; }
.tk .cols b { display: block; font-size: 17px; font-weight: 700; margin-top: 2px; }
.tk .cols.five b { font-size: 20px; }
.tk .cols.five > div:first-child { flex: 2.1; } .tk .cols.five > div:first-child b { white-space: nowrap; font-size: 18px; }          /* 座位类别（SECONDO ARANCIO 这种）一行放得下 */
.tk .band { height: 54px; margin: 6px 0; background: repeating-linear-gradient(90deg, #111 0 28px, var(--red) 28px 56px); display: flex; align-items: center; justify-content: center; }
.tk .band span { font-family: 'Bebas', sans-serif; font-size: 30px; letter-spacing: 0.12em; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }
.tk .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.tk .btn { background: #f2f2f0; color: #111; border-color: #ccc; font-size: 14px; }
.tk .btn.on { background: var(--red); color: #fff; border-color: var(--red); }
#mapmodal { position: fixed; inset: 0; z-index: 9; display: grid; place-items: center; background: rgba(8, 8, 10, 0.7); }
#mapmodal[hidden] { display: none; }
#mapmodal .box { width: min(1100px, 96vw); background: #fff; border-radius: 8px; padding: 10px 12px 12px; color: #111; }
#mapmodal .top { display: flex; justify-content: space-between; align-items: center; font-size: 14px; margin-bottom: 6px; }
#mapmodal .top .btn { background: #f2f2f0; color: #111; border-color: #ccc; font-size: 13px; padding: 5px 12px; }
#mapmodal .pic { position: relative; display: flex; justify-content: center; }
#mapmodal .pic.wait { background: #f2f2f0; border-radius: 6px; }          /* 分区图还没下到：按图的比例留着地方，中间写一句（字在 data-wait 里，matchday.js 的 openMap 写） */
#mapmodal .pic.wait::after { content: attr(data-wait); position: absolute; inset: 0; display: grid; place-items: center; color: #666; font-size: 14px; pointer-events: none; }
#mapmodal img { display: block; }
#mapmodal canvas { position: absolute; left: 50%; top: 0; transform: translateX(-50%); }
#queue { position: fixed; left: 50%; top: 72px; transform: translateX(-50%); padding: 8px 16px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: var(--s); z-index: 5; backdrop-filter: blur(10px); }
#queue b { color: var(--red); font-family: 'Bebas', sans-serif; font-size: 20px; margin-left: 6px; }
#fade { position: fixed; inset: 0; background: #000; opacity: 0; transition: opacity .7s; z-index: 8; pointer-events: none; }
#fade.white { background: #fff; }
#fade.msg.wake { z-index: 60; cursor: pointer; } #fade.msg.wake > div { color: #17171a; gap: 12px; } #fade.msg.wake b { font-size: 44px; } #fade.msg.wake em { font-style: normal; font-family: 'Fangsong', 'Inter', serif; font-size: 19px; opacity: .8; } #fade.msg.wake span { font-size: 16px; } #fade.msg.wake i { opacity: .7; font-size: 14px; } #fade.msg.wake u { text-decoration: none; font-size: var(--s); opacity: .45; margin-top: 10px; }
/* 成就：屏幕底下冒一行；清单 */
#achline { position: fixed; left: 50%; bottom: 118px; transform: translate(-50%, 12px); padding: 9px 18px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); font-size: var(--m); backdrop-filter: blur(10px); z-index: 12; opacity: 0; transition: opacity .4s, transform .4s; pointer-events: none; white-space: nowrap; }
#achline.on { opacity: 1; transform: translate(-50%, 0); } #achline i { font-style: normal; opacity: .6; font-size: var(--s); margin-right: 6px; } #achline b { font-weight: 600; } #achline span { margin-left: 8px; color: var(--red); font-family: 'Bebas', sans-serif; font-size: 17px; } #achline.gold { border-color: rgba(242, 194, 48, .55); } #achline.gold b, #achline.gold span { color: var(--gold); }
#achlist { position: fixed; inset: 0; z-index: 30; background: rgba(8, 8, 10, .82); backdrop-filter: blur(8px); overflow: auto; color: var(--ink); } #achlist[hidden] { display: none; }
#achlist .ah { position: sticky; top: 0; display: flex; align-items: baseline; gap: 14px; padding: 16px 22px; background: rgba(8, 8, 10, .9); border-bottom: 1px solid var(--line); z-index: 1; } #achlist .ah b { font-family: 'Bebas', 'Inter', 'Fangsong', sans-serif; font-weight: 400; font-size: 26px; letter-spacing: .05em; } #achlist .ah span { opacity: .65; font-size: var(--s); } #achlist .ah u { margin-left: auto; text-decoration: none; font-size: 24px; cursor: pointer; padding: 0 8px; }
#achlist .ab { max-width: 980px; margin: 0 auto; padding: 6px 22px 60px; } #achlist h4 { margin: 22px 0 8px; font-weight: 600; font-size: var(--m); } #achlist h4 span { opacity: .5; font-weight: 400; margin-left: 6px; }
#achlist .ag { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 6px; } #achlist .ai { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; display: grid; grid-template-columns: 26px 1fr; align-items: center; column-gap: 6px; background: rgba(255, 255, 255, .03); }
#achlist .ai i { font-style: normal; font-family: 'Bebas', sans-serif; font-size: 15px; opacity: .45; } #achlist .ai b { font-weight: 500; font-size: 13.5px; } #achlist .ai p { grid-column: 1 / -1; margin: 6px 0 0; font-size: var(--s); line-height: 1.55; opacity: .72; display: none; } #achlist .ai.open p { display: block; }
#achlist .ah .code { margin-left: auto; font-size: var(--s); padding: 4px 12px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; white-space: nowrap; opacity: .8; } #achlist .ah .code:hover { opacity: 1; border-color: var(--red); } #achlist .ah .code + u { margin-left: 0; }
#achlist .ac { max-width: 980px; margin: 14px auto 0; padding: 12px 22px; } #achlist .ac[hidden] { display: none; } #achlist .ac p { margin: 0 0 8px; font-size: var(--s); opacity: .75; } #achlist .ac textarea { width: 100%; height: 76px; box-sizing: border-box; background: rgba(255, 255, 255, .06); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: 12px/1.45 ui-monospace, Consolas, monospace; resize: vertical; word-break: break-all; }
#achlist .ac div { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; } #achlist .ac a { font-size: var(--s); padding: 5px 14px; border-radius: 14px; cursor: pointer; border: 1px solid var(--line); } #achlist .ac a.cp { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; } #achlist .ac em { font-style: normal; font-size: var(--s); color: #f2c230; }
#achlist .ai .go { display: block; width: max-content; margin: 9px 0 2px; padding: 4px 13px; border-radius: 14px; background: var(--red); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .04em; cursor: pointer; } #achlist .ai .go:hover { filter: brightness(1.15); }
#achlist .ai.done { border-color: rgba(227, 6, 19, .6); background: rgba(227, 6, 19, .14); } #achlist .ai.done i { color: var(--red); opacity: 1; } #achlist .ai.shut { opacity: .42; } #achlist .ai.egg.done { border-color: rgba(242, 194, 48, .6); background: rgba(242, 194, 48, .12); } #achlist .ai.egg.done i { color: var(--gold); opacity: 1; }
#go100.locked { opacity: 0.38; } #showbar { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; display: flex; gap: 10px; } #showbar[hidden] { display: none; }
#showbar button { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(16, 16, 18, .78); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; backdrop-filter: blur(6px); } #showbar button:hover { border-color: var(--red, #e30613); }
#tip.wrap { white-space: normal; max-width: min(300px, 86vw); line-height: 1.45; } #drawer button.locked { opacity: 0.45; letter-spacing: 2px; }
#shirts i { cursor: default; } #tip { position: fixed; z-index: 80; white-space: nowrap; padding: 6px 10px; border-radius: 8px; background: rgba(18, 18, 20, .97); border: 1px solid var(--line); color: var(--ink); font-size: 12px; pointer-events: none; box-shadow: 0 4px 14px rgba(0, 0, 0, .5); } #tip[hidden] { display: none; }
#ask { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .55); backdrop-filter: blur(3px); } #ask[hidden] { display: none; } #ask .box { width: min(440px, calc(100vw - 40px)); padding: 22px 24px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); display: flex; flex-direction: column; gap: 12px; } #ask b { font-family: 'Bebas', 'Inter', 'Fangsong', sans-serif; font-weight: 400; font-size: 28px; letter-spacing: .05em; color: var(--red); } #ask p { margin: 0; font-size: var(--m); line-height: 1.7; } #ask .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; flex-wrap: wrap; } #ask button { padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-size: var(--m); cursor: pointer; } #ask button.yes { background: var(--red); border-color: var(--red); color: #fff; }
#shirts i.keep-cursor { cursor: default; } #shirts i.got { cursor: pointer; } #shirts i.on { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 6px; }
#fade.msg { display: flex; align-items: center; justify-content: center; z-index: 9; }
#fade.msg > div { max-width: min(560px, 82vw); text-align: center; color: #fff; display: flex; flex-direction: column; gap: 14px; }
#fade.msg b { font-family: 'Bebas', 'Inter', 'Fangsong', sans-serif; font-size: 30px; letter-spacing: .06em; font-weight: 400; color: var(--red); }
#fade.msg span { font-size: 17px; line-height: 1.7; }
#fade.msg i { font-style: normal; font-size: var(--s); opacity: .55; }
#binoc { position: fixed; inset: 0; z-index: 4; pointer-events: none; }
#binoc[hidden] { display: none; }
#binoc svg { position: absolute; inset: 0; width: 100%; height: 100%; }
#binoc b { position: absolute; right: 9%; top: 12%; font: 34px 'Bebas', sans-serif; color: var(--ink); text-shadow: 0 1px 6px #000; }
#resume { position: fixed; right: 22px; top: 64px; z-index: 12; display: none; padding: 9px 20px; font-size: 15px; cursor: pointer; } body.landing.canresume #resume { display: block; }
#binoc span { display: none; }
#binoc span.old { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); pointer-events: auto; cursor: pointer; padding: 7px 16px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: var(--s); color: var(--ink); }
#toast { position: fixed; left: 50%; top: 72px; transform: translateX(-50%); padding: 9px 18px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: var(--m); color: var(--ink); backdrop-filter: blur(10px); z-index: 20; opacity: 0; transition: opacity .4s; pointer-events: none; }
#toast.on { opacity: 1; }
#toast b { color: var(--red); }
#fade.on { opacity: 1; }

/* ---- 手机：顶栏缩短，抽屉从底下拉起来，进门画面改成上下排 */
@media (max-width: 760px) {
  :root { --dw: 100vw; }
  /* 手机顶栏要整排收在屏幕里（用户 2026-10-09 手机截图：「声音按钮没显示，上面一排显示不全」，语言那一组被挤出右边）。
     声音按钮放回来（原来和人群一起藏了，打算以后进设置页）；语言只显示现在这一种，点一下换下一种（ui.js）；钟只留钟点、不带太阳图标；比赛那一格挤的时候可以缩到很窄。人群按钮手机上还是不放，放不下 */
  #topbar { gap: 5px; padding: 0 8px; white-space: nowrap; }
  #topbar .brand, #tbcrowd, #clock span, #qlab, #tbclock svg { display: none; }
  .seg span { padding: 6px 8px; font-size: 11px; }
  .tb { padding: 6px 7px; }
  #matchchip { max-width: 30vw; min-width: 34px; padding: 4px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body:not(.landing) #langseg span:not(.on) { display: none; }
  #hint { bottom: 30px; right: 10px; max-width: 70vw; }
  #drawer { top: auto; bottom: 0; height: 46vh; width: 100%; border-left: none; border-top: 1px solid var(--line); transform: translateY(100%); border-radius: 14px 14px 0 0; }
  body.drawer #drawer { transform: none; }
  #handle { right: auto; left: 50%; top: auto; bottom: 0; margin: 0 0 0 -32px; width: 64px; height: 22px; border-radius: 8px 8px 0 0; border: 1px solid var(--line); border-bottom: none; transition: bottom .25s; }
  body.drawer #handle { right: auto; bottom: 46vh; }
  body.drawer:not(.immersive) #hint { right: 18px; }
  #landing { padding: 70px 16px 16px; }
  #landing .hero, #landing .cards, #landing .matches, #landing .side, #landing .foot { position: static; width: auto; }
  #landing .t1 { font-size: 64px; }
  body[data-lang=zh] #landing .t1 { font-size: min(56px, 15.5vw); letter-spacing: 0.06em; }          /* 中文的游戏名在手机上太大（用户 2026-10-08 发布后在手机上看到：「梦游圣西罗这几个字太大了」）：上面那条 64px 压不过电脑版给中文单写的 104px，手机上一直是 104px、五个字折成两行。这里单独给中文一条，五个字一行放得下 */
  #landing .t2 { font-size: 13px; letter-spacing: 0.12em; }
  #landing .cards { flex-direction: column; margin-top: 18px; }
  .card { width: 100%; height: auto; gap: 10px; }
  #landing .matches { margin-top: 18px; }
  #landing .side { margin-top: 18px; }
  #landing .foot { margin-top: 18px; }
  #minimap { width: 120px; height: 120px; }
  /* 手机上沉浸模式（2026-10-08 自查截图：底下那排按钮比屏幕宽，两头被切掉，还压着小地图；票上「排、座」被挤出右边） */
  #dock { gap: 6px 10px; padding: 8px 10px 4px; border-radius: 22px; flex-wrap: wrap; justify-content: center; width: max-content; max-width: calc(100vw - 12px); bottom: 10px; }
  #dock .rb { width: 50px; font-size: 10px; gap: 3px; } #dock .rb i { width: 44px; height: 44px; } #dock svg { width: 19px; height: 19px; }
  body.immersive #minimap { left: 8px; top: calc(var(--top) + 8px); bottom: auto; width: 88px; height: 88px; }
  body.immersive #maptag { left: 70px; top: calc(var(--top) + 2px); bottom: auto; width: 28px; height: 28px; } #maptag svg { width: 15px; height: 15px; } #tpmap .tp span { font-size: 11px; } #tpmap .tp.num i { width: 20px; height: 20px; line-height: 16px; font-size: 11px; } #tpmap .box { padding: 10px 10px 10px; }
  body.immersive #hint { top: calc(var(--top) + 8px); bottom: auto; right: 8px; max-width: calc(100vw - 116px); font-size: 11px; }
  #achline { bottom: auto; top: calc(var(--top) + 104px); max-width: calc(100vw - 24px); white-space: normal; text-align: center; }
  #toast { max-width: calc(100vw - 24px); width: max-content; text-align: center; border-radius: 14px; }
  .tk .cols.five { flex-wrap: wrap; row-gap: 8px; } .tk .cols.five > div:first-child { flex: 1 0 100%; border-bottom: 1px solid #ddd; padding-bottom: 8px; } .tk .cols.five > div:nth-child(2) { padding-left: 0; border-left: none; }
  #fade.msg > div { max-width: 88vw; } #fade.msg.wake b { font-size: 34px; }
  #achlist .ag { grid-template-columns: 1fr 1fr; } #achlist .ab { padding: 6px 12px 60px; } #achlist .ah { padding: 12px 50px 12px 14px; flex-wrap: wrap; gap: 6px 12px; } #achlist .ah u { position: absolute; right: 6px; top: 6px; margin: 0; } #achlist .ah .code { margin-left: 0; } #achlist .ac { padding: 10px 12px; } #achlist .ag { align-items: start; }
}

/* 建筑构造卡片（设计稿 mock/4_card） */
#ccard { position: fixed; right: 24px; top: calc(var(--top) + 16px); width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - var(--top) - 40px); overflow: auto; padding: 20px 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; backdrop-filter: blur(14px); color: var(--ink); z-index: 9; } #ccard[hidden], #ceras[hidden] { display: none; }
#ccard .era { display: inline-block; padding: 3px 10px; margin-right: 6px; border-radius: 999px; background: var(--red); color: #fff; font-family: 'Bebas', sans-serif; font-size: 16px; letter-spacing: .1em; } #ccard h2 { margin: 10px 0 2px; font-family: 'Bebas', 'Inter', 'Fangsong', sans-serif; font-weight: 400; font-size: 38px; letter-spacing: .04em; line-height: 1.05; }
#ccard .it { font-size: var(--s); opacity: .7; letter-spacing: .06em; } #ccard p { font-size: var(--m); line-height: 1.75; margin: 12px 0; } #ccard .dims { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 8px 0 12px; font-size: var(--s); } #ccard .dims b { font-family: 'Bebas', sans-serif; font-size: 20px; font-weight: 400; letter-spacing: .04em; } #ccard .dims span { opacity: .65; }
#ccard .draw { background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 8px; padding: 10px; } #ccard .draw svg { width: 100%; height: 190px; display: block; } #ccard .src { font-size: 11px; opacity: .55; margin-top: 10px; line-height: 1.6; }
#ccard .nav { display: flex; gap: 8px; margin-top: 12px; align-items: center; } #ccard .nav i { flex: 1; } #ccard .nav .btn { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: var(--s); cursor: pointer; white-space: nowrap; } #ccard .nav .btn:hover { border-color: var(--red); }
#ceras { position: fixed; left: 18px; bottom: 54px; display: flex; gap: 8px; z-index: 9; } #ceras .chip { padding: 5px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: var(--s); color: var(--ink); backdrop-filter: blur(10px); } #ceras .chip { cursor: pointer; user-select: none; } #ceras .chip:hover { border-color: var(--red); } #ceras .chip.on { border-color: var(--red); } #ceras .chip.none { opacity: .5; cursor: default; } #ceras .chip.none:hover { border-color: var(--line); }
@media (max-width: 760px) { #ccard { right: 8px; left: 8px; width: auto; top: auto; bottom: 8px; max-height: 62vh; } #ceras { display: none; } }

#heads { display: flex; gap: 6px; margin: 8px 0 2px; flex-wrap: wrap; } #heads span { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: var(--s); cursor: pointer; opacity: .75; } #heads span.on { border-color: var(--red); opacity: 1; background: rgba(227, 6, 19, .16); }

/* 荣誉室里走近展柜的奖杯观赏（honours.js）：观赏的时候底栏、小地图、摇杆和操作提示都收起来 */
body.honours #dock, body.honours #minimap, body.honours #maptag, body.honours #hint, body.honours #stick { display: none !important; }
#hon { position: fixed; inset: 0; z-index: 9; pointer-events: none; } #hon[hidden] { display: none; } #hon > * { pointer-events: auto; } #hon .btn[hidden] { display: none; }
#hon .hd { position: absolute; left: 20px; top: calc(var(--top) + 10px); pointer-events: none; max-width: calc(100% - 260px); } #hon .hd b { display: block; font-family: 'Bebas', 'Inter', 'Fangsong', sans-serif; font-weight: 400; font-size: 26px; letter-spacing: .12em; line-height: 1.2; } #hon .hd span { font-size: var(--s); color: var(--ink2); }
#hon .tools { position: absolute; right: 18px; top: calc(var(--top) + 10px); display: flex; gap: 8px; } #hon .tools .btn { font-size: var(--s); padding: 6px 14px; backdrop-filter: blur(8px); white-space: nowrap; }
#hon_rail { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; gap: 2px; max-width: calc(100% - 24px); overflow-x: auto; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; backdrop-filter: blur(8px); }
#hon_rail span { cursor: pointer; padding: 7px 13px; border-radius: 7px; color: var(--ink2); font-size: 13px; white-space: nowrap; user-select: none; } #hon_rail span:hover { color: var(--ink); background: rgba(255, 255, 255, .06); } #hon_rail span.on { color: #fff; background: rgba(227, 6, 19, .45); }
#hon_card { position: absolute; right: 18px; top: calc(var(--top) + 54px); width: 320px; max-height: calc(100% - var(--top) - 140px); overflow: auto; padding: 16px 18px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; backdrop-filter: blur(10px); box-sizing: border-box; } #hon_card[hidden] { display: none; }
#hon_card .x { position: absolute; right: 10px; top: 6px; cursor: pointer; font-size: 20px; color: var(--ink2); padding: 2px 8px; }
#hon_card h2 { margin: 0 24px 0 0; font-size: 20px; font-weight: 600; } #hon_card p { margin: 2px 0 8px; font-size: var(--s); color: var(--ink2); } #hon_card p:empty { display: none; } #hon_card p.count { margin: 6px 0 8px; font-size: 15px; color: var(--ink); } #hon_card p.count b { color: var(--gold); font-size: 22px; font-weight: 600; padding: 0 3px; }
#hon_card ol { list-style: none; margin: 0 0 8px; padding: 0; font-size: 13px; font-variant-numeric: tabular-nums; } #hon_card ol li { display: grid; grid-template-columns: 84px 36px 1fr; gap: 6px; padding: 3px 0; border-top: 1px solid var(--line); } #hon_card ol li small { color: var(--ink2); grid-column: 3; margin-top: -4px; }
#hon_card ol.seasons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px 8px; } #hon_card ol.seasons li { display: block; border: 0; padding: 1px 0; }
#hon_card .row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; } #hon_card .row .btn { font-size: 13px; padding: 6px 12px; }
@media (max-width: 760px) { #hon_card { left: 10px; right: 10px; top: auto; bottom: 70px; width: auto; max-height: 44%; } #hon .hd span { display: none; } #hon .hd b { font-size: 20px; } #hon .hd { left: 12px; } #hon .tools { right: 10px; } }
/* 手机上出票的时候小地图压在票的左上角（2026-10-08 自查扫出来的）：票在的时候把小地图和定位钮收起来 */
body:has(#ticket:not([hidden])) #minimap, body:has(#ticket:not([hidden])) #maptag { display: none !important; }
