@font-face {
  font-family: "Monocraft";
  src: url("assets/fonts/Monocraft-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Monocraft";
  src: url("assets/fonts/Monocraft-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #070b12;
  --panel: #111927;
  --panel-raised: #17243a;
  --line: #35465d;
  --line-bright: #2877a8;
  --cyan: #29a8ff;
  --cyan-light: #62c4ff;
  --cyan-soft: #bde9ff;
  --text: #f8fbff;
  --muted: #aeb9c9;
  --dim: #71829a;
  --green: #20d59d;
  --danger: #ff6d83;
  --grass-light: #78a952;
  --grass: #4c7b39;
  --grass-dark: #263e2a;
  --dirt: #4a3528;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(4, 10, 18, .64), rgba(4, 10, 18, .76)),
    radial-gradient(ellipse at 50% 45%, transparent 18%, rgba(4, 10, 18, .42) 80%),
    url("assets/background.avif") center / cover fixed,
    #080e17;
  background-attachment: scroll, scroll, fixed, scroll;
  color: var(--text);
  font-family: "Monocraft", ui-monospace, monospace;
  font-synthesis: none;
}

button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.game-data-only { display: none !important; }
.builder-credit { color: #315b39; font-size: .7rem; text-decoration: none; }.builder-credit:hover { color: #174022; text-decoration: underline; }

.app-shell { position: relative; width: min(1360px, calc(100% - 32px)); margin: 0 auto; padding: 18px 0 42px; }

.topbar, .panel, .metric-card, .stat-card, .shop-card, .guide-card, .achievement-card, .settings-card, .dialog-card {
  border: 2px solid #33445c;
  background: rgba(8, 15, 25, .88);
}

.topbar {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 16px;
  border-top-color: #6d9c5e;
  box-shadow: inset 0 3px 0 #a2cd72;
}

.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.save-indicator { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .71rem; }
.save-indicator i { width: 8px; height: 8px; border: 2px solid var(--green); border-radius: 50%; }

.topbar-reset, .shop-button, .toggle-button, .ghost-button, .danger-button {
  min-height: 38px;
  border: 1px solid var(--line-bright);
  border-radius: 0;
  cursor: pointer;
  font-family: "Monocraft", ui-monospace, monospace;
  font-weight: 700;
  transition: background-color 150ms ease, border-color 150ms ease, opacity 150ms ease;
}
.topbar-reset, .ghost-button { background: var(--panel-raised); color: var(--cyan-soft); padding: 0 14px; }
.topbar-reset:hover, .ghost-button:hover { border-color: var(--cyan-light); background: #18354a; color: white; }

.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(350px, .85fr); gap: 34px; margin-top: 18px; padding: clamp(24px, 4vw, 46px); border-color: #38552d; background: linear-gradient(135deg, rgba(12, 26, 17, .97), rgba(27, 45, 20, .95)); }
.hero-copy > p:not(.eyebrow) { max-width: 54ch; margin: 16px 0 0; color: var(--muted); font-size: .92rem; line-height: 1.85; }
.hero h1 { margin: 10px 0 0; font-family: "Monocraft", ui-monospace, monospace; font-size: clamp(3.6rem, 8vw, 7rem); line-height: .78; letter-spacing: -.05em; }
.hero h1 span { color: var(--cyan); text-shadow: 3px 3px 0 #115578; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.hero-chips span { border: 1px solid var(--line); background: #0c111b; padding: 7px 9px; color: var(--cyan-soft); font-family: "Monocraft", ui-monospace, monospace; font-size: .84rem; }

.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: center; }
.metric-card { min-height: 116px; padding: 18px; }
.metric-card-large { grid-column: span 2; border-color: var(--line-bright); background: linear-gradient(135deg, #162b3a, var(--panel)); }
.metric-label, .stat-label { margin: 0; color: var(--dim); }
.metric-value { margin: 11px 0 0; color: var(--text); font-family: "Monocraft", ui-monospace, monospace; font-size: clamp(2rem, 5vw, 3.6rem); line-height: .8; }

.dashboard-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: start; margin-top: 16px; }
.bento-click, .bento-shop { grid-column: span 7; }
.bento-stats, .dashboard-side-stack { grid-column: span 5; }
.dashboard-side-stack { display: grid; gap: 16px; }
.click-panel, .stats-panel, .shop-panel, .progress-panel, .achievements-panel, .settings-panel { padding: 20px; }

.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.section-heading h2 { margin: 5px 0 0; font-family: "Monocraft", ui-monospace, monospace; font-size: 1.75rem; line-height: 1; }
.status-chip { border: 1px solid #2877a8; background: #10283a; padding: 7px 9px; color: var(--cyan-light); font-family: "Monocraft", ui-monospace, monospace; font-size: .78rem; white-space: nowrap; }

.click-stage { position: relative; display: grid; min-height: 430px; place-items: center; overflow: hidden; border: 2px solid #4f453d; background: #302c2b; isolation: isolate; }
.click-stage::before { position: absolute; z-index: -2; inset: 0; content: ""; background: linear-gradient(90deg, rgba(255,255,255,.07) 25%, transparent 25% 75%, rgba(0,0,0,.16) 75%), linear-gradient(rgba(255,255,255,.05) 25%, transparent 25% 75%, rgba(0,0,0,.14) 75%); background-size: 32px 32px; }
.click-stage::after { position: absolute; z-index: -1; inset: 0; content: ""; background: radial-gradient(circle, rgba(41, 168, 255, .2), transparent 46%); }
.ore-block { position: absolute; width: 60px; height: 60px; border: 2px solid #2e2e2e; background: linear-gradient(135deg, #777 0 25%, #616161 25% 50%, #858585 50% 75%, #606060 75%); box-shadow: inset 0 0 0 8px rgba(0, 0, 0, .08); opacity: .9; }
.ore-block::after { position: absolute; inset: 20px; background: #23a7e7; content: ""; box-shadow: 8px -8px 0 #156d9f, -8px 8px 0 #54c7ff; }
.ore-block-a { top: 10%; left: 9%; }.ore-block-b { right: 9%; bottom: 12%; transform: rotate(90deg); }

.click-feedback-layer { position: absolute; inset: 0; pointer-events: none; }
.click-button { position: relative; display: grid; width: min(74vw, 280px); place-items: center; gap: 12px; border: 0; background: transparent; cursor: pointer; }
.diamond-frame { display: grid; width: min(54vw, 216px); aspect-ratio: 1; place-items: center; border: 2px solid var(--cyan-light); background: #10283a; box-shadow: inset 0 0 0 9px #0c1b2a, 6px 6px 0 rgba(0, 0, 0, .3); transition: transform 130ms ease, background-color 130ms ease; }
.diamond-image { width: 76%; height: 76%; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 0 10px rgba(41, 168, 255, .55)); }
.click-button:hover .diamond-frame { transform: translate3d(0, -3px, 0); background: #13354a; }
.click-button:active .diamond-frame, .click-button.is-pressed .diamond-frame { transform: translate3d(3px, 3px, 0) scale(.96); box-shadow: inset 0 0 0 9px #0c1b2a, 2px 2px 0 rgba(0, 0, 0, .3); }
.click-text { color: white; font-family: "Monocraft", ui-monospace, monospace; font-size: 1.25rem; letter-spacing: .04em; text-shadow: 2px 2px 0 #0f557b; }
.click-helper { position: absolute; bottom: 18px; margin: 0; color: var(--dim); font-size: .77rem; }
.floating-score { position: absolute; color: var(--cyan-light); font-family: "Monocraft", ui-monospace, monospace; font-size: 1.5rem; font-weight: 700; pointer-events: none; text-shadow: 2px 2px 0 #0b4263; animation: score-float 900ms ease-out forwards; }
@keyframes score-float { from { opacity: 1; transform: translate(-50%, -50%) scale(.8); } to { opacity: 0; transform: translate(-50%, -115px) scale(1.2); } }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-card { min-height: 100px; padding: 15px; }.stat-card-wide { grid-column: span 2; min-height: 120px; border-color: var(--line-bright); }.stat-card-accent { background: #10283a; border-color: #2877a8; }
.stat-value { margin: 12px 0 0; color: var(--text); font-family: "Monocraft", ui-monospace, monospace; font-size: 1.75rem; line-height: 1; }

.shop-list, .achievement-list, .progress-stack, .settings-stack { display: grid; gap: 10px; }
.shop-card, .achievement-card, .guide-card, .settings-card { padding: 15px; }
.shop-card { transition: border-color 150ms ease, background-color 150ms ease; }.shop-card:hover { border-color: #2877a8; background: #131d2c; }
.shop-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }.shop-title-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }.shop-title, .guide-title, .achievement-title { margin: 0; color: white; font-family: "Monocraft", ui-monospace, monospace; font-size: 1.2rem; }.shop-level, .shop-effect, .achievement-state { border: 1px solid #24516e; background: #10283a; padding: 3px 6px; color: var(--cyan-light); font-family: "Monocraft", ui-monospace, monospace; font-size: .7rem; white-space: nowrap; }.shop-effect { align-self: flex-start; }.shop-description, .achievement-description, .guide-copy, .settings-copy { margin: 8px 0 0; color: var(--muted); font-size: .77rem; line-height: 1.55; }.shop-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 15px; border-top: 1px solid var(--line); padding-top: 12px; }.shop-cost { margin: 0; color: var(--cyan-soft); font-family: "Monocraft", ui-monospace, monospace; font-size: .95rem; }.shop-button { min-width: 100px; background: var(--cyan); color: white; padding: 0 12px; }.shop-button:hover:not(:disabled) { background: #55beff; }.shop-button:disabled { border-color: #26394a; background: #1a2430; color: #65758a; cursor: not-allowed; }

.guide-label, .settings-title { margin: 0; color: var(--dim); }.guide-title { margin-top: 8px; }.guide-note { margin: 10px 0 0; color: var(--cyan-light); font-family: "Monocraft", ui-monospace, monospace; font-size: .83rem; }.progress-meter { height: 8px; margin-top: 13px; border: 1px solid #24516e; background: #0a1019; }.progress-meter-fill { display: block; width: 0; height: 100%; background: var(--cyan); transition: width 220ms ease; }
.achievement-card { display: flex; align-items: start; justify-content: space-between; gap: 12px; }.achievement-card.is-unlocked { border-color: #1b926e; background: #102a2a; }.achievement-card.is-unlocked .achievement-state { border-color: #1b926e; background: #0e332e; color: var(--green); }
.toggle-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; }.toggle-button { flex: 0 0 auto; background: #10283a; color: var(--cyan-soft); padding: 0 10px; font-size: .82rem; }.toggle-button[aria-pressed="true"] { border-color: #1b926e; background: #0e332e; color: var(--green); }

.toast-stack { position: fixed; z-index: 10; top: 18px; right: 18px; display: grid; gap: 8px; width: min(310px, calc(100vw - 36px)); pointer-events: none; }.toast { border: 1px solid #2877a8; background: #111826; padding: 12px; box-shadow: 6px 6px 0 rgba(0,0,0,.25); animation: toast-in 180ms ease, toast-out 180ms ease 2.6s forwards; }.toast-title { margin: 0; color: var(--cyan-light); font-family: "Monocraft", ui-monospace, monospace; }.toast-copy { margin: 5px 0 0; color: var(--muted); font-size: .76rem; }@keyframes toast-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }@keyframes toast-out { to { opacity: 0; transform: translateX(16px); } }

.reset-dialog { width: min(420px, calc(100% - 28px)); border: 0; padding: 0; background: transparent; color: var(--text); }.reset-dialog::backdrop { background: rgba(0, 0, 0, .7); }.dialog-card { padding: 22px; box-shadow: 8px 8px 0 rgba(0,0,0,.3); }.dialog-title { margin: 0; font-family: "Monocraft", ui-monospace, monospace; font-size: 1.6rem; }.dialog-copy { color: var(--muted); font-size: .82rem; line-height: 1.6; }.dialog-actions { display: flex; justify-content: end; gap: 8px; margin-top: 18px; }.danger-button { border-color: #aa3545; background: #bd3f51; color: white; padding: 0 14px; }.danger-button:hover { background: var(--danger); }

.performance-mode .ore-block, .performance-mode .diamond-image { filter: none; }.performance-mode .click-stage::after { display: none; }.performance-mode * { animation-duration: .01ms !important; transition-duration: .01ms !important; }

@media (max-width: 900px) { .hero { grid-template-columns: 1fr; }.bento-click, .bento-shop, .bento-stats, .dashboard-side-stack { grid-column: span 12; }.click-stage { min-height: 380px; } }
@media (max-width: 600px) { body { background-attachment: scroll, scroll, scroll, scroll; }.app-shell { width: min(100% - 20px, 1360px); padding-top: 10px; }.topbar { min-height: 62px; padding: 8px 10px; }.brand-diamond { width: 34px; height: 34px; }.brand strong { font-size: 1.05rem; }.brand small { font-size: .58rem; }.save-indicator { display: none; }.hero { gap: 24px; padding: 22px 16px; }.hero h1 { font-size: 4rem; }.hero-stats { gap: 7px; }.metric-card { min-height: 96px; padding: 12px; }.dashboard-grid { gap: 10px; margin-top: 10px; }.click-panel, .stats-panel, .shop-panel, .progress-panel, .achievements-panel, .settings-panel { padding: 15px; }.section-heading h2 { font-size: 1.45rem; }.status-chip { font-size: .67rem; }.click-stage { min-height: 335px; }.ore-block { transform: scale(.7); }.ore-block-b { transform: rotate(90deg) scale(.7); }.click-helper { bottom: 12px; font-size: .67rem; }.shop-card-top, .toggle-card { flex-direction: column; }.shop-effect { align-self: start; }.toggle-button { width: 100%; }.shop-card-bottom { align-items: stretch; flex-direction: column; }.shop-button { width: 100%; }.stats-grid { gap: 7px; }.stat-card { min-height: 88px; padding: 11px; }.stat-value { font-size: 1.35rem; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* Desktop plays as one compact Minecraft game screen instead of a long dashboard. */
@media (min-width: 901px) {
  html, body { height: auto; min-height: 100%; overflow-x: hidden; overflow-y: auto; }

  .app-shell {
    display: block;
    height: auto;
    padding: 24px 0 42px;
  }

  .topbar { min-height: 0; padding: 10px 16px; }
  .brand-diamond { width: 42px; height: 42px; }
  .brand strong { font-size: 1.3rem; }
  .brand small { font-size: .68rem; }
  .hero { display: none; }

  .dashboard-grid {
    grid-template-columns: 5fr 3fr 4fr;
    grid-template-rows: auto auto;
    gap: 10px;
    margin: 0;
    align-items: start;
  }

  .bento-click { grid-column: 1; grid-row: 1 / span 2; }
  .bento-stats { grid-column: 2; grid-row: 1; }
  .bento-shop { grid-column: 3; grid-row: 1 / span 2; }
  .dashboard-side-stack { grid-column: 2; grid-row: 2; min-height: 0; grid-template-rows: auto; gap: 8px; align-items: start; }

  .click-panel, .stats-panel, .shop-panel, .progress-panel, .achievements-panel, .settings-panel { min-height: 0; height: auto; padding: 18px; overflow: hidden; }
  .section-heading { margin-bottom: 14px; }
  .section-heading h2 { font-size: 1.55rem; }
  .eyebrow { font-size: .68rem; }
  .status-chip { padding: 6px 8px; font-size: .7rem; }
  .click-stage { min-height: 430px; height: clamp(430px, 48vw, 620px); }
  .diamond-frame { width: min(20vw, 230px); }
  .click-text { margin-top: 2px; font-size: 1.2rem; }
  .click-helper { display: none; }
  .ore-block { transform: scale(.85); }.ore-block-b { transform: rotate(90deg) scale(.85); }

  .stats-grid { gap: 8px; }
  .stat-card { min-height: 0; padding: 11px; }
  .stat-card-wide { min-height: 0; }
  .stat-label { font-size: .62rem; }.stat-value { margin-top: 8px; font-size: 1.5rem; }

  .shop-panel { display: block; }
  .shop-list { min-height: 0; grid-template-rows: repeat(3, auto); gap: 10px; }
  .shop-card { min-height: 0; padding: 8px; overflow: hidden; }
  .shop-card-top { gap: 6px; }.shop-title { font-size: .89rem; }.shop-level, .shop-effect { padding: 2px 4px; font-size: .52rem; }.shop-description { display: -webkit-box; margin-top: 3px; overflow: hidden; font-size: .59rem; line-height: 1.2; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }.shop-card-bottom { margin-top: 5px; padding-top: 5px; }.shop-cost { font-size: .68rem; }.shop-button { min-height: 27px; min-width: 68px; font-size: .68rem; }

  .progress-panel, .achievements-panel, .settings-panel { padding: 14px; }
  .progress-panel .section-heading, .achievements-panel .section-heading, .settings-panel .section-heading { display: none; }
  .progress-stack, .achievement-list, .settings-stack { gap: 4px; height: 100%; }
  .guide-card, .achievement-card, .settings-card { min-height: 0; padding: 10px; overflow: hidden; }
  .guide-label, .settings-title { font-size: .58rem; }.guide-title, .achievement-title { margin-top: 4px; font-size: .95rem; }.guide-copy, .settings-copy, .achievement-description { display: none; }.guide-note { margin-top: 5px; font-size: .7rem; }.progress-meter { height: 5px; margin-top: 7px; }.achievement-card { align-items: center; }.achievement-state { padding: 2px 4px; font-size: .48rem; }.toggle-card { gap: 4px; }.toggle-button { min-height: 23px; padding: 0 4px; font-size: .54rem; }
}

/* Header logo stays square and gets one gentle spin on hover. */
.brand-diamond {
  width: 3.2rem !important;
  height: 3.2rem !important;
  flex: 0 0 3.2rem;
  object-fit: contain;
  image-rendering: pixelated;
  transform-origin: center;
  transform: rotate(0deg);
  filter: drop-shadow(0 0 4px rgba(41, 168, 255, .42)) drop-shadow(0 2px 0 rgba(255, 255, 255, .8));
  transition: transform 1.45s cubic-bezier(.22, 1, .36, 1), filter 180ms ease;
}
.brand:hover .brand-diamond { transform: rotate(360deg); filter: drop-shadow(0 0 7px rgba(41, 168, 255, .56)) drop-shadow(0 2px 0 rgba(255, 255, 255, .8)); }

/* Bright Minecraft RPG menu: warm surfaces, simple actions, plenty of breathing room. */
:root {
  --bg: #b9ddf4;
  --panel: #fff9e9;
  --panel-raised: #f4ead0;
  --line: #a58a60;
  --line-bright: #477b42;
  --cyan: #287fb1;
  --cyan-light: #1f6f9e;
  --cyan-soft: #164866;
  --text: #26342d;
  --muted: #5c6b5e;
  --dim: #738071;
  --green: #3e854a;
}

html { background: #b9ddf4; }
body {
  color: var(--text);
  background:
    linear-gradient(rgba(239, 249, 237, .38), rgba(239, 249, 237, .54)),
    url("assets/background.avif") center / cover fixed,
    #b9ddf4;
  background-attachment: scroll, fixed, scroll;
}

.app-shell { width: min(1240px, calc(100% - 48px)); padding: 24px 0; }
.topbar, .panel, .metric-card, .stat-card, .shop-card, .guide-card, .achievement-card, .settings-card, .dialog-card {
  border: 2px solid #76915a;
  background: rgba(255, 250, 235, .94);
  box-shadow: 0 5px 0 rgba(74, 100, 57, .24);
}

.topbar { border-top: 5px solid #77a84d; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .45), 0 5px 0 rgba(74, 100, 57, .24); }
.brand { gap: 12px; }
.brand small, .eyebrow, .metric-label, .stat-label, .guide-label, .settings-title { color: #39734a; }
.brand strong, .section-heading h2, .shop-title, .guide-title, .achievement-title { color: #273a2e; text-shadow: none; }
.save-indicator { color: #526657; }.save-indicator i { border-color: #3b994c; }
.topbar-reset, .ghost-button { border: 2px solid #426f3b; background: #f7efda; color: #294c31; }
.topbar-reset:hover, .ghost-button:hover { border-color: #294c31; background: #e9dcb9; color: #1e3e27; }

.hero { display: none !important; }
.dashboard-grid { gap: 18px; margin-top: 18px; }
.click-panel, .stats-panel, .shop-panel, .progress-panel { padding: 22px; }
.section-heading { margin-bottom: 18px; }.section-heading h2 { font-size: 1.62rem; }
.status-chip { border: 2px solid #7ba35f; background: #e8f2d8; color: #356c3b; box-shadow: 0 3px 0 rgba(74, 100, 57, .22); }

.click-stage { border: 3px solid #74583b; background: #a87a4c; box-shadow: inset 0 0 0 4px rgba(255, 232, 184, .35), 0 4px 0 rgba(95, 71, 43, .3); }
.click-stage::before { background: linear-gradient(90deg, rgba(255, 229, 183, .15) 25%, transparent 25% 75%, rgba(68, 43, 25, .15) 75%), linear-gradient(rgba(255, 229, 183, .11) 25%, transparent 25% 75%, rgba(68, 43, 25, .12) 75%); background-size: 32px 32px; }
.click-stage::after { background: radial-gradient(circle, rgba(255, 253, 224, .5), transparent 50%); }
.ore-block { border-color: #605c58; background: linear-gradient(135deg, #a5a5a0 0 25%, #898986 25% 50%, #b2b2ac 50% 75%, #858582 75%); }
.diamond-frame { border: 3px solid #397fa3; background: #f7f0d6; box-shadow: inset 0 0 0 9px #d9e8d0, 5px 5px 0 rgba(95, 71, 43, .28); }
.diamond-image { filter: drop-shadow(0 3px 0 rgba(24, 100, 127, .18)); }
.click-button:hover .diamond-frame { transform: none; background: #e8f4dd; }.click-button:active .diamond-frame, .click-button.is-pressed .diamond-frame { transform: translate3d(2px, 2px, 0) scale(.97); box-shadow: inset 0 0 0 9px #d9e8d0, 2px 2px 0 rgba(95, 71, 43, .28); }
.click-text { color: #fffbe9; text-shadow: 2px 2px 0 #68492f; }.click-helper { color: #fff1d0; text-shadow: 1px 1px 0 rgba(77, 48, 28, .58); }

.stat-card { border-color: #b6a27e; background: #fffdf4; }.stat-card-wide, .stat-card-accent { border-color: #5a9d62; background: #eaf4de; }.stat-value { color: #28422e; }
.shop-card { border-color: #b59d75; background: rgba(255, 253, 244, .96); }.shop-card:hover { border-color: #5f914c; background: #f4f7e7; }
.shop-title { color: #2e452f; }.shop-level, .shop-effect { border-color: #8cb38c; background: #e7f1df; color: #356f3b; }.shop-description, .guide-copy, .settings-copy, .achievement-description { color: #556459; }.shop-card-bottom { border-top-color: #d3c5a9; }.shop-cost { color: #5a7442; }
.shop-button { border: 2px solid #325f35; background: #568a42; color: #fffbea; }.shop-button:hover:not(:disabled) { background: #477a37; }.shop-button:disabled { border-color: #b6aa94; background: #d9d0bd; color: #867b69; }
.shop-button.is-upgraded { animation: upgrade-button-confirm 520ms ease; }
@keyframes upgrade-button-confirm {
  0% { transform: scale(1); }
  38% { border-color: #2f6e34; background: #91bd4f; color: #17391d; box-shadow: 0 0 0 4px rgba(111, 175, 72, .3); transform: scale(1.07); }
  100% { transform: scale(1); }
}
.guide-card { border-color: #b6a27e; background: #fffdf4; }.guide-note { color: #39734a; }.progress-meter { border-color: #8ab27d; background: #edf0df; }.progress-meter-fill { background: #589447; }

.toast { border: 2px solid #5b8d4d; background: #fff9e9; color: var(--text); box-shadow: 4px 4px 0 rgba(74, 100, 57, .2); }.toast-title { color: #356f3b; }.toast-copy { color: #596858; }
.reset-dialog { color: var(--text); }.dialog-card { background: #fff9e9; }.dialog-copy { color: #566458; }.danger-button { border: 2px solid #a64e42; background: #bc6251; }.danger-button:hover { background: #a84d42; }

@media (min-width: 901px) {
  .app-shell { grid-template-rows: 80px minmax(0, 1fr); gap: 18px; padding: 24px 0; }
  .topbar { padding: 10px 20px; }.brand-diamond { width: 46px; height: 46px; }.brand strong { font-size: 1.25rem; }
  .dashboard-grid { gap: 18px; }
  .click-panel, .stats-panel, .shop-panel, .progress-panel { padding: 22px; }
  .section-heading h2 { font-size: 1.62rem; }.eyebrow { font-size: .7rem; }
  .click-stage { height: calc(100% - 53px); }.diamond-frame { width: min(20vw, 238px); }.click-helper { display: block; }
  .stat-card { padding: 13px; }.stat-value { font-size: 1.6rem; }
  .shop-list { gap: 10px; }.shop-card { padding: 12px; }.shop-title { font-size: 1rem; }.shop-level, .shop-effect { font-size: .6rem; }.shop-description { display: block; font-size: .68rem; line-height: 1.35; -webkit-line-clamp: unset; }.shop-card-bottom { margin-top: 8px; padding-top: 8px; }.shop-cost { font-size: .75rem; }.shop-button { min-height: 31px; min-width: 82px; font-size: .72rem; }
  .progress-panel { padding: 18px; }.guide-card { padding: 12px; }.guide-title { font-size: 1rem; }.guide-note { font-size: .72rem; }
}

@media (max-width: 600px) {
  body { background-attachment: scroll, scroll, scroll; }.app-shell { width: min(100% - 24px, 1240px); padding: 12px 0 26px; }.topbar, .panel { box-shadow: 0 3px 0 rgba(74, 100, 57, .2); }
}

/* Natural document flow makes browser zoom behave like the portfolio. */
@media (min-width: 901px) {
  html, body { height: auto; min-height: 100%; overflow-x: hidden; overflow-y: auto; }
  .app-shell { display: block; height: auto; padding: 24px 0 42px; }
  .dashboard-grid { grid-template-rows: auto auto; align-items: start; }
  .dashboard-side-stack { grid-template-rows: auto; align-items: start; }
  .click-panel, .stats-panel, .shop-panel, .progress-panel { height: auto; }
  .click-stage { height: clamp(430px, 48vw, 620px); min-height: 430px; }
  .shop-panel { display: block; }
  .shop-list { flex: none; grid-template-rows: repeat(3, auto); gap: 10px; }
}

/* Desktop is a single, compact game board. */
@media (min-width: 901px) {
  html, body { height: 100%; min-height: 0; overflow: hidden; }
  .app-shell {
    display: grid;
    width: min(1160px, calc(100% - 32px));
    height: calc(100vh - 100px);
    grid-template-rows: 62px minmax(0, 1fr);
    gap: 12px;
    margin: 50px auto;
    padding: 0;
  }
  .builder-credit { position: absolute; right: 0; bottom: -28px; }
  .topbar { min-height: 0; height: auto; padding: 7px 14px; }
  .brand-diamond { width: 2.65rem !important; height: 2.65rem !important; flex-basis: 2.65rem; }
  .brand strong { font-size: 1.08rem; }

  .dashboard-grid {
    min-height: 0;
    grid-template-columns: 5fr 3fr 4fr;
    grid-template-rows: minmax(0, 52%) minmax(0, 48%);
    gap: 12px;
    margin: 0;
    align-items: stretch;
  }
  .bento-click { grid-column: 1; grid-row: 1 / span 2; }
  .bento-stats { grid-column: 2; grid-row: 1; }
  .bento-shop { grid-column: 3; grid-row: 1 / span 2; }
  .dashboard-side-stack { grid-column: 2; grid-row: 2; display: grid; min-height: 0; height: auto; grid-template-rows: minmax(0, 1fr); }
  .click-panel, .stats-panel, .shop-panel, .progress-panel { height: 100%; min-height: 0; padding: 14px; overflow: hidden; }
  .section-heading { margin-bottom: 10px; }.section-heading h2 { font-size: 1.32rem; }.eyebrow { font-size: .6rem; }
  .status-chip { padding: 5px 7px; font-size: .62rem; }
  .click-stage { height: calc(100% - 66px); min-height: 0; }
  .diamond-frame { width: min(17vw, 190px); }.click-text { font-size: 1.05rem; }.click-helper { display: none; }

  .stats-grid, .shop-list, .progress-stack { gap: 8px; }
  .stat-card, .shop-card, .guide-card { box-shadow: 0 4px 0 rgba(74, 100, 57, .24); }
  .stats-grid { gap: 8px; }.stat-card { min-height: 0; padding: 9px; }.stat-label { font-size: .55rem; }.stat-value { margin-top: 6px; font-size: 1.3rem; }
  .shop-panel { display: flex; flex-direction: column; }.shop-list { min-height: 0; flex: 1; grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .shop-card { min-height: 0; padding: 8px; overflow: hidden; }.shop-card-top { gap: 6px; }.shop-title { font-size: .82rem; }.shop-level, .shop-effect { padding: 2px 4px; font-size: .48rem; }.shop-description { display: -webkit-box; margin-top: 3px; overflow: hidden; font-size: .56rem; line-height: 1.2; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }.shop-card-bottom { margin-top: 5px; padding-top: 5px; }.shop-cost { font-size: .65rem; }.shop-button { min-height: 26px; min-width: 68px; font-size: .62rem; }
  .progress-panel { padding: 10px; }.progress-panel .section-heading { display: none; }.progress-stack { height: 100%; gap: 8px; }.guide-card { min-height: 0; padding: 8px; overflow: hidden; }.guide-label { font-size: .52rem; }.guide-title { margin-top: 4px; font-size: .84rem; }.guide-copy { display: none; }.guide-note { margin-top: 4px; font-size: .62rem; }.progress-meter { height: 4px; margin-top: 6px; }
}

