:root {
  --ink: #3d342f;
  --muted: #82766d;
  --paper: #fffdf8;
  --cream: #fff4df;
  --yellow: #ffe79a;
  --orange: #ed8a45;
  --teal: #2a8b82;
  --teal-soft: #def3ee;
  --line: #ddcdb9;
  --shadow: #3d342f;
  --danger: #a83d38;
}

* { box-sizing: border-box; }

html { background: #f8ecdc; color: var(--ink); }

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-rounded, "Nunito", "Avenir Next", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 5% 4%, rgba(255, 231, 154, .55), transparent 25rem),
    linear-gradient(180deg, #fff9ee 0, #f8ecdc 100%);
}

button, input, select { font: inherit; }
[hidden] { display: none !important; }

.owner-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 12% 10%, rgba(255,231,154,.75), transparent 22rem),
    linear-gradient(145deg, #fff9ee, #f8ecdc);
}
.gate-card { width: min(430px, 100%); padding: 28px; background: var(--paper); border: 3px solid var(--ink); border-radius: 26px; box-shadow: 0 9px 0 var(--shadow); }
.gate-brand { margin-bottom: 30px; }
.gate-card h1 { margin: 0 0 9px; font-size: 31px; }
.gate-card > p { margin: 0 0 20px; color: var(--muted); line-height: 1.55; }
.gate-card form, .gate-card label { display: grid; gap: 7px; }
.gate-card form { gap: 13px; }
.gate-card label span { color: var(--muted); font-size: 12px; font-weight: 900; }
.gate-card button { min-height: 48px; color: #fff; background: var(--teal); border: 0; border-radius: 13px; font-weight: 1000; cursor: pointer; }
.gate-card button:disabled { opacity: .55; cursor: wait; }
.owner-error { min-height: 20px; margin: 14px 0 0 !important; color: var(--danger) !important; font-size: 12px; font-weight: 800; }

.hero {
  position: relative;
  min-height: 290px;
  padding: max(24px, env(safe-area-inset-top)) clamp(22px, 6vw, 82px) 46px;
  overflow: hidden;
  color: #173f43;
  background: linear-gradient(135deg, #ffeaa3, #ffd998 54%, #f6b86f);
  border-bottom: 8px solid var(--teal);
}

.hero::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  right: -110px;
  bottom: -180px;
  border: 42px solid rgba(255,255,255,.28);
  border-radius: 50%;
}

.brand { display: grid; gap: 0; position: relative; z-index: 1; }
.brand span { font-size: clamp(24px, 4vw, 38px); font-weight: 1000; letter-spacing: -.04em; }
.brand small { color: var(--teal); font-weight: 900; letter-spacing: .28em; }

.hero-copy { position: relative; z-index: 1; max-width: 760px; margin-top: 44px; }
.eyebrow { font-size: 13px; font-weight: 1000; letter-spacing: .14em; color: var(--teal); }
h1 { margin: 8px 0 12px; font-size: clamp(34px, 6vw, 62px); line-height: 1.02; letter-spacing: -.045em; }
.hero-copy p { max-width: 660px; margin: 0; font-size: clamp(16px, 2vw, 21px); line-height: 1.55; }
.otong { position: absolute; right: clamp(24px, 8vw, 110px); top: 50px; width: clamp(120px, 21vw, 240px); height: auto; transform: rotate(6deg); filter: drop-shadow(8px 10px 0 rgba(61,52,47,.18)); }

main { width: min(1220px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 70px; }

.readonly {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: -54px 0 28px;
  padding: 17px 20px;
  position: relative;
  z-index: 2;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: 0 8px 0 var(--shadow);
}
.readonly strong { flex: 0 0 auto; padding: 7px 11px; border-radius: 999px; color: #fff; background: var(--teal); font-size: 13px; letter-spacing: .08em; }
.readonly span { line-height: 1.4; }
.draft-banner strong { color: var(--ink); background: var(--yellow); }
.owner-logout { margin-left: auto; flex: 0 0 auto; padding: 7px 10px; color: var(--teal); background: transparent; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; font-weight: 900; cursor: pointer; }

.summary { display: grid; grid-template-columns: repeat(6, 1fr); gap: 13px; margin: 0 0 28px; }
.metric { min-width: 0; padding: 18px; background: var(--paper); border: 2px solid var(--line); border-radius: 18px; }
.metric strong { display: block; font-size: clamp(27px, 4vw, 42px); line-height: 1; }
.metric span { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; font-weight: 800; }
.review-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin: -15px 0 28px; }
.review-metric { padding: 14px 17px; background: #fff; border: 2px solid var(--line); border-radius: 15px; }
.review-metric strong { display: inline-block; margin-right: 7px; font-size: 23px; }
.review-metric span { color: var(--muted); font-size: 12px; font-weight: 900; }
.review-metric.approved { border-color: #92cabf; background: #edf9f6; }
.review-metric.blocked { border-color: #e8b7b2; background: #fff3f1; }
.review-pack { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin: 18px 0 28px; padding: 22px; background: #fff3c5; border: 2px solid var(--ink); border-radius: 24px; box-shadow: 5px 5px 0 var(--ink); }
.review-pack h2, .review-pack p { margin: 4px 0 0; }
.review-pack-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.review-pack-actions a { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 14px; color: #fff; background: var(--teal); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 3px 3px 0 var(--ink); font-weight: 900; text-decoration: none; }
.review-pack-actions a:hover { transform: translate(-1px, -1px); }

.toolbar { position: sticky; top: 10px; z-index: 5; padding: 18px; margin-bottom: 24px; background: rgba(255,253,248,.94); border: 2px solid var(--line); border-radius: 22px; box-shadow: 0 10px 28px rgba(61,52,47,.11); backdrop-filter: blur(12px); }
.toolbar label, .search-field { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 900; }
input, select { width: 100%; min-height: 46px; padding: 10px 13px; color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 13px; outline: none; }
input:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(42,139,130,.14); }
.filter-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.results-line { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
#reset-filter { padding: 5px 0; color: var(--teal); background: none; border: 0; font-weight: 900; text-decoration: underline; cursor: pointer; }
.toolbar-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.mode-switch { display: flex; padding: 3px; background: #efe6da; border-radius: 12px; }
.mode-switch button { min-height: 36px; padding: 6px 11px; color: var(--muted); background: transparent; border: 0; border-radius: 9px; font-size: 12px; font-weight: 900; cursor: pointer; }
.mode-switch button.active { color: #fff; background: var(--teal); }
.export-button { min-height: 38px; padding: 7px 12px; color: #fff; background: var(--orange); border: 0; border-radius: 11px; font-size: 12px; font-weight: 1000; cursor: pointer; }
.export-button:disabled { opacity: .45; cursor: not-allowed; }
.approved-export { min-height: 38px; padding: 7px 12px; color: #173f43; background: var(--yellow); border: 1px solid #d7ad3c; border-radius: 11px; font-size: 12px; font-weight: 1000; cursor: pointer; }
.approved-export:disabled { opacity: .45; cursor: not-allowed; }
.sync-all { min-height: 38px; padding: 7px 12px; color: #fff; background: var(--teal); border: 0; border-radius: 11px; font-size: 12px; font-weight: 1000; cursor: pointer; }
.sync-all:disabled { opacity: .45; cursor: not-allowed; }

.editor-guide { display: flex; align-items: center; gap: 12px; margin: -8px 0 22px; padding: 13px 16px; background: #fff4cf; border: 2px dashed #d9a942; border-radius: 16px; font-size: 13px; line-height: 1.45; }
.editor-guide strong { flex: 0 0 auto; }
.editor-guide code { padding: 2px 5px; color: #17665f; background: #fff; border-radius: 5px; font-weight: 900; }

.game-list { display: grid; gap: 18px; }
.game-card { overflow: hidden; background: var(--paper); border: 3px solid var(--ink); border-radius: 26px; box-shadow: 0 7px 0 var(--shadow); }
.game-head { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; padding: 20px; background: linear-gradient(110deg, var(--cream), #fff); border-bottom: 2px solid var(--line); }
.game-emoji { display: grid; place-items: center; width: 54px; height: 54px; font-size: 29px; background: #fff; border: 2px solid var(--ink); border-radius: 17px; }
.game-title h2 { margin: 0; font-size: clamp(21px, 3vw, 30px); line-height: 1.1; }
.game-title code { display: inline-block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.badge { padding: 7px 10px; border-radius: 999px; font-size: 11px; font-weight: 1000; letter-spacing: .06em; white-space: nowrap; }
.badge.live { color: #135c54; background: var(--teal-soft); }
.badge.archived { color: #6a4a19; background: #f8dfb9; }
.badge.source-only { color: #6d546e; background: #efdef0; }

.game-body { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.7fr); gap: 22px; padding: 20px; }
.facts { display: grid; align-content: start; gap: 12px; }
.fact { padding: 13px 14px; background: #fbf5eb; border: 1px solid var(--line); border-radius: 14px; }
.fact-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 1000; letter-spacing: .08em; text-transform: uppercase; }
.fact strong { font-size: 15px; }
.fact p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.tier-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tier { padding: 5px 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 800; }
.source-path { display: block; overflow-wrap: anywhere; color: #1e6f68; font-size: 12px; }

.tutorial h3 { margin: 0 0 4px; font-size: 19px; }
.tutorial > p { margin: 0 0 13px; color: var(--muted); font-size: 13px; }
.tutorial-list { display: grid; gap: 9px; padding: 0; margin: 0; list-style: none; counter-reset: tutorial; }
.tutorial-list li { position: relative; padding: 12px 13px 12px 46px; line-height: 1.5; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.tutorial-list li::before { counter-increment: tutorial; content: counter(tutorial); position: absolute; left: 12px; top: 11px; display: grid; place-items: center; width: 24px; height: 24px; color: #fff; background: var(--teal); border-radius: 8px; font-size: 12px; font-weight: 1000; }
.tutorial-key { display: block; margin-top: 5px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.tutorial-list li.has-draft { border-color: var(--teal); box-shadow: inset 4px 0 0 var(--teal); }
.tutorial-list li.source-drift { border-color: var(--orange); box-shadow: inset 4px 0 0 var(--orange); }
.copy-label { display: block; margin: 0 0 6px; color: var(--muted); font-size: 10px; font-weight: 1000; letter-spacing: .08em; text-transform: uppercase; }
.original-copy { padding: 9px 11px; color: var(--muted); background: #faf6ef; border-radius: 10px; }
.draft-field { display: grid; gap: 6px; margin-top: 10px; }
.draft-field textarea { width: 100%; min-height: 92px; resize: vertical; padding: 11px 12px; color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 11px; font: inherit; line-height: 1.5; outline: none; }
.draft-field textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(42,139,130,.14); }
.draft-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 30px; }
.draft-status { color: var(--muted); font-size: 11px; font-weight: 900; }
.draft-status.changed { color: var(--teal); }
.draft-status.drift { color: #9a541d; }
.reset-draft { padding: 5px 8px; color: var(--danger); background: transparent; border: 1px solid #e8b7b2; border-radius: 8px; font-size: 11px; font-weight: 900; cursor: pointer; }
.shared-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-top: 5px; }
.shared-save, .shared-history { padding: 6px 9px; border-radius: 8px; font-size: 11px; font-weight: 900; cursor: pointer; }
.shared-save { color: #fff; background: var(--teal); border: 1px solid var(--teal); }
.shared-save.reset { color: var(--danger); background: #fff; border-color: #e8b7b2; }
.shared-save:disabled, .shared-history:disabled { opacity: .5; cursor: wait; }
.shared-history { color: var(--teal); background: #fff; border: 1px solid #add5cf; }
.draft-preview { margin-top: 9px; padding: 9px 11px; background: var(--teal-soft); border-radius: 10px; }
.draft-preview .copy-label { color: #236e67; }
.draft-compare { margin-top: 4px; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.draft-compare summary { padding: 9px 11px; color: var(--teal); background: #fffaf2; font-size: 11px; font-weight: 1000; cursor: pointer; }
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.compare-pane { min-width: 0; padding: 11px; background: #fff; }
.compare-pane.before { background: #faf6ef; }
.compare-pane.after { background: #edf9f6; }
.compare-copy { overflow-wrap: anywhere; font-size: 12px; line-height: 1.5; }
.draft-review { display: grid; gap: 8px; margin-top: 5px; padding: 11px; background: #fffaf0; border: 1px solid #e6d2ad; border-radius: 11px; }
.review-head, .review-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.review-head strong { font-size: 12px; }
.review-head span { padding: 4px 7px; border-radius: 999px; font-size: 9px; font-weight: 1000; letter-spacing: .05em; }
.review-head span.pending { color: #704a0b; background: #ffe9b8; }
.review-head span.approved { color: #155b53; background: #cfeee8; }
.review-head span.blocked { color: #842f2a; background: #f5ceca; }
.validation-list { display: grid; gap: 4px; }
.validation-list p { margin: 0; padding-left: 17px; position: relative; font-size: 11px; line-height: 1.4; }
.validation-list p::before { position: absolute; left: 0; top: 0; font-weight: 1000; }
.validation-ok { color: #17665f; }
.validation-ok::before { content: "✓"; }
.validation-error { color: var(--danger); }
.validation-error::before { content: "!"; }
.validation-warning { color: #8a5712; }
.validation-warning::before { content: "!"; }
.validation-muted { color: var(--muted); }
.validation-muted::before { content: "•"; }
.review-actions { justify-content: flex-end; }
.review-actions button { padding: 7px 10px; border-radius: 9px; font-size: 11px; font-weight: 1000; cursor: pointer; }
[data-review-approve] { color: #fff; background: var(--teal); border: 1px solid var(--teal); }
[data-review-approve]:disabled { opacity: .48; cursor: not-allowed; }
.review-reopen { color: #8a5712; background: #fff; border: 1px solid #dfbd7b; }
.review-event { background: #edf9f6; border-color: #a7d9d0; }
.review-copy { padding: 10px 12px; background: #fff; border-radius: 11px; }
.review-copy.is-draft { background: var(--teal-soft); }
.revision-pill { display: inline-block; margin-top: 7px; padding: 4px 7px; color: #fff; background: var(--teal); border-radius: 999px; font-size: 9px; font-weight: 1000; letter-spacing: .06em; }
.special, .issues { margin-top: 12px; padding: 12px 14px; border-radius: 14px; font-size: 13px; line-height: 1.5; }
.special { background: var(--teal-soft); border: 1px solid #a7d9d0; }
.issues { color: #77342f; background: #fff0ed; border: 1px solid #efbcb5; }
.issues strong { display: block; margin-bottom: 4px; }
.issues ul { margin: 0; padding-left: 18px; }
.empty-state { padding: 50px 20px; text-align: center; color: var(--muted); font-weight: 800; }
.toast { position: fixed; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); z-index: 20; transform: translateX(-50%); width: max-content; max-width: calc(100% - 30px); padding: 11px 15px; color: #fff; background: #173f43; border-radius: 12px; box-shadow: 0 7px 24px rgba(61,52,47,.28); font-size: 13px; font-weight: 900; text-align: center; }

.history-modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 18px; background: rgba(23,31,30,.58); }
.history-card { position: relative; width: min(680px, 100%); max-height: min(82vh, 760px); overflow: auto; padding: 23px; background: var(--paper); border: 3px solid var(--ink); border-radius: 23px; box-shadow: 0 10px 0 var(--shadow); }
.history-card h2 { margin: 3px 42px 5px 0; font-size: 25px; }
.history-close { position: absolute; right: 14px; top: 12px; width: 40px; height: 40px; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 50%; font-size: 27px; line-height: 1; cursor: pointer; }
.history-status { margin: 0 0 14px; color: var(--muted); font-size: 12px; }
.history-list { display: grid; gap: 10px; }
.history-entry { padding: 13px; background: #fbf5eb; border: 1px solid var(--line); border-radius: 13px; }
.history-entry header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.history-entry strong { font-size: 13px; }
.history-entry time, .history-entry small { color: var(--muted); font-size: 10px; }
.history-entry pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }

footer { display: flex; justify-content: space-between; gap: 12px; padding: 26px max(22px, calc((100% - 1220px) / 2)); color: #fff; background: #173f43; }
footer span { opacity: .7; }

.content-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.content-tabs a { color: var(--ink); background: rgba(255,255,255,.72); border: 2px solid var(--ink); border-radius: 999px; padding: 9px 16px; font-weight: 800; text-decoration: none; }
.content-tabs a.active { color: #fff; background: var(--teal); }
.qb-main { width: min(1180px, calc(100% - 28px)); margin: 0 auto 50px; }
.qb-safety { margin: 18px 0; padding: 17px 18px; background: #fff6ce; border: 2px solid #d6a43c; border-radius: 18px; }
.qb-safety strong { display: block; margin-bottom: 5px; font-size: 18px; }
.qb-safety p { margin: 0; line-height: 1.55; }
.qb-controls { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 12px; margin: 18px 0; padding: 17px; background: #fff; border: 2px solid var(--line); border-radius: 20px; }
.qb-controls label { display: grid; gap: 7px; font-weight: 800; }
.qb-controls select, .qb-controls input { width: 100%; min-width: 0; padding: 12px; color: var(--ink); background: #fffdf8; border: 2px solid var(--line); border-radius: 12px; font: inherit; }
.qb-bank-head { margin: 18px 0 10px; }
.qb-bank-head h2 { margin: 0 0 4px; font-size: clamp(24px, 4vw, 36px); }
.qb-bank-head p { margin: 5px 0; color: var(--muted); line-height: 1.5; }
.qb-bank-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.qb-bank-meta span { padding: 6px 10px; background: #eef8f5; border-radius: 999px; font-size: 13px; font-weight: 800; }
.qb-actions { position: sticky; top: 8px; z-index: 8; display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; padding: 12px; background: rgba(255,253,248,.96); border: 2px solid var(--line); border-radius: 18px; box-shadow: 0 8px 20px rgba(56,47,42,.08); }
.qb-actions button { padding: 10px 13px; }
.qb-actions button.primary { color: #fff; background: var(--teal); }
.qb-validation { margin: 12px 0; padding: 13px 15px; background: #f6f2ea; border-radius: 14px; }
.qb-validation.ok { background: #e8f7f1; color: #1f6a5f; }
.qb-validation.blocked { background: #fff0eb; color: #9b3b25; }
.qb-validation p { margin: 4px 0; }
.qb-editor { display: grid; gap: 12px; }
.qb-entry { display: grid; grid-template-columns: 52px minmax(0,1fr) auto; gap: 12px; align-items: start; padding: 14px; background: #fff; border: 2px solid var(--line); border-radius: 16px; }
.qb-entry-number { display: grid; place-items: center; width: 42px; height: 42px; background: #fff2b7; border-radius: 50%; font-weight: 900; }
.qb-entry-fields { display: grid; grid-template-columns: repeat(var(--field-count, 2), minmax(0,1fr)); gap: 10px; }
.qb-entry-fields label { display: grid; gap: 5px; font-size: 13px; font-weight: 800; }
.qb-entry-fields input, .qb-entry-fields textarea { width: 100%; min-width: 0; padding: 10px; color: var(--ink); background: #fffdf8; border: 2px solid #ded3c5; border-radius: 10px; font: inherit; line-height: 1.4; }
.qb-entry-fields textarea { min-height: 72px; resize: vertical; }
.qb-delete { color: #8a3929; background: #fff1ec; }
.qb-add { width: 100%; padding: 13px; border-style: dashed; }
.qb-empty { padding: 28px; text-align: center; color: var(--muted); background: #fff; border-radius: 16px; }
.qb-pattern-preview { display: grid; width: 90px; aspect-ratio: 1; gap: 1px; margin-top: 6px; padding: 4px; background: #ddd; }
.qb-pattern-preview i { display: block; background: #fff; }
.qb-pattern-preview i.on { background: var(--ink); }
.qb-generators { margin-top: 26px; padding: 18px; background: #fff; border: 2px solid var(--line); border-radius: 20px; }
.qb-generators summary { cursor: pointer; font-size: 20px; font-weight: 900; }
.generator-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 14px; }
.generator-card { padding: 13px; background: #f7f4ed; border-radius: 14px; }
.generator-card strong { display: block; margin-bottom: 4px; }
.generator-card small { display: block; color: var(--muted); line-height: 1.45; }

@media (max-width: 880px) {
  .otong { opacity: .2; right: 10px; }
  .hero-copy { max-width: 86%; }
  .summary { grid-template-columns: repeat(3, 1fr); }
  .review-summary { grid-template-columns: repeat(3, 1fr); }
  .filter-row { grid-template-columns: repeat(2, 1fr); }
  .game-body { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .hero { min-height: 300px; padding-left: 20px; padding-right: 20px; }
  .hero-copy { max-width: 100%; margin-top: 34px; }
  .hero-copy p { max-width: 90%; }
  main { width: min(100% - 20px, 1220px); padding-top: 20px; }
  .readonly { align-items: flex-start; margin-top: -42px; }
  .readonly { flex-direction: column; }
  .owner-logout { margin-left: 0; }
  .summary { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .review-summary { grid-template-columns: 1fr; gap: 8px; margin-top: -15px; }
  .review-pack { align-items: stretch; flex-direction: column; }
  .review-pack-actions { justify-content: stretch; }
  .review-pack-actions a { justify-content: center; flex: 1 1 100%; }
  .metric { padding: 14px; }
  .toolbar { position: static; padding: 14px; }
  .filter-row { grid-template-columns: 1fr; gap: 9px; }
  .compare-grid { grid-template-columns: 1fr; }
  .results-line { align-items: flex-start; gap: 12px; }
  .toolbar-actions { align-items: flex-end; flex-direction: column; }
  .editor-guide { align-items: flex-start; flex-direction: column; }
  .game-head { grid-template-columns: auto 1fr; padding: 15px; }
  .game-head .badge { grid-column: 2; justify-self: start; }
  .game-body { padding: 15px; gap: 18px; }
  .tutorial-list li { padding-left: 42px; }
  footer { flex-direction: column; }
  .qb-controls { grid-template-columns: 1fr; }
  .qb-actions { position: static; }
  .qb-entry { grid-template-columns: 40px minmax(0,1fr); }
  .qb-entry-number { width: 36px; height: 36px; }
  .qb-entry-fields { grid-column: 2; grid-template-columns: 1fr; }
  .qb-delete { grid-column: 2; justify-self: start; }
  .generator-list { grid-template-columns: 1fr; }
}
