@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("./assets/fredoka-latin.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --ink: #49351d;
  --field: #fff0b6;
  --accent: #79dc3e;
  --accent-deep: #429b37;
  font-family: Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { background: #fff0b6; overscroll-behavior: none; }
button { font: inherit; }
.game-page { display: flex; justify-content: center; background: #263020; }

.version-page {
  --ink: #423822;
  position: relative;
  min-height: 100%;
  overflow: auto;
  background: #fff4c9;
  color: var(--ink);
}
.version-page::before, .version-page::after { position: fixed; z-index: 0; width: clamp(170px, 14vw, 260px); aspect-ratio: 1; border-radius: 50%; pointer-events: none; content: ""; }
.version-page::before { top: 2.5%; left: 2.5%; background: rgba(255, 255, 255, .78); }
.version-page::after { right: -2%; bottom: -14%; width: clamp(240px, 24vw, 430px); background: rgba(194, 221, 129, .42); }

.version-picker {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  align-content: center;
  width: min(100%, 760px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(32px, env(safe-area-inset-top)) 22px max(32px, env(safe-area-inset-bottom));
  text-align: center;
}

.version-fruit { font-size: clamp(3rem, 12vw, 5.2rem); line-height: 1; filter: drop-shadow(0 5px 0 rgba(105, 116, 54, .12)); }
.version-eyebrow { margin: 18px 0 4px; color: #7b9c49; font: 700 .76rem "Fredoka", sans-serif; letter-spacing: .2em; }
.version-picker h1 { margin: 0; font-size: clamp(2.5rem, 9vw, 4.3rem); font-weight: 1000; letter-spacing: -.07em; }
.version-intro { margin: 8px 0 28px; color: #81765d; font-size: clamp(.95rem, 3.5vw, 1.08rem); }

.version-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; width: 100%; }
.version-card {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 150px;
  padding: clamp(18px, 4vw, 27px);
  overflow: hidden;
  border: 2px solid rgba(87, 75, 46, .08);
  border-radius: 25px;
  color: var(--ink);
  background: linear-gradient(145deg, #fffdf6, #fff3d6);
  text-align: center;
  text-decoration: none;
  box-shadow: 0 9px 0 rgba(107, 94, 57, .08), 0 17px 32px rgba(103, 88, 45, .09);
  transition: transform .18s ease, box-shadow .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.version-card:hover { transform: translateY(-5px); box-shadow: 0 13px 0 rgba(107, 94, 57, .08), 0 22px 36px rgba(103, 88, 45, .12); }
.version-card:active { transform: translateY(1px); }
.version-card:focus-visible { outline: 3px solid #3979bc; outline-offset: 4px; }
.version-card[hidden] { display: none; }
.version-card-actions { display: flex; justify-content: center; flex-wrap: wrap; width: 100%; gap: 8px; margin-top: 20px; }
.version-card-play, .version-card-score { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 15px; border: 0; border-radius: 999px; font-size: .88rem; font-weight: 900; text-decoration: none; cursor: pointer; }
.version-card-play { gap: 5px; color: #fff; background: #6f9941; }
.version-card-score { color: #5e7438; background: #eef0d8; }
.version-card-play:focus-visible, .version-card-score:focus-visible { outline: 3px solid #3979bc; outline-offset: 3px; }
.score-panel { width: min(420px, calc(100% - 32px)); max-height: min(70dvh, 560px); margin: auto; padding: 22px; overflow: auto; border: 1px solid rgba(87,75,46,.13); border-radius: 22px; color: var(--ink); background: #fffaf0; box-shadow: 0 24px 80px rgba(48,37,27,.25); text-align: left; }
.score-panel::backdrop { background: rgba(48,37,27,.5); backdrop-filter: blur(3px); }
.score-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.score-panel h2 { margin: 0; font-size: 1.15rem; }
.score-panel-close { display: grid; flex: none; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; color: #584d37; background: #f0e8d6; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.score-panel-close:focus-visible { outline: 3px solid #3979bc; outline-offset: 2px; }
.score-panel-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.score-panel-list li { display: flex; align-items: center; justify-content: space-between; min-height: 48px; gap: 12px; padding: 9px 14px; border-radius: 12px; color: #584d37; background: #f5efd9; font-size: .95rem; }
.score-panel-list li:first-child { color: #4d3a1c; background: #ffe8a7; }
.score-panel-rank { font-weight: 900; }
.score-panel-list strong { font-variant-numeric: tabular-nums; }
.score-panel-empty { color: #81765d; font-size: .88rem; }
.ranking-toggle { margin: 0 0 14px; padding: 8px 13px; border: 1px solid rgba(255,255,255,.65); border-radius: 999px; color: #fff; background: rgba(255,255,255,.14); font-weight: 800; cursor: pointer; }
.version-card-year { color: #8d9b77; font: 700 1.05rem "Fredoka", sans-serif; letter-spacing: .08em; }
.version-card-title { margin: 0; font: 700 clamp(1.45rem, 5vw, 2rem) "Fredoka", "Trebuchet MS", sans-serif; letter-spacing: -.035em; }
.version-card-description { margin-top: 5px; color: #81765d; font-size: clamp(.76rem, 3vw, .89rem); }
.version-card-action { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 27px; color: #678f37; font-size: .87rem; font-weight: 900; }
.version-card-action span { font-size: 1.1rem; transition: transform .18s ease; }
.version-card:hover .version-card-action span { transform: translate(3px, -2px); }
.version-card-badge { position: absolute; top: 18px; right: 17px; padding: 5px 9px; border-radius: 999px; color: #fff; background: #75a83c; font: 700 .65rem "Fredoka", sans-serif; letter-spacing: .08em; }
.version-footer { margin: 23px 0 0; color: #978c72; font-size: .82rem; }
.custom-games { display: contents; }
.version-footer-row { display: flex; align-items: center; gap: 12px; }
.admin-entry { margin-top: 23px; color: #71844f; font-size: .82rem; font-weight: 800; text-decoration: none; }
.admin-entry:hover { text-decoration: underline; }
.store-error { grid-column: 1 / -1; color: #8c4838; }

.back-to-versions { pointer-events: auto; }
.back-to-versions:hover, .game-over-back:hover { text-decoration: underline; }
.back-to-versions, .sound-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid rgba(255,255,255,.9);
  border-radius: 50%;
  color: #49351d;
  background: rgba(255,255,255,.58);
  box-shadow: 0 2px 7px rgba(35,55,26,.2);
  font-size: 1.2rem;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}
.sound-toggle { padding: 0; }
.back-to-versions:focus-visible, .sound-toggle:focus-visible { outline: 3px solid #1a6acb; outline-offset: 3px; }
.ranking-status { margin: -10px 0 12px; color: #fff; font-size: .88rem; }
.ranking-status[hidden], .ranking-list[hidden] { display: none; }
.ranking-list { width: min(280px, 80vw); max-height: 28vh; overflow: auto; margin: 0 0 14px; padding: 0; list-style: none; color: white; text-align: left; }
.ranking-list:empty { display: none; }
.ranking-list li { display: block; padding: 5px 8px; border-bottom: 1px solid rgba(255,255,255,.2); font-size: .88rem; }
.ranking-list li:first-child { color: #ffe16c; font-weight: 900; }
.ranking-list li.score-only { justify-content: flex-start; }
.game-over-back { margin-top: 17px; color: #fff; font-size: .9rem; font-weight: 750; text-decoration: none; }
.load-error { position: absolute; z-index: 6; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; color: #49351d; background: rgba(255, 247, 215, .96); font-weight: 800; text-align: center; }
.load-error[hidden] { display: none; }
.load-error a { color: #426e2d; }

.admin-page { min-height: 100%; overflow: auto; color: #f4f4ed; background: #172c2b; }
.admin-shell { width: min(1120px, 100%); margin: 0 auto; padding: 30px clamp(18px, 4vw, 48px) 54px; }
.admin-header { padding: 8px 0 24px; }
.admin-back { color: #b2c4b1; font-size: .9rem; font-weight: 750; text-decoration: none; }
.admin-back:hover { color: #fff; }
.admin-kicker { margin: 0 0 6px; color: #9fbc76; font: 700 .76rem "Fredoka", sans-serif; letter-spacing: .16em; }
.admin-header h1 { margin: 18px 0 4px; font-size: clamp(2rem, 6vw, 3rem); letter-spacing: -.06em; }
.admin-lede { margin: 0; color: #adbbb1; }
.local-save-note { display: grid; gap: 5px; padding: 15px 18px; border: 1px solid #46635a; border-radius: 12px; background: #213d37; }
.local-save-note strong { color: #c7ef8c; font-size: .94rem; }
.local-save-note span { color: #c2cec2; font-size: .87rem; line-height: 1.55; }
.admin-layout { display: grid; grid-template-columns: minmax(230px, .7fr) minmax(0, 1.8fr); gap: 18px; align-items: start; margin-top: 20px; }
.admin-list-panel, .admin-editor { border: 1px solid #36534c; border-radius: 16px; background: #1d3732; }
.admin-list-panel { position: sticky; top: 15px; padding: 19px 14px; }
.admin-editor { padding: clamp(17px, 3vw, 28px); }
.admin-scores { margin-top: 30px; padding-top: 22px; border-top: 1px solid #36534c; }
.admin-scores h3 { margin: 0 0 5px; font-size: 1.05rem; }
.admin-scores > p { color: #a9bbb0; font-size: .84rem; }
.missing-score-form { display: flex; align-items: end; gap: 9px; margin: 16px 0; }
.missing-score-form label { display: grid; flex: 1; gap: 6px; color: #cbd8ce; font-size: .84rem; font-weight: 800; }
.missing-score-form input, .score-admin-row input { min-width: 0; min-height: 40px; padding: 0 10px; border: 1px solid #557064; border-radius: 8px; color: #fff; background: #162e2a; font: inherit; }
.score-admin-list { display: grid; gap: 7px; max-height: 360px; overflow: auto; }
.score-admin-row { display: grid; grid-template-columns: 45px minmax(0, 1fr) 58px; align-items: center; gap: 8px; }
.score-admin-row span { color: #d6edb3; font-weight: 850; }
.score-admin-row button { min-height: 38px; border: 1px solid #60796e; border-radius: 8px; color: #f4f4ed; background: #304a42; font-weight: 800; cursor: pointer; }
.panel-heading, .editor-heading, .fruit-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-heading { padding: 0 3px 15px; }
.panel-heading h2, .editor-heading h2 { margin: 0; font-size: 1.25rem; letter-spacing: -.04em; }
.admin-primary, .admin-danger { min-height: 40px; padding: 0 15px; border: 0; border-radius: 10px; font: inherit; font-size: .9rem; font-weight: 900; cursor: pointer; }
.admin-primary { color: #183024; background: #c2ed7d; box-shadow: 0 3px 0 #86ae4a; }
.admin-primary:hover { background: #d5f79b; }
.admin-new { white-space: nowrap; }
.admin-danger { color: #ffe2d8; background: #72403c; }
.admin-game-list { display: grid; gap: 7px; }
.admin-game-item { display: grid; grid-template-columns: 38px 1fr 12px; align-items: center; gap: 10px; width: 100%; padding: 10px 9px; border: 1px solid transparent; border-radius: 11px; color: #eef2e8; background: transparent; text-align: left; cursor: pointer; }
.admin-game-item:hover { background: #29463f; }
.admin-game-item.is-active { border-color: #749259; background: #2e4a3e; }
.admin-game-thumb { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: #304a42; font-size: 1.3rem; }
.admin-game-label { display: grid; gap: 3px; min-width: 0; }
.admin-game-label strong { overflow: hidden; font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.admin-game-label small { color: #a9bbb0; font-size: .76rem; }
.admin-game-item.is-off .admin-game-label strong { color: #b8c2bb; }
.admin-game-item.is-off .admin-item-arrow { color: #788b81; }
.admin-item-arrow { color: #a8c77b; font-size: 1.25rem; }
.editor-heading { margin-bottom: 21px; }
.editor-actions { display: flex; gap: 9px; }
.admin-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.admin-fields label, .admin-login-card label { display: grid; gap: 7px; color: #cbd8ce; font-size: .88rem; font-weight: 800; }
.admin-fields input, .admin-login-card input { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid #557064; border-radius: 9px; outline: none; color: #fff; background: #162e2a; font: inherit; }
.admin-fields input:focus, .admin-login-card input:focus { border-color: #c2ed7d; box-shadow: 0 0 0 3px rgba(194, 237, 125, .15); }
.publish-toggle { display: inline-flex; align-items: center; gap: 10px; margin-top: 19px; color: #dce5d9; font-size: .88rem; font-weight: 850; cursor: pointer; }
.publish-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.publish-switch { position: relative; width: 42px; height: 24px; border-radius: 99px; background: #61726a; transition: background .16s ease; }
.publish-switch::after { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; content: ""; transition: transform .16s ease; }
.publish-toggle input:checked + .publish-switch { background: #86c94e; }
.publish-toggle input:checked + .publish-switch::after { transform: translateX(18px); }
.publish-toggle input:focus-visible + .publish-switch { outline: 3px solid #b5e879; outline-offset: 3px; }
.publish-toggle input:disabled + .publish-switch { opacity: .5; cursor: not-allowed; }
.publish-toggle input:disabled ~ .publish-label { opacity: .65; }
.settings-section { margin-top: 10px; padding-top: 7px; border-top: 1px solid #36534c; }
.appearance-fields { display: grid; grid-template-columns: minmax(100px, .55fr) 1.45fr; gap: 11px; align-items: end; }
.appearance-fields > label, .sound-grid > label { display: grid; gap: 7px; color: #cbd8ce; font-size: .84rem; font-weight: 800; }
.appearance-fields input[type=color] { width: 100%; height: 43px; padding: 4px; border: 1px solid #557064; border-radius: 9px; background: #162e2a; cursor: pointer; }
.asset-file-label input[type=file], .sound-grid input[type=file] { width: 100%; min-width: 0; padding: 8px; border: 1px solid #557064; border-radius: 9px; color: #cbd8ce; background: #162e2a; font: inherit; font-size: .74rem; }
.asset-file-label input[type=file]::file-selector-button, .sound-grid input[type=file]::file-selector-button { margin-right: 7px; padding: 5px 8px; border: 0; border-radius: 6px; color: #183024; background: #c2ed7d; font-weight: 800; cursor: pointer; }
.background-preview { grid-column: 1 / -1; display: grid; min-height: 94px; place-items: center; overflow: hidden; border: 1px solid #3b5a50; border-radius: 10px; color: #9fb1a5; background: #162e2a; font-size: .8rem; }
.background-preview img { display: block; width: 100%; max-height: 180px; object-fit: cover; }
.background-remove { justify-self: start; }
.sound-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.sound-current { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.sound-current span { padding: 4px 8px; border-radius: 999px; color: #d6edb3; background: #304a3e; font-size: .72rem; }
.sound-reset { justify-self: start; padding: 5px 8px; border: 1px solid #60796e; border-radius: 7px; color: #dce5d9; background: #304a42; font: inherit; font-size: .72rem; font-weight: 750; cursor: pointer; }
.fruit-section-heading { align-items: end; margin: 29px 0 13px; }
.fruit-section-heading h3 { margin: 0; font-size: 1.05rem; }
.fruit-section-heading p { margin: 5px 0 0; color: #a9bbb0; font-size: .82rem; }
.fruit-count { padding: 5px 9px; border-radius: 999px; color: #d6edb3; background: #304a3e; font-size: .78rem; font-weight: 850; }
.fruit-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.fruit-upload-card { display: grid; justify-items: center; gap: 7px; min-width: 0; padding: 12px 8px; border: 1px solid #3b5a50; border-radius: 12px; background: #203b35; cursor: pointer; transition: border-color .15s ease, transform .15s ease; }
.fruit-upload-card:hover { transform: translateY(-2px); border-color: #a1c779; }
.fruit-preview { display: grid; width: clamp(48px, 7vw, 72px); aspect-ratio: 1; overflow: hidden; place-items: center; border-radius: 50%; background: #324b40; font-size: 1.8rem; }
.fruit-preview img { width: 100%; height: 100%; object-fit: cover; }
.fruit-label { max-width: 100%; overflow: hidden; color: #dce5d9; font-size: .77rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.fruit-pick { color: #aeda78; font-size: .74rem; font-weight: 800; }
.admin-status { min-height: 24px; margin: 17px 0 0; color: #c5e699; font-size: .88rem; }
.admin-status.is-error { color: #ffb4a6; }
.admin-login-screen { position: fixed; z-index: 9; inset: 0; display: grid; place-items: center; padding: 22px; background: rgba(9, 20, 19, .93); backdrop-filter: blur(10px); }
.admin-login-screen[hidden] { display: none; }
.admin-login-card { display: grid; gap: 14px; width: min(100%, 390px); padding: 30px; border: 1px solid #526e59; border-radius: 18px; background: #1d3732; box-shadow: 0 22px 70px rgba(0, 0, 0, .35); }
.admin-login-card h1 { margin: 0; font-size: 1.7rem; }
.admin-login-card > p:not(.admin-kicker, .admin-login-error) { margin: 0; color: #bdcabf; line-height: 1.55; }
.admin-login-error { min-height: 20px; margin: 0; color: #ffb4a6; font-size: .85rem; }
.admin-login-card .admin-primary { min-height: 45px; }
.admin-page :focus-visible { outline: 3px solid #b5e879; outline-offset: 3px; }

.crop-modal { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; overflow: auto; padding: 18px; background: rgba(7, 18, 16, .82); backdrop-filter: blur(7px); }
.crop-modal[hidden] { display: none; }
.crop-dialog { width: min(100%, 430px); padding: 22px; border: 1px solid #4d695c; border-radius: 18px; color: #f4f4ed; background: #1d3732; box-shadow: 0 24px 70px rgba(0,0,0,.42); }
.crop-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.crop-heading h2 { margin: 0; font-size: 1.3rem; }
.crop-close { width: 38px; height: 38px; border: 0; border-radius: 50%; color: #eaf0e8; background: #304a42; font-size: 1.6rem; cursor: pointer; }
.crop-instruction { margin: 12px 0 15px; color: #b8c8bd; font-size: .86rem; }
.crop-viewport { display: grid; width: min(100%, 330px); aspect-ratio: 1; margin: 0 auto; place-items: center; overflow: hidden; border-radius: 14px; background: #0e211e; touch-action: none; cursor: grab; }
.crop-viewport.is-dragging { cursor: grabbing; }
.crop-circle { position: relative; width: 76%; aspect-ratio: 1; overflow: hidden; border: 2px solid #d3f19c; border-radius: 50%; box-shadow: 0 0 0 999px rgba(5, 15, 13, .58); pointer-events: none; }
.crop-circle img { position: absolute; top: 50%; left: 50%; max-width: none; transform: translate(-50%, -50%); user-select: none; pointer-events: none; }
.crop-zoom-label { display: grid; gap: 9px; margin-top: 18px; color: #dce5d9; font-size: .85rem; font-weight: 800; }
.crop-zoom-label input { width: 100%; accent-color: #b5e879; }
.crop-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }
.crop-cancel-button { min-height: 40px; padding: 0 15px; border: 1px solid #60796e; border-radius: 10px; color: #e4ece4; background: transparent; font: inherit; font-size: .9rem; font-weight: 800; cursor: pointer; }

.game-screen {
  position: relative;
  width: min(100vw, 56.25dvh);
  height: 100dvh;
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
  background: var(--field);
  touch-action: none;
  isolation: isolate;
}

#game-canvas { display: block; width: 100%; height: 100%; cursor: crosshair; }

.hud {
  position: absolute;
  z-index: 2;
  inset: max(8px, env(safe-area-inset-top)) 10px auto;
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: clamp(6px, 2vw, 14px);
  align-items: start;
  pointer-events: none;
}
.score-hud { display: grid; justify-items: start; gap: 5px; }
.live-ranking-button { min-height: 34px; padding: 5px 11px; border: 2px solid rgba(255,255,255,.9); border-radius: 999px; color: #49351d; background: rgba(255,255,255,.78); box-shadow: 0 2px 7px rgba(35,55,26,.2); font-size: .78rem; font-weight: 900; cursor: pointer; pointer-events: auto; }
.live-ranking-button:focus-visible { outline: 3px solid #1a6acb; outline-offset: 2px; }

.score-display {
  justify-self: start;
  padding: 0 4px;
  color: #fff600;
  font-size: clamp(2rem, 8vw, 2.7rem);
  font-weight: 1000;
  line-height: 1.08;
  letter-spacing: .1em;
  -webkit-text-stroke: 1px #a84318;
  paint-order: stroke fill;
  text-shadow: 2px 3px 0 #9b481c, 0 0 4px #9b481c;
  font-variant-numeric: tabular-nums;
}

.score-display {
  font-family: "Fredoka", "Trebuchet MS", sans-serif;
}

.identity {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 7px;
}

.danger-warning {
  position: absolute;
  z-index: 3;
  top: max(105px, calc(env(safe-area-inset-top) + 97px));
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 14px;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: #e53935;
  box-shadow: 0 2px 8px rgba(80, 20, 20, .32);
  font-size: clamp(.85rem, 3.6vw, 1rem);
  font-weight: 900;
  white-space: nowrap;
  pointer-events: none;
  animation: danger-pulse .65s ease-in-out infinite alternate;
}

.danger-warning[hidden] { display: none; }
@keyframes danger-pulse { to { opacity: .72; transform: translateX(-50%) scale(1.04); } }

.change-button {
  justify-self: end;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  padding: 0;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,.9);
  border-radius: 50%;
  color: #252525;
  background: rgba(255,255,255,.35);
  box-shadow: 0 2px 7px rgba(35,55,26,.24);
  pointer-events: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.next-fruit-preview, .next-fruit-emoji { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.next-fruit-emoji { display: grid; place-items: center; font-size: 2rem; line-height: 1; }
.next-fruit-preview[hidden], .next-fruit-emoji[hidden] { display: none; }

.score-display.score-bump span { animation: score-bump .34s ease-out; }
@keyframes score-bump { 50% { transform: scale(1.25); color: #fff; } }

.change-button:active { transform: translateY(1px); }
.change-button.rerolling .next-fruit-preview, .change-button.rerolling .next-fruit-emoji { animation: reroll .28s ease-out; }
@keyframes reroll { 50% { transform: rotate(18deg) scale(1.12); } }
.change-button:focus-visible, #restart-button:focus-visible { outline: 3px solid #1a6acb; outline-offset: 3px; }

.game-over {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: grid;
  place-content: center;
  place-items: center;
  padding: 28px;
  text-align: center;
  background: rgba(48, 37, 27, .72);
  backdrop-filter: blur(5px);
}

.game-over[hidden] { display: none; }
.game-over-kicker { margin: 0 0 6px; color: #ffe16c; font-weight: 900; letter-spacing: .14em; }
.game-over h2 { margin: 0 0 20px; color: white; font-size: 1.75rem; }

#restart-button {
  border: 0;
  border-radius: 999px;
  padding: 13px 22px;
  color: #fff;
  background: #ff6f61;
  font-weight: 900;
  cursor: pointer;
}

.screen-reader-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@media (min-width: 521px) {
  .score-display { font-size: 2.7rem; }
}

@media (max-width: 480px) {
  .version-picker { justify-content: center; }
  .version-options { gap: 11px; }
  .version-card { min-height: 130px; padding: 18px 14px; border-radius: 20px; }
  .version-card-badge { top: 13px; right: 11px; padding: 4px 7px; }
}

@media (max-width: 680px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-list-panel { position: static; }
  .admin-game-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fruit-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-shell { padding-top: 21px; }
}

@media (max-width: 380px) {
  .admin-fields { grid-template-columns: 1fr; }
  .appearance-fields { grid-template-columns: 1fr; }
  .sound-grid { grid-template-columns: 1fr; }
  .fruit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-game-list { grid-template-columns: 1fr; }
}

@media (max-width: 350px) {
  .version-options { grid-template-columns: 1fr; max-width: 270px; }
  .version-card { min-height: 125px; }
}
