/* AMPED v1 UI. Colours, radii and sizes come from design/kit/design/tokens.json (copied in tokens.css). */
@font-face { font-family: "DejaVu Sans"; src: url(../assets/fonts/DejaVuSans.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DejaVu Sans"; src: url(../assets/fonts/DejaVuSans-Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }

:root { --frame: 1180px; --tabbar: 72px; --ease-out: cubic-bezier(.2, .8, .3, 1); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--ink); color: var(--cream); font: 16px/1.45 "DejaVu Sans", system-ui, sans-serif; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h2 { font-size: 24px; }
h3 { font-size: 16px; }
p { margin: 0; }
img { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.error { color: var(--red); min-height: 1em; }
.error:empty { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.display { font-size: 32px; line-height: 1.1; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* Icons: kit SVGs used as masks so they take the text colour. The mask image is set inline
   so its URL resolves from the page, not from this stylesheet. */
.icon { display: inline-block; flex: none; width: 22px; height: 22px; background: currentColor;
  -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }

/* ---------- buttons ---------- */
.btn { min-height: var(--touch); padding: 12px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--raised); color: var(--cream); font-weight: 700; font-size: 16px;
  cursor: pointer; transition: transform 90ms, background 180ms, border-color 180ms; text-decoration: none; }
.btn:hover { background: #33375a; border-color: #5a5f80; }
.btn:active { transform: translateY(2px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn .icon { width: 20px; height: 20px; }
.btn-primary { min-height: 52px; background: var(--yellow); color: var(--ink); border-color: transparent; box-shadow: 0 4px 0 #b9a43c; }
.btn-primary:hover { background: #fff07d; border-color: transparent; }
.btn-primary:active { box-shadow: 0 1px 0 #b9a43c; transform: translateY(3px); }
.btn-primary:disabled { box-shadow: none; }
.btn-danger { background: transparent; border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: rgba(255, 133, 133, .12); border-color: var(--red); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.icon-btn { width: var(--touch); height: var(--touch); flex: none; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--cream); cursor: pointer; }
.icon-btn:hover { background: var(--raised); }

/* ---------- small pieces ---------- */
.badge { display: inline-block; align-self: flex-start; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--yellow); color: var(--yellow);
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: rgba(17, 20, 36, .7); }
.badge-red { border-color: var(--red); color: var(--red); }
.badge-on-art { position: absolute; left: 12px; top: 12px; z-index: 50; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.chip .icon { width: 18px; height: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.meter { height: 10px; border-radius: 999px; background: var(--ink); border: 1px solid var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--yellow); border-radius: inherit; transition: width 360ms var(--ease-out); }
.mini-meter { display: inline-block; width: 100%; height: 6px; border-radius: 999px; background: var(--ink); overflow: hidden; }
.mini-meter i { display: block; height: 100%; background: var(--c, var(--cyan)); }
.progress-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.action-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.action-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.action-row .btn { flex-direction: column; gap: 4px; font-size: 14px; padding: 10px 6px; }
.section-title { margin-top: 8px; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field legend { font-size: 14px; color: var(--muted); padding: 0; display: flex; justify-content: space-between; }
.field b { color: var(--cream); }
input[type=text], input:not([type]), input[name=title], select, textarea { min-height: var(--touch); padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
input[type=range] { width: 100%; accent-color: var(--yellow); min-height: 32px; }
.pick { position: relative; cursor: pointer; }
.pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pick > span { min-height: var(--touch); padding: 10px 16px; display: inline-flex; align-items: center; border-radius: 12px; border: 1px solid var(--line);
  background: var(--raised); font-weight: 700; font-size: 14px; transition: border-color 180ms, background 180ms; }
.pick input:checked + span { border-color: var(--yellow); color: var(--yellow); background: rgba(255, 228, 94, .08); }
.pick input:focus-visible + span { outline: 3px solid var(--yellow); outline-offset: 2px; }
.pick-row > span { width: 100%; flex-direction: column; align-items: flex-start; gap: 2px; }
.pick-row em { font-style: normal; font-weight: 400; }

/* ---------- title ---------- */
.title-screen { position: fixed; inset: 0; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; background: var(--ink); }
.title-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 45% 40%; }
.title-screen::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 30%, rgba(17, 20, 36, .85) 65%, var(--ink)); }
.title-panel { position: relative; z-index: 1; width: min(420px, 100% - 32px); margin-bottom: calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; text-align: center; }
.wordmark { width: min(320px, 80%); height: auto; }
.title-tag { color: var(--cream); margin-bottom: 8px; }

/* ---------- app frame ---------- */
.app { max-width: var(--frame); margin: 0 auto; padding: 16px 16px calc(var(--tabbar) + 24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }
.app-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.head-title { font-size: 28px; }
.resources { list-style: none; margin: 0; padding: 8px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.res { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.res .icon { width: 20px; height: 20px; color: var(--muted); }
.res-pop { position: absolute; top: -14px; right: 4px; font-size: 12px; font-weight: 700; animation: pop-up 1.1s ease-out forwards; pointer-events: none; }
@keyframes pop-up { from { transform: translateY(6px); opacity: 0; } 20% { opacity: 1; } to { transform: translateY(-14px); opacity: 0; } }
.res-pop.up { color: var(--green); } .res-pop.down { color: var(--red); }
.view { display: flex; flex-direction: column; gap: 16px; outline: none; }
.view > section { display: flex; flex-direction: column; gap: 16px; }

.tabbar { position: fixed; z-index: 60; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, var(--frame));
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--surface); border-top: 1px solid var(--line);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; }
.tabbar button { min-height: 56px; border: 0; background: none; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; font-size: 12px; cursor: pointer; border-radius: 12px; }
.tabbar button:hover { color: var(--cream); }
.tabbar .is-active { color: var(--yellow); font-weight: 700; }

/* ---------- HQ ---------- */
.hq { display: grid !important; gap: 16px; }
.scene-card { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #1a1830; }
.scene-host { position: relative; width: 100%; aspect-ratio: 3 / 2; overflow: hidden; }
.hq-panel { display: flex; flex-direction: column; gap: 16px; }
.gig-card .btn-primary { margin-top: 8px; }

/* ---------- scenes & characters ---------- */
.scene-box { position: absolute; inset: 0; transform-origin: 50% 60%; }
.scene-box.drift { animation: drift 30s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.06) translate(-1%, .6%); } }
.scene-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.scene-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
.glow { position: absolute; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; z-index: 4;
  background: radial-gradient(circle, var(--glow) 0%, transparent 65%); mix-blend-mode: screen; animation: flicker 4s ease-in-out infinite; }
@keyframes flicker { 0%, 100% { opacity: .7; } 40% { opacity: 1; } 43% { opacity: .55; } 46% { opacity: .95; } 70% { opacity: .8; } }

.actor { position: absolute; transform: translateX(-50%); padding: 0; border: 0; background: none; display: block; }
button.actor { cursor: pointer; }
button.actor:focus-visible { outline: 3px dashed var(--yellow); outline-offset: 4px; border-radius: 16px; }
.actor-shadow { position: absolute; left: 50%; bottom: -1.5%; width: 80%; height: 6%; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(rgba(0, 0, 0, .55), transparent 70%); }
.actor-body { position: absolute; inset: 0; transform-origin: 50% 100%; }
.actor-body img { width: 100%; height: 100%; object-fit: contain; object-position: bottom; display: block; user-select: none; -webkit-user-drag: none; }
button.actor:hover img { filter: drop-shadow(0 0 4px var(--c)); }

/* Temporary whole-sprite motion (no articulated animation exists yet) */
.scene-box { --beat: .536s; }
.scene-box.live { --beat: .268s; }
.anim-sing   { animation: sing   calc(var(--beat) * 2) ease-in-out infinite; }
.anim-guitar { animation: guitar calc(var(--beat) * 2) ease-in-out infinite; }
.anim-drum   { animation: drum   var(--beat) ease-in-out infinite; }
.anim-sway   { animation: sway   calc(var(--beat) * 4) ease-in-out infinite; }
.anim-keys   { animation: keys   calc(var(--beat) * 2) ease-in-out infinite; }
@keyframes sing   { 0%, 100% { transform: rotate(-1.5deg); } 25%, 75% { transform: scaleY(.98) translateY(.8%); } 50% { transform: rotate(2deg); } }
@keyframes guitar { 0%, 100% { transform: rotate(-1.2deg); } 25%, 75% { transform: scale(1.015, .97); } 50% { transform: rotate(1.6deg); } }
@keyframes drum   { 0%, 100% { transform: none; } 50% { transform: translateY(-2%) scale(.985, 1.02); } 60% { transform: scale(1.02, .97); } }
@keyframes sway   { 0%, 100% { transform: rotate(-2deg); } 25%, 75% { transform: scaleY(.985); } 50% { transform: rotate(2deg); } }
@keyframes keys   { 0%, 100% { transform: none; } 50% { transform: translateY(.8%) rotate(1.2deg) scaleY(.985); } }
.actor-body.cheer { animation: cheer .65s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes cheer { 0% { transform: scale(1.04, .92); } 35% { transform: translateY(-12%) scale(.96, 1.06) rotate(-3deg); } 70% { transform: scale(1.05, .93); } 100% { transform: none; } }

.note { position: absolute; z-index: 30; width: 20px; height: 20px; pointer-events: none; animation: note 2.2s ease-out forwards; }
.note svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; filter: drop-shadow(0 0 5px currentColor); }
@keyframes note { 0% { transform: translate(-50%, 0) scale(.4); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(calc(-50% + var(--sway)), -80px) rotate(15deg); opacity: 0; } }
.float-text { position: absolute; z-index: 40; transform: translateX(-50%); white-space: nowrap; pointer-events: none; font-weight: 700; font-size: 14px;
  text-shadow: 0 2px 0 #000, 0 0 10px rgba(0, 0, 0, .8); animation: rise 1.5s ease-out forwards; }
@keyframes rise { from { transform: translate(-50%, 8px); opacity: 0; } 20% { opacity: 1; } to { transform: translate(-50%, -30px); opacity: 0; } }

/* ---------- band ---------- */
.roster { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.roster-card { width: 100%; flex-direction: row; align-items: center; gap: 12px; text-align: left; cursor: pointer; color: var(--cream); }
.roster-card:hover { border-color: var(--c); }
.roster-card img { width: 56px; height: 72px; object-fit: contain; object-position: bottom; flex: none; }
.roster-text { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.roster-text .muted { font-size: 14px; }

/* ---------- music & gigs ---------- */
.song-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.song-row { flex-direction: row; justify-content: space-between; align-items: center; gap: 12px; }
.song-row > span:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.song-q { display: flex; align-items: center; gap: 8px; width: 110px; flex: none; }
.song-q .mini-meter i { background: var(--yellow); }
.venue-card { padding: 0; overflow: hidden; }
.venue-img { width: 100%; aspect-ratio: 3 / 1.2; object-fit: cover; object-position: 50% 35%; display: block; }
.venue-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.locked-card { align-items: flex-start; }
.locked-card .icon { width: 32px; height: 32px; color: var(--muted); }

/* ---------- sheets ---------- */
dialog.sheet { width: min(480px, 100% - 24px); max-height: calc(100dvh - 48px); overflow: auto; padding: 20px; border: 1px solid var(--line); border-top: 3px solid var(--c, var(--yellow));
  border-radius: 24px; background: var(--surface); color: var(--cream); display: none; flex-direction: column; gap: 16px; }
dialog.sheet[open] { display: flex; animation: sheet-in 180ms var(--ease-out); }
dialog.sheet::backdrop { background: rgba(8, 9, 18, .7); }
@keyframes sheet-in { from { transform: translateY(16px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; gap: 12px; }
.sheet-head .icon-btn { margin-left: auto; }
.sheet-thumb { width: 48px; height: 64px; object-fit: contain; object-position: bottom; }
.stats { display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; margin: 0; align-items: center; }
.stats dt { font-size: 14px; }
.stats dd { margin: 0; display: flex; align-items: center; gap: 10px; }
.stats b { min-width: 2.5ch; text-align: right; font-variant-numeric: tabular-nums; }
.key-btn { min-width: 56px; min-height: var(--touch); padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--raised); font-weight: 700; cursor: pointer; }
.tap-pad { min-height: 140px; font-size: 20px; }

.toast { position: fixed; z-index: 100; left: 50%; top: 12px; transform: translate(-50%, calc(-100% - 24px)); visibility: hidden; max-width: calc(100% - 32px);
  padding: 12px 16px; border-radius: 12px; background: var(--raised); border: 1px solid var(--yellow); font-weight: 700; font-size: 14px; transition: transform 180ms var(--ease-out); }
.toast.show { transform: translate(-50%, 0); visibility: visible; }

/* ---------- rhythm gig ---------- */
body.on-stage { overflow: hidden; }
.stage-layer { position: fixed; inset: 0; z-index: 80; background: var(--ink); }
.rh { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) min(400px, 92vw) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto;
  user-select: none; -webkit-user-select: none; touch-action: none; overflow: hidden; outline: none; }
.rh-stage { position: absolute; inset: 0; overflow: hidden; container-type: size; }
.rh-cam { position: absolute; left: 50%; top: 50%; width: max(100cqw, 150cqh); aspect-ratio: 3 / 2; transform: translate(-50%, -50%); will-change: transform; }
.rh-cam .scene-box { inset: 0; }
.rh-shade { position: absolute; inset: 0; background: linear-gradient(rgba(17, 20, 36, .55), transparent 30%, transparent 70%, rgba(17, 20, 36, .7)); pointer-events: none; }
.rh-top { grid-column: 1 / -1; position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.rh-title { display: flex; flex-direction: column; min-width: 0; }
.rh-title strong { text-transform: uppercase; letter-spacing: .04em; }
.rh-title span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.rh-score { margin-left: auto; text-align: right; display: flex; flex-direction: column; }
.rh-score strong { font-size: 28px; font-variant-numeric: tabular-nums; line-height: 1; }
.rh-score span { font-size: 12px; color: var(--muted); text-transform: uppercase; }
.rh-crowd { grid-column: 1; grid-row: 2; align-self: start; position: relative; z-index: 2; margin: 8px 16px; display: grid; grid-template-columns: 1fr auto; gap: 6px; font-size: 12px;
  text-transform: uppercase; letter-spacing: .06em; background: rgba(17, 20, 36, .7); padding: 10px 12px; border-radius: 12px; }
.rh-crowd .meter { grid-column: 1 / -1; }
.rh-crowd .meter i { background: var(--cyan); }
.rh.crowd-low .rh-crowd .meter i { background: var(--red); }
.rh-side { grid-column: 3; grid-row: 2; align-self: center; justify-self: center; position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; }
.rh-side strong { font-size: 56px; line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
.rh-side span { font-size: 12px; text-transform: uppercase; color: var(--muted); }
.rh-judge { min-height: 1.3em; font-size: 28px; font-weight: 700; font-style: italic; text-shadow: 0 2px 8px rgba(0, 0, 0, .7); }
.rh-judge[data-grade=perfect] { color: var(--yellow); } .rh-judge[data-grade=great] { color: var(--cyan); }
.rh-judge[data-grade=good] { color: var(--cream); } .rh-judge[data-grade=miss] { color: var(--red); }
.rh-judge.pop { animation: judge 180ms var(--ease-out); }
@keyframes judge { from { transform: scale(1.3); } }

.rh-highway { grid-column: 2; grid-row: 2; position: relative; z-index: 1; background: rgba(17, 20, 36, .72); border-left: 2px solid var(--line); border-right: 2px solid var(--line); }
.rh-lanes { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rh-lane { position: relative; border: 0; border-right: 1px solid rgba(70, 74, 102, .7); background: none; padding: 0; cursor: pointer; touch-action: none; }
.rh-lane:last-child { border-right: 0; }
.rh-lane.is-pressed { animation: lane-press 160ms ease-out; }
@keyframes lane-press { from { background: linear-gradient(transparent 40%, color-mix(in srgb, var(--lane) 22%, transparent)); } }
.rh-lane.is-miss { animation: lane-miss 260ms ease-out; }
@keyframes lane-miss { from { background: rgba(255, 133, 133, .22); } }
.rh-receptor { position: absolute; left: 50%; top: 86%; width: 62%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rh-receptor img { width: 100%; aspect-ratio: 1; opacity: .5; transition: opacity 90ms, transform 90ms; }
.rh-lane.is-pressed .rh-receptor img { opacity: 1; transform: scale(1.08); }
.rh-receptor kbd { font: 700 12px "DejaVu Sans", sans-serif; padding: 2px 8px; border-radius: 6px; background: var(--raised); border: 1px solid var(--line); }
.rh-fx { position: absolute; left: 50%; top: 0; width: 140%; transform: translate(-50%, -20%); pointer-events: none; animation: fx 300ms ease-out forwards; }
@keyframes fx { from { opacity: 1; transform: translate(-50%, -20%) scale(.7); } to { opacity: 0; transform: translate(-50%, -20%) scale(1.25); } }
.rh-hitline { position: absolute; left: 0; right: 0; top: 86%; height: 3px; background: var(--cream); pointer-events: none; }
.rh-notes { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.rh-note { position: absolute; top: 0; width: calc(25% * .62); aspect-ratio: 1; will-change: transform; }
.rh-foot { grid-column: 1 / -1; position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); font-size: 14px; font-variant-numeric: tabular-nums; }
.rh-temp { color: var(--muted); font-size: 12px; text-align: right; }
.rh-overlay { position: absolute; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; }
.rh-overlay.count { pointer-events: none; }
.rh-overlay.count strong { font-size: 96px; color: var(--yellow); text-shadow: 0 4px 20px rgba(0, 0, 0, .7); }
.rh-overlay.menu { background: rgba(8, 9, 18, .7); }
.panel { width: min(420px, 100% - 32px); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }

/* Narrow screens: HUD stacks above the highway */
@media (max-width: 760px) {
  .rh { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto; }
  .rh-crowd { grid-column: 1; grid-row: 2; margin: 0 16px 8px; }
  .rh-highway { grid-column: 1; grid-row: 3; width: min(400px, 100% - 24px); justify-self: center; }
  .rh-side { grid-column: 1; grid-row: 3; align-self: start; justify-self: end; margin: 12px 20px 0 0; z-index: 3; pointer-events: none; }
  .rh-side strong { font-size: 32px; }
  .rh-judge { font-size: 20px; }
}

/* ---------- results ---------- */
.results { position: absolute; inset: 0; overflow: auto; display: flex; align-items: flex-start; justify-content: center; padding: 24px 0; }
.results-bg { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(6px) brightness(.45); transform: scale(1.05); }
.results-panel { position: relative; margin: auto; }
.results-panel h2 { font-size: 32px; }
.stars { display: flex; gap: 6px; }
.star { width: 32px; height: 32px; fill: none; stroke: var(--yellow); stroke-width: 1.6; }
.star.on { fill: var(--yellow); animation: star-pop 360ms cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes star-pop { from { transform: scale(.4); opacity: 0; } }
.review { font-style: italic; }
.result-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.result-grid div { background: var(--raised); border-radius: 12px; padding: 10px; }
.result-grid dt { font-size: 12px; color: var(--muted); }
.result-grid dd { margin: 0; font-size: 20px; font-weight: 700; }
.rewards { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rewards li { display: flex; align-items: center; gap: 10px; }
.rewards b { margin-left: auto; }
.rewards .up { color: var(--green); } .rewards .down { color: var(--red); }

/* ---------- desktop ---------- */
@media (min-width: 960px) {
  .app { padding-left: 32px; padding-right: 32px; }
  .hq { grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); align-items: start; }
  .gigs, .music, .band, .shop { max-width: 640px; }
  .resources { max-width: 640px; }
  .head-title { font-size: 32px; }
}

/* ---------- reduced motion (setting or device) ---------- */
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation: none !important; transition: none !important; }

/* ---------- loading & credits ---------- */
.loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.loading img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(6px) brightness(.4); }
.loading p { position: relative; font-size: 20px; font-weight: 700; color: var(--yellow); }
.credits summary { min-height: var(--touch); display: flex; align-items: center; cursor: pointer; font-weight: 700; }
.credits ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14px; }
.credits a { color: var(--cyan); }

/* ---------- map ---------- */
.map-board { position: relative; margin: 0 -16px; border-radius: var(--radius); overflow: hidden;
  background:
    radial-gradient(60% 18% at 30% 92%, rgba(255, 200, 110, .12), transparent),
    radial-gradient(60% 18% at 70% 70%, rgba(167, 146, 255, .12), transparent),
    radial-gradient(60% 18% at 30% 48%, rgba(70, 217, 232, .1), transparent),
    radial-gradient(60% 18% at 70% 25%, rgba(255, 100, 142, .12), transparent),
    radial-gradient(70% 12% at 50% 4%, rgba(255, 228, 94, .18), transparent),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(70, 74, 102, .25) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(70, 74, 102, .25) 39px 40px),
    var(--surface); }
.map-path { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-path path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.map-path .ahead { stroke: var(--line); stroke-width: 4; stroke-dasharray: 2 10; }
.map-path .done { stroke: var(--yellow); stroke-width: 5; }
.map-act { position: absolute; left: 12px; width: 34%; display: flex; flex-direction: column; font-size: 12px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); pointer-events: none; border-left: 2px solid var(--yellow); padding-left: 8px; }
.map-act.on-right { left: auto; right: 12px; text-align: right; border-left: 0; border-right: 2px solid var(--yellow); padding: 0 8px 0 0; }
.map-act span { color: var(--yellow); }
.map-node { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 6px; width: 132px;
  padding: 0; border: 0; background: none; color: var(--cream); cursor: pointer; z-index: 2; }
.map-thumb { position: relative; width: 84px; height: 84px; border-radius: 50%; overflow: hidden; border: 3px solid var(--line); background: var(--ink); transition: transform 90ms; }
.map-node:hover .map-thumb { transform: scale(1.06); }
.map-thumb img { width: 100%; height: 100%; object-fit: cover; }
.is-fest .map-thumb { border-radius: 22px; }
.is-open .map-thumb { border-color: var(--yellow); }
.is-locked .map-thumb img { filter: grayscale(.85) brightness(.45); }
.map-lock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--cream); }
.map-lock .icon { width: 26px; height: 26px; }
.map-label { display: flex; flex-direction: column; align-items: center; text-align: center; background: rgba(17, 20, 36, .85); border-radius: 10px; padding: 4px 8px; }
.map-label strong { font-size: 14px; line-height: 1.2; }
.map-label small { font-size: 12px; color: var(--muted); }
.map-stars { color: var(--yellow) !important; letter-spacing: 1px; }
.map-new { color: var(--green) !important; font-weight: 700; }
.is-new .map-thumb { animation: map-pulse 1.4s ease-in-out infinite; }
@keyframes map-pulse { 50% { box-shadow: 0 0 0 10px rgba(117, 227, 176, .25); } }
.map-band { position: absolute; z-index: 3; height: 92px; transform: translate(26px, -78%); pointer-events: none; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .6));
  animation: band-bob 1.1s ease-in-out infinite; }
@keyframes band-bob { 50% { transform: translate(26px, -84%); } }
.venue-banner { width: calc(100% + 40px); margin: -20px -20px 0; aspect-ratio: 3 / 1.3; object-fit: cover; border-radius: 24px 24px 0 0; }
.req-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.req-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.req-list li.ok { color: var(--green); }
.req-list small { margin-left: auto; }
.unlock-card { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; border: 1px solid var(--green); background: rgba(117, 227, 176, .08); }
.unlock-card img { width: 84px; height: 56px; object-fit: cover; border-radius: 10px; }
.unlock-card .badge { border-color: var(--green); color: var(--green); }
@media (min-width: 960px) { .map { max-width: 640px; } }

/* ---------- studio ---------- */
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.row-between select { min-height: 40px; }
.step-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; align-items: center; }
.step-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.step-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.step { height: 36px; min-width: 0; border-radius: 8px; border: 1px solid var(--line); background: var(--ink); color: var(--ink); font-weight: 700; font-size: 13px; cursor: pointer; padding: 0; }
.step.beat { border-color: #5b6085; }
.step.on { background: var(--cyan); border-color: transparent; }
.step.acc { background: var(--yellow); border-color: transparent; }
.step.riff-m { background: #4d7d86; color: var(--cream); }
.step.riff-P { background: var(--pink); }
.step.riff-H { background: var(--violet); }
.step.riff-L { background: var(--yellow); }
.step.riff-A { background: var(--green); }
.step.now { outline: 2px solid var(--cream); outline-offset: 1px; }
.preview-bar { position: sticky; bottom: calc(var(--tabbar) + 8px); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; border-radius: 16px;
  background: rgba(29, 32, 53, .95); border: 1px solid var(--line); backdrop-filter: blur(6px); }
.preview-bar .btn-primary { min-height: 48px; }
.pick.is-off { opacity: .4; }
.genre-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.genre-card { position: relative; cursor: pointer; }
.genre-card input { position: absolute; opacity: 0; inset: 0; }
.genre-card span { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--raised); }
.genre-card small { color: var(--muted); font-size: 12px; }
.genre-card input:checked + span { border-color: var(--yellow); background: rgba(255, 228, 94, .08); }
.genre-card input:checked + span strong { color: var(--yellow); }
.genre-card input:focus-visible + span { outline: 3px solid var(--yellow); outline-offset: 2px; }
@media (min-width: 600px) { .step-grid { grid-template-columns: repeat(16, minmax(0, 1fr)); } .genre-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- gig camera, lights & crowd ---------- */
.rh-beams { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; opacity: .7; }
.rh-beams::before, .rh-beams::after { content: ""; position: absolute; top: -20%; width: 60%; height: 140%; transform-origin: 50% 0; opacity: .45;
  clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%); }
.rh-beams::before { left: 0; background: linear-gradient(var(--b1), transparent 80%); animation: beam calc(var(--beat) * 4) ease-in-out infinite alternate; }
.rh-beams::after { right: 0; background: linear-gradient(var(--b2), transparent 80%); animation: beam calc(var(--beat) * 4) ease-in-out infinite alternate-reverse; }
@keyframes beam { from { transform: rotate(-24deg); } to { transform: rotate(24deg); } }
.rh-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.rh-crowd-fg { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: clamp(70px, 20cqh, 190px); pointer-events: none; transform-origin: 50% 100%; }
.rh-crowd-fg circle, .rh-crowd-fg rect { fill: #06070d; stroke: var(--rim); stroke-width: .5; stroke-opacity: .55; }
.rh-crowd-fg .arm { transform-box: fill-box; transform-origin: 50% 100%; animation: arm calc(var(--beat) * 2) ease-in-out infinite alternate; animation-delay: var(--d); }
@keyframes arm { from { transform: rotate(-12deg) translateY(10%); } to { transform: rotate(12deg) translateY(-6%); } }
.reduce-motion .rh-beams::before, .reduce-motion .rh-beams::after, .reduce-motion .rh-crowd-fg .arm { animation: none; }

/* ---------- studio: tracks, sample library, editors ---------- */
.studio-top { align-items: flex-start; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--ink); flex-shrink: 0; }
.seg button { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 700; padding: 8px 16px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.seg button[aria-pressed="true"] { background: var(--yellow); color: var(--ink); }
.seg button:disabled { cursor: not-allowed; opacity: .55; }
.seg .icon { width: 14px; height: 14px; }

.arranger { overflow-x: auto; display: grid; gap: 6px; padding-bottom: 6px; scrollbar-width: thin; }
.arr-row { display: grid; grid-template-columns: 92px repeat(var(--cols), minmax(104px, 1fr)) auto; gap: 6px; align-items: stretch; }
.arr-row.is-muted .clip-cell { opacity: .35; }
.trk-name { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; position: sticky; left: 0; background: var(--surface); z-index: 1; padding-right: 4px; }
.trk-name .icon { width: 18px; height: 18px; flex-shrink: 0; }
.mute { margin-left: auto; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: var(--ink); color: var(--muted); font-weight: 700; font-size: 12px; cursor: pointer; padding: 0; }
.mute[aria-pressed="true"] { background: var(--red); color: var(--ink); border-color: transparent; }
.sec-head { border: 1px solid var(--line); background: var(--ink); color: var(--cream); border-radius: 10px; padding: 6px 8px; text-align: left; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.sec-head b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sec-head small { font-size: 11px; color: var(--muted); }
.sec-head.is-sel { border-color: var(--yellow); }
.sec-head.is-now { background: var(--yellow); color: var(--ink); }
.sec-head.is-now small { color: var(--ink); }
.sec-add { width: 40px; border: 1px dashed var(--line); background: transparent; border-radius: 10px; cursor: pointer; display: grid; place-items: center; color: var(--cream); }
.clip-cell { --tc: var(--cyan); border: 1px solid var(--line); border-left: 4px solid var(--tc); background: var(--ink); color: var(--cream); border-radius: 10px; padding: 6px 8px; text-align: left; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 6px; min-height: 64px; }
.clip-cell b { font-size: 12px; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.clip-cell.is-sel { outline: 2px solid var(--yellow); outline-offset: 1px; }
.clip-cell.is-silent { border-left-color: var(--line); color: var(--muted); }
.trk-drums { --tc: var(--cyan); } .trk-guitar { --tc: var(--pink); } .trk-bass { --tc: var(--violet); } .trk-vocals { --tc: var(--yellow); }

.mini { --s: -1; position: relative; display: block; height: 22px; border-radius: 4px; background: rgba(255, 255, 255, .04); overflow: hidden; }
.mini svg { width: 100%; height: 100%; display: block; }
.mini .ph { position: absolute; top: 0; bottom: 0; width: calc(100% / var(--n)); left: calc(var(--s) * 100% / var(--n)); background: rgba(255, 255, 255, .28); display: none; }
.mini.is-play .ph { display: block; }
.mini .m-k { fill: var(--cyan); } .mini .m-s { fill: var(--cream); } .mini .m-h { fill: #7c83b3; } .mini .m-c { fill: var(--yellow); } .mini .m-g { fill: #5b6085; }
.mini .m-gP { fill: var(--pink); } .mini .m-gm { fill: #4d7d86; } .mini .m-gH { fill: var(--violet); } .mini .m-gL { fill: var(--yellow); } .mini .m-gA { fill: var(--green); }
.mini .m-b { fill: var(--violet); } .mini .m-v { fill: var(--yellow); } .mini .m-vh { fill: rgba(255, 228, 94, .45); }

.lib h3 { display: flex; align-items: center; gap: 8px; }
.lib h3 .icon { width: 20px; height: 20px; }
.lib-fold summary { cursor: pointer; padding: 6px 0; }
.lib-fold summary small { color: var(--muted); font-weight: 400; }
.lib-fold > .lib-grid { margin-bottom: 6px; }
.lib-group { margin: 6px 0 0; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.lib-card { display: grid; grid-template-columns: 44px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 12px; background: var(--ink); overflow: hidden; }
.lib-card.is-on { border-color: var(--yellow); box-shadow: inset 0 0 0 1px var(--yellow); }
.lib-card.is-playing { border-color: var(--cyan); }
.lib-play { border: 0; border-right: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--cream); cursor: pointer; display: grid; place-items: center; }
.lib-play .icon { width: 18px; height: 18px; }
.lib-card.is-playing .lib-play { background: var(--cyan); color: var(--ink); }
.lib-use { border: 0; background: transparent; color: var(--cream); text-align: left; font: inherit; cursor: pointer; padding: 8px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lib-use b { font-size: 14px; }
.lib-use small { font-size: 12px; color: var(--muted); line-height: 1.3; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--yellow); }

.editor { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.editor h4 { margin: 0; }
.step.ghost { background: #5b6085; border-color: transparent; }
.step.hold { background: rgba(70, 217, 232, .3); border-color: transparent; }
.step.rest.on { background: var(--muted); }
.roll { display: grid; gap: 3px; }
.roll-bar { margin: 4px 0 2px; }
.roll-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; align-items: center; }
.roll .step { height: 24px; border-radius: 5px; }
.sec-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-small { min-height: 40px; padding: 6px 12px; font-size: 14px; }
.preview-bar [data-now] { flex: 1 1 140px; }
@media (max-width: 599px) { .roll .step-grid { grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 2px; } .roll .step { height: 22px; border-radius: 3px; } }

/* ---------- wardrobe ---------- */
.ward-cast { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ward-card { border: 1px solid var(--line); background: var(--ink); color: var(--cream); border-radius: 12px; padding: 8px; font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.ward-card img { width: 100%; height: 110px; object-fit: contain; object-position: bottom; }
.ward-card b { font-size: 14px; }
.ward-card small { font-size: 11px; color: var(--muted); line-height: 1.25; }
.ward-card.is-sel { border-color: var(--yellow); box-shadow: inset 0 0 0 1px var(--yellow); }
.ward-card:disabled { opacity: .45; cursor: not-allowed; }
.ward-preview { flex-shrink: 0; height: min(44dvh, 360px); border-radius: 14px; background: radial-gradient(ellipse at 50% 90%, #2a2f55, #121426 70%); display: flex; justify-content: center; align-items: flex-end; padding: 12px; overflow: hidden; }
.ward-preview img { height: 100%; width: auto; max-width: 100%; min-height: 0; object-fit: contain; object-position: bottom; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .5)); }

/* ---------- character rig: legs / torso / head layers of one cutout, moved by js/scene.js ---------- */
.actor { --neck: 19%; --hip: 56%; }
.actor-body { transform: translateY(var(--jump, 0%)); }
.rig { position: absolute; inset: 0; display: block; }
.rig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: bottom; display: block; user-select: none; -webkit-user-drag: none; }
/* each layer fades in under the one above it, so the cut never shows through */
.rig-legs { transform-origin: 50% 100%; transform: scaleY(var(--k, 1)); }
.rig-legs > img { -webkit-mask-image: linear-gradient(to bottom, transparent calc(var(--hip) - 4%), #000 calc(var(--hip) - 1%)); mask-image: linear-gradient(to bottom, transparent calc(var(--hip) - 4%), #000 calc(var(--hip) - 1%)); }
.rig-torso { transform-origin: 50% var(--hip); transform: translateY(calc((1 - var(--k, 1)) * (100% - var(--hip)))) rotate(var(--lean, 0deg)); }
.rig-torso > img { -webkit-mask-image: linear-gradient(to bottom, transparent calc(var(--neck) - 4%), #000 var(--neck), #000 var(--hip), transparent calc(var(--hip) + 5%)); mask-image: linear-gradient(to bottom, transparent calc(var(--neck) - 4%), #000 var(--neck), #000 var(--hip), transparent calc(var(--hip) + 5%)); }
.rig-head { transform-origin: 50% var(--neck); transform: translateY(var(--hy, 0%)) rotate(var(--nod, 0deg)); }
.rig-head > img { -webkit-mask-image: linear-gradient(to bottom, #000 var(--neck), transparent calc(var(--neck) + 4%)); mask-image: linear-gradient(to bottom, #000 var(--neck), transparent calc(var(--neck) + 4%)); }
.actor .prop { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.actor > .prop-front { z-index: 2; }
.prop-sticks .stick-l { transform: rotate(var(--sl, 0deg)); }
.prop-sticks .stick-r { transform: rotate(var(--sr, 0deg)); }
.prop-kit .crash { transform: rotate(var(--cr, 0deg)); }
.reduce-motion .rig, .reduce-motion .actor-body, .reduce-motion .prop * { transform: none !important; }
/* animated clips (Runway) replace the rig and the drawn instruments, which are in the clip */
.actor.has-anim .rig, .actor.has-anim .prop { display: none; }
.anim-sprite { position: absolute; display: block; background-repeat: no-repeat; background-position: 0 0; pointer-events: none; }
/* the crowd joins in: jumps on the beat in choruses, fists up when the band is on a run */
.rh-crowd-fg.pump .fan { animation: fan-jump var(--beat) cubic-bezier(.3, .7, .4, 1) infinite; animation-delay: calc(var(--d) * .2); }
.rh-crowd-fg.roar .arm { animation: fist var(--beat) ease-out infinite alternate; }
.rh-crowd-fg .fan { transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes fan-jump { 0%, 100% { transform: translateY(0); } 35% { transform: translateY(-7%); } }
@keyframes fist { from { transform: translateY(-30%) scaleY(1.25); } to { transform: translateY(-55%) scaleY(1.35); } }
.reduce-motion .rh-crowd-fg .fan, .reduce-motion .rh-crowd-fg .arm { animation: none; }

/* ---------- studio effects ---------- */
.fx-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.fx-group { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 10px; margin: 0; display: grid; gap: 8px; }
.fx-group legend { font-weight: 700; font-size: 14px; padding: 0 4px; }
.fx-knob { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; column-gap: 8px; font-size: 13px; }
.fx-knob input { width: 100%; accent-color: var(--yellow); }
.fx-knob small { grid-column: 2; display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: -4px; }
.fx-knob small i { font-style: normal; }

/* gig lyrics, karaoke style, above the footer */
.rh-lyric { position: absolute; left: 50%; bottom: 72px; transform: translateX(-50%); width: min(90%, 560px); text-align: center; pointer-events: none; z-index: 6; display: grid; gap: 2px; }
.rh-lyric span { font-weight: 800; font-size: clamp(16px, 2.6vw, 24px); color: var(--cream); text-shadow: 0 2px 8px rgba(0, 0, 0, .8); }
.rh-lyric small { font-size: 13px; color: var(--muted); text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.rh-lyric span:empty, .rh-lyric small:empty { display: none; }
/* studio lyrics */
.lyrics-card h3 { display: flex; align-items: center; gap: 8px; }
.lyrics-card textarea { width: 100%; resize: vertical; font: inherit; line-height: 1.5; }
.ai-take { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
