/* Shared styles: tokens, buttons, cards, landing, auth, admin. */
:root {
  --green: #0f8a4b;
  --green-dark: #0a6b39;
  --green-soft: #e3f6ea;
  --ink: #101828;
  --muted: #667085;
  --line: #e4e7ec;
  --card: #ffffff;
  --bg: #eef4fb;
  --red: #d92d20;
  --gold: #f5b301;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(16, 24, 40, .12);
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 16px; line-height: 1.45; }
h1, h2, h3, p { margin: 0; }
a { color: var(--green-dark); }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 10px 18px; font-weight: 700; cursor: pointer;
  text-decoration: none; background: #fff; color: var(--ink); transition: transform .08s, filter .15s;
  touch-action: manipulation; user-select: none;
}
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 6px 16px rgba(15, 138, 75, .35); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: rgba(255, 255, 255, .85); box-shadow: 0 2px 8px rgba(16, 24, 40, .08); }
.btn-danger { background: #fee4e2; color: var(--red); }
.btn-exit { background: var(--gold); color: #3d2c00; box-shadow: 0 2px 8px rgba(245, 179, 1, .35); }
.btn-lg { padding: 15px 26px; font-size: 1.08rem; }
.btn-block { width: 100%; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--green-soft); color: var(--green-dark); border-radius: 999px; padding: 4px 12px; font-size: .82rem; font-weight: 700; }
.pill.off { background: #f2f4f7; color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #17c964; box-shadow: 0 0 0 4px rgba(23, 201, 100, .25); }
.big-emoji { font-size: 3rem; line-height: 1; }

.field { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 14px; }
.field input { display: block; width: 100%; margin-top: 6px; padding: 13px 16px; border-radius: 16px; border: 2px solid transparent; background: #f2f4f7; font-weight: 500; outline: none; }
.field input:focus { border-color: var(--green); background: #fff; }
.field small { display: block; font-weight: 500; color: var(--muted); margin-top: 5px; }
.form-error { background: #fee4e2; color: var(--red); border-radius: 14px; padding: 10px 14px; font-weight: 600; margin-bottom: 12px; }
.notice { background: var(--green-soft); color: var(--green-dark); border-radius: 14px; padding: 10px 14px; font-weight: 600; margin-bottom: 12px; }

/* Pages */
.page { min-height: 100%; background: linear-gradient(180deg, #cfe6fb 0%, #eef4fb 55%, #f4f7ee 100%); display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; }
.topbar nav { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.brand { font-weight: 900; font-size: 1.25rem; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.back-link { padding: 16px 18px; font-weight: 700; text-decoration: none; }
.center-card { margin: auto; text-align: center; display: grid; gap: 12px; max-width: 360px; }
.foot { text-align: center; padding: 20px; font-size: .85rem; }

.hero { width: 100%; max-width: 980px; margin: 0 auto; padding: 28px 18px 40px; text-align: center; flex: 1; }
.hero h1 { font-size: clamp(2.3rem, 9vw, 4.4rem); line-height: 1.02; letter-spacing: -.03em; margin: 16px 0 12px; }
.hero .lead { max-width: 620px; margin: 0 auto; color: #344054; font-size: 1.08rem; }
.cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 24px 0 30px; }
/* Two Sims from the top of the rich list, daring visitors to beat them */
.champs { display: flex; justify-content: center; align-items: flex-end; gap: 14px 26px; margin: -6px 0 26px; }
.champ { display: flex; align-items: center; gap: 4px; min-width: 0; text-decoration: none; color: var(--ink); }
.champ:nth-child(even) { flex-direction: row-reverse; }
.champ-sim { flex: none; display: flex; flex-direction: column; align-items: center; width: 120px; }
.champ-sim canvas { width: 120px; height: 160px; display: block; }
.champ-worth { background: var(--gold); color: #3d2c00; border-radius: 999px; padding: 4px 11px; font-weight: 900; font-size: .88rem; white-space: nowrap; font-variant-numeric: tabular-nums;
  box-shadow: 0 6px 16px rgba(122, 89, 0, .3); animation: champ-float 2.6s ease-in-out infinite; margin-bottom: -6px; position: relative; z-index: 1; }
.champ:nth-child(even) .champ-worth { animation-delay: -1.3s; }
.champ-say { position: relative; background: #fff; border-radius: 20px; padding: 12px 14px; max-width: 250px; min-width: 0; text-align: left; box-shadow: 0 6px 20px rgba(16, 24, 40, .12); transition: transform .15s; }
.champ:hover .champ-say { transform: translateY(-2px); }
.champ-say::before { content: ''; position: absolute; top: 50%; left: -7px; width: 16px; height: 16px; margin-top: -8px; background: #fff; border-radius: 3px; transform: rotate(45deg); }
.champ:nth-child(even) .champ-say::before { left: auto; right: -7px; }
.champ-say b { display: block; overflow-wrap: anywhere; }
.champ-say small { display: block; color: var(--muted); font-size: .78rem; font-weight: 600; line-height: 1.35; }
.champ-say p { margin: 6px 0 0; font-weight: 700; font-size: .95rem; line-height: 1.3; color: var(--green-dark); transition: opacity .3s; }
.champ-say p.out { opacity: 0; }
@keyframes champ-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (max-width: 720px) {
  .champs { flex-direction: column; align-items: stretch; }
  .champ-sim { width: 108px; }
  .champ-sim canvas { width: 108px; height: 140px; }
  .champ-worth { font-size: .8rem; padding: 3px 9px; }
  .champ-say { max-width: none; flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .champ-worth { animation: none; } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 26px; }
.stat { background: #fff; border-radius: 20px; padding: 16px 12px; box-shadow: 0 4px 14px rgba(16, 24, 40, .07); }
.stat b { display: block; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat { min-width: 0; }
.stat b { overflow-wrap: anywhere; }
.stat-flip { cursor: pointer; }
.stat-flip.full { font-size: 1.05rem; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; text-align: left; }
.features article { background: rgba(255, 255, 255, .9); border-radius: 20px; padding: 18px; }
.features span { font-size: 1.8rem; }
.features h3 { margin: 6px 0 4px; }
.features p { color: var(--muted); font-size: .93rem; }

.auth { width: 100%; max-width: 440px; margin: 0 auto; padding: 4px 18px 40px; text-align: center; }
.auth h1 { font-size: 2.2rem; }
.auth .card { text-align: left; margin-top: 22px; }
.tabs { display: flex; background: #f2f4f7; border-radius: 999px; padding: 4px; margin-bottom: 18px; }
.tab { flex: 1; border: 0; background: transparent; border-radius: 999px; padding: 10px; font-weight: 700; color: var(--muted); cursor: pointer; }
.tab.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(16, 24, 40, .1); }
.auth .tab { text-align: center; text-decoration: none; }
form[data-mode="login"] .only-signup { display: none; }

.admin-main { width: 100%; max-width: 900px; margin: 0 auto; padding: 8px 18px 60px; display: grid; gap: 16px; }
.table-card { overflow-x: auto; padding: 8px 14px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.track-row { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.track-row audio { display: block; margin-top: 8px; max-width: 100%; height: 36px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.admin-main.wide { max-width: 1240px; }
/* The admin menu: a list down the left side on a computer, behind a Menu button on a phone. */
.adminbar { background: #fff; box-shadow: 0 2px 14px rgba(16, 24, 40, .08); position: sticky; top: 0; z-index: 20; }
.adminbar-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; }
.adminbar-menu { padding: 8px 14px; font-size: .92rem; }
.adminbar nav { display: none; padding: 4px 10px 14px; max-height: calc(100vh - 62px); overflow-y: auto; }
.adminbar.open nav { display: block; }
.adminbar-group { display: block; margin: 14px 10px 4px; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.adminbar nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; color: var(--ink); font-weight: 600; font-size: .95rem; text-decoration: none; }
.adminbar nav a:hover { background: #f2f4f7; }
.adminbar nav a.on { background: var(--green); color: #fff; }
.adminbar nav a i { font-style: normal; width: 22px; text-align: center; flex: none; }
.adminbar nav a span { flex: 1; min-width: 0; }
.adminbar em { flex: none; min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font-style: normal; font-size: .74rem; font-weight: 800; line-height: 20px; text-align: center; }
.adminbar nav a.on em { background: #fff; color: var(--green-dark); }
.adminbar nav a.adminbar-exit { margin-top: 14px; background: var(--gold); color: #3d2c00; font-weight: 800; }
@media (min-width: 900px) {
  .adminbar { position: fixed; left: 0; top: 0; bottom: 0; width: 232px; display: flex; flex-direction: column; box-shadow: 2px 0 14px rgba(16, 24, 40, .06); }
  .adminbar-top { padding: 18px 20px 6px; }
  .adminbar-menu { display: none; }
  .adminbar nav { display: flex; flex-direction: column; flex: 1; max-height: none; padding: 0 12px 16px; }
  .adminbar nav a.adminbar-exit { margin-top: auto; }
  .adminbar ~ .admin-main { margin-left: 232px; width: calc(100% - 232px); max-width: none; padding: 26px 32px 60px; }
  .adminbar ~ .admin-main > * { width: 100%; max-width: 900px; margin-left: auto; margin-right: auto; }
  .adminbar ~ .admin-main.wide > * { max-width: 1240px; }
}
/* Admin numbers run into the millions, so the cards are wider and a figure that is still too long wraps instead of spilling out. */
.admin .stats { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.admin .stat { padding: 16px; min-width: 0; }
.admin .stat b { font-size: 1.3rem; overflow-wrap: anywhere; }
.filters .btn, .pager .btn, .admin-main td .btn { padding: 8px 14px; font-size: .9rem; }
.pill.bad { background: #fee4e2; color: var(--red); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters input, .filters select, .edit-grid input, .edit-grid select { padding: 9px 14px; border-radius: 14px; border: 2px solid transparent; background: #f2f4f7; font-weight: 500; outline: none; max-width: 100%; }
.filters input:focus, .filters select:focus, .edit-grid input:focus, .edit-grid select:focus { border-color: var(--green); background: #fff; }
.filters input[type="search"] { flex: 1 1 100%; min-width: 0; }
th a.sort { color: inherit; text-decoration: none; }
th a.sort.on { color: var(--green-dark); }
.pager { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px 18px; }
.kv div { min-width: 0; overflow-wrap: anywhere; }
.kv span { display: block; color: var(--muted); font-size: .8rem; font-weight: 700; }
.edit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.edit-grid form { display: grid; gap: 8px; align-content: start; }
.edit-grid label { font-weight: 700; font-size: .85rem; display: grid; gap: 4px; }
.amount-in { color: var(--green-dark); font-weight: 700; }
.amount-out { color: var(--red); font-weight: 700; }

/* Live 3D city behind public pages */
#cityBg { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; opacity: 0; transition: opacity 1.2s; pointer-events: none; }
.city-on #cityBg { opacity: 1; }
.city-veil { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1.2s;
  background: linear-gradient(180deg, rgba(232, 243, 252, .82) 0%, rgba(232, 243, 252, .5) 42%, rgba(232, 243, 252, .22) 100%); }
.city-on .city-veil { opacity: 1; }
.has-city > *:not(#cityBg):not(.city-veil) { position: relative; z-index: 1; }
.has-city .hero h1, .has-city .auth h1 { text-shadow: 0 2px 18px rgba(255, 255, 255, .9); }
.has-city .lead, .has-city .auth > .muted { color: #1d2939; font-weight: 600; text-shadow: 0 1px 10px rgba(255, 255, 255, .95); }
.has-city .foot { color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }

/* Google button, divider, forgot link */
.btn-google { background: #fff; color: #1f1f1f; border: 1.5px solid #dadce0; box-shadow: none; }
.btn-google:hover { background: #f8fafd; }
.btn-apple { background: #000; color: #fff; border: 1.5px solid #000; box-shadow: none; }
.btn-apple:hover { background: #1f1f1f; }
.btn-google + .btn-apple { margin-top: 10px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 16px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.forgot { text-align: center; margin-top: 14px; font-weight: 700; font-size: .92rem; }
form[data-mode="signup"] .only-login { display: none; }

.field select { display: block; width: 100%; margin-top: 6px; padding: 13px 16px; border-radius: 16px; border: 2px solid transparent; background: #f2f4f7; font-weight: 500; }

.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 12px; }

.ad-edit { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.ad-edit summary { cursor: pointer; font-weight: 700; color: var(--green-dark); }
.ad-edit form { margin-top: 12px; }
.fold { margin-top: 16px; }
.fold > summary { cursor: pointer; font-weight: 800; font-size: 1.1rem; }
.fold[open] > summary { margin-bottom: 14px; }

/* Our social pages: round icon links */
.social { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 0 0 12px; }
.social-ico { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; box-shadow: 0 4px 12px rgba(16, 24, 40, .18); transition: transform .12s; }
.social-ico:hover { transform: translateY(-2px); background: var(--green-dark); }
.about .social { justify-content: flex-start; margin: 0; }
.has-city .foot .social-ico { background: #fff; color: var(--green-dark); }

/* Features and benefits pages */
.catalog { max-width: 980px; }
.catalog-filter { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 12px; }
.catalog-filter .field { margin-bottom: 8px; }
.catalog-count { grid-column: 1 / -1; font-size: .88rem; font-weight: 700; }
.about p.catalog-count { color: var(--muted); }
.catalog-group { display: grid; gap: 12px; scroll-margin-top: 12px; }
.catalog-group[hidden], .feat[hidden] { display: none; }
.catalog-group > h2 { font-size: 1.35rem; margin: 10px 0 0; text-shadow: 0 2px 14px rgba(255, 255, 255, .95); }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 12px; }
.feat { scroll-margin-top: 12px; }
.feat:target { outline: 3px solid var(--green); }
.feat-emoji { font-size: 1.8rem; }
.feat h3 { margin: 4px 0 6px; font-size: 1.05rem; }
.about .feat p { font-size: .94rem; margin-bottom: 8px; }
.about .feat p.feat-why { color: var(--green-dark); }
.catalog-jump, .benefit-uses { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.catalog-jump a, .benefit-uses a { text-decoration: none; }
.benefit { scroll-margin-top: 12px; }
.benefit-points { margin: 0 0 12px 20px; color: #344054; }
.benefit-points li { margin-bottom: 4px; }
.catalog-cta { text-align: center; }
.catalog-cta .cta { margin: 16px 0 0; }
.more-links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

/* About page */
.about { width: 100%; max-width: 760px; margin: 0 auto; padding: 8px 18px 50px; display: grid; gap: 16px; }
.about h1 { font-size: clamp(2rem, 7vw, 3rem); line-height: 1.05; letter-spacing: -.02em; }
.about h2 { font-size: 1.2rem; margin-bottom: 6px; }
.about p { color: #344054; margin-bottom: 10px; }
.about p:last-child { margin-bottom: 0; }
.founder { display: flex; gap: 14px; align-items: center; }
.founder .big-emoji { font-size: 2.4rem; }
.has-city .foot a { color: #fff; }

/* Terms, privacy and the 18+ confirmation */
.legal ul { margin: 0 0 10px; padding-left: 20px; color: #344054; }
.legal li { margin-bottom: 6px; }
.agree { display: flex; gap: 10px; align-items: flex-start; background: #f2f4f7; border-radius: 16px; padding: 12px 14px; margin-bottom: 14px; font-size: .9rem; cursor: pointer; }
.agree input { width: 20px; height: 20px; margin-top: 1px; flex: none; accent-color: var(--green); }
.agree-note { font-size: .82rem; color: var(--muted); text-align: center; margin-top: 10px; }

.snapshot { background: #f6f7f9; border-radius: 14px; padding: 12px 14px; margin: 8px 0 12px; white-space: pre-wrap; word-break: break-word; font: inherit; font-size: .93rem; }
code { background: #eef2f6; border-radius: 6px; padding: 1px 6px; font-size: .85rem; }

/* Public profile card */
.profile-card { text-align: center; display: grid; gap: 12px; }
.profile-face { font-size: 4.2rem; line-height: 1; }
.profile-card h1 { font-size: clamp(1.8rem, 7vw, 2.6rem); }

/* How to play and download pages */
.about ol { margin: 0; padding: 0; list-style: none; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 12px; }
.guide-grid > div { background: #f6f7f9; border-radius: 16px; padding: 12px 14px; }
.guide-grid p { margin: 4px 0 0; font-size: .93rem; }
.guide-steps { display: grid; gap: 8px; margin: 12px 0; counter-reset: step; }
.guide-steps li { counter-increment: step; position: relative; padding: 10px 14px 10px 46px; background: #f6f7f9; border-radius: 14px; color: #344054; }
.guide-steps li::before { content: counter(step); position: absolute; left: 12px; top: 10px; width: 24px; height: 24px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 800; font-size: .82rem; display: grid; place-items: center; }
kbd { display: inline-block; min-width: 26px; text-align: center; background: #fff; border: 1px solid #d0d5dd; border-bottom-width: 3px; border-radius: 7px; padding: 1px 6px; font: inherit; font-weight: 700; font-size: .85rem; }
.rich-list { display: grid; gap: 6px; }
.rich-list > a, .rich-list > div { display: flex; align-items: center; gap: 12px; background: #f6f7f9; border-radius: 14px; padding: 10px 14px; color: inherit; text-decoration: none; }
.rich-list > a:hover { background: var(--green-soft); }
.rich-rank { width: 34px; text-align: center; font-weight: 800; font-size: 1.1rem; flex: none; }
.rich-name { flex: 1; min-width: 0; display: grid; }
.rich-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rich-name small { color: var(--muted); }
.rich-worth { font-weight: 800; color: var(--green-dark); white-space: nowrap; }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin: 12px 0; }
.shots li p { margin: 8px 0 0; font-size: .93rem; }
.shot { height: 150px; border-radius: 18px; border: 3px solid #1d2433; background: #eef2f6; padding: 10px 8px; display: flex; flex-direction: column; gap: 6px; align-items: stretch; justify-content: flex-start; overflow: hidden; font-size: .78rem; }
.shot-bar { background: #fff; border-radius: 99px; padding: 5px 10px; display: flex; justify-content: space-between; align-items: center; white-space: nowrap; overflow: hidden; }
.shot-bar i { font-style: normal; font-weight: 800; background: #facc15; border-radius: 6px; padding: 0 7px; }
.shot-point { align-self: flex-end; font-weight: 700; color: #b54708; }
.shot-menu { background: #fff; border-radius: 10px; padding: 7px 10px; color: var(--muted); }
.shot-menu.on { background: #facc15; color: #101828; font-weight: 800; }
.shot-app { align-self: center; font-size: 2rem; background: #fff; border-radius: 16px; width: 54px; height: 54px; display: grid; place-items: center; margin-top: 4px; }
.shot-name { align-self: center; font-weight: 700; }
.shot-ok { align-self: flex-end; background: var(--green); color: #fff; font-weight: 800; border-radius: 99px; padding: 5px 14px; }

/* Admin forms laid out as an even grid: label, box, hint, all starting at the same height */
.room-card { display: grid; gap: 14px; margin-bottom: 12px; }
.room-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.room-top b { font-size: 1.05rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 16px; align-items: start; }
.form-grid .span { grid-column: 1 / -1; }
.form-grid label { display: flex; flex-direction: column; gap: 5px; font-weight: 700; font-size: .85rem; min-width: 0; }
.form-grid input:not([type="checkbox"]), .form-grid select, .form-grid textarea { width: 100%; min-width: 0; height: 44px; box-sizing: border-box; padding: 0 14px; border-radius: 14px; border: 2px solid transparent; background: #f2f4f7; font: inherit; font-weight: 500; outline: none; }
.form-grid textarea { height: auto; padding: 10px 14px; resize: vertical; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: var(--green); background: #fff; }
.form-grid small { font-weight: 500; font-size: .78rem; line-height: 1.35; }
.form-grid label.check { flex-direction: row; align-items: center; gap: 8px; min-height: 44px; }
.form-grid details summary { cursor: pointer; font-weight: 700; font-size: .85rem; color: var(--green-dark); }
.form-grid details .form-grid { margin-top: 12px; }

/* Sponsored quest booking at /advertise */
.quest-kinds { display: grid; gap: 8px; margin-bottom: 12px; }
.quest-kind { display: flex; gap: 10px; align-items: flex-start; background: #f6f7f9; border: 2px solid transparent; border-radius: 16px; padding: 12px 14px; cursor: pointer; }
.quest-kind:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.quest-kind input { margin-top: 4px; accent-color: var(--green); }
.quest-kind span { display: grid; gap: 2px; }
.quest-kind small { color: var(--muted); font-size: .86rem; }
.quest-kind em { font-style: normal; font-weight: 800; font-size: .86rem; color: var(--green-dark); }
.quest-colors { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.quest-colors input[type=color] { width: 64px; height: 40px; padding: 2px; border-radius: 10px; border: 2px solid #d0d5dd; background: #fff; }
.quest-shirt { width: 150px; height: 120px; border-radius: 26px 26px 14px 14px; display: grid; place-items: center; box-shadow: inset 0 -8px 0 rgba(0,0,0,.12); clip-path: polygon(22% 0, 38% 0, 50% 10%, 62% 0, 78% 0, 100% 22%, 86% 36%, 80% 30%, 80% 100%, 20% 100%, 20% 30%, 14% 36%, 0 22%); }
.quest-shirt span { font-weight: 800; font-size: .72rem; white-space: nowrap; text-align: center; line-height: 1.1; }

/* Create your game (/create-your-game) and the owner's Control Centre (/control) */
.make-hero { text-align: center; display: grid; gap: 10px; justify-items: center; }
.make-hero .lead { max-width: 600px; color: #1d2939; font-weight: 600; text-shadow: 0 1px 10px rgba(255, 255, 255, .95); }
.make-video { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #101828; box-shadow: var(--shadow); margin-top: 8px; }
.make-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.make-box .row-actions { margin-top: 6px; }
.make-slug { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.make-slug input { margin-top: 0; flex: 1; min-width: 0; }
.make-slug b { color: var(--muted); white-space: nowrap; font-size: .92rem; }
.field small.make-ok { color: var(--green-dark); font-weight: 700; }
.field small.make-bad { color: var(--red); font-weight: 700; }
.make-promo { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--green-soft); color: var(--green-dark); text-align: center; font-size: .95rem; }
.make-promo s { color: var(--muted); }
.make-tabs { margin-bottom: 0; background: rgba(255, 255, 255, .78); box-shadow: var(--shadow); }
.make-tabs .tab { font-size: 1rem; padding: 12px 10px; }
.make-tabs .tab.on { background: var(--green); color: #fff; }
.make-pane[hidden] { display: none; }
.about ol.make-top { display: grid; gap: 4px; margin-top: 8px; }
.make-top li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #eaecf0; }
.make-top li:first-child { border-top: 0; }
.make-rank { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--green-soft); color: var(--green-dark); font-weight: 800; display: grid; place-items: center; }
.make-top-game { display: grid; gap: 2px; min-width: 0; }
.make-top-game > a { overflow-wrap: anywhere; }
.make-top-game small { color: var(--muted); }
.make-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; color: #344054; }
.ctl-link { flex: 1; min-width: 180px; padding: 11px 14px; border-radius: 14px; border: 2px solid transparent; background: #f2f4f7; font: inherit; font-weight: 600; }
.ctl-switches { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 12px 0 14px; }
.ctl-switch { display: flex; gap: 10px; align-items: flex-start; background: #f2f4f7; border-radius: 16px; padding: 12px 14px; cursor: pointer; }
.ctl-switch input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--green); flex: none; }
.ctl-switch small { display: block; color: var(--muted); font-weight: 500; }
.game-ribbon { background: #101828; color: #fff; text-align: center; padding: 8px 14px; font-weight: 700; font-size: .92rem; }
.game-ribbon a { color: #86efac; }
.ctl-socials { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; }
.founder + .founder { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }

/* A quiet journal: opened by the player, never over a mini game. */
.story-dream { background: #edf7ef; border: 1px solid #cde5d3; border-radius: 18px; padding: 20px; margin-bottom: 24px; }
.story-dream > small, .story-dialogue > small { font-weight: 800; font-size: .65rem; letter-spacing: .09em; color: #0a6b39; }
.story-dream h3, .story-dialogue h3 { margin: 8px 0 10px; }
.story-dream > p, .story-dialogue > p { font-size: .88rem; line-height: 1.65; }
.story-milestone { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid #d8e9dd; }
.story-milestone > b { border-radius: 50%; background: #dbe6df; color: #54715e; width: 27px; height: 27px; display: grid; place-items: center; flex-shrink: 0; font-size: .75rem; }
.story-milestone.done > b { background: #0f8a4b; color: white; }
.story-milestone span { font-weight: 700; font-size: .82rem; }
.story-milestone small { display: block; margin-top: 3px; color: #6b7e71; font-weight: 400; font-size: .73rem; }
.story-chapters { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; counter-reset: chapters; margin: 14px 0 20px; }
.story-chapters li { font-size: .7rem; padding: 6px 9px; border-radius: 8px; background: #f0f2f3; color: #7b8289; }
.story-chapters li.current { background: #fff0c6; color: #775600; font-weight: 700; }
.story-chapters li.done { background: #e6f3e9; color: #0a6b39; }
.story-dialogue { border: 1px solid #e0e6e2; border-radius: 18px; background: #fffdf7; padding: 20px; margin-bottom: 20px; }
.story-dialogue .row { background: white; margin-top: 9px; }
.story-journal { padding: 14px 0; border-bottom: 1px solid #e4e9e5; }
.story-journal summary { font-size: .84rem; font-weight: 700; cursor: pointer; }
.story-journal p { font-size: .82rem; line-height: 1.6; color: #5e6b63; }
.story-dream summary { list-style: none; cursor: pointer; display: grid; gap: 6px; }
.story-dream summary::-webkit-details-marker { display: none; }
.story-dream summary small { color: #0a6b39; font-size: .63rem; font-weight: 800; letter-spacing: .08em; }
.story-dream summary b { font-size: 1rem; }
.story-dream summary span { color: #5d7766; font-size: .76rem; }
.story-dream[open] summary { margin-bottom: 16px; }

/* ---------- App Store and Google Play badges (functions/mobile.php nlg_store_badges) ---------- */
/* The badges are Apple's and Google's own images, never recoloured: only sized and spaced here. */
.store-badges { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.store-badge { display: inline-block; line-height: 0; border-radius: 8px; transition: transform .15s ease, box-shadow .15s ease; }
.store-badge:hover, .store-badge:focus-visible { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(16, 24, 40, .25); }
.store-badge img { display: block; height: 44px; width: auto; }
.hero .store-badges { justify-content: center; margin: -12px 0 28px; }
.store-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0 0 16px; }
.store-foot > span { font-weight: 700; font-size: .85rem; }
.store-foot .store-badges { justify-content: center; }
.store-foot .store-badge img { height: 38px; }
.store-card { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border: 2px solid var(--green); border-radius: var(--radius); padding: 14px 16px; }
.store-card-icon { border-radius: 14px; flex: none; }
.store-card b { display: block; color: var(--green-dark); }
.store-card span { display: block; font-size: .85rem; opacity: .75; margin: 2px 0 10px; }
.store-hero { text-align: center; border: 2px solid var(--green); background: linear-gradient(180deg, var(--green-soft), var(--card) 55%); }
.store-hero-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 8px 22px rgba(15, 138, 75, .35); margin: 4px auto 10px; display: block; }
.store-hero h2 { margin: 0 0 6px; }
.store-hero .store-badges { justify-content: center; margin: 16px 0 6px; }
.store-hero .store-badge img { height: 52px; }
.store-perks { list-style: none; padding: 0; margin: 14px auto 0; max-width: 420px; text-align: left; display: grid; gap: 6px; font-size: .92rem; }
.auth-stores { text-align: center; margin: 18px auto 0; max-width: 420px; }
.auth-stores p { margin: 0 0 8px; }
.auth-stores .store-badges { justify-content: center; }
@media (max-width: 480px) { .stat b { font-size: 1.25rem; } }
