:root {
  color-scheme: light;
  --ink: #17221f;
  --muted: #66716b;
  --paper: #fffaf7;
  --canvas: #f9efed;
  --soft: #f7e4e0;
  --line: #e6bdb7;
  --coral: #FE5542;
  --coral-dark: #b83225;
  --lime: #b9dd7c;
  --blue: #66b8c5;
  --yellow: #f2c957;
  --accent-deep: #d94635;
  --danger: #d84a3a;
  --danger-soft: #ffd8cf;
  --shadow: 0 18px 40px rgba(23, 34, 31, .14), 4px 4px 0 var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(184, 50, 37, .13) 0 1px, transparent 1px 100%) 31px 0 / 38px 100%,
    linear-gradient(rgba(184, 50, 37, .07) 0 1px, transparent 1px 100%) 0 21px / 100% 42px,
    linear-gradient(90deg, rgba(184, 50, 37, .045) 0 1px, transparent 1px 100%) 0 0 / 42px 100%,
    radial-gradient(circle at 84% 10%, rgba(254, 85, 66, .12), transparent 28%),
    var(--canvas);
}
body::before {
  content: "";
  position: fixed;
  inset: 0 auto 0 0;
  width: 10px;
  background: var(--coral);
  pointer-events: none;
}
button, a { -webkit-tap-highlight-color: transparent; }
button, select { font: inherit; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }

.shell { width: min(1080px, calc(100% - 34px)); margin: 42px auto 64px; }
.eyebrow { margin: 0 0 10px; color: var(--coral-dark); font-size: .68rem; font-weight: 950; letter-spacing: .17em; text-transform: uppercase; }
.hero {
  position: relative;
  min-height: 334px;
  padding: 44px 0 54px;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 34px;
}
.hero::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 0;
  width: min(300px, 45%);
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 18px, transparent 18px 26px);
}
.hero h1 { margin: 0; max-width: 800px; font-size: clamp(3rem, 8.2vw, 6.7rem); line-height: .83; letter-spacing: -.07em; text-wrap: balance; }
.hero h1 span { display: block; color: var(--coral); }
.hero .lede { max-width: 590px; margin: 24px 0 0; color: var(--muted); font-size: clamp(.95rem, 1.8vw, 1.12rem); font-weight: 700; line-height: 1.55; }

.daily-panel {
  position: relative;
  overflow: hidden;
  margin-top: 28px;
  padding: 20px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: rgba(255,250,247,.92);
  box-shadow: 0 14px 28px rgba(23,34,31,.1), 4px 4px 0 var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.daily-panel::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(184,50,37,.16);
  pointer-events: none;
}
.daily-orbit {
  flex: none;
  position: relative;
  width: 66px;
  aspect-ratio: 1;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--ink);
}
.daily-orbit span {
  position: absolute;
  width: 18px;
  aspect-ratio: 1;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
}
.daily-orbit span:nth-child(1) { left: 8px; top: 10px; background: var(--coral); }
.daily-orbit span:nth-child(2) { right: 7px; top: 22px; background: var(--blue); }
.daily-orbit span:nth-child(3) { left: 23px; bottom: 8px; background: var(--lime); }
.daily-copy { position: relative; z-index: 1; flex: 1; min-width: 0; }
.daily-title { margin: 0 0 5px; color: var(--ink); font-size: .84rem; font-weight: 950; letter-spacing: .06em; text-transform: uppercase; }
.daily-stats { display: flex; flex-wrap: wrap; gap: 10px 14px; color: var(--muted); font-size: .72rem; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.daily-stats span { padding: 7px 9px; border: 1.5px solid var(--ink); border-radius: 6px; background: rgba(255,250,247,.72); box-shadow: 2px 2px 0 var(--ink); }
.daily-stats strong { color: var(--ink); }
.shelf-meter { width: min(360px, 100%); height: 9px; margin-top: 13px; border: 1.5px solid var(--ink); border-radius: 99px; background: var(--paper); overflow: hidden; }
.shelf-meter span { display: block; width: 0; height: 100%; background: var(--coral); transition: width .2s ease; }
.daily-activity { margin-top: 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22px; }
.shelf-dots { display: flex; gap: 7px; }
.shelf-dots i { width: 12px; aspect-ratio: 1; border: 1.5px solid var(--ink); border-radius: 50%; background: var(--paper); box-shadow: 1px 1px 0 var(--ink); }
.shelf-dots i.done { background: var(--yellow); }
.day-history { display: flex; gap: 4px; }
.day-pip { width: 13px; aspect-ratio: 1; border: 1.5px solid var(--ink); border-radius: 3px; background: var(--paper); }
.day-pip.partial { background: var(--lime); }
.day-pip.full { background: var(--coral); }
.daily-action {
  position: relative;
  z-index: 1;
  flex: none;
  min-height: 42px;
  padding: 12px 15px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--coral);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: .74rem;
  font-weight: 950;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.daily-action:hover { transform: translateY(-1px); box-shadow: 4px 4px 0 var(--ink); }

.game-grid { margin-top: 30px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.game-card {
  position: relative;
  min-height: 400px;
  padding: 22px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.game-card::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(23, 34, 31, .18);
  pointer-events: none;
}
.game-card:hover { transform: translate(-2px, -3px) rotate(-.35deg); box-shadow: 0 22px 42px rgba(23, 34, 31, .16), 7px 7px 0 var(--ink); }
.game-card:nth-child(2):hover { transform: translate(-2px, -3px) rotate(.4deg); }
.thread-card { background: var(--blue); }
.growth-card { background: var(--lime); }
.life-card { background: var(--accent-deep); }
.tents-card { background: #dff2cb; }
.bridges-card { background: #ffd7d1; }
.loop-card { background: #ffe8e4; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pill { font-size: .64rem; font-weight: 950; letter-spacing: .13em; text-transform: uppercase; }
.pill { padding: 6px 9px; border: 1.5px solid var(--ink); border-radius: 6px; background: rgba(255,250,247,.78); letter-spacing: .06em; }
.card-state { box-shadow: 2px 2px 0 var(--ink); }
.card-state.is-ready {
  background: var(--yellow);
  color: var(--ink);
  border-width: 2px;
  box-shadow: 3px 3px 0 var(--ink);
}
.card-art { height: 175px; margin: 19px -4px 12px; display: grid; place-items: center; }
.game-card h2 { margin: auto 0 0; font-size: 2rem; line-height: 1; letter-spacing: -.05em; }
.game-card p { margin: 9px 0 0; font-size: .87rem; font-weight: 720; line-height: 1.4; }
.card-meta { margin-top: 17px; display: grid; gap: 5px; color: rgba(23,35,31,.76); font-size: .72rem; font-weight: 850; }
.card-meta strong { color: var(--ink); }
.card-foot { margin-top: 18px; display: flex; justify-content: space-between; color: rgba(23,35,31,.72); font-size: .68rem; font-weight: 950; text-transform: uppercase; letter-spacing: .06em; }
.mini-grid { width: 154px; aspect-ratio: 1; display: grid; grid-template-columns: repeat(5, 1fr); border: 2px solid var(--ink); border-radius: 8px; background: var(--paper); box-shadow: 5px 6px 0 var(--ink); overflow: hidden; transform: rotate(-3deg); }
.mini-grid i { border-right: 1px solid rgba(23,35,31,.13); border-bottom: 1px solid rgba(23,35,31,.13); }
.mini-grid i:nth-child(5n) { border-right: 0; }
.mini-grid i.path { background: var(--coral); }
.mini-grid i.patch { background: repeating-linear-gradient(135deg, #b9b2a5 0 4px, #d8d1c4 4px 8px); }
.mini-grid i.bead { position: relative; }
.mini-grid i.bead::after { content: attr(data-mark); position: absolute; inset: 6px; border: 1.5px solid var(--ink); border-radius: 7px; background: var(--lime); display: grid; place-items: center; font: 950 .58rem/1 ui-monospace, monospace; }
.mini-grid i.bead.straight::after { background: var(--blue); }
.mini-grid i.dot { position: relative; }
.mini-grid i.dot::after { content: attr(data-n); position: absolute; inset: 5px; border: 1.5px solid var(--ink); border-radius: 50%; background: var(--yellow); display: grid; place-items: center; font: 950 .62rem/1 ui-monospace, monospace; }
.cell-stack { width: 170px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; transform: rotate(2deg); }
.cell-stack i { aspect-ratio: 1; border: 1.5px solid var(--ink); border-radius: 6px; background: rgba(255,250,247,.62); box-shadow: 2px 2px 0 var(--ink); }
.cell-stack i.on { background: var(--ink); }
.choice-stack { position: relative; width: 190px; height: 155px; }
.choice-stack i { position: absolute; width: 150px; padding: 14px 12px; border: 2px solid var(--ink); border-radius: 8px; background: var(--paper); box-shadow: 4px 4px 0 var(--ink); font-style: normal; font-size: .66rem; font-weight: 900; }
.choice-stack i b { float: right; color: var(--coral-dark); }
.choice-stack i:nth-child(1) { left: 0; top: 0; transform: rotate(-5deg); }
.choice-stack i:nth-child(2) { right: 0; top: 51px; background: var(--yellow); transform: rotate(4deg); }
.choice-stack i:nth-child(3) { left: 13px; bottom: 0; background: var(--blue); transform: rotate(-1deg); }
.skyline-mini { width:190px;height:150px;padding:15px;border:2px solid var(--ink);border-radius:8px;background:var(--paper);box-shadow:5px 6px 0 var(--ink);display:flex;align-items:end;gap:7px;transform:rotate(2deg); }
.skyline-mini b { align-self:center;font:950 .72rem/1 ui-monospace,monospace; }
.skyline-mini i { flex:1;height:calc(var(--h) * 25px);border:1.5px solid var(--ink);border-radius:6px 6px 0 0;background:var(--blue);display:grid;place-items:center;font:950 .65rem/1 ui-monospace,monospace;font-style:normal; }
.life-stack { width: 190px; position: relative; height: 150px; }
.life-stack i { position: absolute; width: 120px; height: 72px; padding: 12px; border: 2px solid var(--ink); border-radius: 8px; background: var(--paper); box-shadow: 4px 4px 0 var(--ink); font-style: normal; font-size: .65rem; font-weight: 900; }
.life-stack i:nth-child(1) { left: 0; top: 8px; transform: rotate(-8deg); }
.life-stack i:nth-child(2) { right: 0; top: 40px; background: var(--yellow); transform: rotate(7deg); }
.life-stack i:nth-child(3) { left: 28px; bottom: 0; background: var(--coral); transform: rotate(-1deg); }
.tents-mini { width:166px;aspect-ratio:1;display:grid;grid-template-columns:repeat(3,1fr);border:2px solid var(--ink);border-radius:8px;background:var(--paper);box-shadow:5px 6px 0 var(--ink);overflow:hidden;transform:rotate(-2deg); }
.tents-mini i { position:relative;border-right:1px solid rgba(23,35,31,.13);border-bottom:1px solid rgba(23,35,31,.13);display:grid;place-items:center;font:950 .95rem/1 ui-monospace,monospace;font-style:normal; }
.tents-mini i:nth-child(3n){ border-right:0; }
.tents-mini .tree::before { content:"";width:52%;aspect-ratio:1;border:1.5px solid var(--ink);border-radius:45% 55%;background:var(--lime);box-shadow:2px 2px 0 var(--ink); }
.tents-mini .tent::before { content:"";width:0;height:0;border-left:15px solid transparent;border-right:15px solid transparent;border-bottom:28px solid var(--coral);filter:drop-shadow(2px 2px 0 var(--ink)); }
.bridges-mini { position:relative;width:190px;height:150px;border:2px solid var(--ink);border-radius:8px;background:var(--paper);box-shadow:5px 6px 0 var(--ink);transform:rotate(2deg); }
.bridges-mini i { position:absolute;width:43px;aspect-ratio:1;border:2px solid var(--ink);border-radius:50%;background:var(--yellow);box-shadow:3px 3px 0 var(--ink);display:grid;place-items:center;font:950 .9rem/1 ui-monospace,monospace;font-style:normal;z-index:2; }
.bridges-mini i:nth-of-type(1){left:20px;top:24px}.bridges-mini i:nth-of-type(2){right:24px;top:24px}.bridges-mini i:nth-of-type(3){left:20px;bottom:22px}.bridges-mini i:nth-of-type(4){right:24px;bottom:22px}
.bridges-mini b,.bridges-mini em { position:absolute;background:var(--coral);box-shadow:0 4px 0 var(--yellow);border-radius:99px;z-index:1; }
.bridges-mini b:nth-of-type(1){left:60px;right:62px;top:44px;height:5px}.bridges-mini b:nth-of-type(2){left:60px;right:62px;bottom:42px;height:5px}
.bridges-mini em{left:40px;top:63px;bottom:63px;width:5px}
.loop-mini { width:170px;aspect-ratio:1;display:grid;grid-template-columns:10px 1fr 10px 1fr 10px;grid-template-rows:10px 1fr 10px 1fr 10px;align-items:center;justify-items:center;border:2px solid var(--ink);border-radius:8px;background:var(--paper);box-shadow:5px 6px 0 var(--ink);padding:16px;transform:rotate(-2deg); }
.loop-mini i { width:8px;aspect-ratio:1;border-radius:50%;background:var(--ink); }
.loop-mini b { width:100%;height:7px;border-radius:99px;background:var(--coral);box-shadow:1px 2px 0 var(--ink); }
.loop-mini em { width:7px;height:100%;border-radius:99px;background:var(--coral);box-shadow:1px 2px 0 var(--ink); }
.loop-mini span { font:950 1.1rem/1 ui-monospace,monospace; }

.sapling-note { width: 350px; max-width: 100%; padding: 18px 20px; border: 2px solid var(--ink); border-radius: 8px; background: rgba(255,250,247,.9); box-shadow: 0 14px 28px rgba(89,37,30,.1), 4px 4px 0 var(--ink); display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: center; justify-self: end; transform: rotate(1deg); }
.hero .sapling-note { position: absolute; right: 0; bottom: 54px; }
.sapling-note strong { display: block; font-size: 1rem; }
.sapling-note p { margin: 5px 0 0; color: var(--muted); font-size: .8rem; font-weight: 650; line-height: 1.5; }
.sapling-art { position: relative; width: 68px; height: 74px; display: block; }
.sapling-art::before { content: ""; position: absolute; z-index: 1; left: 32px; bottom: 8px; width: 6px; height: 46px; border: 2px solid var(--ink); border-bottom: 0; border-radius: 8px 8px 0 0; background: #875734; transform: rotate(1deg); }
.sapling-art::after { content: ""; position: absolute; z-index: 3; left: 5px; right: 3px; bottom: 2px; height: 14px; border: 2px solid var(--ink); border-radius: 55% 45% 48% 52%; background: #9fcf63; box-shadow: inset 0 5px 0 #cce88a; }
.sapling-art i { position: absolute; z-index: 2; width: 31px; height: 15px; border: 2px solid var(--ink); border-radius: 95% 4% 95% 4%; background: #9fcf63; box-shadow: 2px 2px 0 var(--ink); transform-origin: 75% 70%; }
.sapling-art i:nth-child(1) { left: 1px; top: 28px; transform: rotate(27deg); }
.sapling-art i:nth-child(2) { left: 10px; top: 12px; background: #b9dd7c; transform: rotate(48deg) scale(.92); }
.sapling-art i:nth-child(3) { right: 0; top: 27px; border-radius: 4% 95% 4% 95%; background: #cce88a; transform: rotate(-27deg); }
.sapling-art i:nth-child(4) { right: 9px; top: 10px; border-radius: 4% 95% 4% 95%; background: #9fcf63; transform: rotate(-48deg) scale(.9); }
.sapling-art i:nth-child(5) { left: 19px; top: 1px; width: 29px; height: 16px; background: #b9dd7c; transform: rotate(3deg); }

.game-shell { width: min(1120px, calc(100% - 30px)); margin: 40px auto 54px; }

.game-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand-home {
  padding: 9px 4px;
  color: var(--ink);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 950;
  letter-spacing: -.01em;
}
.brand-home:hover { color: var(--coral-dark); }
.daily-button { min-width: 124px; padding: 10px 15px; border: 2px solid var(--ink); border-radius: 8px; background: var(--yellow); color: var(--ink); box-shadow: 3px 3px 0 var(--ink); text-align: center; text-decoration: none; font-size: .72rem; font-weight: 950; letter-spacing: .05em; text-transform: uppercase; }
.game-help > .daily-button { width: 100%; margin-top: 2px; }
.daily-button[hidden], .game-settings[hidden] { display: none; }
.daily-button:hover { transform: translateY(-1px); box-shadow: 4px 4px 0 var(--ink); }
.daily-button.needs-attention { animation: daily-attention 1.15s ease .35s 1; }
.daily-button.is-daily { background: var(--paper); color: var(--muted); box-shadow: 2px 2px 0 var(--ink); }
.daily-button.is-daily:hover { background: var(--soft); box-shadow: 3px 3px 0 var(--ink); }
.daily-button.is-complete { background: #d9d8d3; color: var(--muted); box-shadow: 2px 2px 0 var(--ink); cursor: default; pointer-events: none; }

.game-intro { margin: 22px 0 20px; padding-top: 18px; border-top: 2px solid var(--ink); }
.game-intro h1 { margin: 0; font-size: clamp(2.1rem, 4.6vw, 3.2rem); line-height: .95; letter-spacing: -.05em; }
.game-intro p:last-child { max-width: 560px; margin: 9px 0 0; color: var(--muted); font-size: .87rem; font-weight: 700; line-height: 1.5; }

.game-toolbar {
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: rgba(255,250,247,.92);
  box-shadow: 0 12px 22px rgba(23,34,31,.08), 4px 4px 0 var(--ink);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
}
.toolbar-status { flex: 1 1 220px; min-width: 0; }
.toolbar-status strong { font-size: .95rem; }
.toolbar-status output { margin-left: 10px; color: var(--coral-dark); font: 900 1rem/1 ui-monospace, monospace; }
.toolbar-status p { margin: 4px 0 0; color: var(--muted); font-size: .76rem; font-weight: 650; line-height: 1.4; }
.toolbar-actions { flex: none; display: flex; flex-wrap: wrap; gap: 8px; }
.toolbar-controls { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.toolbar-hint { margin: 0; color: var(--muted); font-size: .68rem; font-weight: 800; font-style: italic; }

.play-card, .side-card {
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: rgba(255,250,247,.92);
  box-shadow: var(--shadow);
}
.play-card { min-height: 420px; padding: clamp(18px, 3vw, 34px); display: grid; place-items: center; }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 290px); gap: 20px; align-items: start; }
.game-main { min-width: 0; display: grid; gap: 18px; }
.game-help { display: grid; grid-template-columns: 1fr; gap: 16px; position: sticky; top: 18px; }
.game-settings { padding: 17px 19px; border: 2px solid var(--ink); border-radius: 8px; background: rgba(255,250,247,.92); box-shadow: 0 12px 22px rgba(23,34,31,.08), 4px 4px 0 var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.game-settings h2 { flex: none; margin: 0; font-size: .82rem; letter-spacing: -.01em; }
.game-settings .toolbar-controls { justify-content: flex-end; }
.side-card { padding: 19px 21px; box-shadow: 0 14px 24px rgba(23,34,31,.09), 4px 4px 0 var(--ink); }
.side-card h2 { margin: 0 0 10px; font-size: .92rem; letter-spacing: -.02em; }
.side-card p { margin: 0; color: var(--muted); font-size: .78rem; font-weight: 650; line-height: 1.5; }

.button {
  min-height: 42px;
  padding: 9px 13px;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  box-shadow: 2px 3px 0 var(--ink);
  font-size: .76rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 3px 4px 0 var(--ink); }
.button:active { transform: translate(2px, 2px); box-shadow: none; }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: 2px 3px 0 var(--ink); }
.button.primary { background: var(--coral); }
.button.daily { background: var(--yellow); }
.control-label { display: grid; gap: 6px; color: var(--muted); font-size: .64rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.control-label select { min-height: 38px; padding: 6px 9px; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--paper); color: var(--ink); font-weight: 850; }
.rules { margin: 0; padding-left: 18px; color: var(--muted); font-size: .77rem; font-weight: 650; line-height: 1.5; }
.rules li + li { margin-top: 6px; }
.micro { margin-top: 12px !important; font-size: .66rem !important; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 25px; max-width: calc(100% - 30px); padding: 11px 16px; border: 2px solid var(--ink); border-radius: 8px; background: var(--yellow); box-shadow: 4px 5px 0 var(--ink); font-size: .78rem; font-weight: 900; opacity: 0; pointer-events: none; transform: translate(-50%, 18px); transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.daily-reward {
  position: fixed;
  z-index: 120;
  inset: 0;
  padding: 24px;
  background: rgba(249,239,237,.94);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .32s ease;
}
.daily-reward.show { opacity: 1; pointer-events: auto; }
.reward-panel { position: relative; isolation: isolate; overflow: hidden; width: min(620px, 100%); padding: clamp(36px, 7vw, 68px); border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); box-shadow: 0 30px 70px rgba(23,34,31,.24), 8px 9px 0 var(--ink); text-align: center; opacity: 0; transform: translateY(28px) scale(.94) rotate(-1deg); transition: opacity .35s ease .08s, transform .48s cubic-bezier(.2,.9,.24,1.18) .08s; }
.daily-reward.show .reward-panel { opacity: 1; transform: translateY(0) scale(1) rotate(-.4deg); }
.reward-kicker { margin: 0 0 9px; color: var(--coral-dark); font-size: .76rem; font-weight: 950; letter-spacing: .16em; text-transform: uppercase; }
.daily-reward h2 { margin: 0; font-size: clamp(2.6rem, 8vw, 5rem); line-height: .92; letter-spacing: -.055em; }
.reward-line { margin: 18px 0 0; color: var(--muted); font-size: 1rem; font-weight: 800; }
.reward-stars { display: block; margin-top: 18px; font-size: clamp(2.2rem, 7vw, 3.5rem); letter-spacing: .04em; }
.reward-actions { margin-top: 28px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.reward-endless, .reward-home { min-height: 46px; padding: 12px 17px; border: 2px solid var(--ink); border-radius: 8px; box-shadow: 3px 3px 0 var(--ink); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-size: .74rem; font-weight: 950; letter-spacing: .06em; text-transform: uppercase; }
.reward-endless { background: var(--coral); color: var(--ink); }
.reward-home { background: var(--paper); color: var(--ink); }
.reward-burst { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.reward-burst i { position: absolute; width: 16px; aspect-ratio: 1; border: 1.5px solid var(--ink); background: var(--yellow); opacity: 0; transform: translateY(25px) rotate(12deg) scale(.4); }
.daily-reward.show .reward-burst i { animation: reward-confetti .7s cubic-bezier(.2,.8,.3,1.2) .28s forwards; }
.reward-burst i:nth-child(1) { left: 8%; top: 16%; background: var(--lime); }
.reward-burst i:nth-child(2) { right: 9%; top: 12%; background: var(--blue); border-radius: 50%; animation-delay: .34s !important; }
.reward-burst i:nth-child(3) { right: 14%; bottom: 15%; background: var(--coral); animation-delay: .4s !important; }
.reward-burst i:nth-child(4) { left: 12%; bottom: 12%; background: var(--yellow); border-radius: 50%; animation-delay: .46s !important; }
.reward-burst i:nth-child(5) { right: 4%; top: 46%; background: var(--lime); animation-delay: .52s !important; }
.reward-burst i:nth-child(6) { left: 5%; top: 48%; background: var(--coral); border-radius: 50%; animation-delay: .38s !important; }
.reward-burst i:nth-child(7) { left: 28%; top: 7%; background: var(--yellow); animation-delay: .5s !important; }
.reward-burst i:nth-child(8) { right: 30%; bottom: 6%; background: var(--blue); border-radius: 50%; animation-delay: .56s !important; }

@media (max-width: 850px) {
  .game-grid { grid-template-columns: 1fr; }
  .game-card { min-height: 300px; display: grid; grid-template-columns: 1fr 1.05fr; column-gap: 20px; }
  .card-top { grid-column: 1 / -1; }
  .card-art { grid-row: 2 / 5; height: auto; }
  .game-card h2 { align-self: end; }
  .game-layout { grid-template-columns: 1fr; }
  .game-help { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .shell { width: min(100% - 22px, 1080px); margin-top: 26px; }
  .hero { min-height: 0; padding: 38px 0 37px; grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(3rem, 17vw, 5.2rem); }
  .hero .sapling-note { position: static; justify-self: start; margin-top: 28px; }
  .daily-panel { display: grid; gap: 16px; }
  .daily-orbit { display: none; }
  .daily-action { width: 100%; }
  .daily-activity { flex-wrap: nowrap; gap: 12px; }
  .shelf-dots { gap: 5px; }
  .shelf-dots i { width: 10px; }
  .day-history { gap: 2px; }
  .day-pip { width: 11px; }
  .game-card { min-height: 390px; display: flex; }
  .card-art { height: 165px; }
  .sapling-note { grid-template-columns: 62px 1fr; padding: 18px; transform: rotate(-.5deg); }
  .sapling-art { width: 58px; transform: scale(.9); transform-origin: left center; }
  .game-shell { width: min(100% - 18px, 1120px); margin-top: 24px; }
  .game-top { flex-wrap: wrap; }
  .game-intro { margin-top: 16px; padding-top: 14px; }
  .game-toolbar { padding: 14px; }
  .toolbar-actions, .toolbar-controls { width: 100%; }
  .toolbar-actions .button { flex: 1 1 auto; }
  .game-settings { align-items: flex-start; flex-direction: column; }
  .game-settings .toolbar-controls { justify-content: flex-start; }
  .game-help { grid-template-columns: 1fr; }
  .daily-reward { padding: 14px; }
  .play-card { min-height: 0; padding: 15px; border-radius: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@keyframes daily-attention {
  0%, 100% { background: var(--yellow); transform: translateY(0) rotate(0); box-shadow: 3px 3px 0 var(--ink); }
  35% { background: #fff09a; transform: translateY(-3px) rotate(-1.5deg); box-shadow: 5px 6px 0 var(--ink), 0 0 0 8px rgba(242,201,87,.24); }
  68% { background: var(--yellow); transform: translateY(-1px) rotate(1deg); box-shadow: 4px 5px 0 var(--ink); }
}

@keyframes reward-confetti {
  0% { opacity: 0; transform: translateY(25px) rotate(0) scale(.4); }
  62% { opacity: 1; transform: translateY(-10px) rotate(145deg) scale(1.15); }
  100% { opacity: 1; transform: translateY(0) rotate(210deg) scale(1); }
}
