/* Hodion v11.0 design layer: brighter, rounder, "sticker" style (docs/STYLE.md).
   One clear shape per thing, max 3 colours per character, thick soft outlines, one main action per screen.
   Motion: short (≤ 600 ms), springy, and fully off with "Less motion" or the system reduced-motion setting. */
:root {
  --radius: 22px;
  --radius-sm: 14px;
  --bg: #eefaf3;
  --bg-glow: rgba(38, 196, 133, 0.2);
  --sun: #ffcd3c;
  --pop: #ff7a59;
  --sky: #5aa9ff;
  --grape: #8b6cff;
  --shadow: 0 1px 0 rgba(10, 50, 35, 0.06), 0 8px 22px rgba(15, 107, 82, 0.12);
  --shadow-lift: 0 2px 0 rgba(10, 50, 35, 0.08), 0 16px 34px rgba(15, 107, 82, 0.18);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-mid: 240ms;
}
html[data-theme="dark"] { --bg: #0b1712; --shadow: 0 1px 0 rgba(0,0,0,0.3), 0 10px 26px rgba(0,0,0,0.35); }

/* softer, brighter background */
body { background: radial-gradient(120% 60% at 50% -10%, var(--bg-glow), transparent 60%), var(--bg); background-attachment: fixed; }

/* cards: rounder, sticker outline, a little lift on press */
.pro-card, .companion, .world-card, .shop-card, .badge-card, .tile, .report-tile, .banner { border-radius: var(--radius); }
.pro-card { box-shadow: var(--shadow); border: 1.5px solid var(--line-soft); }
.tile { transition: transform var(--t-fast) var(--spring), box-shadow var(--t-mid) var(--ease); }
.tile:active, .pro-card:active { transform: scale(0.985); }
.button { border-radius: 999px; transition: transform var(--t-fast) var(--spring), filter var(--t-fast) var(--ease); }
.button:active { transform: scale(0.95); }
.button:not(.secondary):not(.ghost) { box-shadow: 0 3px 0 color-mix(in srgb, var(--pine) 60%, #000 40%); }
.button:not(.secondary):not(.ghost):active { box-shadow: 0 1px 0 color-mix(in srgb, var(--pine) 60%, #000 40%); transform: translateY(2px) scale(0.98); }

/* bouncy checkmark */
.check-btn { border-width: 3px; }
.task-row.is-done .check-btn, .check-btn[aria-pressed="true"] { background: var(--pine); color: var(--on-pine); }
.check-btn.v11-pop { animation: v11-pop 520ms var(--spring); }
@keyframes v11-pop { 0% { transform: scale(0.6); } 55% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* smooth view change */
main > section:not([hidden]).v11-enter { animation: v11-enter 260ms var(--ease) both; }
@keyframes v11-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Hodi dances on streak milestones and happy moments */
#mascot.v11-dance svg { animation: v11-dance 1100ms var(--ease) 1; transform-origin: 50% 90%; }
@keyframes v11-dance { 0%,100% { transform: rotate(0) translateY(0); } 15% { transform: rotate(-10deg) translateY(-6px); } 30% { transform: rotate(10deg) translateY(0); } 45% { transform: rotate(-8deg) translateY(-8px); } 60% { transform: rotate(8deg); } 80% { transform: translateY(-4px) scale(1.04); } }
.coin-pill.v11-bump { animation: v11-pop 480ms var(--spring); }

/* ---------- v11 Today strip ---------- */
.v11-strip { display: grid; gap: 0.6rem; margin: 0.6rem 0; }
.v11-row { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.v11-chip { border: 2px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 0.38rem 0.8rem; font: inherit; font-weight: 700; font-size: var(--fs-sm); cursor: pointer; display: inline-flex; gap: 0.35rem; align-items: center; min-height: 40px; transition: transform var(--t-fast) var(--spring), background var(--t-fast); }
.v11-chip[aria-pressed="true"] { background: var(--pine); border-color: var(--pine); color: var(--on-pine); }
.v11-chip:active { transform: scale(0.94); }
.v11-win { width: 100%; justify-content: center; font-size: var(--fs-md); padding: 0.8rem 1rem; min-height: 52px; }
.v11-card { background: var(--surface); border: 1.5px solid var(--line-soft); border-radius: var(--radius); padding: 0.8rem 0.95rem; box-shadow: var(--shadow); color: var(--ink); }
.v11-card h3 { margin: 0 0 0.3rem; font-size: var(--fs-md); display: flex; align-items: center; gap: 0.4rem; }
.v11-card p { margin: 0.2rem 0; color: var(--muted); }
.v11-tag { display: inline-block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; color: var(--accent-soft-ink); background: var(--accent-soft); border-radius: 999px; padding: 0.1rem 0.5rem; }
.v11-coach { border-left: 6px solid var(--sun); }
.v11-done-today { text-align: center; background: linear-gradient(135deg, var(--accent-soft), var(--surface)); }
.v11-quest { display: flex; gap: 0.6rem; align-items: center; padding: 0.4rem 0; }
.v11-bar { flex: 1; height: 10px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.v11-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--pine), var(--sun)); border-radius: inherit; transition: width 600ms var(--ease); }

/* ---------- sheet (one shared full-screen panel) ---------- */
.v11-sheet { position: fixed; inset: 0; z-index: 60; display: grid; place-items: end center; background: rgba(8, 24, 18, 0.45); }
.v11-sheet[hidden] { display: none; }
.v11-panel { width: min(560px, 100%); max-height: 92vh; overflow: auto; background: var(--bg); color: var(--ink); border-radius: 26px 26px 0 0; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); box-shadow: var(--shadow-lift); animation: v11-up 300ms var(--spring); }
@media (min-width: 700px) { .v11-sheet { place-items: center; } .v11-panel { border-radius: 26px; } }
@keyframes v11-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.v11-panel header { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
.v11-panel h2 { margin: 0; font-size: var(--fs-lg); }
.v11-close { border: 0; background: var(--surface); color: var(--ink); width: 40px; height: 40px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; box-shadow: var(--shadow); }
.v11-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.6rem; }
.v11-gift { text-align: center; }
.v11-gift .v11-art { height: 96px; display: grid; place-items: center; }
.v11-gift .v11-art svg { height: 96px; width: auto; }

/* ---------- companions ---------- */
.v11-friend { display: grid; grid-template-columns: 72px 1fr; gap: 0.7rem; align-items: center; }
.v11-friend svg { width: 72px; height: 72px; }
.v11-friend.is-locked svg { filter: grayscale(1) opacity(0.45); }

/* ---------- valley map ---------- */
.v11-map svg { width: 100%; height: auto; border-radius: var(--radius); display: block; }

/* ---------- story recap ---------- */
.v11-story { position: fixed; inset: 0; z-index: 70; background: #0b1712; display: grid; place-items: center; }
.v11-story[hidden] { display: none; }
.v11-slide { width: min(420px, 100vw); height: min(746px, 100vh); border-radius: 22px; position: relative; overflow: hidden; color: #fff; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 2rem 1.4rem; }
.v11-slide .big { font-size: clamp(3rem, 18vw, 5.5rem); font-weight: 1000; line-height: 1; letter-spacing: -0.03em; animation: v11-zoom 700ms var(--spring) both; }
.v11-slide .lbl { font-size: 1.15rem; font-weight: 800; margin-top: 0.6rem; animation: v11-enter 500ms 200ms var(--ease) both; }
.v11-slide .sub { opacity: 0.9; margin-top: 0.8rem; animation: v11-enter 500ms 350ms var(--ease) both; }
.v11-slide .blob { position: absolute; border-radius: 50%; filter: blur(2px); opacity: 0.55; animation: v11-float 6s ease-in-out infinite alternate; }
@keyframes v11-zoom { from { transform: scale(0.3) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes v11-float { from { transform: translate(0, 0) scale(1); } to { transform: translate(18px, -22px) scale(1.12); } }
.v11-bars { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; gap: 4px; }
.v11-bars i { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.35); overflow: hidden; }
.v11-bars i b { display: block; height: 100%; width: 0; background: #fff; }
.v11-bars i.on b { width: 100%; transition: width 4.5s linear; }
.v11-bars i.past b { width: 100%; }
.v11-story-ui { position: absolute; bottom: 18px; left: 0; right: 0; display: flex; justify-content: center; gap: 0.6rem; z-index: 2; }
.v11-story-ui .button { background: #fff; color: #0b1712; box-shadow: none; }
.v11-tap { position: absolute; top: 0; bottom: 80px; width: 40%; z-index: 1; background: none; border: 0; }
.v11-tap.prev { left: 0; } .v11-tap.next { right: 0; }

/* ---------- milestone bloom ---------- */
.v11-bloom { text-align: center; padding: 1rem 0; }
.v11-bloom svg { width: 180px; height: 180px; }
.v11-bloom .petal { transform-origin: 90px 90px; animation: v11-petal 900ms var(--spring) both; }
@keyframes v11-petal { from { transform: scale(0) rotate(-40deg); } to { transform: none; } }
.v11-road { display: flex; gap: 0.4rem; overflow-x: auto; padding: 0.3rem 0 0.5rem; scroll-snap-type: x mandatory; }
.v11-stop { flex: 0 0 86px; text-align: center; scroll-snap-align: start; border-radius: 16px; padding: 0.5rem 0.3rem; background: var(--surface); border: 2px solid var(--line-soft); font-size: var(--fs-sm); }
.v11-stop.is-done { border-color: var(--pine); background: var(--accent-soft); color: var(--accent-soft-ink); }
.v11-stop.is-next { border-style: dashed; border-color: var(--sun); }
.v11-stop b { display: block; font-size: 1.1rem; }

/* emotes */
.v11-emotes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.v11-emote { border: 2px solid var(--line-soft); background: var(--surface); border-radius: 18px; padding: 0.3rem; cursor: pointer; color: var(--ink); font: inherit; font-size: var(--fs-sm); }
.v11-emote svg { width: 100%; height: 70px; }
.v11-emote:hover svg, .v11-emote:focus svg { animation: v11-dance 900ms var(--ease); }

/* ---------- winter themes (cosmetic) ---------- */
html[data-accent="snowy"] { --pine: #1f5fa8; --on-pine: #fff; --pine-ink: #0b2a4d; --accent-soft: #dcecff; --accent-soft-ink: #0d3463; --bg: #f1f7ff; --bg-glow: rgba(90, 169, 255, 0.25); }
html[data-accent="newstart"] { --pine: #6a3fd1; --on-pine: #fff; --pine-ink: #2a1160; --accent-soft: #ece4ff; --accent-soft-ink: #34187a; --bg: #fbf7ff; --bg-glow: rgba(255, 205, 60, 0.28); }
html[data-accent="meadow"] { --pine: #2d7d1f; --on-pine: #fff; --pine-ink: #123a0b; --accent-soft: #e4f7cf; --accent-soft-ink: #1d4a12; --bg: #f7fdee; --bg-glow: rgba(255, 205, 60, 0.25); }
html[data-theme="dark"][data-accent="snowy"] { --pine: #8cc4ff; --on-pine: #06213f; --pine-ink: #dcecff; --accent-soft: #15304d; --accent-soft-ink: #dcecff; --bg: #08121e; }
html[data-theme="dark"][data-accent="newstart"] { --pine: #c3a8ff; --on-pine: #1f0b4f; --pine-ink: #ece4ff; --accent-soft: #2c1d55; --accent-soft-ink: #ece4ff; --bg: #110b1e; }
html[data-theme="dark"][data-accent="meadow"] { --pine: #9be27f; --on-pine: #0f2a07; --pine-ink: #e4f7cf; --accent-soft: #1e3a14; --accent-soft-ink: #e4f7cf; --bg: #0c1508; }
.v11-weather { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.v11-weather i { position: absolute; top: -12px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px rgba(120, 170, 255, 0.8); animation: v11-snow linear infinite; opacity: 0.9; }
html[data-accent="newstart"] .v11-weather i { background: #ffd166; box-shadow: 0 0 8px rgba(255, 209, 102, 0.9); border-radius: 2px; transform: rotate(45deg); animation-name: v11-twinkle; top: auto; }
@keyframes v11-snow { to { transform: translate3d(30px, 105vh, 0); } }
@keyframes v11-twinkle { 0%,100% { opacity: 0; transform: scale(0.4) rotate(45deg); } 50% { opacity: 0.9; transform: scale(1) rotate(45deg); } }


/* ---------- less motion: everything calm ---------- */
html.less-motion *, html.less-motion *::before, html.less-motion *::after { animation: none !important; transition: none !important; }
html.less-motion .v11-weather { display: none; }
@media (prefers-reduced-motion: reduce) {
  .v11-weather { display: none; }
  #mascot.v11-dance svg, .check-btn.v11-pop, .v11-slide .big, .v11-panel, main > section.v11-enter { animation: none !important; }
}

/* v11: the one-line strip above the tasks */
.v11-modes { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.v11-modes::-webkit-scrollbar { display: none; }
.v11-modes .v11-chip { flex: 0 0 auto; white-space: nowrap; }
/* phones: keep the day first (pro.css orders: now 2, quick add 3, day 5) */
#v11-strip { order: 6; margin: 0 0 0.6rem; }
#v11-strip2 { order: 6; margin: 0 0 0.75rem; }
.v11-modes .v11-win { width: auto; min-height: 40px; font-size: var(--fs-sm); padding: 0.38rem 0.9rem; background: var(--pine); color: var(--on-pine); border-color: var(--pine); }

/* garden surprises (decoration only) */
.v11-surprise { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: inherit; }
.v11-butterfly { position: absolute; width: 30px; height: 24px; left: 62%; top: 22%; animation: v11-flutter 6s ease-in-out infinite; }
.v11-lantern { position: absolute; top: 10%; width: 10px; height: 14px; border-radius: 5px; background: #ffd166; box-shadow: 0 0 12px 4px rgba(255, 209, 102, 0.55); animation: v11-glow 3s ease-in-out infinite alternate; }
@keyframes v11-flutter { 0%, 100% { transform: translate(0, 0) scaleX(1); } 25% { transform: translate(-30px, 8px) scaleX(0.7); } 50% { transform: translate(-60px, -4px) scaleX(1); } 75% { transform: translate(-25px, -10px) scaleX(0.7); } }
@keyframes v11-glow { from { opacity: 0.55; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .v11-butterfly, .v11-lantern { animation: none; } }
.less-motion .v11-butterfly, .less-motion .v11-lantern { animation: none; }
