:root {
  --bg: #f4f1e8;
  --card: #ffffff;
  --ink: #1c1f1a;
  --muted: #5f655c;
  --line: #e2ded3;
  --line-2: #cfcabd;
  --brand: #14532d;
  --brand-2: #1f7a43;
  --brand-soft: #e6f2ea;
  --tile: #f3e4c4;
  --tile-ink: #1d1d1d;
  --empty: #39404a;
  --tw: #b9472f;
  --dw: #d4834a;
  --tl: #2b6ea8;
  --dl: #4b9a68;
  --new: #ffd84d;
  --sel: #4da3ff;
  --warn-bg: #fff6dd;
  --warn-line: #e8c35a;
  --err: #b42318;
  --err-bg: #fdecea;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(28,31,26,.04), 0 6px 20px rgba(28,31,26,.06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--brand-2); }
main { max-width: 760px; margin: 0 auto; padding: 0 16px 48px; }
h1 { font-size: clamp(1.55rem, 5vw, 2.2rem); line-height: 1.15; margin: 20px 0 8px; letter-spacing: -.015em; }
h2 { font-size: 1.3rem; margin: 36px 0 10px; letter-spacing: -.01em; }
h3 { font-size: 1.05rem; margin: 20px 0 4px; }
.lead { color: var(--muted); font-size: 1.05rem; margin-top: 0; }
.small { font-size: .85rem; color: var(--muted); }
:focus-visible { outline: 3px solid var(--sel); outline-offset: 2px; }

/* Sidhuvud */
.top {
  display: flex; align-items: center; justify-content: space-between; position: relative;
  max-width: 760px; margin: 0 auto; padding: 14px 16px;
}
.logo { font-weight: 800; font-size: 1.25rem; text-decoration: none; color: var(--ink); letter-spacing: -.01em; display: inline-flex; align-items: center; }
.logo-tile {
  display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; margin-right: 2px;
  background: var(--tile); border-radius: 5px; box-shadow: inset 0 -2px 0 rgba(0,0,0,.12);
}
.top nav a { text-decoration: none; font-weight: 600; }

/* Knappar */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 22px; cursor: pointer;
  background: var(--brand); color: #fff; font: inherit; font-weight: 700; text-decoration: none;
  min-height: 48px; line-height: 1.2; transition: background .15s, transform .05s;
}
.btn:hover { background: var(--brand-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn-ghost { background: transparent; color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); }
.btn-ghost:hover { background: rgba(20,83,45,.06); }
.btn-small { padding: 8px 14px; min-height: 44px; font-size: .92rem; }
.btn-block { width: 100%; }
.btn-lg { font-size: 1.08rem; min-height: 54px; padding: 14px 24px; }
.btn-spin {
  width: 18px; height: 18px; border-radius: 50%; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: spin .8s linear infinite; flex: none;
}
.linkish { background: none; border: 0; color: var(--brand-2); text-decoration: underline; font: inherit; cursor: pointer; padding: 10px 4px; min-height: 44px; }

.flash {
  max-width: 728px; margin: 0 auto 8px; padding: 12px 16px; border-radius: var(--radius);
  background: #e6f4ea; color: #12401f;
}

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 16px 0; }
.card > h2:first-of-type { margin-top: 0; }
.mt { margin-top: 20px; }
.links { text-align: center; margin-top: 16px; }

/* Spelväljare */
.games { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 16px 0 24px; }
.game {
  display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 14px; padding: 18px 20px;
  border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow); transition: transform .12s, border-color .12s;
}
.game:hover { transform: translateY(-1px); border-color: var(--brand-2); }
.game strong { font-size: 1.2rem; display: block; line-height: 1.2; }
.game-icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 10px;
  background: var(--tile); color: var(--tile-ink); font-weight: 800; font-size: 1.4rem; box-shadow: inset 0 -3px 0 rgba(0,0,0,.12);
}
.game-arrow { color: var(--brand); font-size: 1.5rem; line-height: 1; }
.game.soon { opacity: .55; pointer-events: none; }
.steps-strip { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 8px 0 24px; padding: 0; list-style: none; }
.steps-strip li { display: flex; align-items: flex-start; gap: 10px; font-size: .95rem; color: var(--muted); }
.steps-strip li > span:last-child { padding-top: 2px; }
@media (min-width: 640px) { .steps-strip { grid-template-columns: repeat(3, 1fr); } }
.steps-strip strong { color: var(--ink); }
.step-no {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none;
  background: var(--brand); color: #fff; font-weight: 800; font-size: .9rem;
}

/* Verktyget */
.tool { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; margin: 16px 0 8px; box-shadow: var(--shadow); }
.upload {
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  padding: 28px 16px 20px; border: 2px dashed var(--line-2); border-radius: var(--radius); background: #fcfbf7;
}
.upload-art { display: flex; gap: 6px; margin-bottom: 4px; }
.upload-art span {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 7px; background: var(--tile); color: var(--tile-ink);
  font-weight: 800; font-size: 1.3rem; box-shadow: inset 0 -3px 0 rgba(0,0,0,.14); transform: rotate(-4deg);
}
.upload-art span:nth-child(2) { transform: rotate(2deg) translateY(-3px); }
.upload-art span:nth-child(3) { transform: rotate(5deg); }
.upload .small { margin: 0; }
.upload .error { margin: 4px 0 0; }
.upload input[type=file], .file-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.progress { text-align: center; padding: 40px 8px; color: var(--muted); }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--brand); margin: 0 auto 14px; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.notice { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; font-size: .95rem; }
.notice p { margin: 0; }
.notice p + p { margin-top: 8px; }
.error { color: var(--err); }
.error-box {
  margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--err-bg); color: var(--err);
  border: 1px solid #f3c2bd; font-size: .95rem; font-weight: 600;
}

/* Granskningssteget */
.side { display: flex; flex-direction: column; }
.side > * { order: 1; }
.side > .results { order: 0; }

.shot-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.shot-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.shot-info .small { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }
.shot-thumb { width: 40px; height: 40px; border-radius: 8px; flex: none; border: 1px solid var(--line); background: var(--empty); }
.shot-actions { display: flex; gap: 8px; flex: none; }
@media (max-width: 439px) { .shot-info .small { display: none; } }
.shot-bar .btn { cursor: pointer; }
.preview { margin: 0 0 14px; }
.preview canvas { width: 100%; height: auto; border-radius: 10px; display: block; }

.step-head { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; flex-wrap: wrap; }
.step-title { font-size: 1.08rem; font-weight: 800; margin: 0; letter-spacing: 0; line-height: 1.2; }
.step-head .small { flex-basis: 100%; margin-top: -4px; padding-left: 38px; }
.layout-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.layout-label { font-weight: 600; font-size: .92rem; color: var(--muted); }
.rack-head { margin-top: 22px; }
.rerun { display: none; margin: 18px 0 -12px; padding-top: 14px; border-top: 1px solid var(--line); }
.has-moves .rerun { display: block; }
.has-moves .rack-head .step-no { display: none; }
.rack-head .rack-count { flex-basis: auto; margin: 0 0 0 auto; padding: 0; }

.layout { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.seg {
  border: 0; background: transparent; border-radius: 999px; padding: 6px 12px; min-height: 36px; font: inherit; font-size: .88rem; font-weight: 600;
  color: var(--muted); cursor: pointer;
}
.seg.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.layout-hint { margin: -4px 0 10px; }

/* Spelplanen */
.board-wrap { display: flex; justify-content: center; }
.board {
  --n: 15; --cell: 46px;
  display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 2px; width: 100%;
  max-width: calc(var(--n) * var(--cell));
  background: #22272e; padding: 3px; border-radius: 10px; user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.cell {
  position: relative; aspect-ratio: 1; border-radius: 3px; background: var(--empty);
  display: grid; place-items: center; font-weight: 800; color: #fff;
  font-size: clamp(9px, 3.3vw, 19px); line-height: 1; cursor: pointer;
}
.cell .lbl { font-size: .5em; font-weight: 700; opacity: .9; letter-spacing: .02em; }
.cell.TW { background: var(--tw); } .cell.DW { background: var(--dw); }
.cell.TL { background: var(--tl); } .cell.DL { background: var(--dl); }
.cell.tile { background: var(--tile); color: var(--tile-ink); box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); }
.cell.tile.blank { color: #8a6d3b; }
.cell .pts { position: absolute; top: 1px; right: 2px; font-size: .42em; font-weight: 700; opacity: .75; }
.cell.unsure { outline: 2px solid var(--err); outline-offset: -2px; background: #fde9d9; }
.cell.new { background: var(--new); color: #1d1d1d; box-shadow: inset 0 -2px 0 rgba(0,0,0,.18), 0 0 0 1.5px #fff; z-index: 1; }
.cell.center::after { content: "★"; font-size: .7em; opacity: .5; }
.cell.tile.center::after, .cell.new.center::after, .cell.sel.center::after { content: none; }
.cell.sel {
  outline: 3px solid var(--sel); outline-offset: 0; z-index: 2; transform: scale(1.18); border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.cell.sel:not(.tile):not(.new) { background: #1f3b5c; }
.cell.sel::before {
  content: "→"; position: absolute; right: -1px; bottom: -1px; font-size: .5em; line-height: 1; padding: 1px 2px;
  background: var(--sel); color: #fff; border-radius: 3px 0 3px 0; font-weight: 800;
}
.board[data-dir=v] .cell.sel::before { content: "↓"; }

.edit-bar { margin: 10px 0 0; min-height: 48px; }
.edit-bar .hint { margin: 0; font-size: .88rem; color: var(--muted); padding: 6px 2px; }
.unsure-key { display: inline-block; padding: 0 6px; border-radius: 4px; outline: 2px solid var(--err); outline-offset: -2px; background: #fde9d9; color: var(--ink); font-weight: 700; font-size: .8rem; }
.edit-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.edit-pos { flex-basis: 100%; font-size: .85rem; font-weight: 700; color: var(--muted); }
.chip {
  border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: .92rem; font-weight: 600;
  cursor: pointer; min-height: 44px; color: var(--ink);
}
.chip:disabled { opacity: .45; cursor: default; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip-done { margin-left: auto; background: var(--brand); color: #fff; border-color: var(--brand); }
.sr-input { position: fixed; left: -100px; top: 50%; width: 1px; height: 1px; opacity: 0; }

/* Brickhållaren */
.rack-row { position: relative; }
.rack-input {
  width: 100%; font: inherit; font-size: 1.7rem; font-weight: 800; letter-spacing: .4em; text-transform: uppercase; text-indent: .2em;
  padding: 12px 52px 12px 14px; border: 2px solid var(--line-2); border-radius: 12px; background: #fffdf7; color: var(--tile-ink);
  min-height: 60px; -webkit-appearance: none; appearance: none;
}
.rack-input::placeholder { color: #b8b2a3; font-weight: 600; letter-spacing: .05em; font-size: 1.05rem; text-indent: 0; text-transform: none; }
.rack-input:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(31,122,67,.15); }
.rack-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: transparent; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.rack-clear:hover { background: var(--bg); }
.rack-hint { margin: 6px 0 14px; }

.quota { font-size: .88rem; color: var(--muted); text-align: center; margin: 10px 0 0; }

/* Resultat */
.results { margin: 14px 0 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.move-nav {
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 6px;
  margin: 0 0 10px; padding: 6px; border-radius: 12px; background: var(--brand-soft); border: 1px solid #c9e2d1;
}
.nav-btn {
  width: 44px; height: 44px; border-radius: 10px; border: 0; background: #fff; color: var(--brand); font-size: 1.6rem; line-height: 1;
  cursor: pointer; font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.nav-btn:disabled { opacity: .35; cursor: default; }
.move-nav-mid { text-align: center; min-width: 0; }
.nav-title { font-weight: 600; color: var(--muted); font-size: .95rem; }
.nav-line { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.nav-no { font-size: .8rem; font-weight: 700; color: var(--muted); }
.nav-w { font-weight: 800; font-size: 1.15rem; letter-spacing: .05em; }
.nav-w .bl, .move .w .bl { color: #8a6d3b; text-decoration: underline dotted; }
.nav-pts { font-weight: 800; color: var(--brand); }
.nav-sub { font-size: .8rem; color: var(--muted); }

.moves { list-style: none; padding: 0; margin: 0; }
.move {
  display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; cursor: pointer; background: #fff;
  min-height: 60px; transition: border-color .12s, background .12s;
}
.move:hover { border-color: var(--line-2); }
.move.on { border-color: var(--brand-2); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand-2) inset; }
.move .no { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--bg); font-weight: 800; font-size: .9rem; color: var(--muted); }
.move.on .no { background: var(--brand); color: #fff; }
.move .mid { min-width: 0; }
.move .w { font-weight: 800; font-size: 1.2rem; letter-spacing: .05em; display: block; }
.move .where { font-size: .82rem; color: var(--muted); margin-top: 2px; }
.move .cross { font-size: .8rem; color: var(--brand-2); font-weight: 600; margin-top: 1px; }
.move .pts { font-weight: 800; font-size: 1.25rem; color: var(--brand); white-space: nowrap; }
.move .pts small { font-size: .8rem; font-weight: 700; }
.bingo { display: inline-block; font-size: .7rem; letter-spacing: 0; background: var(--new); border-radius: 6px; padding: 2px 7px; margin-left: 8px; vertical-align: middle; }
.move.skel { pointer-events: none; }
.move.skel span { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--line) 25%, #f0ede4 50%, var(--line) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.move.skel span:nth-child(1) { width: 30px; height: 30px; border-radius: 50%; }
.move.skel span:nth-child(2) { width: 60%; height: 18px; }
.move.skel span:nth-child(3) { width: 40px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { padding: 20px 16px; border-radius: 12px; background: var(--bg); color: var(--muted); text-align: center; font-size: .95rem; }

.cta { text-align: center; margin: 18px 0 0; background: var(--brand-soft); border-color: #c9e2d1; }
.cta h3 { margin-top: 0; font-size: 1.2rem; }
.cta .cta-used { margin: 0 0 6px; font-weight: 700; color: var(--err); }
.cta .btn { margin-top: 4px; }

/* Formulär */
.form label { display: block; font-weight: 600; margin: 14px 0 6px; }
.form input[type=email], .form input[type=text], .form input[type=password] {
  width: 100%; font: inherit; font-size: 1.05rem; padding: 12px 14px; border: 2px solid var(--line-2); border-radius: 12px; background: #fff; min-height: 48px;
}
.form input:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(31,122,67,.15); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; }
.check input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--brand); }
.hp { position: absolute; left: -9999px; }

.faq dt { font-weight: 700; margin-top: 16px; }
.faq dd { margin: 4px 0 0; color: #33372f; }

.foot { max-width: 760px; margin: 0 auto; padding: 24px 16px 40px; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); text-align: center; }
.foot a { color: inherit; }
.foot p { margin: 6px 0; }

.acct { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--tile); color: var(--brand); }
.acct .pawn { flex: none; }
.top nav { display: flex; align-items: center; gap: 14px; }
.login-link { color: var(--ink); }

/* Meny */
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px; border: 2px solid var(--brand); border-radius: 10px;
  color: var(--brand); font-weight: 700; background: var(--card); user-select: none; -webkit-user-select: none; }
.menu[open] summary { background: var(--brand); color: #fff; }
.menu summary::-webkit-details-marker { display: none; }
.bars { display: grid; gap: 4px; width: 16px; }
.bars i { display: block; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s, opacity .2s; }
.menu[open] .bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu[open] .bars i:nth-child(2) { opacity: 0; }
.menu[open] .bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.menu-panel { position: absolute; right: 0; top: 52px; z-index: 20; min-width: 230px; background: var(--card);
  border: 1px solid var(--line); border-radius: 16px; padding: 8px; box-shadow: 0 12px 32px rgba(0,0,0,.14);
  display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.menu-panel a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; min-height: 44px; border-radius: 10px;
  color: var(--ink); text-decoration: none; font-weight: 600; }
.menu-panel a:hover { background: var(--bg); }
.menu-panel .menu-main { background: var(--tile); color: var(--brand); }
.menu-panel .menu-small { font-weight: 400; font-size: .92rem; color: var(--muted); padding: 8px 14px; min-height: 40px; }
.menu-panel hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.menu-panel .menu-join { color: var(--brand); }

/* Admin */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 16px 0; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.kpi span { font-size: .82rem; color: var(--muted); font-weight: 600; }
.kpi strong { font-size: 1.6rem; line-height: 1.2; }
.kpi em { font-style: normal; font-size: .78rem; color: var(--muted); }
.chart-card { padding: 14px; }
.chart { width: 100%; height: auto; display: block; }
.bar-member { fill: var(--brand); }
.bar-anon { fill: #9fc9ad; }
.axis { font-size: 11px; fill: var(--muted); }
.legend { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.sw-member { background: var(--brand); } .sw-anon { background: #9fc9ad; margin-left: 10px; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.admin-table { border-collapse: collapse; width: 100%; font-size: .88rem; }
.admin-table th, .admin-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.admin-table th { font-size: .78rem; color: var(--muted); }
.admin-table td:nth-child(n+3) { text-align: right; }
.admin-table tr.muted td { color: var(--muted); }
.tag { display: inline-block; font-size: .7rem; padding: 1px 6px; border-radius: 6px; background: var(--tile); color: var(--brand); margin-left: 4px; }
.btn-danger { background: var(--err); }
.btn-danger:hover { background: #8f1c13; }
.confirm-box { border-color: var(--err); }
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-ghost.btn-small { color: var(--brand); background: #fff; }
.notice .btn-small { min-height: 40px; }

/* Större skärmar */
@media (min-width: 640px) {
  .tool { padding: 24px; }
  .step-head .small { flex-basis: auto; padding-left: 0; margin: 0 0 0 auto; }
}
@media (min-width: 960px) {
  .tool { padding: 28px; width: min(1100px, calc(100vw - 48px)); margin-left: calc(50% - min(550px, 50vw - 24px)); }
  .has-moves .rerun { display: none; }
  .has-moves .rack-head .step-no { display: inline-grid; }
  .review { display: grid; grid-template-columns: minmax(0, 1fr) 400px; column-gap: 36px; align-items: start; }
  .review > .shot-bar, .review > .preview, .review > [data-notices], .review > .cta { grid-column: 1 / -1; }
  .main-col { position: sticky; top: 16px; }
  .side > * { order: 0; }
  .board { --cell: 44px; }
  .cell { font-size: 19px; }
  .rack-head { margin-top: 2px; }
  .results { margin-top: 20px; }
  .preview canvas { max-height: 70vh; width: auto; max-width: 100%; margin: 0 auto; }
}
[hidden] { display: none !important; }
.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; max-width: 560px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
.consent p { margin: 0 0 10px; font-size: .95rem; }
.consent-row { display: flex; gap: 8px; justify-content: flex-end; }
.consent-row .btn { min-height: 44px; }
.cta.share { background: #fff8e1; border-color: #f0dc9a; }
.cta.share h3::before { content: "\270E"; margin-right: 8px; }
.share-note { min-height: 1.2em; margin: 10px 0 0; word-break: break-word; }
.fusklapp { text-align: left; background: #fffdf5; border: 1px dashed #d9c37a; border-radius: 6px; padding: 12px 14px; margin: 4px 0 12px; font-size: .95rem; line-height: 1.45; transform: rotate(-1deg); box-shadow: 0 2px 6px rgba(0,0,0,.06); -webkit-user-select: all; user-select: all; word-break: break-word; }
.fusklapp-url { color: var(--brand-2); text-decoration: underline; }
.share-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.share-row .btn { min-width: 130px; }
.fusklapp-next { display: block; margin: -4px auto 12px; font-size: .9rem; min-height: 36px; }
.got-lapp { background: #fffdf5; border: 1px dashed #d9c37a; transform: rotate(-.6deg); margin: 0 0 20px; }
.got-lapp-title { font-weight: 800; font-size: 1.15rem; margin: 0 0 6px; }
.got-lapp .btn { margin-top: 6px; }
