@import url('./puzzle.css?v=shuffle-v1');
@import url('./counter.css?v=track-v1');
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;900&display=swap');

:root {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-synthesis: none;
  --reveal-x: 50vw;
  --reveal-y: 50vh;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--page); }
button { font: inherit; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }

:root {
  --bg: radial-gradient(ellipse 55% 25% at 86% 13%, var(--wash-a), transparent 80%), radial-gradient(ellipse 42% 22% at 60% 8%, var(--wash-b), transparent 85%), radial-gradient(ellipse 48% 20% at 5% 47%, var(--wash-a), transparent 90%), var(--page);
  --line: var(--edge);
  --heading: var(--ink);
  --focus: var(--accent);
}
:root[data-theme='light'] {
  --editors: #6946bf; --mix: #5f154d; --favor: #997021; --male: #2669a9;
  --female: #b43d77; --old: #347353; --list: #237c2b; --shake: #30364e;
  --counter: #996523; --hidefart: #b94838; --memory: #317893; --fartsays: #a75a32;
  --puzzle: #174f9d; --sweeper: #5b4a9e; --piano: #247679;
  --settings: #464885; --info: #343c57;
}
:root[data-theme='pastel'] {
  --editors: #7950c8; --mix: #7e3a69; --favor: #a97922; --male: #3d70ad;
  --female: #bd5387; --old: #477c5e; --list: #488e3f; --shake: #45436f;
  --counter: #a47830; --hidefart: #c2594d; --memory: #397d95; --fartsays: #ac6640;
  --puzzle: #4268a2; --sweeper: #6656a1; --piano: #4c8181;
  --settings: #615991; --info: #50516f;
}
:root[data-theme='dark'] {
  --editors: #583b9b; --mix: #5f0000; --favor: #775b1d; --male: #275687;
  --female: #913459; --old: #315d4b; --list: #41800c; --shake: #222b45;
  --counter: #79551f; --hidefart: #963f33; --memory: #315e7b; --fartsays: #844626;
  --puzzle: #05388b; --sweeper: #48407f; --piano: #247679;
  --settings: #333366; --info: #323232;
}
:root { --tile-radius: 20px; }

.color_editors { --tile-color: var(--editors); }
.color_mix { --tile-color: var(--mix); }
.color_favor { --tile-color: var(--favor); }
.color_male { --tile-color: var(--male); }
.color_female { --tile-color: var(--female); }
.color_old { --tile-color: var(--old); }
.color_list { --tile-color: var(--list); }
.color_shake { --tile-color: var(--shake); }
.color_app_timer { --tile-color: var(--counter); }
.color_hidefart { --tile-color: var(--hidefart); }
.color_app_memory { --tile-color: var(--memory); }
.color_fartsays { --tile-color: var(--fartsays); }
.color_puzzle { --tile-color: var(--puzzle); }
.color_sweeper { --tile-color: var(--sweeper); }
.color_piano { --tile-color: var(--piano); }
.color_settings { --tile-color: var(--settings); }
.color_info { --tile-color: var(--info); }

.app-shell { min-height: 100svh; display: flex; flex-direction: column; overflow: clip; background: var(--bg); }
.app-header, .app-footer, .home-screen, .page-screen { width: min(1250px, calc(100% - 56px)); margin-inline: auto; }
.app-header { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 24px; position: relative; z-index: 2; }
.brand { display: inline-flex; align-items: center; gap: 13px; font-size: 20px; font-weight: 900; letter-spacing: -.06em; line-height: .94; white-space: nowrap; }
.brand img { width: 42px; height: 42px; border-radius: 12px; }
.brand strong { color: var(--accent); }
[data-theme='dark'] .brand strong { color: var(--accent); }
.theme-switch { display: flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.theme-switch button { min-height: 37px; min-width: 67px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; font-size: 13px; font-weight: 700; cursor: pointer; }
.theme-switch button[aria-pressed='true'] { color: var(--button-ink); background: var(--cta-start); box-shadow: var(--shadow); }
.view { flex: 1; }
.home-screen { padding-block: clamp(35px, 7vw, 100px) 90px; }
.home-intro { margin-bottom: 44px; }
.eyebrow { color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .18em; }
.home-intro h1 { max-width: 900px; margin: 12px 0 0; color: var(--heading); font-size: clamp(48px, 8vw, 106px); font-weight: 900; letter-spacing: -.085em; line-height: 1.04; }
.home-intro h1 span { color: #e65387; }
.tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile { position: relative; display: flex; flex-direction: column; min-height: 270px; padding: 24px; overflow: hidden; isolation: isolate; border: 1px solid #ffffff60; border-radius: var(--tile-radius); background: radial-gradient(circle at 85% 10%, #ffffff27, transparent 52%), var(--tile-color); color: #fff; box-shadow: 0 16px 38px #08102d1c; transition: transform .25s ease, box-shadow .25s ease; }
.tile:hover { transform: translateY(-6px) rotate(-1deg); box-shadow: 0 25px 47px #08102d40; }
.tile::after { content: ''; position: absolute; inset: -60% -15% 25% 35%; z-index: -1; border-radius: 50%; background: radial-gradient(circle, #ffffff35, transparent 70%); pointer-events: none; }
.tile-number { font-size: 15px; font-weight: 700; letter-spacing: .14em; opacity: .78; }
.tile-icon { display: block; width: 142px; height: 142px; margin: auto; background-image: url('/app/img/game-icons-sprite.webp'); background-repeat: no-repeat; background-size: 300% 300%; background-position: var(--sprite-x) var(--sprite-y); filter: drop-shadow(0 12px 20px #0003); }
.tile-label { max-width: 100%; font-size: clamp(20px, 2vw, 25px); font-weight: 700; letter-spacing: -.045em; line-height: 1.15; }
.tile-arrow { position: absolute; right: 22px; top: 19px; font-size: 23px; line-height: 1; }
.page-screen { min-height: min(670px, calc(100svh - 160px)); margin-block: 22px 50px; padding: clamp(25px, 5vw, 60px); border: 1px solid #ffffff40; border-radius: var(--tile-radius); background: radial-gradient(circle at 85% 25%, #ffffff45, transparent 45%), var(--tile-color); color: #fff; box-shadow: 0 26px 80px #07132b33; }
.page-screen h1 { margin: 35px 0 0; font-size: clamp(45px, 7vw, 88px); font-weight: 900; letter-spacing: -.075em; line-height: 1.05; }
.back-button { min-height: 45px; padding: 9px 18px; border: 1px solid #ffffff65; border-radius: 999px; color: #fff; background: #ffffff24; font-size: 14px; font-weight: 700; cursor: pointer; }
.back-button:hover { background: #ffffff40; }
.app-footer { display: flex; justify-content: space-between; gap: 16px; padding-block: 26px 35px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .07em; }
.inner-app-page .app-header { display: none; }
.app-footer a:hover { text-decoration: underline; }
.noscript { padding: 1rem; text-align: center; }

.category-screen { width: min(1120px, calc(100% - 56px)); margin: 26px auto 64px; }
.category-header { display: flex; align-items: center; gap: 22px; margin-bottom: 22px; }
.category-header h1 { margin: 0; font-size: clamp(28px, 4vw, 48px); font-weight: 900; letter-spacing: -.06em; }
.category-back { color: var(--ink); border-color: var(--line); background: var(--surface); }
.category-back:hover { background: var(--line); }
.fart-deck { display: grid; overflow: hidden; border-radius: var(--tile-radius); background: var(--tile-color); box-shadow: 0 25px 70px #07132b31; touch-action: none; user-select: none; cursor: grab; }
.fart-deck:active { cursor: grabbing; }
.fart-deck > .fart-panel { grid-area: 1 / 1; }
.fart-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .85fr); gap: clamp(35px, 6vw, 100px); align-items: center; min-height: 505px; padding: clamp(26px, 5vw, 64px); border-radius: var(--tile-radius); color: #fff; background: radial-gradient(circle at 10% 90%, #59ddff45, transparent 47%), radial-gradient(circle at 96% 5%, #ffffff29, transparent 40%), var(--tile-color); }
.fart-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.fart-position { margin: 0; color: #e2f6ff; font-size: 14px; font-weight: 800; letter-spacing: .12em; }
.fart-favorite { display: grid; flex: none; place-items: center; width: 52px; height: 52px; padding: 0; border: 1px solid #ffffff77; border-radius: 50%; color: #fff; background: #ffffff2b; font-size: 31px; line-height: 1; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.fart-favorite:hover { background: #ffffff48; transform: scale(1.07); }
.fart-favorite[aria-pressed='true'] { color: #ffbfd7; background: #ffffff30; }
.fart-intro h2 { margin: 0 0 35px; max-width: 700px; font-size: clamp(42px, 5.6vw, 81px); font-weight: 900; line-height: 1.01; letter-spacing: -.075em; text-wrap: balance; }
.fart-play { display: inline-flex; align-items: center; gap: 17px; min-height: 72px; padding: 8px 28px 8px 9px; border: 0; border-radius: 999px; color: #142452; background: #fff; font-size: 18px; cursor: pointer; box-shadow: 0 12px 35px #001c4933; transition: transform .2s ease, background .2s ease; }
.fart-play:hover { transform: translateY(-3px); background: #d9f7ff; }
.fart-play > span { display: grid; place-items: center; width: 54px; height: 54px; padding-left: 3px; border-radius: 50%; color: #fff; background: #163981; font-size: 21px; }
.fart-play[aria-pressed='true'] > span { padding-left: 0; font-size: 20px; }
.fart-error { min-height: 22px; margin: 10px 0 0; font-size: 14px; }
.fart-ratings { padding: clamp(20px, 3vw, 35px); border: 1px solid #ffffff45; border-radius: 24px; background: #041b4a54; backdrop-filter: blur(10px); }
.fart-ratings h3 { margin: 0 0 25px; font-size: 14px; letter-spacing: .15em; }
.fart-rating { display: grid; grid-template-columns: 1fr auto; column-gap: 18px; margin: 18px 0; font-size: 15px; }
.fart-rating strong { font-variant-numeric: tabular-nums; }
.fart-bar { grid-column: 1 / -1; height: 11px; margin-top: 9px; overflow: hidden; border-radius: 99px; background: #ffffff38; }
.fart-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #81e8ff, #fff38d); transform-origin: left center; }
.fart-panel.is-active .fart-bar span { animation: chart-grow 1s cubic-bezier(.18,.8,.25,1) both; }
.fart-panel.is-active .fart-rating:nth-of-type(2) .fart-bar span { animation-delay: .06s; }
.fart-panel.is-active .fart-rating:nth-of-type(3) .fart-bar span { animation-delay: .12s; }
.fart-panel.is-active .fart-rating:nth-of-type(4) .fart-bar span { animation-delay: .18s; }
.fart-panel.is-active .fart-rating:nth-of-type(5) .fart-bar span { animation-delay: .24s; }
@keyframes chart-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.fart-navigation { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.fart-navigation button { min-height: 48px; padding: 10px 19px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: var(--surface); font-size: 15px; font-weight: 700; cursor: pointer; }
.fart-navigation button:hover:not(:disabled) { background: var(--line); }
.fart-navigation button:disabled { opacity: .4; cursor: default; }
.fart-navigation span { color: var(--muted); font-size: 14px; }

.memory-screen { width: min(1100px, calc(100% - 40px)); margin: 22px auto 80px; }
.memory-header { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.memory-header h1 { margin: 0; font-size: clamp(30px, 4vw, 52px); font-weight: 900; letter-spacing: -.065em; }
.memory-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; }
.memory-level { font-size: clamp(22px, 3vw, 34px); font-weight: 900; letter-spacing: -.05em; }
.memory-controls { display: flex; align-items: end; gap: 10px; }
.memory-controls label { display: grid; gap: 5px; color: var(--muted); font-size: 14px; font-weight: 700; }
.memory-controls select, .memory-controls button, .memory-result button { min-height: 45px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.memory-controls select { min-width: 125px; }
.memory-controls button:hover, .memory-result button:hover { background: var(--line); }
.memory-status { margin: 0 0 22px; color: var(--muted); font-size: 16px; font-weight: 700; }
.memory-grid { display: grid; grid-template-columns: repeat(var(--memory-columns), minmax(0, 1fr)); gap: clamp(8px, 1.2vw, 13px); width: 100%; max-width: var(--memory-grid-max); margin: 0 auto; }
.memory-card { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; background: transparent; cursor: pointer; perspective: 850px; -webkit-tap-highlight-color: transparent; }
.memory-card-inner { position: absolute; inset: 0; display: block; transform-style: preserve-3d; transition: transform .47s cubic-bezier(.2,.75,.2,1); }
.memory-card.is-flipped .memory-card-inner { transform: rotateY(180deg); }
.memory-face { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; border-radius: var(--tile-radius); backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 10px 27px #07132b26; }
.memory-face-back { border: 1px solid #ffffff60; background: radial-gradient(circle at 80% 10%, #ffffff33, transparent 55%), var(--memory); }
.game-puff-icon { display: block; width: 62%; aspect-ratio: 1; background: url('/app/img/game-puff-icons.webp') no-repeat 0% center / 200% 100%; pointer-events: none; filter: drop-shadow(0 7px 13px #25103a36); }
.game-puff-icon-sound { background-image: url('/app/img/game-burst-pastel.webp'); background-size: contain; background-position: center; }
.memory-face-front { border: 1px solid #ffffff8a; color: #fff; background: radial-gradient(circle at 20% 80%, #ffffff30, transparent 55%), #9c56d1; font-size: clamp(32px, 6vw, 76px); transform: rotateY(180deg); }
.memory-card.is-matched .memory-face-front { background: #289884; }
.memory-card.is-matched .memory-face-front::after { content: '✓'; position: absolute; right: 10%; top: 5%; font-size: clamp(16px, 2vw, 28px); }
.memory-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: var(--tile-radius); }
.memory-result { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 18px; max-width: var(--memory-grid-max, 1000px); margin: 25px auto; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); font-size: 20px; }
.memory-result[hidden] { display: none; }

.says-screen { width: min(900px, calc(100% - 40px)); margin: 22px auto 80px; }
.says-header { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.says-header h1 { margin: 0; font-size: clamp(30px, 4vw, 52px); font-weight: 900; letter-spacing: -.065em; }
.says-intro { margin: 0 0 20px; color: var(--muted); font-size: 16px; }
.says-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; max-width: 680px; margin: 0 auto 12px; }
.says-score { display: flex; gap: 20px; font-size: 17px; }
.says-score strong { color: var(--ink); }
.says-start { min-height: 46px; padding: 9px 20px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: var(--surface); font: inherit; font-weight: 800; cursor: pointer; }
.says-start:hover { background: var(--line); }
.says-status { max-width: 680px; min-height: 1.5em; margin: 0 auto 18px; color: var(--muted); font-size: 16px; font-weight: 700; }
.says-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 2vw, 18px); max-width: 680px; margin: 0 auto; }
.says-pad { position: relative; display: grid; place-items: center; aspect-ratio: 1.28; padding: 0; border: 2px solid #ffffff7a; border-radius: var(--tile-radius); background: radial-gradient(circle at 25% 20%, #ffffff40, transparent 55%), var(--pad-color); box-shadow: 0 14px 32px #07132b28, inset 0 -12px 0 #00000016; cursor: pointer; transition: transform .14s ease, filter .14s ease, box-shadow .14s ease; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.says-pad:nth-child(1) { --pad-color: #b33366; }
.says-pad:nth-child(2) { --pad-color: #2462ba; }
.says-pad:nth-child(3) { --pad-color: #a87308; }
.says-pad:nth-child(4) { --pad-color: #268060; }
.says-pad .game-puff-icon { width: min(54%, 138px); margin: auto; }
.says-pad:disabled { cursor: default; opacity: 1; }
.says-pad.is-lit { transform: scale(.95); filter: brightness(1.45) saturate(1.25); box-shadow: 0 0 0 5px #ffffffaa, 0 0 36px var(--pad-color), inset 0 5px 18px #ffffff4d; }
.says-pad:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }

.sweeper-screen { width: min(1120px, calc(100% - 40px)); margin: 22px auto 80px; }
.sweeper-header { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.sweeper-header h1 { margin: 0; font-size: clamp(30px, 4vw, 52px); font-weight: 900; letter-spacing: -.065em; }
.sweeper-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; }
.sweeper-level { font-size: clamp(22px, 3vw, 34px); font-weight: 900; letter-spacing: -.05em; }
.sweeper-controls { display: flex; align-items: end; gap: 10px; }
.sweeper-controls label { display: grid; gap: 5px; color: var(--muted); font-size: 14px; font-weight: 700; }
.sweeper-controls select, .sweeper-controls button, .sweeper-result button, .sweeper-flag-mode { min-height: 45px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.sweeper-controls select { min-width: 125px; }
.sweeper-controls button:hover, .sweeper-result button:hover, .sweeper-flag-mode:hover { background: var(--line); }
.sweeper-status { margin: 0 0 14px; color: var(--muted); font-size: 16px; font-weight: 700; }
.sweeper-flag-mode { margin-bottom: 6px; }
.sweeper-flag-mode[aria-pressed='true'] { color: #fff; border-color: #bd4b40; background: #a6382e; }
.sweeper-tip { margin: 7px 0 18px; color: var(--muted); font-size: 13px; }
.sweeper-board { width: 100%; overflow-x: auto; padding-bottom: 8px; }
.sweeper-grid { --sweeper-size: clamp(36px, 4vw, 46px); display: grid; grid-template-columns: repeat(var(--sweeper-columns), var(--sweeper-size)); gap: 4px; width: max-content; max-width: none; margin-inline: auto; padding: 4px; border-radius: 12px; background: #34637b; }
.sweeper-grid.is-lost { background: #8e241c; }
.sweeper-cell { display: grid; place-items: center; width: var(--sweeper-size); height: var(--sweeper-size); padding: 0; border: 1px solid #ffffff75; border-radius: 5px; color: #fff; background: #286d91; font: inherit; font-size: clamp(16px, 2vw, 23px); font-weight: 900; cursor: pointer; touch-action: manipulation; }
.sweeper-cell:hover:not(:disabled) { filter: brightness(1.2); }
.sweeper-cell.is-open { color: #142646; background: #fff; cursor: default; }
.sweeper-cell.is-mine { border-color: #8e241c; background: #8e241c; }
.sweeper-cell.is-hit { background: #d7352c; }
.sweeper-cell.is-flagged { background: #654ab3; }
.sweeper-cell img { width: 74%; height: 74%; object-fit: contain; pointer-events: none; }
.sweeper-cell[data-nearby='2'] { color: #177246; }
.sweeper-cell[data-nearby='3'] { color: #b93636; }
.sweeper-cell[data-nearby='4'] { color: #6044a6; }
.sweeper-cell:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sweeper-result { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 16px; max-width: 800px; margin: 23px auto; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); font-size: 20px; }
.sweeper-result[hidden] { display: none; }

.hide-screen { width: min(1050px, calc(100% - 40px)); margin: 22px auto 75px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.hide-screen * { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.hide-screen img { -webkit-user-drag: none; }
.hide-header { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.hide-header h1 { margin: 0; font-size: clamp(30px, 4vw, 52px); font-weight: 900; letter-spacing: -.065em; }
.hide-instructions { margin-bottom: 19px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: var(--surface); }
.hide-instructions strong { font-size: 16px; }
.hide-instructions p { max-width: 820px; margin: 5px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.hide-dashboard { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.hide-meter { min-width: 0; padding: 12px 16px 15px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.hide-meter-head { display: flex; align-items: center; gap: 11px; min-height: 37px; }
.hide-meter-head img { width: 34px; height: 34px; padding: 5px; border-radius: 8px; background: #ffffffd9; object-fit: contain; }
.hide-meter-head strong { flex: 1; font-size: 15px; }
.hide-meter-head > span { font-size: 21px; font-weight: 900; font-variant-numeric: tabular-nums; }
.hide-meter-track { height: 13px; margin-top: 10px; overflow: hidden; border-radius: 999px; background: #58677c40; }
.hide-meter-track span { display: block; height: 100%; width: 10%; border-radius: inherit; transition: width .1s linear; }
.hide-meter-pressure .hide-meter-track span { background: linear-gradient(90deg, #f5b955, #e96d47); }
.hide-meter-detection .hide-meter-track span { background: linear-gradient(90deg, #f795c4, #c93675); }
.hide-score { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 15px 0; font-size: 14px; font-weight: 700; }
.hide-score strong { font-size: clamp(25px, 4vw, 41px); font-weight: 900; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.hide-score small { color: var(--muted); font-size: 14px; }
.hide-scene { position: relative; height: clamp(420px, 63svh, 690px); overflow: hidden; isolation: isolate; border: 1px solid #ffffff55; border-radius: var(--tile-radius); background: radial-gradient(circle at 22% 5%, var(--glass-a), transparent 42%), linear-gradient(160deg, var(--glass-b), var(--glass-c) 55%, var(--page)); box-shadow: 0 25px 70px #07132b32; cursor: pointer; touch-action: none; }
.hide-traffic-status { position: absolute; z-index: 5; top: 19px; left: 50%; width: max-content; max-width: calc(100% - 30px); padding: 9px 15px; transform: translateX(-50%); border: 1px solid #ffffff73; border-radius: 999px; color: #fff; background: #16263ab8; font-size: 12px; font-weight: 900; letter-spacing: .1em; text-align: center; box-shadow: 0 7px 22px #10132926; }
.hide-traffic-status.is-safe { background: #217e61; }
.hide-city { position: absolute; z-index: 1; inset: auto 0 3px; height: 245px; background: url('/app/css/bg/city.png') repeat-x center bottom / auto 255px; opacity: .62; pointer-events: none; }
.hide-road { position: absolute; z-index: 1; right: 0; bottom: 80px; left: 0; height: 3px; background: #f9d7c473; box-shadow: 0 8px 25px #120e2670; pointer-events: none; }
.hide-car { position: absolute; z-index: 2; bottom: 82px; left: -200px; width: 200px; height: 100px; object-fit: contain; pointer-events: none; }
.hide-car.is-driving { animation: hide-car-drive 1.5s linear forwards; }
@keyframes hide-car-drive { to { transform: translate3d(var(--drive-distance), 0, 0); } }
.hide-woman { position: absolute; z-index: 3; bottom: 15px; left: 50%; width: 174px; height: 400px; transform: translateX(-50%); background: url('/app/css/woman/woman.png') no-repeat center bottom / 174px 400px; pointer-events: none; }
.hide-skirt { position: absolute; bottom: 130px; left: 1px; width: 77px; height: 100px; object-fit: contain; }
.hide-skirt[hidden], .hide-scene-panel[hidden] { display: none; }
.hide-scene-panel { position: absolute; z-index: 7; top: 50%; left: 50%; display: grid; justify-items: center; gap: 11px; width: min(390px, calc(100% - 36px)); padding: 25px; transform: translate(-50%, -50%); border: 1px solid #ffffff8c; border-radius: 22px; color: #fff; background: #1b294cdb; box-shadow: 0 18px 55px #12142a77; text-align: center; backdrop-filter: blur(12px); cursor: default; }
.hide-scene-panel strong { font-size: clamp(22px, 4vw, 31px); font-weight: 900; line-height: 1.1; }
.hide-scene-panel p { margin: 0; line-height: 1.4; }
.hide-scene-panel button { min-height: 46px; margin-top: 7px; padding: 10px 20px; border: 0; border-radius: 999px; color: #21213f; background: #fff; font: inherit; font-weight: 900; cursor: pointer; }
.hide-scene-panel button:hover { background: #fff1bc; }

/* Shared losing motion for games: a few increasingly small "no" shakes. */
.game-over-shake { animation: game-over-shake .58s cubic-bezier(.33,.7,.3,1) both; }
@keyframes game-over-shake {
  0%, 100% { transform: translateX(0); }
  13% { transform: translateX(-18px); }
  29% { transform: translateX(14px); }
  45% { transform: translateX(-9px); }
  61% { transform: translateX(6px); }
  77% { transform: translateX(-3px); }
  89% { transform: translateX(1px); }
}

@media (max-width: 760px) {
  .category-screen { width: min(100% - 28px, 560px); margin-block: 14px 42px; }
  .category-header { gap: 15px; margin-bottom: 15px; }
  .category-header h1 { font-size: 27px; }
  .fart-panel { grid-template-columns: 1fr; min-height: 0; gap: 25px; padding: 26px 23px; }
  .fart-intro h2 { min-height: 1.9em; margin-bottom: 20px; font-size: clamp(39px, 9vw, 60px); }
  .fart-ratings { padding: 19px 22px; }
  .fart-ratings h3 { margin-bottom: 18px; }
  .fart-rating { margin: 13px 0; }
  .fart-navigation { flex-wrap: wrap; }
  .fart-navigation span { order: 3; width: 100%; text-align: center; }
  .fart-navigation button { flex: 1; }
  .memory-screen { width: calc(100% - 28px); margin-block: 12px 55px; }
  .memory-header { gap: 12px; margin-bottom: 19px; }
  .memory-header h1 { font-size: 28px; }
  .memory-toolbar { align-items: start; }
  .memory-controls { width: 100%; }
  .memory-controls label { flex: 1; }
  .memory-controls select { width: 100%; }
  .memory-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .memory-face { border-radius: 14px; }
  .memory-face-front { font-size: clamp(28px, 9vw, 48px); }
  .says-screen { width: calc(100% - 28px); margin-block: 12px 55px; }
  .says-header { gap: 12px; }
  .says-header h1 { font-size: 28px; }
  .says-pad { aspect-ratio: 1; }
  .sweeper-screen { width: calc(100% - 28px); margin-block: 12px 55px; }
  .sweeper-header { gap: 12px; margin-bottom: 19px; }
  .sweeper-header h1 { font-size: 28px; }
  .sweeper-controls { width: 100%; }
  .sweeper-controls label { flex: 1; }
  .sweeper-controls select { width: 100%; }
  .sweeper-board { overflow-x: visible; padding-bottom: 0; }
  .sweeper-grid { grid-template-columns: repeat(var(--sweeper-columns), minmax(0, 1fr)); gap: 3px; width: 100%; max-width: 100%; margin-inline: 0; padding: 3px; }
  .sweeper-cell { width: 100%; min-width: 0; height: auto; aspect-ratio: 1; font-size: clamp(13px, 4vw, 19px); }
  .hide-screen { width: calc(100% - 28px); margin-block: 12px 55px; }
  .hide-header { gap: 12px; margin-bottom: 17px; }
  .hide-header h1 { font-size: 28px; }
  .hide-instructions { padding: 13px 15px; }
  .hide-dashboard { gap: 8px; }
  .hide-meter { padding: 10px 10px 12px; }
  .hide-meter-head { flex-wrap: wrap; gap: 5px; }
  .hide-meter-head img { width: 27px; height: 27px; padding: 3px; }
  .hide-meter-head strong { font-size: 12px; }
  .hide-meter-head > span { width: 100%; font-size: 21px; }
  .hide-scene { height: min(600px, max(470px, 70svh)); }
  .hide-woman { bottom: 3px; }
  .hide-car { bottom: 72px; }
  .hide-road { bottom: 70px; }
}

@keyframes old-out {
  from { opacity: 1; transform: scale(1) rotate(0); filter: blur(0) saturate(1); }
  to { opacity: .22; transform: scale(.93) rotate(-2deg); filter: blur(22px) saturate(1.4); }
}
@keyframes blob-in {
  from { opacity: .55; clip-path: ellipse(0% 0% at var(--reveal-x) var(--reveal-y)); transform: scale(1.06) rotate(2deg); filter: blur(36px); }
  to { opacity: 1; clip-path: ellipse(160% 160% at var(--reveal-x) var(--reveal-y)); transform: scale(1) rotate(0); filter: blur(0); }
}
::view-transition-old(root) { animation: .59s cubic-bezier(.4,0,.2,1) both old-out; }
::view-transition-new(root) { animation: .59s cubic-bezier(.4,0,.2,1) both blob-in; }

@media (max-width: 700px) {
  .app-header, .app-footer, .home-screen, .page-screen { width: min(100% - 32px, 520px); }
  .app-header { min-height: 78px; }
  .brand { font-size: 16px; }
  .brand img { width: 36px; height: 36px; }
  .theme-switch button { min-width: 54px; min-height: 34px; font-size: 11px; }
  .home-screen { padding-block: 34px 60px; }
  .home-intro { margin-bottom: 30px; }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { min-height: 185px; padding: 16px; }
  .tile-icon { width: min(105px, 70%); height: auto; aspect-ratio: 1; }
  .tile-label { max-width: 125px; font-size: 17px; }
  .tile-arrow { right: 13px; top: 13px; font-size: 18px; }
  .page-screen { min-height: calc(100svh - 167px); padding: 28px 23px; margin-block: 12px 32px; }
  .app-footer { flex-wrap: wrap; }
}
@media (max-width: 370px) {
  .app-header { gap: 8px; }
  .brand { gap: 6px; font-size: 14px; }
  .brand img { width: 32px; height: 32px; }
  .theme-switch button { min-width: 43px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .fart-panel.is-active .fart-bar span { animation: none; }
  .game-over-shake { animation: none; }
}

/* The Mix studio uses the same palette as the landing page in every theme. */
.tile-icon-mix { background-image: url('/app/img/mix-tile-icon.svg'); background-size: contain; background-position: center; }
.mix-screen { width: min(1130px, calc(100% - 40px)); margin: 26px auto 90px; }
.mix-header { display: flex; align-items: center; gap: 20px; }
.mix-header h1 { margin: 0; font-size: clamp(36px, 5vw, 64px); font-weight: 900; letter-spacing: -.075em; line-height: 1; }
.mix-header .eyebrow { margin: 0 0 5px; }
.mix-intro { max-width: 750px; margin: 20px 0 26px; color: var(--muted); line-height: 1.5; }
.mix-studio, .mix-library, .mix-presets { border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: 0 20px 52px #10163412; }
.mix-studio, .mix-library, .mix-presets { padding: clamp(16px, 3vw, 30px); }
.mix-studio-head, .mix-library-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.mix-studio-head > div:first-child { display: grid; gap: 4px; }
.mix-kicker { color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .17em; }
.mix-studio-head strong, .mix-library-head h2 { color: var(--ink); font-size: clamp(23px, 3vw, 34px); font-weight: 900; letter-spacing: -.055em; }
.mix-studio-actions { display: flex; align-items: center; gap: 9px; }
.mix-clear, .mix-play { min-height: 46px; padding: 10px 19px; border-radius: 999px; font-weight: 800; cursor: pointer; }
.mix-clear { border: 1px solid var(--line); color: var(--ink); background: var(--page); }
.mix-play { border: 0; color: #fff; background: #7351bc; }
.mix-clear:disabled, .mix-play:disabled { opacity: .45; cursor: default; }
.mix-timeline { position: relative; --mix-lane-inset: 0px; }
.mix-ruler { display: flex; justify-content: space-between; margin: 29px 0 8px; color: var(--muted); font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mix-tracks { display: grid; gap: 11px; }
.mix-track { position: relative; height: 80px; border: 1px dashed var(--line); border-radius: 12px; background: repeating-linear-gradient(90deg, transparent 0, transparent calc(20% - 1px), var(--line) calc(20% - 1px), var(--line) 20%), color-mix(in srgb, var(--page) 75%, transparent); transition: border-color .15s, background-color .15s; }
.mix-track.is-target { border: 2px solid #9260df; background-color: #a67ee133; }
.mix-track-hint { position: absolute; top: 50%; left: 14px; transform: translateY(-50%); color: var(--muted); font-size: 13px; pointer-events: none; }
.mix-playhead { position: absolute; z-index: 5; top: 31px; bottom: 0; left: calc((100% - 2px) * var(--playhead-progress, 0)); width: 2px; border-radius: 2px; background: #b873af; opacity: .7; pointer-events: none; }
.mix-playhead[hidden] { display: none; }
.mix-clip { position: absolute; top: 6px; bottom: 6px; display: flex; flex-direction: column; justify-content: center; min-width: 0; overflow: hidden; padding: 5px 7px; border: 1px solid #ffffff8a; border-radius: 9px; color: #fff; background: linear-gradient(140deg, #7852bb, #a262bd); box-shadow: 0 6px 18px #40226855; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.mix-track:nth-child(2) .mix-clip { background: linear-gradient(140deg, #277897, #4c9eb2); }
.mix-track:nth-child(3) .mix-clip { background: linear-gradient(140deg, #b65a68, #d08163); }
.mix-clip:active { cursor: grabbing; }
.mix-clip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 900; }
.mix-clip-time { font-size: 10px; opacity: .85; }
.mix-selection { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(150px, 260px) auto; align-items: center; gap: 18px; margin-top: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); font-size: 13px; font-weight: 800; }
.mix-selection[hidden] { display: none; }
.mix-selected-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mix-volume { display: grid; grid-template-columns: auto auto; align-items: center; gap: 4px 12px; }
.mix-volume output { justify-self: end; font-variant-numeric: tabular-nums; }
.mix-volume input { grid-column: 1 / -1; width: 100%; margin: 0; accent-color: #8260bb; cursor: pointer; }
.mix-selection button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--page); cursor: pointer; }
.mix-selection button svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mix-library, .mix-presets { margin-top: 21px; }
.mix-library-head h2 { margin: 3px 0 0; }
.mix-library-head > span { color: var(--muted); font-size: 13px; font-weight: 700; }
.mix-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 23px 0 18px; }
.mix-tabs button { padding: 10px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: var(--page); font-size: 11px; font-weight: 900; letter-spacing: .04em; cursor: pointer; }
.mix-tabs button[aria-pressed='true'] { border-color: #7451b6; color: #fff; background: #7451b6; }
.mix-sound-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.mix-sound { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 67px; padding: 9px; border: 1px solid var(--line); border-radius: 14px; background: var(--page); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.mix-sound:active { cursor: grabbing; }
.mix-preview, .mix-add { cursor: pointer; }
.mix-preview { flex: 0 0 38px; height: 38px; border: 0; border-radius: 12px; color: #fff; background: #7f60bd; }
.mix-sound-info { display: grid; flex: 1; min-width: 0; gap: 2px; }
.mix-sound-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 13px; }
.mix-sound-info small { color: var(--muted); font-size: 11px; }
.mix-add { min-height: 37px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--surface); font-size: 12px; font-weight: 800; }
.mix-preset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.mix-preset { display: grid; gap: 9px; min-height: 144px; padding: 20px; border: 1px solid #ffffff70; border-radius: 16px; color: #fff; background: linear-gradient(145deg, #7351b8, #a765ae); text-align: left; cursor: pointer; }
.mix-preset:nth-child(2) { background: linear-gradient(145deg, #277b95, #48a5aa); }
.mix-preset:nth-child(3) { background: linear-gradient(145deg, #a84a56, #d27966); }
.mix-preset strong { font-size: 20px; font-weight: 900; letter-spacing: -.035em; }
.mix-preset span { font-size: 13px; line-height: 1.35; }
.mix-preset small { align-self: end; font-size: 12px; font-weight: 800; }
.mix-drag-ghost { position: fixed; z-index: 100; left: 0; top: 0; max-width: 170px; overflow: hidden; padding: 10px 16px; border-radius: 11px; color: #fff; background: #7852bb; box-shadow: 0 12px 32px #24173c66; font-size: 13px; font-weight: 800; pointer-events: none; }
@media (max-width: 700px) {
  .mix-sound-list, .mix-preset-grid { grid-template-columns: 1fr; }
  .mix-screen { width: calc(100% - 24px); margin-top: 18px; }
  .mix-intro { font-size: 14px; }
  .mix-track { height: 76px; }
  .mix-sound { gap: 7px; }
  .mix-studio-actions { gap: 5px; }
  .mix-clear, .mix-play { min-height: 42px; padding: 8px 10px; font-size: 12px; }
  .mix-preset { min-height: 112px; }
  .mix-selection { grid-template-columns: 1fr auto; gap: 10px; }
  .mix-volume { grid-column: 1 / -1; grid-row: 2; }
  .mix-selection button { grid-column: 2; grid-row: 1; }
}

.mix-export-row { display: flex; justify-content: flex-end; margin-top: 16px; }
.mix-export-button { min-height: 46px; padding: 10px 20px; border: 0; border-radius: 999px; color: #fff; background: linear-gradient(135deg, #7852bb, #b15b94); font-weight: 900; cursor: pointer; box-shadow: 0 8px 22px #7852bb38; }
.mix-export-button:disabled { opacity: .42; cursor: default; box-shadow: none; }
.mix-export-dialog { width: min(500px, calc(100% - 28px)); max-width: none; padding: 0; border: 1px solid #ffffffb0; border-radius: 26px; color: var(--ink); background: transparent; box-shadow: 0 30px 100px #08102d55; }
.mix-export-dialog::backdrop { background: #1014269c; backdrop-filter: blur(7px); }
.mix-export-card { display: grid; justify-items: center; gap: 13px; padding: clamp(25px, 6vw, 42px); border-radius: inherit; background: radial-gradient(circle at 88% 2%, #ebc7ec, transparent 48%), var(--surface); text-align: center; }
.mix-export-card[hidden], .mix-name-field[hidden] { display: none; }
.mix-export-icon { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 22px; color: white; background: linear-gradient(145deg, #7750bc, #d16f9c); font-size: 36px; box-shadow: 0 12px 30px #8054ac45; }
.mix-export-card .mix-kicker { margin: 8px 0 0; }
.mix-export-card h2 { margin: 0; font-size: clamp(25px, 5vw, 34px); line-height: 1.1; letter-spacing: -.055em; }
.mix-name-note { max-width: 370px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.mix-export-card p[data-export-message] { max-width: 370px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.mix-name-field { display: grid; width: min(370px, 100%); gap: 7px; color: var(--ink); font-size: 14px; font-weight: 800; text-align: left; }
.mix-name-field span { color: var(--muted); font-size: 12px; font-weight: 500; }
.mix-name-field input { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--page); font: inherit; font-weight: 600; }
.mix-name-field input:focus { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
.mix-export-progress { width: min(320px, 100%); height: 10px; overflow: hidden; border-radius: 999px; background: var(--page); }
.mix-export-progress span { display: block; width: 40%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7954bd, #db70a0); animation: mix-progress 1.15s ease-in-out infinite alternate; }
@keyframes mix-progress { from { transform: translateX(-35%); } to { transform: translateX(185%); } }
.mix-export-close, .mix-export-start { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 145px; padding: 10px 20px; border: 0; border-radius: 999px; color: #fff; background: #7351bc; font-weight: 800; cursor: pointer; }
.mix-export-start { background: linear-gradient(135deg, #7852bb, #b15b94); }
.mix-export-close { border: 1px solid var(--line); color: var(--ink); background: var(--page); }
.mix-export-close:disabled { opacity: .58; cursor: wait; }
.mix-export-start:disabled { opacity: .58; cursor: wait; }
.mix-creations { margin-top: 22px; padding: clamp(16px, 3vw, 30px); border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: 0 20px 52px #10163412; scroll-margin-top: 20px; }
.mix-creations-empty { margin: 18px 0 0; color: var(--muted); font-size: 14px; }
.mix-created-list { display: grid; gap: 9px; margin-top: 18px; }
.mix-created-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--page); }
.mix-created-details { display: grid; min-width: 0; gap: 4px; }
.mix-created-details strong { overflow: hidden; color: var(--ink); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.mix-created-details small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.mix-created-actions { display: flex; flex: 0 0 auto; align-items: center; flex-wrap: wrap; gap: 7px; }
.mix-created-actions button { min-height: 40px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 800; cursor: pointer; }
.mix-created-play { color: #fff; background: #7351bc; }
.mix-created-load { color: var(--ink); background: color-mix(in srgb, var(--accent) 13%, var(--page)); }
.mix-created-remove { color: var(--muted); background: var(--page); }
.mix-created-status { margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.mix-created-status:empty { display: none; }
.mix-delete-card .mix-name-note strong { color: var(--ink); overflow-wrap: anywhere; }
.mix-delete-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; width: 100%; margin-top: 4px; }
.mix-delete-actions .mix-export-close, .mix-delete-actions .mix-export-start { min-width: min(145px, calc(50% - 5px)); }
@media (max-width: 700px) {
  .mix-created-item { align-items: flex-start; flex-wrap: wrap; }
  .mix-created-details { flex: 1 1 100%; }
  .mix-created-actions { flex: 1 1 100%; width: 100%; }
  .mix-created-actions button { flex: 1 1 105px; }
}
@media (max-width: 700px) { .mix-export-row { justify-content: stretch; } .mix-export-button { width: 100%; } }
