:root {
  --bg: #050a18;
  --surface: rgba(16, 28, 60, 0.55);
  --line: rgba(140, 170, 255, 0.12);
  --line-strong: rgba(140, 170, 255, 0.26);
  --text: #eaeff9;
  --muted: #8e9aba;
  --faint: #5c6887;
  --blue: #3d6bff;
  --blue-2: #6f93ff;
  --blue-3: #b3c7ff;
  --gold: #d9bc78;
  --danger: #ff7088;
  --serif-en: "Cormorant Garamond", "Noto Serif JP", "Hiragino Mincho ProN", serif;
  --serif-ja: "Noto Serif JP", "Hiragino Mincho ProN", serif;
  --sans: "Noto Sans JP", "Hiragino Sans", sans-serif;
  --pixel: "DotGothic16", "Osaka-Mono", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  letter-spacing: 0.03em;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1100px 600px at 85% -15%, rgba(61, 107, 255, 0.30), transparent 60%),
    radial-gradient(800px 500px at -10% 35%, rgba(28, 58, 160, 0.28), transparent 60%),
    radial-gradient(700px 400px at 60% 110%, rgba(40, 80, 200, 0.18), transparent 60%),
    linear-gradient(180deg, #08122f 0%, #050a18 65%);
}

button, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }

/* ---------- ヘッダー ---------- */
.topbar {
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-family: var(--serif-en);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark { color: var(--blue-2); font-size: 12px; }
.topbar-actions { display: flex; gap: 8px; }

.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  transition: background 0.3s, border-color 0.3s;
}
.ghost-btn:hover { background: rgba(111, 147, 255, 0.1); border-color: var(--blue-2); }
.badge {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(111, 147, 255, 0.2);
  color: var(--blue-3);
  font-size: 11px;
  text-align: center;
}

/* ---------- メイン ---------- */
main { max-width: 880px; margin: 0 auto; padding: 0 24px 96px; }

.hero { margin: 16px 0 28px; }
.date { margin: 0 0 10px; font-size: 13px; color: var(--muted); letter-spacing: 0.2em; }
.hero h1 {
  margin: 0;
  font-family: var(--serif-ja);
  font-weight: 500;
  font-size: clamp(28px, 5vw, 38px);
  letter-spacing: 0.08em;
}
.daily-status {
  display: inline-flex;
  margin-top: 16px;
  padding: 6px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px;
  color: var(--blue-3);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: background 0.3s, border-color 0.3s;
}
.daily-status:hover { background: rgba(111, 147, 255, 0.1); border-color: var(--blue-2); }
.daily-status.is-done { color: var(--gold); border-color: rgba(217, 188, 120, 0.35); }

/* ---------- ダッシュボード ---------- */
.dashboard {
  display: grid;
  grid-template-columns: repeat(3, auto) 1fr;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px 8px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 28px;
  border-right: 1px solid var(--line);
}
.stat-value {
  font-family: var(--serif-en);
  font-size: 44px;
  font-weight: 500;
  line-height: 1;
}
.stat.primary .stat-value {
  background: linear-gradient(180deg, #ffffff, var(--blue-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label { font-size: 11px; color: var(--muted); letter-spacing: 0.25em; }

.level { padding: 0 28px; }
.level-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.lv { font-family: var(--serif-en); font-size: 15px; color: var(--blue-3); }
.lv b { font-size: 26px; font-weight: 500; color: var(--text); margin-left: 2px; }
.exp-bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.exp-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--blue-3));
  box-shadow: 0 0 12px rgba(111, 147, 255, 0.8);
  transition: width 0.9s var(--ease);
}

.latest-review {
  grid-column: 1 / -1;
  margin: 22px 28px 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 10px 24px;
}
.latest-head { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.latest-label { font-size: 11px; color: var(--muted); letter-spacing: 0.25em; }
.latest-week { font-size: 12px; color: var(--blue-3); letter-spacing: 0.08em; }
.latest-comment {
  margin: 0;
  font-family: var(--serif-ja);
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.latest-comment.is-empty { color: var(--faint); }
.text-btn {
  background: none;
  border: none;
  padding: 4px 0;
  font-size: 13px;
  color: var(--blue-3);
  white-space: nowrap;
  transition: color 0.2s;
}
.text-btn:hover { color: #fff; }

/* ---------- ToDo ---------- */
.todo, .reflection {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 36px 36px 28px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.todo-head { display: flex; align-items: baseline; justify-content: space-between; }
.todo-head h2 {
  margin: 0;
  font-family: var(--serif-en);
  font-size: 40px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.progress { font-size: 13px; color: var(--muted); letter-spacing: 0.12em; }

.todo-form {
  display: flex;
  gap: 6px;
  margin: 22px 0 10px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(3, 8, 24, 0.5);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.todo-form:focus-within { border-color: var(--blue-2); box-shadow: 0 0 0 4px rgba(61, 107, 255, 0.15); }
.todo-form input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  padding: 12px 14px;
  font-size: 16px;
}
.todo-form input::placeholder, .memo-form ::placeholder { color: var(--faint); }

.todo-form button, .memo-form button {
  border: none;
  border-radius: 10px;
  padding: 0 24px;
  background: linear-gradient(135deg, #4b79ff, #2a4cd2);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.15em;
  box-shadow: 0 10px 24px -10px rgba(61, 107, 255, 0.9);
  transition: filter 0.2s, transform 0.2s;
}
.todo-form button:hover, .memo-form button:hover { filter: brightness(1.12); }
.todo-form button:active, .memo-form button:active { transform: scale(0.97); }

.todo-list { list-style: none; margin: 0; padding: 0; }
.item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 18px 6px;
  border-bottom: 1px solid var(--line);
  animation: rise 0.5s var(--ease) both;
}
.item:last-child { border-bottom: none; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.check {
  position: relative;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--blue-2);
  background: transparent;
  transition: background 0.3s, box-shadow 0.3s, transform 0.2s;
}
.check:hover { background: rgba(111, 147, 255, 0.15); box-shadow: 0 0 0 5px rgba(111, 147, 255, 0.1); }
.check::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 4px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.3s var(--ease);
}
.is-done .check, .completing .check {
  background: linear-gradient(135deg, #5b85ff, #2a4cd2);
  border-color: transparent;
}
.is-done .check::after, .completing .check::after { transform: rotate(45deg) scale(1); }
.completing .check { animation: pop 0.4s var(--ease); box-shadow: 0 0 0 8px rgba(111, 147, 255, 0.2), 0 0 24px rgba(111, 147, 255, 0.8); }
@keyframes pop { 50% { transform: scale(1.3); } }

.item-body { min-width: 0; }
.item-text { font-size: 16px; font-weight: 400; word-break: break-word; transition: color 0.3s; }
.meta { margin-top: 5px; font-size: 12px; color: var(--faint); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.status {
  white-space: nowrap;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--blue-3);
  font-size: 10px;
  letter-spacing: 0.15em;
}
.is-done .status { border-color: rgba(217, 188, 120, 0.35); color: var(--gold); }
.is-done .item-text { color: var(--faint); text-decoration: line-through; text-decoration-color: rgba(142, 154, 186, 0.5); }

.delete-btn {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  color: var(--faint);
  opacity: 0;
  transition: opacity 0.2s, color 0.2s, border-color 0.2s;
}
.item:hover .delete-btn, .delete-btn:focus-visible, .delete-btn.armed { opacity: 1; }
.delete-btn:hover { color: var(--text); border-color: var(--line-strong); }
.delete-btn.armed { color: var(--danger); border-color: rgba(255, 112, 136, 0.5); }
@media (hover: none) { .delete-btn { opacity: 1; } }

.empty {
  padding: 36px 0 20px;
  text-align: center;
  color: var(--muted);
  font-family: var(--serif-ja);
  letter-spacing: 0.12em;
}

.done-section h3 {
  margin: 30px 0 2px;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.3em;
}

/* ---------- 日々の振り返り ---------- */
.reflection { scroll-margin-top: 24px; }
.reflection-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 16px 24px; }
.reflection-head h2 { margin: 0; font-family: var(--serif-en); font-size: 40px; font-weight: 500; letter-spacing: 0.04em; }
.reflection-lead { margin: 6px 0 0; font-size: 13px; color: var(--muted); letter-spacing: 0.12em; }

.day-nav { display: flex; align-items: center; gap: 10px; }
.day-nav .icon-btn { font-size: 22px; flex: none; }
.day-label {
  min-width: 128px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: var(--serif-ja);
  font-size: 15px;
}

.day-wins {
  margin-top: 24px;
  padding: 14px 18px;
  border: 1px solid rgba(217, 188, 120, 0.18);
  border-radius: 14px;
  background: rgba(217, 188, 120, 0.05);
}
.day-wins-label { font-size: 11px; color: var(--gold); letter-spacing: 0.25em; }
.day-wins ul { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.day-wins li { padding: 3px 12px; border-radius: 999px; background: rgba(217, 188, 120, 0.1); color: #f0e2bd; font-size: 13px; }

.q { padding: 28px 0; border-bottom: 1px solid var(--line); }
.q-label {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0;
  font-family: var(--serif-ja);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.6;
}
.q-num { flex: none; font-family: var(--serif-en); font-size: 15px; color: var(--blue-2); letter-spacing: 0.1em; }
.q-hint { margin: 6px 0 14px; font-size: 12px; line-height: 1.7; color: var(--muted); letter-spacing: 0.05em; }
.q textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(3, 8, 24, 0.5);
  line-height: 1.8;
  outline: none;
  resize: vertical;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.q textarea:focus { border-color: var(--blue-2); box-shadow: 0 0 0 4px rgba(61, 107, 255, 0.15); }
.q textarea::placeholder { color: var(--faint); }

.score-scale { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.score-btn {
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  font-family: var(--serif-en);
  font-size: 18px;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.score-btn:hover { background: rgba(111, 147, 255, 0.1); }
.score-btn[aria-pressed="true"] {
  border-color: transparent;
  background: linear-gradient(135deg, #4b79ff, #2a4cd2);
  box-shadow: 0 8px 20px -8px rgba(61, 107, 255, 0.9);
}

.daily-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 26px; }
.daily-foot .meta { margin: 0 auto 0 0; }
.daily-foot .ghost-btn { padding: 12px 20px; }
.primary-btn {
  border: none;
  border-radius: 12px;
  padding: 14px 32px;
  background: linear-gradient(135deg, #4b79ff, #2a4cd2);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.15em;
  box-shadow: 0 10px 24px -10px rgba(61, 107, 255, 0.9);
  transition: filter 0.2s, transform 0.2s;
}
.primary-btn:hover { filter: brightness(1.12); }
.primary-btn:active { transform: scale(0.97); }
.primary-btn:disabled { opacity: 0.6; cursor: default; }

.daily-view { margin-top: 24px; }
.view-score { display: flex; align-items: baseline; gap: 8px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.view-score-num { font-family: var(--serif-en); font-size: 56px; font-weight: 500; line-height: 1; }
.view-score-max { font-family: var(--serif-en); font-size: 18px; color: var(--muted); }
.view-score-label { margin-left: 10px; font-size: 11px; color: var(--muted); letter-spacing: 0.25em; }
.view-answers { margin: 0; }
.view-answers dt { margin-top: 22px; font-size: 12px; color: var(--blue-3); letter-spacing: 0.06em; }
.view-answers dd { margin: 6px 0 0; font-family: var(--serif-ja); font-size: 15px; line-height: 1.9; white-space: pre-wrap; word-break: break-word; }

/* ---------- 今日の名言 ---------- */
.quote-card {
  position: relative;
  overflow: hidden;
  margin-top: 24px;
  padding: 52px 40px 44px;
  border: 1px solid rgba(217, 188, 120, 0.25);
  border-radius: 24px;
  text-align: center;
  background:
    radial-gradient(600px 260px at 50% 0%, rgba(217, 188, 120, 0.13), transparent 70%),
    linear-gradient(180deg, rgba(22, 36, 82, 0.75), rgba(10, 18, 44, 0.75));
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.quote-card::before {
  content: "\201C";
  position: absolute;
  top: -24px;
  left: 24px;
  font-family: var(--serif-en);
  font-size: 200px;
  line-height: 1;
  color: rgba(217, 188, 120, 0.12);
  pointer-events: none;
}
.quote-eyebrow { margin: 0; font-size: 12px; color: var(--gold); letter-spacing: 0.35em; }
.quote-category { display: inline-block; margin-top: 8px; font-size: 11px; color: var(--muted); letter-spacing: 0.15em; }
.quote-text {
  margin: 24px auto 0;
  max-width: 620px;
  font-family: var(--serif-ja);
  font-size: clamp(20px, 3.4vw, 28px);
  line-height: 1.8;
  letter-spacing: 0.06em;
  background: linear-gradient(180deg, #ffffff, #f3e3bb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.quote-author { margin: 18px 0 0; font-size: 14px; letter-spacing: 0.1em; }
.quote-source { font-size: 12px; color: var(--muted); }
.coach-note {
  max-width: 540px;
  margin: 32px auto 0;
  padding-top: 26px;
  border-top: 1px solid rgba(217, 188, 120, 0.2);
  font-size: 14px;
  line-height: 2;
  color: var(--blue-3);
  white-space: pre-line;
}
.quote-card.locked { padding: 32px; border-color: var(--line); background: var(--surface); }
.quote-card.locked::before { display: none; }
.quote-locked { margin: 12px 0 0; font-family: var(--serif-ja); color: var(--muted); line-height: 1.8; letter-spacing: 0.1em; }

.quote-card.reveal { animation: quote-glow 2.6s ease-out; }
.quote-card.reveal > * { animation: quote-in 1.1s var(--ease) both; }
.quote-card.reveal > :nth-child(2) { animation-delay: 0.2s; }
.quote-card.reveal > :nth-child(3) { animation-delay: 0.5s; }
.quote-card.reveal > :nth-child(4) { animation-delay: 1s; }
.quote-card.reveal > :nth-child(5) { animation-delay: 1.5s; }
@keyframes quote-in { from { opacity: 0; transform: translateY(10px); filter: blur(6px); } }
@keyframes quote-glow {
  0% { box-shadow: 0 0 0 0 rgba(217, 188, 120, 0); }
  35% { box-shadow: 0 0 90px 6px rgba(217, 188, 120, 0.35); }
  100% { box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7); }
}

/* 週次パネル内の日々の振り返り */
.week-dailies { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.week-dailies li { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(3, 8, 24, 0.3); }
.wd-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.wd-score { font-family: var(--serif-en); font-size: 14px; color: var(--blue-3); }
.wd-text {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- メモ（ドロワー） ---------- */
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(2, 5, 16, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
  z-index: 20;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  padding: 28px;
  overflow-y: auto;
  background: linear-gradient(180deg, #0b1636, #070e24);
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.45s var(--ease), visibility 0.45s;
  z-index: 21;
}
body.drawer-open .scrim { opacity: 1; pointer-events: auto; }
.drawer.open { transform: none; visibility: visible; }

.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.drawer-head h2 { margin: 0; font-family: var(--serif-en); font-size: 32px; font-weight: 500; }
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: transparent;
  font-size: 18px;
  line-height: 1;
}
.icon-btn:hover { background: rgba(111, 147, 255, 0.1); }

.memo-form { display: flex; flex-direction: column; gap: 10px; }
.memo-form input, .memo-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(3, 8, 24, 0.5);
  outline: none;
  resize: vertical;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.memo-form input:focus, .memo-form textarea:focus { border-color: var(--blue-2); box-shadow: 0 0 0 4px rgba(61, 107, 255, 0.15); }
.memo-form button { padding: 12px; }

.icon-btn:disabled { opacity: 0.3; cursor: default; background: transparent; }

.week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(3, 8, 24, 0.35);
}
.week-nav .icon-btn { flex: none; font-size: 22px; }
.week-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: var(--serif-ja);
  font-size: 15px;
  text-align: center;
}
.week-year { font-family: var(--sans); font-size: 11px; color: var(--muted); letter-spacing: 0.2em; }
.week-tag {
  padding: 0 10px;
  border: 1px solid rgba(217, 188, 120, 0.4);
  border-radius: 999px;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.2em;
}

.form-foot { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.memo-form .form-foot button { padding: 12px 28px; }
.save-state { font-size: 12px; color: var(--blue-3); opacity: 0; transition: opacity 0.3s; }
.save-state.visible { opacity: 1; }

.drawer-sub {
  margin: 36px 0 0;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.3em;
}

.memo-list { list-style: none; margin: 24px 0 0; padding: 0; }
.review-list { margin-top: 12px; }
.review-list li:not(.empty) { padding: 6px 0; }
.review-item {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  transition: background 0.2s, border-color 0.2s;
}
.review-item:hover { background: rgba(111, 147, 255, 0.07); }
.review-list li.active .review-item { background: rgba(111, 147, 255, 0.12); border-color: var(--line-strong); }
.review-item .memo-body { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.review-item .meta { margin-top: 8px; }
.memo-list li { padding: 18px 0; border-top: 1px solid var(--line); animation: rise 0.5s var(--ease) both; }
.memo-title { font-weight: 500; font-size: 15px; }
.memo-body { margin: 6px 0 0; font-size: 14px; color: var(--muted); white-space: pre-wrap; word-break: break-word; line-height: 1.7; }

/* ---------- クエストクリア ---------- */
.quest {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  cursor: pointer;
  background: rgba(2, 5, 15, 0);
  transition: background 0.4s, opacity 0.35s;
}
.quest.show { background: rgba(2, 5, 15, 0.86); }
.quest.closing { opacity: 0; }

.quest-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.quest.show .quest-flash { animation: flash 0.7s ease-out; }
@keyframes flash { 0% { opacity: 0.9; } 100% { opacity: 0; } }

.quest-rays {
  position: absolute;
  left: 50%;
  top: 36%;
  width: 180vmax;
  height: 180vmax;
  translate: -50% -50%;
  background: repeating-conic-gradient(rgba(130, 165, 255, 0.18) 0deg 5deg, transparent 5deg 15deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 45%);
  mask-image: radial-gradient(circle, #000 0%, transparent 45%);
  opacity: 0;
}
.quest.show .quest-rays { animation: rays-in 1s var(--ease) forwards, spin 40s linear infinite; }
@keyframes rays-in { from { opacity: 0; scale: 0.3; } to { opacity: 1; scale: 1; } }
@keyframes spin { to { rotate: 360deg; } }

.quest-glow {
  position: absolute;
  left: 50%;
  top: 36%;
  width: 70vmin;
  height: 40vmin;
  translate: -50% -50%;
  background: radial-gradient(ellipse, rgba(217, 188, 120, 0.35), rgba(61, 107, 255, 0.25) 45%, transparent 70%);
  filter: blur(20px);
  opacity: 0;
}
.quest.show .quest-glow { animation: glow 2.4s ease-in-out 0.3s infinite alternate both; }
@keyframes glow { from { opacity: 0.6; } to { opacity: 1; } }

.quest-particles { position: absolute; left: 50%; top: 36%; }
.quest-particles span {
  position: absolute;
  width: var(--s);
  height: var(--s);
  margin: calc(var(--s) / -2);
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 12px var(--c);
  opacity: 0;
  animation: burst var(--d) cubic-bezier(0.1, 0.8, 0.3, 1) var(--delay) forwards;
}
@keyframes burst {
  0% { transform: translate(0, 0) scale(1.2); opacity: 1; }
  100% { transform: translate(var(--x), var(--y)) scale(0); opacity: 0; }
}

.quest-title {
  position: absolute;
  left: 50%;
  top: 36%;
  translate: -50% -50%;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}
.quest.show .quest-title { animation: title-in 1s cubic-bezier(0.2, 1.3, 0.4, 1) both; }
@keyframes title-in {
  0% { opacity: 0; scale: 2.6; filter: blur(14px); }
  55% { opacity: 1; filter: blur(0); }
  100% { scale: 1; }
}
.quest-sub {
  display: block;
  font-family: var(--serif-en);
  font-size: clamp(16px, 3vw, 24px);
  letter-spacing: 0.7em;
  padding-left: 0.7em;
  color: var(--blue-3);
}
.quest-main {
  display: block;
  font-family: var(--serif-en);
  font-weight: 600;
  font-size: clamp(64px, 15vw, 150px);
  line-height: 1;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #ffffff 0%, #fff4d6 38%, #d9bc78 68%, #8f6f2e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(217, 188, 120, 0.5)) drop-shadow(0 0 60px rgba(80, 120, 255, 0.6));
}

/* ドット絵風メッセージウィンドウ */
.dq-window {
  position: absolute;
  left: 50%;
  bottom: max(40px, 9vh);
  translate: -50% 0;
  width: min(660px, calc(100% - 32px));
  min-height: calc(3 * 1.9em + 52px);
  padding: 22px 30px 30px;
  background: #000;
  color: #fff;
  border: 4px solid #fff;
  border-radius: 10px;
  box-shadow: 0 0 0 4px #000, 0 30px 80px rgba(0, 0, 0, 0.7);
  font-family: var(--pixel);
  font-size: clamp(16px, 2.6vw, 22px);
  line-height: 1.9;
  letter-spacing: 0.06em;
  opacity: 0;
}
.quest.show .dq-window { animation: win-in 0.25s steps(3) 0.75s both; }
@keyframes win-in { from { opacity: 0; scale: 1 0.1; } to { opacity: 1; scale: 1 1; } }
#dq-text { margin: 0; white-space: pre-wrap; word-break: break-word; }
.dq-cursor {
  position: absolute;
  left: 50%;
  bottom: 4px;
  translate: -50% 0;
  font-size: 14px;
  visibility: hidden;
}
.dq-window.ready .dq-cursor { visibility: visible; animation: blink 0.9s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- レスポンシブ ---------- */
@media (max-width: 680px) {
  .topbar { padding: 20px 16px; }
  .topbar { gap: 8px; }
  .brand { font-size: 15px; letter-spacing: 0.12em; gap: 6px; }
  .topbar-actions { gap: 6px; }
  .ghost-btn { padding: 7px 11px; font-size: 12px; gap: 6px; }
  .sound-label, .sound-state { display: none; }
  #sound-toggle.is-off { opacity: 0.45; }
  main { padding: 0 16px 72px; }
  .dashboard { grid-template-columns: repeat(3, 1fr); padding: 20px 0; row-gap: 20px; }
  .stat { padding: 0 18px; }
  .stat:nth-child(3) { border-right: none; }
  .stat-value { font-size: 36px; }
  .level { grid-column: 1 / -1; padding: 18px 18px 0; border-top: 1px solid var(--line); }
  .latest-review { margin: 0 18px; padding-top: 18px; grid-template-columns: 1fr; }
  .text-btn { justify-self: end; }
  .todo, .reflection { padding: 26px 18px 18px; border-radius: 20px; }
  .reflection-head h2 { font-size: 32px; }
  .day-nav { width: 100%; justify-content: space-between; }
  .score-scale { grid-template-columns: repeat(5, 1fr); }
  .quote-card { padding: 40px 20px 32px; border-radius: 20px; }
  .daily-foot { flex-wrap: wrap; }
  .todo-head h2 { font-size: 32px; }
  .item { gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .quest-particles { display: none; }
}
