/* Title / login gate (js/game/title.js): night-sky scene, gold-framed hero panel with the moon crest, news panel, top bar and
   footer links, plus its own dialogs / toasts / update prompt. Royal palette (navy + plum + gold), Kanit.
   Everything is prefixed .ttl- and carries its own colour tokens, so it does not depend on html.theme-royal being applied yet.
   Sections: tokens · scene · layout · hero · news · buttons + fields · consent · server · dialogs · toasts + update · phone portrait · phone landscape */
.ttl-root, .ttl-ov, .ttl-toasts, .ttl-upd, .ttl-upd-pill {
  --t-bg: #0a0b24; --t-navy: #141640; --t-plum: #3a1f5c;
  --t-gold: #e0b252; --t-gold-hi: #ffe39a; --t-gold-dk: #8a5a16; --t-gold-dim: rgba(224, 178, 82, 0.45);
  --t-line: rgba(140, 110, 220, 0.4); --t-text: #f2f1ff; --t-muted: #a9a6d2; --t-faint: #7c79a8;
  --t-ok: #6fe0a0; --t-warn: #ffc866; --t-danger: #ff7d8c; --t-info: #7fb6ff;
  --t-surface: linear-gradient(180deg, rgba(40, 27, 88, 0.9), rgba(13, 10, 40, 0.94));
  --t-well: rgba(8, 6, 28, 0.62);
  font-family: 'Kanit', 'Thonburi', 'Leelawadee UI', 'Noto Sans Thai', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--t-text); font-size: 15px; line-height: 1.5; font-weight: 400;
}
.ttl-root [hidden], .ttl-ov [hidden] { display: none !important; }
.ttl-root h1, .ttl-root h2, .ttl-root h4, .ttl-root p, .ttl-ov h2, .ttl-ov h4, .ttl-ov p { margin: 0; }
.ttl-root h2::after, .ttl-ov h2::after { content: none; }

/* ---------- scene */
.ttl-root { position: fixed; inset: 0; z-index: 9000; overflow: hidden; background: var(--t-bg); transition: opacity .4s ease; }
.ttl-root.out { opacity: 0; pointer-events: none; }
.ttl-sky { position: absolute; inset: -2%; background: #0b0a2a url(../assets/map/sky.png) 50% 22% / cover no-repeat; image-rendering: pixelated; animation: ttl-drift 60s ease-in-out infinite alternate; }
.ttl-stars { position: absolute; inset: 0; pointer-events: none; opacity: .8; animation: ttl-twinkle 5s ease-in-out infinite alternate;
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 31% 62%, #ffe9b0 50%, transparent 51%),
    radial-gradient(2px 2px at 57% 12%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 73% 44%, #cfe0ff 50%, transparent 51%),
    radial-gradient(2px 2px at 88% 24%, #ffe9b0 50%, transparent 51%), radial-gradient(1.5px 1.5px at 44% 82%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 6% 74%, #cfe0ff 50%, transparent 51%), radial-gradient(2px 2px at 94% 78%, #fff 50%, transparent 51%); }
.ttl-shade { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 80% at 50% 30%, rgba(10, 8, 36, 0) 30%, rgba(8, 6, 28, 0.72) 100%), linear-gradient(180deg, rgba(8, 6, 28, 0.5), rgba(8, 6, 28, 0) 22%, rgba(8, 6, 28, 0) 68%, rgba(8, 6, 28, 0.82)); }
@keyframes ttl-drift { from { transform: scale(1.02) translate3d(-0.6%, 0, 0); } to { transform: scale(1.06) translate3d(0.6%, -0.8%, 0); } }
@keyframes ttl-twinkle { from { opacity: .35; } to { opacity: .9; } }
@keyframes ttl-rot { to { transform: rotate(360deg); } }
@keyframes ttl-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ttl-sky, .ttl-stars { animation: none; } }

/* ---------- layout */
.ttl-view {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px; overflow-x: hidden; overflow-y: auto;
  -webkit-overflow-scrolling: touch; touch-action: pan-y; overscroll-behavior: contain;
  padding: calc(12px + env(safe-area-inset-top, 0px)) calc(16px + env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) calc(16px + env(safe-area-inset-left, 0px));
}
.ttl-top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ttl-main { flex: 1 0 auto; display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 360px); gap: 24px; justify-content: center; align-items: center; padding: 34px 0 10px; }
.ttl-foot { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; }
.ttl-links { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.ttl-ver { font-size: 12px; color: var(--t-faint); white-space: nowrap; }
.v-consent, .v-server { align-items: center; }
.ttl-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ttl-between { justify-content: space-between; } .ttl-wrap { flex-wrap: wrap; }
.ttl-small { font-size: 13.5px; } .ttl-tiny { font-size: 12px; } .ttl-muted { color: var(--t-muted); } .ttl-faint { color: var(--t-faint); }
.ttl-gold { color: var(--t-gold-hi); } .ttl-center { text-align: center; } .ttl-nowrap { white-space: nowrap; }
.ttl-ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* gold frame shared by the hero, news, consent and server panels */
.ttl-frame, .ttl-modal {
  position: relative; background: var(--t-surface); border: 1px solid var(--t-gold); border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 227, 154, 0.14), inset 0 0 0 5px rgba(12, 9, 34, 0.55), inset 0 0 0 6px var(--t-gold-dim), 0 18px 44px rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
}
.ttl-corner { position: absolute; width: 22px; height: 22px; pointer-events: none; border: 2px solid var(--t-gold-hi); opacity: .9; }
.ttl-corner::after { content: ""; position: absolute; width: 6px; height: 6px; background: var(--t-gold-hi); transform: rotate(45deg); box-shadow: 0 0 8px rgba(255, 227, 154, 0.8); }
.ttl-corner.tl { left: 9px; top: 9px; border-right: 0; border-bottom: 0; border-top-left-radius: 9px; } .ttl-corner.tl::after { left: -4px; top: -4px; }
.ttl-corner.tr { right: 9px; top: 9px; border-left: 0; border-bottom: 0; border-top-right-radius: 9px; } .ttl-corner.tr::after { right: -4px; top: -4px; }
.ttl-corner.bl { left: 9px; bottom: 9px; border-right: 0; border-top: 0; border-bottom-left-radius: 9px; } .ttl-corner.bl::after { left: -4px; bottom: -4px; }
.ttl-corner.br { right: 9px; bottom: 9px; border-left: 0; border-top: 0; border-bottom-right-radius: 9px; } .ttl-corner.br::after { right: -4px; bottom: -4px; }
.ttl-frame.sm .ttl-corner { width: 16px; height: 16px; }

/* ---------- hero */
.ttl-hero { padding: 58px 30px 22px; text-align: center; animation: ttl-pop .5s ease both; }
.ttl-crest { position: absolute; left: 50%; top: -38px; width: 78px; height: 78px; margin-left: -39px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #1b1450, #0b0828 70%); border: 2px solid var(--t-gold);
  box-shadow: 0 0 0 4px rgba(12, 9, 34, 0.9), 0 0 0 5px var(--t-gold-dim), 0 0 30px rgba(190, 160, 255, 0.55); display: grid; place-items: center; }
.ttl-moon { width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 34% 32%, #fffdf0, #f1e2b4 46%, #c9a9ee 100%);
  box-shadow: inset -11px -7px 0 0 rgba(72, 48, 132, 0.5), 0 0 18px rgba(255, 236, 180, 0.75); }
.ttl-moon.sm { flex: none; width: 40px; height: 40px; box-shadow: inset -9px -6px 0 0 rgba(72, 48, 132, 0.5), 0 0 14px rgba(255, 236, 180, 0.6); }
.ttl-star { position: absolute; color: var(--t-gold-hi); font-size: 11px; text-shadow: 0 0 6px rgba(255, 227, 154, 0.9); animation: ttl-twinkle 2.6s ease-in-out infinite alternate; }
.ttl-star.s1 { left: 8px; top: 12px; } .ttl-star.s2 { right: 9px; bottom: 12px; font-size: 8px; animation-delay: 1.1s; }
.ttl-eyebrow { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 11px; letter-spacing: 0.34em; color: var(--t-gold); font-weight: 500; }
.ttl-eyebrow span { flex: 0 1 46px; height: 1px; background: linear-gradient(90deg, transparent, var(--t-gold)); }
.ttl-eyebrow span:last-child { transform: scaleX(-1); }
.ttl-logo { margin: 6px 0 8px; }
.ttl-logo h1 { font-size: clamp(25px, 4.6vw, 34px); line-height: 1.15; font-weight: 700; letter-spacing: 0.07em;
  background: linear-gradient(180deg, #fff6cf 8%, #f2c967 48%, #b97f22 96%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.55)) drop-shadow(0 0 14px rgba(240, 190, 90, 0.35)); }
.ttl-logo2 { margin-top: 2px; font-size: 15px; letter-spacing: 0.28em; color: #d9ccff; font-weight: 500; text-shadow: 0 0 12px rgba(178, 107, 255, 0.7); }
.ttl-tagline { font-size: 13px; color: var(--t-muted); max-width: 34em; margin: 0 auto 14px !important; }
.ttl-actions { display: grid; gap: 9px; }
.ttl-acc { overflow-wrap: anywhere; }

/* ---------- news */
.ttl-news { padding: 18px 18px 16px; align-self: center; animation: ttl-pop .5s .08s ease both; }
.ttl-news-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.ttl-news-head h2 { font-size: 16px; font-weight: 600; color: var(--t-gold-hi); }
.ttl-news-list { display: grid; gap: 7px; }
.ttl-notice { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 9px 10px; min-height: 44px;
  background: var(--t-well); border: 1px solid var(--t-line); border-radius: 10px; color: var(--t-text); font-size: 13.5px; transition: border-color .15s, background .15s; }
.ttl-notice:hover, .ttl-notice:focus-visible { border-color: var(--t-gold); background: rgba(60, 40, 120, 0.5); }
.ttl-notice-t { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ttl-tag { display: inline-block; flex: none; padding: 0 7px; border-radius: 999px; font-size: 11px; line-height: 19px; white-space: nowrap; color: var(--t-muted); border: 1px solid var(--t-line); background: rgba(20, 16, 56, 0.8); }
.ttl-tag.k-event { color: var(--t-gold-hi); border-color: var(--t-gold-dim); } .ttl-tag.k-update { color: var(--t-info); border-color: rgba(127, 182, 255, 0.45); }
.ttl-tag.k-maint { color: var(--t-warn); border-color: rgba(255, 200, 102, 0.45); } .ttl-tag.k-notice { color: #d9b8ff; border-color: rgba(178, 107, 255, 0.5); }
.ttl-tag.k-req { color: var(--t-danger); border-color: rgba(255, 125, 140, 0.5); }
.ttl-empty { padding: 18px; text-align: center; color: var(--t-muted); }

/* ---------- buttons + fields */
.ttl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 7px 16px; border-radius: 11px;
  font: inherit; font-weight: 500; font-size: 15px; line-height: 1.25; color: var(--t-text); cursor: pointer; text-align: center;
  background: linear-gradient(180deg, #2c2468, #171446); border: 1px solid var(--t-gold-dim);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 2px 0 rgba(0, 0, 0, 0.5); transition: filter .15s, transform .08s, border-color .15s;
}
.ttl-btn:hover { filter: brightness(1.14); border-color: var(--t-gold); }
.ttl-btn:active { transform: translateY(1px); }
.ttl-btn:disabled { opacity: .55; cursor: default; filter: none; transform: none; }
.ttl-btn:focus-visible, .ttl-link:focus-visible, .ttl-status:focus-visible, .ttl-notice:focus-visible, .ttl-seg button:focus-visible, .ttl-x:focus-visible,
.ttl-srv-row:focus-visible, .ttl-ch:focus-visible, .ttl-tabs button:focus-visible { outline: 2px solid var(--t-gold-hi); outline-offset: 2px; }
.ttl-btn.primary { color: #2a1804; font-weight: 600; background: linear-gradient(180deg, #fff0b8 0%, #f0c25a 42%, #c88a24 100%); border-color: #fff1c0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -2px 0 rgba(120, 70, 10, 0.45), 0 3px 0 rgba(0, 0, 0, 0.5), 0 0 18px rgba(240, 190, 90, 0.3); }
.ttl-btn.moon { background: linear-gradient(180deg, #4a3aa8, #2a1f72); border-color: rgba(178, 150, 255, 0.7); }
.ttl-btn.ghost { background: rgba(20, 16, 56, 0.45); border-color: var(--t-line); box-shadow: none; }
.ttl-btn.danger { background: linear-gradient(180deg, #b23a55, #7a1f38); border-color: rgba(255, 150, 165, 0.7); }
.ttl-btn.lg { min-height: 50px; font-size: 17px; } .ttl-btn.sm { min-height: 34px; padding: 4px 11px; font-size: 13px; border-radius: 9px; }
.ttl-btn.block { width: 100%; } .ttl-btn.icon { width: 42px; padding: 0; flex: none; } .ttl-btn.icon.sm { width: 38px; min-height: 38px; }
.ttl-g { width: 20px; height: 20px; flex: none; background: #fff; border-radius: 50%; padding: 3px; box-sizing: border-box; }
.ttl-link { padding: 4px 2px; min-height: 30px; background: none; border: 0; font: inherit; font-size: 13px; color: #cdbfff; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(205, 191, 255, 0.4); text-underline-offset: 3px; }
.ttl-link:hover { color: var(--t-gold-hi); } .ttl-link.danger { color: var(--t-danger); }
.ttl-spin { display: inline-block; width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; vertical-align: -2px; animation: ttl-rot .7s linear infinite; }
.ttl-status { display: flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%; min-height: 38px; padding: 5px 13px; border-radius: 999px; font: inherit; font-size: 13px; color: var(--t-text);
  background: rgba(14, 11, 44, 0.72); border: 1px solid var(--t-line); cursor: pointer; }
.ttl-status:hover { border-color: var(--t-gold); }
.ttl-status-sub { color: var(--t-muted); white-space: nowrap; }
.ttl-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--t-faint); }
.ttl-dot.ok { background: var(--t-ok); box-shadow: 0 0 8px var(--t-ok); } .ttl-dot.warn { background: var(--t-warn); box-shadow: 0 0 8px var(--t-warn); } .ttl-dot.danger { background: var(--t-danger); }
.ttl-seg { display: inline-flex; flex: none; padding: 3px; border-radius: 999px; background: rgba(14, 11, 44, 0.72); border: 1px solid var(--t-line); }
.ttl-seg button { min-width: 44px; min-height: 32px; padding: 2px 11px; border: 0; border-radius: 999px; background: none; font: inherit; font-size: 13px; color: var(--t-muted); cursor: pointer; }
.ttl-seg button.on { color: #2a1804; font-weight: 600; background: linear-gradient(180deg, #ffe9a8, #d9a43c); }
.ttl-form { display: grid; gap: 10px; margin: 10px 0; }
.ttl-field { display: grid; gap: 4px; min-width: 0; }
.ttl-field > label { font-size: 13px; color: var(--t-muted); }
.ttl-input { width: 100%; min-width: 0; min-height: 42px; padding: 8px 12px; border-radius: 10px; font: inherit; font-size: 16px; color: var(--t-text);
  background: var(--t-well); border: 1px solid var(--t-line); outline: none; -webkit-user-select: text; user-select: text; touch-action: manipulation; }
.ttl-input:focus { border-color: var(--t-gold); box-shadow: 0 0 0 3px rgba(224, 178, 82, 0.22); }
.ttl-input.invalid { border-color: var(--t-danger); }
.ttl-input:disabled { opacity: .6; }
.ttl-input::placeholder { color: var(--t-faint); }
select.ttl-input { appearance: auto; } select.ttl-input option { color: #111; }
.ttl-textarea { min-height: 110px; resize: vertical; }
.ttl-row > .ttl-input { flex: 1; }
.ttl-err { font-size: 13px; color: var(--t-danger); } .ttl-hint { font-size: 12px; color: var(--t-faint); }
.ttl-inset { padding: 10px 12px; border-radius: 10px; background: var(--t-well); border: 1px solid var(--t-line); margin: 8px 0; overflow-wrap: anywhere; }
.ttl-code { display: inline-block; margin-top: 4px; font-size: 22px; letter-spacing: 0.3em; color: var(--t-gold-hi); font-family: ui-monospace, 'SF Mono', Menlo, monospace; -webkit-user-select: text; user-select: text; }
.ttl-sep { border: 0; border-top: 1px solid var(--t-line); margin: 12px 0; }
.ttl-range { width: 100%; accent-color: var(--t-gold); min-height: 28px; touch-action: pan-y; }
.ttl-setrow { min-height: 40px; margin: 4px 0; }
.ttl-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.ttl-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.ttl-switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--t-well); border: 1px solid var(--t-line); transition: background .15s; pointer-events: none; }
.ttl-switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--t-muted); transition: transform .15s, background .15s; }
.ttl-switch input:checked + i { background: rgba(224, 178, 82, 0.35); border-color: var(--t-gold); }
.ttl-switch input:checked + i::after { transform: translateX(20px); background: var(--t-gold-hi); }
.ttl-check { display: flex; align-items: flex-start; gap: 9px; padding: 5px 0; font-size: 13.5px; cursor: pointer; }
.ttl-check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--t-gold); }

/* ---------- documents (terms / privacy / guide) + consent */
.ttl-doc { padding: 12px 14px; border-radius: 10px; background: var(--t-well); border: 1px solid var(--t-line); font-size: 13.5px; -webkit-user-select: text; user-select: text; }
.ttl-docbody { display: grid; gap: 10px; }
.ttl-docbody h4 { font-size: 14px; font-weight: 600; color: var(--t-gold-hi); margin-bottom: 2px; }
.ttl-docbody ul { margin: 4px 0 0; padding-left: 20px; }
.ttl-table-wrap { overflow-x: auto; touch-action: pan-x pan-y; }
.ttl-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ttl-table th, .ttl-table td { padding: 5px 7px; border: 1px solid var(--t-line); text-align: left; vertical-align: top; }
.ttl-table th { color: var(--t-gold-hi); font-weight: 500; background: rgba(40, 27, 88, 0.6); }
.ttl-panel { flex: none; width: min(680px, 100%); margin: auto; padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 10px; animation: ttl-pop .4s ease both; }
.ttl-cn-head { display: flex; align-items: center; gap: 12px; }
.ttl-cn-head h2, .ttl-srv-head h2 { font-size: 20px; font-weight: 600; color: var(--t-gold-hi); }
.ttl-tabs { display: flex; gap: 6px; }
.ttl-tabs button { flex: 1; min-height: 38px; padding: 4px 8px; border-radius: 10px; font: inherit; font-size: 13.5px; color: var(--t-muted); background: rgba(14, 11, 44, 0.6); border: 1px solid var(--t-line); cursor: pointer; }
.ttl-tabs button.on { color: var(--t-gold-hi); border-color: var(--t-gold); background: rgba(60, 40, 120, 0.6); }
.ttl-cn-doc { flex: 1 1 200px; min-height: 120px; max-height: 34vh; overflow-y: auto; touch-action: pan-y; outline: none; }
.ttl-cn-all { padding-bottom: 6px; margin-bottom: 2px; border-bottom: 1px solid var(--t-line); }
.ttl-cn-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ttl-cn-need { flex: 1; text-align: right; min-width: 60px; }

/* ---------- server + channel */
.ttl-srv { width: min(600px, 100%); }
.ttl-srv-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; }
.ttl-srv-head h2 { text-align: center; font-size: 18px; }
.ttl-srv-list { display: grid; gap: 8px; }
.ttl-srv-card { border-radius: 12px; background: var(--t-well); border: 1px solid var(--t-line); overflow: hidden; }
.ttl-srv-card.selected { border-color: var(--t-gold); box-shadow: 0 0 14px rgba(224, 178, 82, 0.2); }
.ttl-srv-card.off { opacity: .62; }
.ttl-srv-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 12px; background: none; border: 0; font: inherit; color: var(--t-text); text-align: left; cursor: pointer; }
.ttl-srv-glyph { font-size: 22px; flex: none; }
.ttl-srv-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.ttl-srv-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ttl-srv-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.ttl-srv-ping { display: flex; align-items: center; gap: 5px; flex: none; color: var(--t-muted); }
.ttl-srv-chev { flex: none; width: 12px; color: var(--t-gold); }
.ttl-srv-load, .ttl-srv-note { padding: 0 12px 9px; }
.ttl-srv-chs { padding: 8px 12px 12px; border-top: 1px solid var(--t-line); display: grid; gap: 6px; }
.ttl-ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 7px; }
.ttl-ch { display: grid; gap: 4px; padding: 8px 10px; min-height: 52px; border-radius: 10px; font: inherit; font-size: 13.5px; text-align: left; color: var(--t-text); background: rgba(30, 22, 76, 0.7); border: 1px solid var(--t-line); cursor: pointer; }
.ttl-ch.on { border-color: var(--t-gold); background: rgba(80, 56, 150, 0.7); box-shadow: inset 0 0 0 1px var(--t-gold-dim); }
.ttl-ch:disabled { opacity: .5; cursor: default; }
.ttl-loadrow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ttl-bar { flex: 1; min-width: 30px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.ttl-bar i { display: block; height: 100%; border-radius: 3px; background: var(--t-ok); }
.ttl-bar.lv-busy i { background: var(--t-warn); } .ttl-bar.lv-full i { background: var(--t-danger); }
.c-smooth { color: var(--t-ok); } .c-busy { color: var(--t-warn); } .c-full { color: var(--t-danger); }
.ttl-srv-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.ttl-srv-legend [data-all] { flex: 1 1 auto; }
.ttl-srv-foot { display: flex; align-items: center; gap: 12px; }
.ttl-srv-sum { flex: 1; min-width: 0; } .ttl-srv-sum-v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- dialogs */
.ttl-ov { position: fixed; inset: 0; z-index: 9100; display: grid; place-items: center; padding: calc(12px + env(safe-area-inset-top, 0px)) 12px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(5, 4, 20, 0.66); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.ttl-modal { width: min(440px, 100%); max-height: 100%; display: flex; flex-direction: column; animation: ttl-pop .22s ease both; }
.ttl-modal.wide { width: min(640px, 100%); }
.ttl-mhead { flex: none; display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--t-line); }
.ttl-mtitle { flex: 1; min-width: 0; font-size: 17px; font-weight: 600; color: var(--t-gold-hi); display: block; overflow-wrap: anywhere; }
.ttl-x { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--t-line); background: rgba(14, 11, 44, 0.7); color: var(--t-text); font-size: 20px; line-height: 1; cursor: pointer; }
.ttl-x:hover { border-color: var(--t-gold); }
.ttl-mbody { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; overscroll-behavior: contain; padding: 14px 16px; display: grid; gap: 8px; align-content: start; }
.ttl-mfoot { flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid var(--t-line); }
.ttl-gbtn { display: grid; place-items: center; min-height: 48px; margin: 6px 0; }
.ttl-faq { display: grid; gap: 7px; }
.ttl-card { border-radius: 10px; background: var(--t-well); border: 1px solid var(--t-line); padding: 0 12px; }
.ttl-card summary { padding: 10px 0; cursor: pointer; min-height: 42px; }
.ttl-card[open] summary { color: var(--t-gold-hi); }
.ttl-card p { padding: 0 0 12px; -webkit-user-select: text; user-select: text; }
.ttl-news-sum { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; list-style: none; }
.ttl-news-sum::-webkit-details-marker { display: none; }
.ttl-news-meta { margin-bottom: 4px; }
.ttl-news-body { white-space: pre-line; -webkit-user-select: text; user-select: text; }

/* ---------- toasts + update prompt (these outlive the gate) */
.ttl-toasts { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 9300; display: grid; gap: 7px; justify-items: center; width: min(92vw, 460px); pointer-events: none; }
.ttl-toast { display: flex; align-items: flex-start; gap: 8px; max-width: 100%; padding: 9px 15px; border-radius: 12px; font-size: 14px; background: rgba(20, 15, 56, 0.96); border: 1px solid var(--t-gold-dim);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55); animation: ttl-pop .2s ease both; transition: opacity .3s, transform .3s; overflow-wrap: anywhere; }
.ttl-toast.ok { border-color: rgba(111, 224, 160, 0.6); } .ttl-toast.warn { border-color: rgba(255, 200, 102, 0.6); } .ttl-toast.danger { border-color: rgba(255, 125, 140, 0.7); }
.ttl-toast.out { opacity: 0; transform: translateY(6px); }
.ttl-upd { position: fixed; right: calc(14px + env(safe-area-inset-right, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 9200; display: flex; gap: 11px; width: min(340px, calc(100vw - 28px)); padding: 13px 15px;
  border-radius: 14px; background: linear-gradient(180deg, rgba(40, 27, 88, 0.97), rgba(13, 10, 40, 0.98)); border: 1px solid var(--t-gold); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6); animation: ttl-pop .25s ease both; }
.ttl-upd-ico { font-size: 26px; line-height: 1; } .ttl-upd-main { flex: 1; min-width: 0; }
.ttl-upd-t { font-weight: 600; color: var(--t-gold-hi); } .ttl-upd-d { font-size: 13px; color: var(--t-muted); overflow-wrap: anywhere; }
.ttl-upd-act { display: flex; gap: 7px; margin-top: 8px; }
.ttl-upd-pill { position: fixed; right: calc(14px + env(safe-area-inset-right, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 9200; min-height: 34px; padding: 4px 13px; border-radius: 999px; font-size: 13px;
  color: #2a1804; font-weight: 600; background: linear-gradient(180deg, #ffe9a8, #d9a43c); border: 1px solid #fff1c0; cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5); }

/* ---------- phone portrait / narrow: hero above news, the page scrolls */
@media (max-width: 860px) {
  .ttl-main { grid-template-columns: minmax(0, 460px); gap: 16px; padding-top: 46px; align-content: start; }
  .ttl-hero { padding: 52px 20px 18px; }
  .ttl-foot { justify-content: center; text-align: center; } .ttl-links { justify-content: center; }
  .ttl-status-sub { overflow: hidden; text-overflow: ellipsis; }
  .ttl-panel { padding: 18px 16px 14px; }
}
@media (max-width: 420px) {
  .ttl-view { padding-left: calc(12px + env(safe-area-inset-left, 0px)); padding-right: calc(12px + env(safe-area-inset-right, 0px)); }
  .ttl-eyebrow { letter-spacing: 0.24em; } .ttl-logo2 { letter-spacing: 0.2em; font-size: 14px; }
  .ttl-top .ttl-row { gap: 5px; } .ttl-seg button { min-width: 40px; padding: 2px 8px; }
  .ttl-srv-head h2 { font-size: 16px; } .ttl-cn-head h2 { font-size: 18px; }
  .ttl-cn-foot .ttl-btn.lg { flex: 1 1 100%; order: 3; } .ttl-cn-need { text-align: left; }
  .ttl-srv-foot { flex-wrap: wrap; } .ttl-srv-foot .ttl-btn { flex: 1 1 100%; }
}

/* ---------- phone landscape (short): hero and news side by side, two-column actions, compact chrome */
@media (max-height: 540px) and (orientation: landscape) {
  .ttl-view { gap: 6px; padding-top: calc(7px + env(safe-area-inset-top, 0px)); padding-bottom: calc(7px + env(safe-area-inset-bottom, 0px)); }
  .ttl-main { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); max-width: 900px; width: 100%; margin: 0 auto; gap: 14px; padding: 30px 0 4px; align-items: start; }
  .ttl-hero { padding: 34px 16px 12px; }
  .ttl-crest { top: -26px; width: 54px; height: 54px; margin-left: -27px; } .ttl-crest .ttl-moon { width: 32px; height: 32px; box-shadow: inset -8px -5px 0 0 rgba(72, 48, 132, 0.5), 0 0 12px rgba(255, 236, 180, 0.7); }
  .ttl-star.s1 { left: 4px; top: 7px; } .ttl-star.s2 { right: 5px; bottom: 7px; }
  .ttl-eyebrow { font-size: 10px; } .ttl-logo { margin: 2px 0 4px; } .ttl-logo h1 { font-size: 23px; } .ttl-logo2 { font-size: 12px; }
  .ttl-tagline { font-size: 12px; margin-bottom: 8px !important; }
  .ttl-actions { grid-template-columns: 1fr 1fr; gap: 7px; } .ttl-actions .ttl-start, .ttl-actions .ttl-wide { grid-column: 1 / -1; }
  .ttl-btn { min-height: 38px; font-size: 14px; } .ttl-btn.lg { min-height: 42px; font-size: 15px; }
  .ttl-news { padding: 14px 12px 12px; align-self: start; }
  .ttl-foot { justify-content: space-between; } .ttl-link { min-height: 26px; }
  .ttl-panel { padding: 14px 16px 12px; gap: 7px; } .ttl-cn-doc { max-height: 26vh; min-height: 70px; flex-basis: 70px; }
  .ttl-cn-head .ttl-moon { display: none; } .ttl-cn-head h2 { font-size: 17px; }
  .ttl-cn-checks { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; } .ttl-cn-all { grid-column: 1 / -1; }
}

/* ---------- character creation: third-class showcase (auras) + name bar on one page */
.v-create { align-items: center; }
/* --cc-s: thumbnail scale, 50 % on small screens up to 100 % on very large ones; --cc-big: height of the showcase figure */
.ttl-cc { width: min(1180px, 100%); --cc-s: .5; --cc-big: min(37vh, 30vw); }
@media (min-width: 1000px) { .ttl-cc { --cc-s: .6; } }
@media (min-width: 1200px) { .ttl-cc { --cc-s: .7; } }
@media (min-width: 1400px) { .ttl-cc { --cc-s: .8; } }
@media (min-width: 1600px) { .ttl-cc { --cc-s: .9; } }
@media (min-width: 1900px) { .ttl-cc { --cc-s: 1; } }
.ttl-cc-body { display: grid; grid-template-columns: minmax(170px, 36%) minmax(0, 1fr); gap: 14px; align-items: stretch; min-height: 0; }
.ttl-cc-big { margin: 0; display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 12px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 60%, rgba(150, 120, 255, .22), transparent 65%), var(--t-well); border: 1px solid var(--t-line); }
/* the figure sits in the exact centre of the stage (the caption below is not counted) */
.ttl-cc-stage { flex: 1 1 auto; display: grid; place-items: center; min-height: calc(var(--cc-big) * 1.34); }
.ttl-cc-fig { --au: #ffd98a; position: relative; height: var(--cc-big); aspect-ratio: 312 / 420; }
.ttl-cc-fig img { position: relative; z-index: 3; display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .55)); animation: cc-bob 3.6s ease-in-out infinite; }
.ttl-cc-big figcaption { flex: none; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.ttl-cc-big b { font-size: 18px; color: var(--t-gold-hi); }
.ttl-cc-big figcaption i { font-style: normal; color: var(--t-gold-hi); }

/* auras */
.ttl-cc-fig .au { position: absolute; pointer-events: none; display: block; }
/* light pillar rising from the circle */
.au-pillar { z-index: 1; left: 8%; right: 8%; bottom: 3%; top: -22%; opacity: .55; mix-blend-mode: screen;
  background: linear-gradient(to top, var(--au), rgba(255, 255, 255, .0) 88%);
  -webkit-mask-image: radial-gradient(ellipse 50% 100% at 50% 100%, #000 20%, transparent 72%); mask-image: radial-gradient(ellipse 50% 100% at 50% 100%, #000 20%, transparent 72%);
  animation: cc-breathe 2.8s ease-in-out infinite; }
/* magic circle under the feet: a flattened disc with two counter-rotating rune rings and pulsing shock rings */
.au-foot { z-index: 2; left: 50%; top: 95%; width: 150%; aspect-ratio: 1; margin: -75% 0 0 -75%; transform: scaleY(.3); }
.au-foot::before, .au-foot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; mix-blend-mode: screen; }
.au-foot::before { background: radial-gradient(closest-side, rgba(255, 255, 255, .55), var(--au) 30%, transparent 62%),
    repeating-conic-gradient(from 0deg, var(--au) 0 3deg, transparent 3deg 15deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 0 58%, transparent 60% 74%, #000 76% 90%, transparent 93%); mask-image: radial-gradient(closest-side, #000 0 58%, transparent 60% 74%, #000 76% 90%, transparent 93%);
  animation: cc-spin 14s linear infinite; filter: drop-shadow(0 0 10px var(--au)); }
.au-foot::after { inset: 8%; border: 3px double var(--au); box-shadow: 0 0 22px var(--au), inset 0 0 26px var(--au);
  background: conic-gradient(from 0deg, transparent 0 20%, rgba(255, 255, 255, .8) 25%, transparent 30% 70%, rgba(255, 255, 255, .8) 75%, transparent 80%);
  -webkit-mask-image: radial-gradient(closest-side, transparent 62%, #000 66% 100%); mask-image: radial-gradient(closest-side, transparent 62%, #000 66% 100%);
  animation: cc-spin 7s linear infinite reverse; }
.au-foot b { position: absolute; inset: 20%; border-radius: 50%; border: 3px solid var(--au); box-shadow: 0 0 14px var(--au); opacity: 0; animation: cc-ring 3s ease-out infinite; }
.au-foot b:nth-child(2) { animation-delay: 1s; } .au-foot b:nth-child(3) { animation-delay: 2s; }
/* sun-burst rays behind the head and shoulders */
.au-rays { z-index: 1; left: 50%; top: 18%; width: 170%; aspect-ratio: 1; margin: -85% 0 0 -85%; border-radius: 50%; opacity: .5; mix-blend-mode: screen;
  background: repeating-conic-gradient(from 0deg, var(--au) 0 5deg, transparent 5deg 20deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 12%, transparent 72%); mask-image: radial-gradient(closest-side, #000 12%, transparent 72%);
  animation: cc-spin 40s linear infinite; }
/* halo above the head */
.au-halo { z-index: 4; left: 50%; top: -2%; width: 66%; aspect-ratio: 1; margin: -33% 0 0 -33%; transform: scaleY(.26); border-radius: 50%;
  border: 5px solid #fff6d0; box-shadow: 0 0 14px 4px var(--au), 0 0 44px 12px var(--au), inset 0 0 14px 2px var(--au); animation: cc-halo 2.6s ease-in-out infinite; }
.au-halo::after { content: ""; position: absolute; inset: -18%; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 40%, #fff 48%, transparent 56%);
  -webkit-mask-image: radial-gradient(closest-side, transparent 70%, #000 74% 90%, transparent 94%); mask-image: radial-gradient(closest-side, transparent 70%, #000 74% 90%, transparent 94%);
  animation: cc-spin 3.2s linear infinite; }
/* sparks drifting up */
.au-sparks { z-index: 4; inset: 0; }
.au-sparks b { position: absolute; bottom: 4%; width: 5px; height: 5px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px 3px var(--au); opacity: 0; animation: cc-spark 3.4s linear infinite; }
.au-sparks b:nth-child(1) { left: 6%; animation-delay: 0s; } .au-sparks b:nth-child(2) { left: 24%; animation-delay: 1.3s; }
.au-sparks b:nth-child(3) { left: 41%; animation-delay: 2.4s; } .au-sparks b:nth-child(4) { left: 58%; animation-delay: .6s; }
.au-sparks b:nth-child(5) { left: 76%; animation-delay: 1.9s; } .au-sparks b:nth-child(6) { left: 93%; animation-delay: 2.9s; }
.au-sparks b:nth-child(7) { left: 15%; animation-delay: 3.1s; width: 3px; height: 3px; } .au-sparks b:nth-child(8) { left: 85%; animation-delay: .9s; width: 3px; height: 3px; }
@keyframes cc-spin { to { rotate: 360deg; } }
@keyframes cc-bob { 50% { translate: 0 -1.2%; } }
@keyframes cc-breathe { 50% { opacity: .85; } }
@keyframes cc-halo { 50% { translate: 0 -6%; filter: brightness(1.25); } }
@keyframes cc-ring { 0% { scale: .4; opacity: .9; } 100% { scale: 2.4; opacity: 0; } }
@keyframes cc-spark { 0% { translate: 0 0; opacity: 0; } 12% { opacity: 1; } 100% { translate: 0 calc(var(--cc-big) * -1.05); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ttl-cc-fig .au, .ttl-cc-fig .au::before, .ttl-cc-fig .au::after, .ttl-cc-fig .au b, .ttl-cc-fig img { animation: none; } }

/* thumbnails */
.ttl-cc-grid { --card: calc(132px * var(--cc-s)); display: grid; grid-template-columns: repeat(auto-fill, var(--card)); gap: calc(4px + 6px * var(--cc-s));
  justify-content: center; align-content: center; max-height: calc(var(--cc-big) * 1.34 + 70px); overflow-y: auto; touch-action: pan-y; padding: 2px; }
.ttl-cc-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 3px; border-radius: 9px; background: var(--t-well); border: 1px solid var(--t-line); color: inherit; cursor: pointer; font: inherit; min-width: 0; }
.ttl-cc-card img { width: 100%; aspect-ratio: 312 / 420; object-fit: contain; }
.ttl-cc-card span { font-size: calc(7px + 5px * var(--cc-s)); line-height: 1.2; text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; max-width: 100%; }
.ttl-cc-card:hover { filter: brightness(1.15); }
.ttl-cc-card.on { border-color: var(--t-gold-hi); box-shadow: 0 0 0 1px var(--t-gold-hi), 0 0 12px rgba(255, 220, 140, .35); }

/* name bar */
.ttl-cc-bar { display: flex; align-items: flex-end; justify-content: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--t-well); border: 1px solid var(--t-line); }
.ttl-cc-name { position: relative; flex: 0 1 340px; display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-bottom: 18px; }
.ttl-cc-name label { font-size: 12px; color: var(--t-muted, #b9b2e0); }
.ttl-cc-bar .ttl-btn { flex: none; margin-bottom: 18px; }
.ttl-cc-st { position: absolute; left: 2px; bottom: 0; font-size: 12px; line-height: 16px; white-space: nowrap; color: var(--t-muted, #b9b2e0); }
.ttl-cc-st i { font-style: normal; font-weight: 700; display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; font-size: 10px; color: #fff; vertical-align: -2px; }
.ttl-cc-st.bad { color: #ff6b6b; } .ttl-cc-st.bad i { background: #e02438; box-shadow: 0 0 0 1px #5a0a12; }
.ttl-cc-st.ok { color: #7be08a; } .ttl-cc-st.ok i { background: #23a24a; }
.ttl-cc-st small { opacity: .85; }
.ttl-cc-note { text-align: center; margin: -4px 0 0; }

/* portrait: showcase on top, thumbnails below */
@media (orientation: portrait) {
  .ttl-cc { --cc-big: min(24vh, 46vw); }
  .ttl-cc-body { grid-template-columns: 1fr; }
  .ttl-cc-grid { max-height: 26vh; }
  .ttl-cc-bar { flex-wrap: wrap; }
  .ttl-cc-name { flex: 1 1 100%; order: -1; }
  .ttl-cc-bar .ttl-btn { margin-bottom: 0; } .ttl-cc-bar .ttl-btn.primary { flex: 1 1 auto; }
}
/* short landscape (phones) */
@media (max-height: 460px) and (orientation: landscape) {
  .ttl-cc { --cc-big: min(34vh, 24vw); }
  .ttl-cc .ttl-cn-head .ttl-small, .ttl-cc-note { display: none; }
  .ttl-cc-bar { padding: 6px 10px; } .ttl-cc-name label { display: none; }
}

/* ---------- phone portrait: the whole title / login screen on ONE page, no scrolling (as little space as possible) */
@media (orientation: portrait) and (max-width: 560px) {
  .v-title.ttl-view { gap: 6px; padding-top: calc(6px + env(safe-area-inset-top, 0px)); padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; }
  .v-title .ttl-top { gap: 6px; }
  .v-title .ttl-status { min-height: 30px; padding-top: 2px; padding-bottom: 2px; font-size: 12px; }
  .v-title .ttl-seg button { min-height: 28px; font-size: 12px; } .v-title .ttl-top .ttl-btn.icon { min-height: 30px; width: 34px; }
  .v-title .ttl-main { flex: 0 0 auto; gap: 8px; padding: 24px 0 0; }
  .v-title .ttl-hero { padding: 28px 12px 8px; }
  .v-title .ttl-crest { top: -22px; width: 46px; height: 46px; margin-left: -23px; }
  .v-title .ttl-crest .ttl-moon { width: 27px; height: 27px; box-shadow: inset -7px -4px 0 0 rgba(72, 48, 132, 0.5), 0 0 10px rgba(255, 236, 180, 0.7); }
  .v-title .ttl-star.s1 { left: 3px; top: 5px; } .v-title .ttl-star.s2 { right: 4px; bottom: 5px; }
  .v-title .ttl-eyebrow { font-size: 9px; letter-spacing: 0.2em; margin: 0; }
  .v-title .ttl-logo { margin: 0 0 4px; } .v-title .ttl-logo h1 { font-size: 22px; line-height: 1.15; } .v-title .ttl-logo2 { font-size: 11px; letter-spacing: 0.18em; }
  .v-title .ttl-tagline { display: none; }
  .v-title .ttl-actions { grid-template-columns: 1fr 1fr; gap: 6px; }
  .v-title .ttl-actions .ttl-start, .v-title .ttl-actions .ttl-wide { grid-column: 1 / -1; }
  .v-title .ttl-btn { min-height: 36px; font-size: 13px; padding: 2px 8px; } .v-title .ttl-btn.lg { min-height: 40px; font-size: 14.5px; }
  .v-title .ttl-actions p { margin: 0; line-height: 1.25; } .v-title .ttl-link { min-height: 22px; font-size: 12px; }
  .v-title .ttl-acc { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .v-title .ttl-news { padding: 8px 10px 8px; }
  .v-title .ttl-news-head { margin-bottom: 4px; } .v-title .ttl-news-head h2 { font-size: 13.5px; } .v-title .ttl-news-head .ttl-btn { min-height: 26px; font-size: 11.5px; padding: 0 8px; }
  .v-title .ttl-news-list { gap: 4px; }
  .v-title .ttl-notice { min-height: 30px; padding: 3px 8px; gap: 6px; align-items: center; }
  .v-title .ttl-notice-t { font-size: 12px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .v-title .ttl-notice .ttl-tag { font-size: 10px; padding: 0 6px; } .v-title .ttl-notice .ttl-tiny { font-size: 10px; }
  .v-title .ttl-foot { gap: 2px 10px; margin-top: auto; } .v-title .ttl-links { gap: 2px 10px; } .v-title .ttl-links .ttl-link, .v-title .ttl-foot .ttl-link { font-size: 11px; min-height: 22px; }
  .v-title .ttl-ver { font-size: 10px; }
}
/* shorter phones: fewer news rows, then none, so it still fits */
@media (orientation: portrait) and (max-width: 560px) and (max-height: 700px) { .v-title .ttl-notice:nth-child(n+3) { display: none; } .v-title .ttl-eyebrow { display: none; } }
@media (orientation: portrait) and (max-width: 560px) and (max-height: 610px) { .v-title .ttl-notice:nth-child(n+2) { display: none; } .v-title .ttl-acc { display: none; } }

/* ---------- phone landscape: the whole title / login screen on ONE page (the browser bar leaves ~300-370 px of height) */
@media (max-height: 540px) and (orientation: landscape) {
  .v-title.ttl-view { gap: 4px; padding-top: calc(4px + env(safe-area-inset-top, 0px)); padding-bottom: calc(3px + env(safe-area-inset-bottom, 0px)); }
  .v-title .ttl-status { min-height: 26px; padding-top: 1px; padding-bottom: 1px; font-size: 11.5px; }
  .v-title .ttl-seg button { min-height: 24px; font-size: 11.5px; } .v-title .ttl-top .ttl-btn.icon { min-height: 26px; width: 30px; font-size: 13px; }
  .v-title .ttl-main { flex: 0 0 auto; gap: 10px; padding: 14px 0 0; align-items: stretch; }
  .v-title .ttl-hero { padding: 18px 12px 6px; }
  .v-title .ttl-crest { top: -15px; width: 32px; height: 32px; margin-left: -16px; }
  .v-title .ttl-crest .ttl-moon { width: 18px; height: 18px; box-shadow: inset -5px -3px 0 0 rgba(72, 48, 132, 0.5), 0 0 8px rgba(255, 236, 180, 0.7); }
  .v-title .ttl-star { display: none; }
  .v-title .ttl-eyebrow, .v-title .ttl-tagline { display: none; }
  .v-title .ttl-logo { margin: 0 0 4px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 0 10px; }
  .v-title .ttl-logo h1 { font-size: 19px; line-height: 1.15; } .v-title .ttl-logo2 { font-size: 10.5px; letter-spacing: 0.14em; }
  .v-title .ttl-actions { gap: 5px; }
  .v-title .ttl-btn { min-height: 31px; font-size: 12.5px; padding: 1px 8px; } .v-title .ttl-btn.lg { min-height: 35px; font-size: 14px; }
  /* "reset password" and the account note share one row */
  .v-title .ttl-actions p.ttl-wide { grid-column: auto; margin: 0; line-height: 1.2; min-width: 0; }
  .v-title .ttl-link { min-height: 20px; font-size: 11.5px; }
  .v-title .ttl-acc { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; align-self: center; }
  .v-title .ttl-news { padding: 8px 10px; align-self: stretch; }
  .v-title .ttl-news-head { margin-bottom: 4px; } .v-title .ttl-news-head h2 { font-size: 13px; } .v-title .ttl-news-head .ttl-btn { min-height: 24px; font-size: 11px; padding: 0 8px; }
  .v-title .ttl-news-list { gap: 4px; }
  .v-title .ttl-notice { min-height: 28px; padding: 2px 8px; gap: 6px; align-items: center; }
  .v-title .ttl-notice-t { font-size: 11.5px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .v-title .ttl-notice .ttl-tag { font-size: 10px; padding: 0 6px; } .v-title .ttl-notice .ttl-tiny { font-size: 10px; }
  .v-title .ttl-foot { flex-wrap: nowrap; gap: 2px 10px; margin-top: auto; justify-content: space-between; }
  .v-title .ttl-links { flex-wrap: nowrap; gap: 2px 10px; min-width: 0; overflow: hidden; } .v-title .ttl-links .ttl-link, .v-title .ttl-foot .ttl-link { font-size: 10.5px; min-height: 18px; white-space: nowrap; }
  .v-title .ttl-ver { font-size: 9.5px; }
}
@media (max-height: 330px) and (orientation: landscape) {
  .v-title .ttl-logo2 { display: none; } .v-title .ttl-btn { min-height: 28px; } .v-title .ttl-btn.lg { min-height: 31px; }
  .v-title .ttl-main { padding-top: 12px; } .v-title .ttl-notice { min-height: 25px; }
}

/* transfer-code dialog */
.ttl-xf { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.ttl-xf .ttl-row { gap: 8px; } .ttl-xf .ttl-input { flex: 1; min-width: 0; text-align: center; font-size: 20px; letter-spacing: .3em; font-variant-numeric: tabular-nums; }
.ttl-xf-code { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px; border-radius: 10px; background: rgba(0, 0, 0, .35); border: 1px solid var(--t-gold-hi); }
.ttl-xf-code span { font-size: 34px; font-weight: 700; letter-spacing: .12em; color: var(--t-gold-hi); font-variant-numeric: tabular-nums; }
.ttl-xf-code small { font-size: 12px; opacity: .8; }
