/* The title screen (client/js/title.js): full-bleed pixel night scene, Dice & Dominion logo, game-style menu and the
   New Game choices. Uses the Jersey 15 pixel face loaded by dnd_home.css. */
.ttl { position: fixed; inset: 0; overflow: hidden; background: #0b0a1c; color: #f1e8d5; font-family: Inter, system-ui, sans-serif; z-index: 1; }
.ttl-sky { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.ttl-party { position: absolute; left: 0; right: 0; bottom: 4%; display: flex; justify-content: center; align-items: flex-end; gap: 0; pointer-events: none; }
.ttl-hero { width: auto; height: auto; image-rendering: pixelated; margin: 0 calc(var(--hs, 2) * -38px); filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .55)); }
.ttl-hero:nth-child(odd) { transform: translateY(10px); }
.ttl-vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 90% at 50% 38%, transparent 40%, rgba(5, 3, 10, .65) 100%); }
.ttl-ui { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 6vh 16px 0; overflow-y: auto; }

/* logo */
.ttl-logo { text-align: center; margin-top: 4vh; animation: ttlIn .9s ease both; }
.ttl-kick { font: 400 18px/1 'Jersey 15', monospace; letter-spacing: .35em; text-transform: uppercase; color: #bfa6d8; opacity: .85; }
.ttl-logo h1 { margin: 6px 0 4px; font: 400 clamp(56px, 10vw, 128px)/.9 'Jersey 15', 'Cinzel', serif; letter-spacing: .02em; color: #ffd76a;
  text-shadow: 0 4px 0 #8a4a14, 0 8px 0 #3a1a08, 0 0 40px rgba(255, 190, 80, .45); }
.ttl-logo h1 span { color: #ff9a4a; }
.ttl-sub { font: 400 22px/1 'Jersey 15', monospace; letter-spacing: .12em; color: #f1e8d5; text-shadow: 0 2px 0 #000; }

/* main menu */
.ttl-menu { display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin-top: 5vh; min-width: 300px; animation: ttlIn .9s .25s ease both; }
.ttl-item { position: relative; background: rgba(14, 10, 22, .72); border: 2px solid #3a2c4e; color: #e9dcc4; font: 400 34px/1 'Jersey 15', monospace; letter-spacing: .06em;
  padding: 10px 28px 10px 48px; text-align: left; cursor: pointer; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .5), 0 4px 0 rgba(0, 0, 0, .45); transition: transform .08s, background .12s, color .12s; }
.ttl-item .ttl-cur { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 22px; color: #ffd76a; opacity: 0; }
.ttl-item.on { background: linear-gradient(90deg, rgba(120, 70, 20, .85), rgba(40, 24, 10, .85)); border-color: #ffd76a; color: #fff3cf; transform: translateX(6px); }
.ttl-item.on .ttl-cur { opacity: 1; animation: ttlBlink .8s steps(2) infinite; }
.ttl-foot { margin-top: auto; padding: 14px 0 calc(14px + 22vh); font-size: 13px; color: #bfb0d0; text-shadow: 0 1px 0 #000; }
.ttl-foot b { color: #ffd76a; }

/* panels: new game steps, join, other games */
.ttl-panel { width: min(980px, 100%); margin: 2vh 0 24vh; padding: 18px 22px 16px; background: rgba(16, 12, 24, .9); border: 2px solid #4a3a5e; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .6), 0 10px 0 rgba(0, 0, 0, .45), 0 0 60px rgba(0, 0, 0, .6); animation: ttlIn .35s ease both; }
.ttl-panel.narrow { width: min(520px, 100%); }
.ttl-panel.wide { width: min(1180px, 100%); }
.ttl-panel h2 { margin: 8px 0 2px; font: 400 44px/1 'Jersey 15', monospace; color: #ffd76a; text-shadow: 0 3px 0 #5a2e0e; }
.ttl-psub { color: #bfb0d0; margin-bottom: 14px; }
.ttl-phead { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ttl-back { background: none; border: 2px solid #4a3a5e; color: #d8c8e8; font: 400 20px/1 'Jersey 15', monospace; padding: 6px 12px; cursor: pointer; }
.ttl-back:hover { border-color: #ffd76a; color: #ffd76a; }
.ttl-steps { display: flex; align-items: center; gap: 0; margin-left: auto; }
.ttl-steps span { width: 28px; height: 28px; display: grid; place-items: center; font: 400 18px/1 'Jersey 15', monospace; border: 2px solid #4a3a5e; color: #8a7a9e; background: #120e1a; cursor: default; }
.ttl-steps span.done { border-color: #7ac06a; color: #bff0a8; cursor: pointer; }
.ttl-steps span.now { border-color: #ffd76a; color: #1a1209; background: #ffd76a; }
.ttl-steps i { width: 18px; height: 2px; background: #4a3a5e; }
.ttl-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.ttl-cards.many { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); max-height: 46vh; overflow-y: auto; padding: 2px; }
.ttl-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 16px 16px 14px; cursor: pointer; color: #e9dcc4;
  background: linear-gradient(160deg, #241a30, #150f1d); border: 2px solid #3a2c4e; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .45), 0 4px 0 rgba(0, 0, 0, .4); transition: transform .1s, border-color .1s; }
.ttl-card:hover { transform: translateY(-2px); border-color: #8a6ab0; }
.ttl-card.on { border-color: #ffd76a; background: linear-gradient(160deg, #4a3214, #1c130b); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .45), 0 4px 0 rgba(0, 0, 0, .4), 0 0 24px rgba(255, 200, 90, .25); }
.ttl-cicon { font-size: 34px; line-height: 1; filter: drop-shadow(0 2px 0 #000); }
.ttl-cname { font: 400 30px/1 'Jersey 15', monospace; color: #fff3cf; margin-top: 4px; }
.ttl-ctag { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #ffb24a; }
.ttl-cdesc { font-size: 14px; line-height: 1.45; color: #cfc2b0; }
.ttl-cards.many .ttl-cname { font-size: 24px; }
.ttl-cards.many .ttl-ctag { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-style: italic; }
.ttl-cards.many .ttl-cdesc { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ttl-ccheck { position: absolute; top: 10px; right: 12px; width: 26px; height: 26px; display: grid; place-items: center; background: #ffd76a; color: #1a1209; font-weight: 900; }
.ttl-pfoot { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.ttl-hint { color: #8a7a9e; font-size: 13px; }
.ttl-go { margin-left: auto; background: linear-gradient(#ffd76a, #e0a030); color: #2a1606; border: 2px solid #1a0e04; font: 400 28px/1 'Jersey 15', monospace; padding: 10px 22px; cursor: pointer;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .25), 0 4px 0 rgba(0, 0, 0, .5); }
.ttl-go:hover { filter: brightness(1.08); transform: translateY(-1px); }
.ttl-namebox { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 12px; }
.ttl-namebox label { font: 400 18px/1 'Jersey 15', monospace; letter-spacing: .12em; text-transform: uppercase; color: #bfa6d8; }
.ttl-namebox input { font: 400 30px/1 'Jersey 15', monospace; padding: 10px 14px; background: #0c0912; color: #fff3cf; border: 2px solid #4a3a5e; outline: none; }
.ttl-namebox input:focus { border-color: #ffd76a; }
.ttl-namebox input.ttl-code { letter-spacing: .5em; text-transform: uppercase; text-align: center; font-size: 44px; }
.ttl-namebox.inline { flex: 1; margin: 0; }
.ttl-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.ttl-sumrow { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 10px 12px; background: #150f1d; border: 2px solid #3a2c4e; color: #e9dcc4; cursor: pointer; position: relative; }
.ttl-sumrow span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #8a7a9e; }
.ttl-sumrow b { font-size: 15px; }
.ttl-sumrow em { position: absolute; right: 10px; top: 10px; font-size: 11px; font-style: normal; color: #ffb24a; opacity: 0; }
.ttl-sumrow:hover { border-color: #ffd76a; } .ttl-sumrow:hover em { opacity: 1; }
.ttl-worlds { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; max-height: 50vh; overflow-y: auto; padding: 2px; }
.ttl-worlds .world-card { min-height: 0; }
.ttl-otherbar { display: flex; gap: 12px; align-items: flex-end; margin-top: 14px; flex-wrap: wrap; }

.ttl-panel.still { animation: none; }
@keyframes ttlIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ttlBlink { 50% { opacity: .2; } }
@media (max-width: 760px) {
  .ttl-hero { margin: 0 -84px; }
  .ttl-item { font-size: 28px; }
  .ttl-panel { padding: 14px 14px 12px; } .ttl-panel h2 { font-size: 34px; }
  .ttl-steps { margin-left: 0; width: 100%; } .ttl-steps span { width: 24px; height: 24px; } .ttl-steps i { width: 8px; }
  .ttl-cards, .ttl-cards.many { grid-template-columns: 1fr; max-height: none; }
  .ttl-foot { padding-bottom: calc(14px + 14vh); }
}
.ttl-worlds .wc-blurb { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
/* the table settings step */
.ttl-sets { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 14px; }
.ttl-set { display: flex; flex-direction: column; gap: 6px; }
.ttl-set.wide { grid-column: 1 / -1; }
.ttl-set > span { font: 400 17px/1 'Jersey 15', monospace; letter-spacing: .1em; text-transform: uppercase; color: #bfa6d8; }
.ttl-set > span b { color: #ffd76a; letter-spacing: .04em; }
.ttl-set select { font: 600 16px Inter, sans-serif; padding: 10px 12px; background: #0c0912; color: #fff3cf; border: 2px solid #4a3a5e; outline: none; }
.ttl-set select:focus { border-color: #ffd76a; }
.ttl-set input[type=range] { accent-color: #ffd76a; width: 100%; }
.ttl-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; margin-top: 14px; }
.ttl-check { display: flex; gap: 12px; align-items: flex-start; padding: 12px; background: #150f1d; border: 2px solid #3a2c4e; cursor: pointer; }
.ttl-check:has(input:checked) { border-color: #ffd76a; background: #2a1d10; }
.ttl-check input { width: 20px; height: 20px; accent-color: #ffd76a; margin-top: 2px; }
.ttl-check span { display: flex; flex-direction: column; gap: 3px; } .ttl-check b { font: 400 22px/1 'Jersey 15', monospace; color: #fff3cf; } .ttl-check small { color: #bfb0d0; font-size: 13px; }
/* "Your table is ready" */
.ttl-welcome { position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; padding: 16px; background: rgba(6, 4, 12, .78); backdrop-filter: blur(2px); animation: ttlIn .25s ease both; }
.ttl-welcome .ttl-wbox { margin: 0; text-align: center; }
.ttl-welcome .ttl-kick { margin-bottom: 4px; }
.ttl-bigcode { display: flex; justify-content: center; gap: 10px; margin: 18px 0; }
.ttl-bigcode span { width: 74px; height: 88px; display: grid; place-items: center; font: 400 64px/1 'Jersey 15', monospace; color: #ffd76a; background: #0c0912; border: 2px solid #ffd76a; box-shadow: 0 6px 0 #5a2e0e, 0 0 24px rgba(255, 200, 90, .25); text-shadow: 0 3px 0 #5a2e0e; }
.ttl-linkrow { display: flex; gap: 8px; }
.ttl-linkrow input { flex: 1; min-width: 0; font: 500 14px Inter, sans-serif; padding: 10px; background: #0c0912; color: #d8c8e8; border: 2px solid #4a3a5e; }
.ttl-welcome .ttl-pfoot { margin-top: 20px; }
@media (max-width: 760px) { .ttl-bigcode span { width: 56px; height: 68px; font-size: 48px; } }
.ttl-welcome .ttl-panel h2 { font: 400 48px/1 'Jersey 15', monospace !important; color: #ffd76a; text-shadow: 0 3px 0 #5a2e0e; text-transform: none; letter-spacing: .01em; margin: 6px 0 2px; }
.ttl-check small, .ttl-set > span { text-transform: none; letter-spacing: 0; }
.ttl-set > span { text-transform: uppercase; letter-spacing: .1em; }
.ttl-check small { text-transform: none !important; letter-spacing: 0 !important; font: 400 13px/1.35 Inter, sans-serif; }
