/* ============ Strawberry Garden · styles ============ */
:root {
  --cream: #fbf5e9;
  --paper: #fffdf8;
  --line: #ecdfc6;
  --line-soft: #f3ead8;
  --text: #4a3f35;
  --muted: #8d8070;
  --green: #5c8f4a;
  --green-d: #3f6e33;
  --green-l: #e7f1dc;
  --sage: #a4c38b;
  --red: #e5534b;
  --red-d: #c63f38;
  --red-l: #fde6e3;
  --orange: #e9a23b;
  --orange-l: #fdf0d9;
  --pink: #ec8fa0;
  --pink-l: #fde8ec;
  --blue: #5f97c2;
  --blue-l: #e3eff8;
  --wood: #b98a5a;
  --shadow: 0 6px 22px rgba(120, 90, 50, .10), 0 1px 3px rgba(120, 90, 50, .08);
  --shadow-lg: 0 14px 40px rgba(120, 90, 50, .16);
  --r: 20px;
  --font: 'Zen Maru Gothic', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-en: 'Fredoka', 'Zen Maru Gothic', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at 12% 18%, rgba(236, 143, 160, .07) 0 120px, transparent 121px),
    radial-gradient(circle at 88% 70%, rgba(164, 195, 139, .10) 0 160px, transparent 161px),
    var(--cream);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 10px 28px;
  background: rgba(255, 253, 248, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; white-space: nowrap; }
.brand-logo { font-size: 26px; align-self: center; filter: drop-shadow(0 2px 2px rgba(0,0,0,.12)); }
.brand-name { font-family: var(--font-en); font-weight: 700; font-size: 21px; color: var(--green-d); }
.brand-sub { font-size: 14px; color: var(--muted); font-weight: 700; }
.nav { display: flex; gap: 6px; margin: 0 auto; }
.nav a {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 999px;
  text-decoration: none; font-weight: 700; font-size: 14.5px; color: #6b5f52;
  transition: background .2s, color .2s;
}
.nav a span { font-size: 15px; }
.nav a:hover { background: var(--green-l); }
.nav a.active { background: var(--green-l); color: var(--green-d); box-shadow: inset 0 0 0 1.5px #cfe2bd; }
.top-right { display: flex; align-items: center; gap: 12px; }
.date-chip {
  font-size: 13px; font-weight: 700; color: var(--muted);
  padding: 6px 12px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line);
  white-space: nowrap;
}
.user {
  display: flex; align-items: center; gap: 8px; border: 0; background: transparent;
  font-weight: 700; color: var(--text); font-size: 14px; padding: 4px 6px; border-radius: 999px;
}
.user:hover { background: var(--line-soft); }
.user img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.caret { color: var(--muted); font-size: 11px; }
.sync-pill {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: 13px; font-weight: 700; color: #3a6f98;
  padding: 5px 12px; border-radius: 999px; background: var(--blue-l); border: 1px solid #c9def0;
}
.sync-pill img { width: 20px; height: 20px; border-radius: 50%; }
.sync-pill[data-state="ok"] { color: var(--green-d); background: var(--green-l); border-color: #d4e6c3; }
.sync-pill[data-state="syncing"], .sync-pill[data-state="dirty"] { color: #a86b12; background: var(--orange-l); border-color: #f4dcb0; }
.sync-pill[data-state="error"], .sync-pill[data-state="offline"] { color: var(--red-d); background: var(--red-l); border-color: #f8cbc6; }
.sync-pill[data-state="off"] { color: var(--muted); background: #f3eee4; border-color: var(--line); }
.google-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; align-self: flex-start;
  background: #fff; border: 1.5px solid #dadce0; border-radius: 999px; padding: 10px 22px;
  font-weight: 700; font-size: 15px; color: #3c4043; box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.google-btn:hover { background: #f8f9fa; }
.acct { display: flex; align-items: center; gap: 12px; }
.acct img, .acct-ph { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; display: flex; align-items: center; justify-content: center; font-size: 26px; background: var(--line-soft); }
.acct-row { display: flex; justify-content: space-between; font-size: 14px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.acct-row b[data-state="ok"] { color: var(--green-d); }
.acct-row b[data-state="error"] { color: var(--red-d); }

main { max-width: 1320px; margin: 0 auto; padding: 0 24px 40px; }
.foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 18px 0 30px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 16 / 7;
  min-height: 380px;
  margin: 18px 0 0;
  border-radius: 28px;
  overflow: hidden;
  background: url('assets/hero.jpg') center 50% / cover no-repeat;
  box-shadow: var(--shadow);
}
.hero::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 22%;
  background: linear-gradient(to top, rgba(251, 245, 233, .9), transparent);
  pointer-events: none;
}
.board {
  position: absolute; left: 10.2%; top: 35%; width: 15.4%; height: 36%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: #5a3d22; transform: rotate(-1deg);
  padding: 0 .6cqw;
}
.board .b-title { font-weight: 900; font-size: clamp(11px, 1.35cqw, 20px); letter-spacing: .1em; margin-bottom: .5cqw; color: #7a4f2a; }
.board .b-jp { font-weight: 900; font-size: clamp(12px, 1.5cqw, 22px); line-height: 1.35; }
.board .b-cn { font-size: clamp(10px, 1.05cqw, 15px); margin-top: .5cqw; font-weight: 700; color: #7a5a3c; }
.board .b-next {
  margin-top: .7cqw; border: 0; background: rgba(255,255,255,.55); color: #7a4f2a;
  font-size: clamp(9px, .85cqw, 12px); font-weight: 700; border-radius: 999px; padding: .25cqw .8cqw;
}
.hero-center {
  position: absolute; left: 50%; top: 6%; transform: translateX(-56%);
  width: 46%; display: flex; flex-direction: column; align-items: center; z-index: 2;
}
.plaque {
  position: relative; width: 100%;
  background: rgba(255, 253, 248, .93);
  border-radius: 3cqw;
  padding: 1.6cqw 2cqw 2.2cqw;
  text-align: center;
  box-shadow: 0 10px 30px rgba(110, 80, 40, .18);
}
.plaque::before {
  content: ''; position: absolute; inset: .7cqw; border-radius: 2.4cqw;
  border: 2px dashed #d9c9a8; pointer-events: none;
}
.plaque .fl { position: absolute; font-size: clamp(14px, 2cqw, 30px); }
.plaque .fl.f1 { left: -1cqw; top: -1.2cqw; }
.plaque .fl.f2 { right: -1cqw; top: -1cqw; }
.plaque .fl.f3 { left: 6%; bottom: -1.3cqw; }
.plaque .fl.f4 { right: 7%; bottom: -1.2cqw; }
.plaque h1 {
  margin: 0; font-family: var(--font-en); font-weight: 700; color: var(--green-d);
  font-size: clamp(18px, 2.75cqw, 42px); letter-spacing: .02em; line-height: 1.1;
}
.plaque h1 em { font-style: normal; color: var(--red); }
.ribbon {
  position: relative; margin-top: -1.4cqw;
  background: linear-gradient(#ef6b62, #de4c44);
  color: #fff; font-weight: 700;
  font-size: clamp(11px, 1.25cqw, 18px);
  padding: .6cqw 2.4cqw; border-radius: .6cqw;
  box-shadow: 0 4px 10px rgba(200, 60, 50, .3);
  white-space: nowrap;
}
.ribbon::before, .ribbon::after {
  content: ''; position: absolute; top: 25%; width: 1.6cqw; height: 100%;
  background: #c7423b; z-index: -1;
}
.ribbon::before { left: -1.1cqw; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 40% 50%); }
.ribbon::after { right: -1.1cqw; clip-path: polygon(0 0, 100% 0, 60% 50%, 100% 100%, 0 100%); }
.motto {
  margin: 1cqw 0 0; font-weight: 700; color: #5d5246; letter-spacing: .12em;
  font-size: clamp(11px, 1.15cqw, 16px);
  background: rgba(255, 253, 248, .75); padding: .3cqw 1.4cqw; border-radius: 999px;
}
.hero-btns { display: flex; gap: 1.4cqw; margin-top: 1.5cqw; }
.btn-hero {
  border: 0; border-radius: 999px; color: #fff; font-weight: 900;
  font-size: clamp(13px, 1.45cqw, 21px);
  padding: 1cqw 2.6cqw;
  box-shadow: 0 6px 0 rgba(0,0,0,.12), 0 10px 20px rgba(0,0,0,.12);
  transition: transform .15s, box-shadow .15s;
  display: flex; align-items: center; gap: .6cqw;
  border: 3px solid rgba(255,255,255,.85);
}
.btn-hero:hover { transform: translateY(-2px); }
.btn-hero:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,.12); }
.btn-hero.red { background: linear-gradient(#f06a60, #dc4a42); }
.btn-hero.green { background: linear-gradient(#78ad62, #5a8f48); }

/* ---------- stats strip ---------- */
.stats {
  position: relative; z-index: 3;
  margin: -64px 28px 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--paper); border-radius: var(--r);
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.stat { display: flex; gap: 12px; padding: 16px 20px; align-items: flex-start; min-width: 0; }
.stat + .stat { border-left: 1px dashed var(--line); }
.stat .ico { font-size: 30px; line-height: 1; margin-top: 2px; }
.stat .lbl { font-weight: 900; font-size: 13.5px; color: #5d5246; }
.stat .big { font-family: var(--font-en); font-weight: 700; font-size: 26px; color: var(--red); line-height: 1.2; }
.stat .big small { font-size: 15px; color: var(--muted); font-weight: 600; }
.stat .sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .body { min-width: 0; flex: 1; }
.mini-bar { height: 6px; background: var(--line-soft); border-radius: 9px; margin-top: 6px; overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--sage), var(--green)); border-radius: 9px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: var(--green-l); color: var(--green-d); border: 1px solid #d4e6c3;
}
.chip.red { background: var(--red-l); color: var(--red-d); border-color: #f8cbc6; }
.chip.orange { background: var(--orange-l); color: #a86b12; border-color: #f4dcb0; }
.chip.pink { background: var(--pink-l); color: #b8526a; border-color: #f6c9d3; }
.chip.blue { background: var(--blue-l); color: #3a6f98; border-color: #c9def0; }
.chip.gray { background: #f3eee4; color: var(--muted); border-color: var(--line); }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 22px; margin-top: 22px; }
.panel {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow); padding: 18px 20px; position: relative;
}
.panel-title { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 15px; margin: 0 0 12px; color: #5d5246; }
.panel-title .grow { flex: 1; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow); padding: 14px 14px 16px; text-align: center;
  display: flex; flex-direction: column; align-items: center;
  transition: transform .2s, box-shadow .2s; position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card::before {
  content: '✿'; position: absolute; top: 8px; right: 12px; color: #f2b8c4; font-size: 16px;
}
.card h3 { margin: 2px 0 6px; font-size: 19px; font-weight: 900; }
.card.c-green h3 { color: var(--green-d); }
.card.c-orange h3 { color: #b8781c; }
.card.c-pink h3 { color: #c3576f; }
.card.c-blue h3 { color: #3a6f98; }
.card img { width: 100%; aspect-ratio: 1.25; object-fit: cover; border-radius: 14px; }
.card .meta { font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 8px; }
.card .ctitle { font-weight: 900; font-size: 14px; margin: 2px 0 10px; min-height: 2.6em; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pill {
  border: 0; border-radius: 999px; color: #fff; font-weight: 900; font-size: 14px;
  padding: 9px 18px; display: inline-flex; align-items: center; gap: 8px; margin-top: auto;
  box-shadow: 0 3px 0 rgba(0,0,0,.12); transition: filter .15s, transform .15s; text-decoration: none;
}
.pill:hover { filter: brightness(1.06); transform: translateY(-1px); }
.pill.green { background: var(--green); }
.pill.orange { background: var(--orange); }
.pill.pink { background: var(--pink); }
.pill.blue { background: var(--blue); }
.pill.red { background: var(--red); }
.pill.ghost { background: #fff; color: var(--text); border: 1.5px solid var(--line); box-shadow: none; }
.pill.sm { font-size: 12.5px; padding: 6px 12px; }
.pill[disabled] { opacity: .5; cursor: not-allowed; }

/* garden path */
.garden { margin-top: 18px; overflow: hidden; background: linear-gradient(#fffdf8, #f6f9ee); }
.garden-head { display: flex; align-items: center; gap: 12px; }
.garden-head h3 { margin: 0; font-family: var(--font-en); font-weight: 700; color: var(--green-d); font-size: 19px; letter-spacing: .02em; }
.garden-head h3 small { font-family: var(--font); color: var(--muted); font-size: 13px; margin-left: 6px; }
.tabs { display: inline-flex; background: var(--line-soft); padding: 4px; border-radius: 999px; gap: 2px; margin-left: auto; }
.tabs button { border: 0; background: transparent; font-weight: 700; font-size: 13px; padding: 6px 14px; border-radius: 999px; color: var(--muted); }
.tabs button.on { background: #fff; color: var(--green-d); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.path-wrap { position: relative; display: grid; grid-template-columns: repeat(4, 1fr) 180px; gap: 10px; align-items: end; margin-top: 10px; min-height: 190px; }
.path-svg { position: absolute; left: 0; right: 190px; top: 0; bottom: 0; width: calc(100% - 190px); height: 100%; pointer-events: none; }
.pot { position: relative; text-align: center; z-index: 1; padding-bottom: 4px; }
.pot .plant { font-size: 44px; line-height: 1; height: 56px; display: flex; align-items: flex-end; justify-content: center; filter: drop-shadow(0 3px 2px rgba(0,0,0,.12)); }
.pot .vase { width: 64px; height: 34px; margin: -2px auto 0; background: linear-gradient(#d98a5c, #b9693f); border-radius: 6px 6px 18px 18px; position: relative; box-shadow: inset 0 4px 0 rgba(255,255,255,.25); }
.pot .vase::before { content: ''; position: absolute; left: -5px; right: -5px; top: -6px; height: 10px; background: #c97a4d; border-radius: 6px; }
.pot .pname {
  margin-top: 10px; display: inline-block; background: #fff; border: 1.5px solid var(--line);
  font-weight: 900; font-size: 12.5px; padding: 6px 10px; border-radius: 10px; box-shadow: 0 2px 0 var(--line);
}
.pot .pstat { font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 6px; }
.pot.locked .plant { filter: grayscale(.8) opacity(.6); }
.pot.current .pname { border-color: var(--sage); background: var(--green-l); }
.signpost {
  align-self: center; position: relative; z-index: 1;
  background: linear-gradient(#e2bf8c, #cfa36c); color: #4d3216; border-radius: 12px;
  padding: 12px 14px; font-weight: 900; font-size: 13.5px; line-height: 1.4; text-align: center;
  box-shadow: 0 4px 0 #a97c48, 0 8px 18px rgba(0,0,0,.12);
  border: 2px solid #b88b56;
}
.signpost::after { content: ''; position: absolute; left: 50%; bottom: -46px; width: 10px; height: 46px; background: #a97c48; transform: translateX(-50%); z-index: -1; border-radius: 3px; }
.signpost small { display: block; font-size: 11.5px; color: #6d4b26; font-weight: 700; margin-bottom: 4px; }

/* sidebar */
.side { display: flex; flex-direction: column; gap: 16px; }
.grow-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kv { background: #fff; border: 1px solid var(--line-soft); border-radius: 14px; padding: 10px 12px; }
.kv .k { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.kv .v { font-family: var(--font-en); font-weight: 700; font-size: 30px; color: var(--green-d); line-height: 1.15; }
.kv .v small { font-size: 14px; color: var(--muted); }
.kv.red .v { color: var(--red); }
.week-flowers { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; background: #fff; border: 1px solid var(--line-soft); border-radius: 14px; padding: 10px 12px; }
.week-flowers .fl { display: flex; gap: 4px; }
.week-flowers .fl span { font-size: 18px; display: flex; flex-direction: column; align-items: center; }
.week-flowers .fl span em { font-style: normal; font-size: 10px; color: var(--muted); font-weight: 700; }
.week-flowers .cnt { font-family: var(--font-en); font-weight: 700; font-size: 22px; color: var(--green-d); }
.week-flowers .cnt small { font-size: 12px; color: var(--muted); }
.stage { margin-top: 10px; background: #fff; border: 1px solid var(--line-soft); border-radius: 14px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; }
.stage .s-name { font-weight: 900; font-size: 16px; color: var(--green-d); }
.stage .s-ico { font-size: 34px; margin-left: auto; }
.bar { height: 12px; background: var(--line-soft); border-radius: 9px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, var(--sage), var(--green)); transition: width .6s; }
.bar.pink i { background: linear-gradient(90deg, #f6b6c2, var(--pink)); }
.row-sb { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.muted { color: var(--muted); font-size: 12.5px; }
.count-big { font-family: var(--font-en); font-weight: 700; font-size: 38px; color: var(--red); line-height: 1; }
.chart svg { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 12px; font-size: 12px; color: var(--muted); font-weight: 700; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }

/* ---------- today view ---------- */
.page-head { display: flex; align-items: center; gap: 12px; margin: 24px 0 16px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 24px; font-weight: 900; }
.page-head .muted { font-size: 14px; }
.sessions { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.session { padding: 20px 22px 22px; }
.session.done { background: linear-gradient(#fffdf8, #f5faef); }
.s-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.s-top .track { font-weight: 900; font-size: 14px; }
.s-top .nav-days { margin-left: auto; display: flex; gap: 4px; }
.icon-btn { border: 1px solid var(--line); background: #fff; border-radius: 10px; width: 32px; height: 32px; font-weight: 900; color: var(--muted); }
.icon-btn:hover { background: var(--line-soft); }
.icon-btn.wide { width: auto; padding: 0 10px; font-size: 12.5px; }
.s-title { font-size: 23px; font-weight: 900; margin: 12px 0 4px; }
.s-week { font-size: 13px; font-weight: 700; color: var(--muted); }
.s-goal { margin: 10px 0 0; background: var(--line-soft); border-radius: 12px; padding: 10px 14px; font-size: 14px; line-height: 1.6; }
.timer { display: flex; align-items: center; gap: 18px; margin: 16px 0 6px; padding: 14px 16px; border-radius: 16px; background: #fff; border: 1px solid var(--line-soft); }
.ring { position: relative; width: 92px; height: 92px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .t { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-en); font-weight: 700; font-size: 21px; color: var(--green-d); }
.timer .tctl { flex: 1; min-width: 0; }
.segs { display: flex; gap: 4px; margin-bottom: 10px; }
.seg { flex-basis: 0; text-align: center; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.seg i { display: block; height: 8px; border-radius: 6px; background: var(--line-soft); margin-bottom: 4px; overflow: hidden; position: relative; }
.seg i b { position: absolute; inset: 0 auto 0 0; background: var(--sage); width: 0; }
.seg.cur { color: var(--green-d); }
.tbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.steps { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 8px; }
.steps li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-soft); background: #fff; transition: background .2s, border-color .2s; }
.steps li.cur { border-color: var(--sage); background: #f7fbf2; }
.steps li.checked { opacity: .65; }
.steps li.checked .stxt { text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.steps input, .acc input { width: 18px; height: 18px; accent-color: var(--green); margin-top: 2px; flex: none; }
.min-badge { flex: none; font-family: var(--font-en); font-weight: 700; font-size: 12px; background: var(--green-l); color: var(--green-d); border-radius: 8px; padding: 2px 7px; margin-top: 1px; }
.stxt { font-size: 14px; line-height: 1.6; }
.sec-label { font-weight: 900; font-size: 13.5px; margin: 16px 0 8px; color: #5d5246; display: flex; align-items: center; gap: 6px; }
.probs { display: flex; flex-wrap: wrap; gap: 8px; }
.prob { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; background: var(--pink-l); color: #a8435b; border: 1px solid #f6c9d3; padding: 6px 12px; border-radius: 10px; font-weight: 700; font-size: 13.5px; }
.prob:hover { background: #fbd9e0; }
details.hint { background: var(--orange-l); border: 1px solid #f4dcb0; border-radius: 12px; padding: 8px 12px; margin-top: 10px; font-size: 13.5px; line-height: 1.6; }
details.hint summary { cursor: pointer; font-weight: 900; color: #a86b12; }
.code { position: relative; margin: 0; background: #2f3a2c; color: #e9f1df; border-radius: 14px; padding: 14px 16px; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; overflow-x: auto; white-space: pre; }
.code .copy { position: absolute; top: 8px; right: 8px; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 11.5px; border-radius: 8px; padding: 4px 8px; font-family: var(--font); }
.code .copy:hover { background: rgba(255,255,255,.22); }
.acc { display: flex; gap: 10px; align-items: flex-start; background: var(--green-l); border: 1px solid #d4e6c3; border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.6; cursor: pointer; }
.acc b { color: var(--green-d); }
.links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
textarea, input[type=text], input[type=url], select {
  width: 100%; font-family: inherit; font-size: 14px; color: var(--text);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; outline: none;
  transition: border-color .2s;
}
textarea:focus, input:focus, select:focus { border-color: var(--sage); }
textarea { resize: vertical; min-height: 80px; line-height: 1.6; }
.s-foot { display: flex; gap: 10px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.s-foot .pill { margin-top: 0; }
.done-badge { font-weight: 900; color: var(--green-d); }

/* ---------- map view ---------- */
.phase { margin-bottom: 22px; }
.phase h3 { font-size: 16px; font-weight: 900; margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.phase h3 .bar { flex: 0 0 160px; height: 8px; }
.week-row { display: grid; grid-template-columns: 170px repeat(7, minmax(0, 1fr)); gap: 8px; align-items: stretch; margin-bottom: 8px; }
.week-name { font-size: 13px; font-weight: 900; padding: 8px 4px; line-height: 1.35; }
.week-name small { display: block; color: var(--muted); font-weight: 700; }
.day-chip {
  border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 8px 9px; text-align: left;
  font-size: 12px; line-height: 1.35; color: var(--text); min-height: 64px; display: flex; flex-direction: column; gap: 3px;
  transition: transform .15s, box-shadow .15s;
}
.day-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.day-chip .dn { font-family: var(--font-en); font-weight: 700; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; }
.day-chip .dt { font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.day-chip.review { background: var(--orange-l); border-color: #f4dcb0; }
.day-chip.done { background: var(--red-l); border-color: #f5c3be; }
.day-chip.done .dn { color: var(--red-d); }
.day-chip.cur { border-color: var(--green); box-shadow: 0 0 0 3px rgba(92, 143, 74, .18); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(92, 143, 74, .08); } }

/* ---------- notes view ---------- */
.notes-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
.form { display: flex; flex-direction: column; gap: 10px; }
.form label { font-size: 12.5px; font-weight: 900; color: #5d5246; display: flex; flex-direction: column; gap: 5px; }
.mlist { display: flex; flex-direction: column; gap: 10px; }
.mitem { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; }
.mitem.solved { opacity: .6; }
.mitem .mbody { flex: 1; min-width: 0; }
.mitem .mt { font-weight: 900; font-size: 15px; }
.mitem .mt a { text-decoration: none; border-bottom: 1.5px dashed var(--pink); }
.mitem .mn { font-size: 13.5px; color: #5d5246; margin-top: 4px; white-space: pre-wrap; line-height: 1.55; }
.mitem .mm { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.mitem .ma { display: flex; flex-direction: column; gap: 6px; }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.empty { text-align: center; padding: 36px 10px; color: var(--muted); font-weight: 700; }
.empty .e-ico { font-size: 42px; display: block; margin-bottom: 6px; }

/* ---------- report view ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.kpi { text-align: center; padding: 16px 10px; }
.kpi .ki { font-size: 26px; }
.kpi .kv2 { font-family: var(--font-en); font-weight: 700; font-size: 30px; color: var(--green-d); line-height: 1.2; }
.kpi .kv2 small { font-size: 14px; color: var(--muted); }
.kpi .kl { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.report-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; }
.heat { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; gap: 4px; justify-content: start; }
.heat i { width: 16px; height: 16px; border-radius: 4px; background: #f1ebde; display: block; }
.heat i.l1 { background: #f8c9c4; }
.heat i.l2 { background: #ef8e86; }
.heat i.l3 { background: var(--red-d); }
.heat i.today { outline: 2px solid var(--green); outline-offset: 1px; }
.heat-wrap { display: flex; gap: 8px; }
.heat-days { display: grid; grid-template-rows: repeat(7, 16px); gap: 4px; font-size: 10.5px; color: var(--muted); font-weight: 700; }
.phase-line { margin: 10px 0; }
.phase-line .row-sb { font-size: 13px; font-weight: 700; margin-bottom: 4px; }

/* ---------- modal / toast ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(60, 45, 30, .35); backdrop-filter: blur(3px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .2s; }
.modal { background: var(--paper); border-radius: 22px; box-shadow: var(--shadow-lg); width: min(680px, 100%); max-height: 88vh; overflow: auto; padding: 22px 24px; border: 1px solid var(--line); animation: pop .25s; }
.modal h3 { margin: 0 0 4px; font-size: 20px; font-weight: 900; }
.modal .m-close { float: right; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.rv-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line-soft); background: #fff; border-radius: 14px; margin-top: 10px; }
.rv-item .rv-b { flex: 1; min-width: 0; }
.rv-item .rv-t { font-weight: 900; }
.rv-item .rv-q { font-size: 13px; color: #5d5246; margin-top: 4px; line-height: 1.55; }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); opacity: 0;
  background: #4a3f35; color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 14px;
  transition: all .3s; z-index: 200; pointer-events: none; box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 150; overflow: hidden; }
.confetti span { position: absolute; top: -40px; font-size: 26px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }

/* ---------- responsive ---------- */
.layout > *, .sessions > *, .notes-grid > *, .report-grid > *, .side > * { min-width: 0; }
.nav a { white-space: nowrap; }
@media (max-width: 1180px) {
  .layout { grid-template-columns: 1fr; }
  .side { display: grid; grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .nav a { padding: 8px 10px; }
  .brand-sub { display: none; }
}
@media (max-width: 900px) {
  .sessions, .notes-grid, .report-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); margin: -40px 12px 0; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px dashed var(--line); }
  .week-row { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .week-name { grid-column: 1 / -1; padding: 4px 0 0; }
  .path-wrap { grid-template-columns: repeat(4, 1fr); }
  .signpost, .path-svg { display: none; }
  .topbar { flex-wrap: wrap; gap: 8px 16px; padding: 10px 14px; }
  .nav { order: 3; width: 100%; overflow-x: auto; }
  .date-chip { display: none; }
  main { padding: 0 12px 30px; }
}
@media (max-width: 640px) {
  .hero { aspect-ratio: auto; min-height: 420px; background-position: 70% 50%; }
  .board { display: none; }
  .hero-center { width: 92%; transform: translateX(-50%); top: 6%; }
  .plaque { border-radius: 18px; padding: 16px 14px 22px; }
  .ribbon { white-space: normal; text-align: center; }
  .side, .cards { grid-template-columns: 1fr; }
  .card img { aspect-ratio: 2; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 12px; gap: 8px; }
  .stat .ico { font-size: 22px; }
  .stat .big { font-size: 21px; }
  .brand-name { font-size: 18px; }
  .path-wrap { min-height: 160px; }
  .pot .pname { font-size: 11px; padding: 4px 6px; }
  .timer { flex-direction: column; align-items: stretch; }
  .ring { margin: 0 auto; }
  .day-chip .dt { display: none; }
  .day-chip { min-height: 40px; }
}
