:root {
  color-scheme: light;
  --ink: #1d1d1f;
  --paper: #f5f5f7;
  --white: #ffffff;
  --line: #d2d2d7;
  --muted: #6e6e73;
  --red: #ff3b30;
  --blue: #0071e3;
  --green: #34c759;
  --lime: #d7ff4f;
  --yellow: #ffd60a;
  --shadow: 0 22px 50px rgba(29, 29, 31, 0.1);
}

body.dark-mode {
  color-scheme: dark;
  --ink: #f5f5f7;
  --paper: #111214;
  --white: #1c1d20;
  --line: #3a3b40;
  --muted: #a7a7ad;
  --blue: #5aa7ff;
  --green: #50d86f;
  --red: #ff6961;
  --yellow: #ffe36e;
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "YuGothic", "Noto Sans JP", sans-serif;
  letter-spacing: 0;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(100%, 920px);
  margin: 0 auto;
  padding-bottom: 92px;
}

.hero-panel {
  position: relative;
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 18px 10px;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
}

.hero-panel::before {
  position: absolute;
  right: -42px;
  top: 76px;
  z-index: 0;
  color: rgba(29, 29, 31, 0.035);
  content: "自由\A 成長\A 行動";
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  font-size: 4.6rem;
  font-weight: 900;
  line-height: 0.86;
  white-space: pre;
  transform: rotate(-8deg) skew(-8deg);
  pointer-events: none;
}

.hero-panel > * {
  position: relative;
  z-index: 1;
}

.topline,
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.section-head > div {
  min-width: 0;
  flex: 1;
}

.topline {
  justify-content: flex-end;
  font-size: 0.82rem;
  color: var(--muted);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-right: auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1;
}

.live-pill,
.chapter,
.sync-label {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  white-space: nowrap;
}

.live-pill {
  color: var(--blue);
  background: rgba(0, 113, 227, 0.08);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 1.55rem;
  line-height: 1;
  font-weight: 900;
}

.hero-copy {
  margin-top: 10px;
  padding-top: 0;
  text-align: left;
}

.lead {
  width: min(100%, 370px);
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}

.theme-words {
  height: clamp(72px, 19vw, 98px);
  margin: 8px -8px 0;
  overflow: hidden;
  border-radius: 8px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.theme-words > span {
  display: none;
}

.theme-words img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform: scale(1.18);
  transform-origin: center;
}

body.dark-mode .theme-words img {
  filter: invert(1) brightness(1.18);
}

body.dark-mode .hero-panel::before,
body.dark-mode .focus-band::before {
  color: rgba(255, 255, 255, 0.045);
}

body.dark-mode .mission-card {
  background:
    linear-gradient(135deg, rgba(90, 167, 255, 0.14), rgba(28, 29, 32, 0) 48%),
    var(--white);
}

body.dark-mode .deadline-alert {
  background: linear-gradient(135deg, rgba(255, 105, 97, 0.13), rgba(255, 227, 110, 0.08));
}

body.dark-mode .goal-item,
body.dark-mode .barometer-grid article,
body.dark-mode .bucket-form {
  background: var(--white);
}

body.dark-mode .mail-band,
body.dark-mode .habit-band {
  background: var(--paper);
}

body.dark-mode .flow-rule,
body.dark-mode .mail-rule,
body.dark-mode .deadline-item,
body.dark-mode .bucket-bulk-form {
  background: var(--white);
}

body.dark-mode .bucket-form input,
body.dark-mode .bucket-form select,
body.dark-mode .bucket-form textarea,
body.dark-mode .reply-card,
body.dark-mode .session-card {
  background: var(--white);
}

body.dark-mode .bottom-nav {
  background: rgba(28, 29, 32, 0.94);
}

body.dark-mode .bottom-nav a {
  color: var(--ink);
}

body.dark-mode .bottom-nav a:nth-child(1) {
  color: var(--blue);
}

body.dark-mode .bottom-nav a:nth-child(2) {
  color: var(--green);
}

body.dark-mode .bottom-nav a:nth-child(4) {
  color: var(--red);
}

.theme-triad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.theme-triad article {
  min-height: 46px;
  padding: 7px 9px;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 24px rgba(29, 29, 31, 0.06);
}

.theme-triad span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.theme-triad strong {
  display: block;
  margin-top: 3px;
  font-size: 1.2rem;
  line-height: 1;
}

.theme-triad article:nth-child(1) strong {
  color: var(--blue);
}

.theme-triad article:nth-child(2) strong {
  color: var(--green);
}

.theme-triad article:nth-child(3) strong {
  color: var(--red);
}

.level-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: end;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.scope-strip {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.scope-strip article {
  min-height: 50px;
  padding: 8px;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 20px rgba(29, 29, 31, 0.05);
}

.scope-strip span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
}

.scope-strip strong {
  display: block;
  margin-top: 5px;
  font-size: 0.76rem;
  line-height: 1.25;
}

.level-strip strong {
  display: block;
  margin-top: 4px;
  font-size: 0.92rem;
}

.meter {
  grid-column: 1;
  grid-row: 2;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8e8ed;
}

#month-percent {
  grid-column: 2;
  grid-row: 2;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1;
}

.meter span {
  display: block;
  width: 64%;
  height: 100%;
  background: var(--blue);
  transition: width 220ms ease;
}

.mini-label {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.focus-band,
.mail-band,
.timeline-band,
.future-band,
.habit-band,
.self-band {
  padding: 20px 18px;
  border-bottom: 1px solid var(--line);
}

.focus-band {
  position: relative;
  background: var(--white);
  overflow: hidden;
}

.focus-band::before {
  position: absolute;
  right: -18px;
  top: 8px;
  z-index: 0;
  color: rgba(0, 113, 227, 0.055);
  content: "今日";
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  font-size: 7rem;
  font-weight: 900;
  line-height: 1;
  transform: rotate(-9deg) skew(-10deg);
  pointer-events: none;
}

.focus-band > * {
  position: relative;
  z-index: 1;
}

.timeline-band {
  background: var(--paper);
}

.flow-rule {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.flow-rule span {
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 900;
}

.flow-rule p {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  font-weight: 800;
}

.mail-band {
  background: #fbfbfd;
}

.future-band {
  background: var(--ink);
  color: var(--white);
}

.habit-band {
  background: #fbfbfd;
}

.self-band {
  background: var(--paper);
  padding-bottom: 96px;
}

h2 {
  margin-top: 3px;
  font-size: 1.52rem;
  line-height: 1;
  font-weight: 900;
}

.support-panel {
  display: block;
}

.support-panel summary {
  list-style: none;
  cursor: pointer;
  width: 100%;
}

.support-panel summary::-webkit-details-marker {
  display: none;
}

.support-panel summary::after {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "+";
  font-size: 1rem;
  font-weight: 900;
}

.support-panel[open] summary::after {
  content: "−";
}

.support-panel .chapter,
.support-panel .sync-label {
  display: none;
}

.support-panel:not([open]) {
  padding-block: 16px;
}

.self-band:not([open]) {
  padding-bottom: 16px;
}

.self-band:not([open]) .section-head,
.mail-band:not([open]) .section-head,
.future-band:not([open]) .section-head {
  align-items: center;
}

.future-band .mini-label,
.future-band .chapter {
  color: rgba(255, 255, 255, 0.72);
}

.icon-button {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 1.25rem;
}

.mission-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 113, 227, 0.08), rgba(255, 255, 255, 0) 48%),
    #f5f5f7;
  box-shadow: var(--shadow);
}

.mission-card h3 {
  margin-top: 4px;
  font-size: 1.05rem;
  line-height: 1.18;
}

.mission-card p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.complete-button {
  min-width: 64px;
  min-height: 54px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-weight: 900;
}

.complete-button:disabled {
  background: var(--line);
  color: var(--muted);
  cursor: default;
}

.work-focus-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  margin-top: 10px;
  padding: 9px 12px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  text-align: left;
}

.work-focus-button span {
  display: grid;
  gap: 2px;
}

.work-focus-button small {
  color: var(--lime);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.work-focus-button strong {
  font-size: 1rem;
}

.work-focus-button b {
  display: grid;
  place-items: center;
  min-width: 42px;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: 0.76rem;
  white-space: nowrap;
}

.deadline-alert {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 59, 48, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 59, 48, 0.08), rgba(255, 214, 10, 0.08));
}

.deadline-alert[hidden] {
  display: none;
}

.deadline-alert-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.deadline-alert-head strong {
  font-size: 0.88rem;
}

.deadline-alert-list {
  display: grid;
  gap: 7px;
}

.deadline-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 9px 10px;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  text-align: left;
}

.deadline-item b {
  display: block;
  font-size: 0.86rem;
  line-height: 1.3;
}

.deadline-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.deadline-item strong {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.74rem;
  white-space: nowrap;
}

.deadline-item.urgent strong,
.deadline-item.overdue strong {
  background: rgba(255, 59, 48, 0.1);
  color: var(--red);
}

.quick-capture {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 8px;
  background: rgba(245, 245, 247, 0.72);
}

.quick-capture label {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.quick-capture div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.quick-capture input {
  min-width: 0;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  font-weight: 800;
}

.quick-capture button {
  min-height: 40px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  font-weight: 900;
}

.daily-routine {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.daily-routine-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.daily-routine-head h3 {
  font-size: 1rem;
}

.task-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.task-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 56px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  text-align: left;
}

.task-main {
  display: grid;
  gap: 6px;
}

.task-main b {
  font-size: 0.98rem;
  line-height: 1.25;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.task-meta i {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
}

.task-meta i:nth-child(1) {
  color: var(--red);
}

.task-meta i:nth-child(2) {
  color: var(--green);
}

.reminder-inbox {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 8px;
  background: var(--white);
}

.reminder-inbox[open] {
  box-shadow: 0 16px 34px rgba(29, 29, 31, 0.08);
}

.reminder-inbox-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  list-style: none;
  cursor: pointer;
}

.reminder-inbox-head::-webkit-details-marker {
  display: none;
}

.reminder-inbox-head h3 {
  margin-top: 3px;
  font-size: 1rem;
}

.reminder-inbox-head small {
  color: var(--muted);
  font-weight: 900;
  white-space: nowrap;
}

.reminder-inbox-note {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.45;
}

.reminder-inbox-list {
  display: grid;
  gap: 8px;
}

.reminder-section {
  overflow: hidden;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 8px;
  background: rgba(245, 245, 247, 0.72);
}

.reminder-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 0 10px;
  list-style: none;
  cursor: pointer;
}

.reminder-section > summary::-webkit-details-marker {
  display: none;
}

.reminder-section > summary strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}

.reminder-section > summary span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  white-space: nowrap;
}

.reminder-section-list {
  padding: 0 10px 6px;
  background: var(--white);
}

.reminder-candidate {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-top: 1px solid rgba(29, 29, 31, 0.08);
}

.reminder-candidate:first-child {
  border-top: 0;
}

.reminder-candidate b {
  font-size: 0.92rem;
  line-height: 1.3;
}

.reminder-candidate small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
}

.reminder-candidate button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
}

.reminder-candidate button[data-promote-reminder] {
  border-color: var(--blue);
  background: rgba(0, 113, 227, 0.08);
  color: var(--blue);
}

.task-schedule-editor {
  grid-column: 1 / -1;
}

.task-schedule-editor summary {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
}

.task-schedule-editor div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
  padding: 9px;
  border-radius: 8px;
  background: var(--paper);
}

.task-schedule-editor label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
}

.task-schedule-editor input,
.task-schedule-editor select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
}

.reminder-empty {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.check-dot {
  position: relative;
  width: 26px;
  height: 26px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.check-dot::before,
.check-dot::after {
  position: absolute;
  inset: 50%;
  display: block;
  opacity: 0;
  pointer-events: none;
  content: "";
}

.check-dot::before {
  width: 46px;
  height: 46px;
  transform: translate(-50%, -50%) scale(0.6);
  border: 2px solid var(--blue);
  border-radius: 50%;
}

.check-dot::after {
  width: 9px;
  height: 15px;
  transform: translate(-50%, -58%) rotate(42deg) scale(0.8);
  border-right: 3px solid var(--white);
  border-bottom: 3px solid var(--white);
}

.task-row.done,
.habit-tile.done,
.complete-button.done {
  background: var(--blue);
  color: var(--white);
}

.task-row.done .check-dot {
  background: var(--green);
  border-color: var(--green);
  transform: scale(1.05);
}

.task-row.done .check-dot::after {
  opacity: 1;
}

.task-row.life-burst {
  animation: task-lift 520ms ease;
}

.task-row.life-burst .check-dot::before {
  animation: future-ring 620ms ease;
}

.task-row.life-burst .check-dot::after {
  animation: future-check 520ms ease;
}

.task-row.life-burst strong {
  animation: xp-rise 720ms ease;
}

.timeline {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.schedule-form {
  display: grid;
  grid-template-columns: 86px 1fr 78px;
  gap: 8px;
  margin-top: 14px;
}

.schedule-form input,
.schedule-form select,
.schedule-form button {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 900;
}

.schedule-form input,
.schedule-form select {
  width: 100%;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--white);
}

.calendar-direct-toggle {
  grid-column: 1 / 3;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.calendar-direct-toggle input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--blue);
}

.schedule-form button {
  padding: 0 10px;
  border: 0;
  background: var(--ink);
  color: var(--white);
}

.timeline article,
.timeline-session {
  display: grid;
  grid-template-columns: 28px 68px 1fr auto;
  gap: 14px;
  width: 100%;
  padding: 12px 0;
  border: 0;
  border-top: 1px solid rgba(16, 16, 16, 0.22);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.timeline article.dragging,
.timeline-session.dragging {
  opacity: 0.45;
}

.drag-handle {
  display: grid;
  place-items: center;
  width: 28px;
  color: var(--muted);
  font-weight: 900;
  touch-action: none;
}

.schedule-actions {
  display: flex;
  gap: 4px;
}

.schedule-actions button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  font-weight: 900;
}

.schedule-actions button[data-calendar-schedule] {
  width: auto;
  min-width: 62px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--blue);
}

.timeline time,
.timeline-session time {
  font-size: 1.1rem;
  font-weight: 900;
}

.timeline h3,
.timeline-session h3 {
  font-size: 1.05rem;
}

.timeline p,
.timeline-session p {
  margin-top: 4px;
  color: var(--muted);
}

.timeline-session.done h3,
.timeline-session.done time {
  color: var(--blue);
}

.mail-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.mail-rule {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.45;
}

.mail-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.mail-card h3 {
  font-size: 1.05rem;
}

.mail-card p {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.mail-card button {
  min-width: 62px;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-weight: 900;
}

.mail-card.replied {
  opacity: 0.58;
}

.mail-card.replied button {
  background: var(--green);
}

.goal-stack {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.goal-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.34);
}

.goal-item span {
  color: rgba(255, 255, 255, 0.68);
  font-weight: 900;
}

.goal-item p {
  font-size: 1.1rem;
  line-height: 1.45;
}

.goal-item.active p {
  color: var(--lime);
}

.habit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.habit-tile {
  min-height: 94px;
  padding: 12px;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 10px 24px rgba(29, 29, 31, 0.05);
}

.habit-tile span {
  display: block;
  font-size: 1.18rem;
  font-weight: 900;
}

.habit-tile strong {
  display: block;
  margin-top: 10px;
  font-size: 0.92rem;
  line-height: 1.35;
}

.habit-tile small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.habit-tile.done small {
  color: rgba(255, 255, 255, 0.72);
}

.movement-card {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.movement-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.movement-head h3 {
  margin-top: 4px;
  font-size: 1.25rem;
}

.movement-card p {
  color: var(--muted);
  line-height: 1.45;
  font-weight: 800;
}

.movement-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.movement-actions button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 900;
}

.movement-actions button:first-child {
  background: var(--ink);
  color: var(--white);
}

.movement-card small {
  color: var(--muted);
  font-weight: 900;
}

.quit-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  align-items: end;
  padding: 14px;
  background: rgba(29, 29, 31, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.quit-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.quit-card {
  display: grid;
  gap: 12px;
  width: min(100%, 520px);
  max-height: calc(100svh - 28px);
  overflow: auto;
  margin: 0 auto;
  padding: 14px;
  border-radius: 18px;
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 30px 80px rgba(29, 29, 31, 0.26);
}

.quit-card .mini-label,
.quit-card label {
  color: rgba(255, 255, 255, 0.62);
}

.quit-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.quit-card h2 {
  margin-top: 4px;
  font-size: 1.35rem;
}

.quit-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quit-card-head strong {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
}

.quit-card .session-close {
  border-color: rgba(255, 255, 255, 0.32);
  color: var(--white);
}

.quit-card label {
  font-size: 0.78rem;
  font-weight: 900;
}

.quit-card input {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.non-smoking-button {
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 900;
}

.quit-settings-panel {
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.quit-settings-panel summary {
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font-weight: 900;
}

.quit-settings-panel[open] summary {
  margin-bottom: 10px;
}

.quit-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quit-settings label {
  margin-top: 0;
}

.quit-settings input {
  width: 100%;
}

.quit-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.quit-stats article {
  min-height: 78px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.quit-stats span {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  font-weight: 900;
}

.quit-stats strong {
  display: block;
  margin-top: 8px;
  font-size: 1.12rem;
  line-height: 1.08;
}

.quit-milestone {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.quit-budget {
  padding: 12px;
  border-radius: 8px;
  background: rgba(215, 255, 79, 0.14);
}

.quit-budget p {
  margin-top: 6px;
  line-height: 1.45;
  font-weight: 900;
}

.quit-milestone p {
  margin-top: 6px;
  line-height: 1.45;
  font-weight: 900;
}

.quit-milestone .mini-meter {
  background: rgba(255, 255, 255, 0.18);
}

.quit-milestone .mini-meter i {
  background: var(--lime);
}

.reflection-box {
  margin-top: 18px;
}

.reflection-box label,
.growth-lab label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 116px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  line-height: 1.5;
}

.growth-lab {
  display: grid;
  gap: 14px;
  margin-top: 22px;
  padding: 16px;
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.growth-lab-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.growth-lab h3 {
  margin-top: 3px;
  font-size: 1.65rem;
  line-height: 1.08;
}

.growth-score {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font-size: 1.45rem;
  font-weight: 900;
}

.barometer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.barometer-grid article {
  padding: 12px;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 8px;
  background: #fbfbfd;
}

.barometer-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.barometer-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 1.8rem;
  line-height: 1;
}

.mini-meter {
  height: 6px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8e8ed;
}

.mini-meter i {
  display: block;
  width: 50%;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 180ms ease;
}

.barometer-grid article:nth-child(2) .mini-meter i {
  background: var(--green);
}

.barometer-grid article:nth-child(3) .mini-meter i {
  background: var(--red);
}

.barometer-grid article:nth-child(4) .mini-meter i {
  background: var(--yellow);
}

.growth-insight,
.next-growth-step {
  padding: 14px;
  border-radius: 8px;
  background: var(--paper);
}

.growth-insight p,
.next-growth-step p {
  margin-top: 6px;
  line-height: 1.5;
  font-weight: 800;
}

.growth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.bucket-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.bucket-group {
  overflow: hidden;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 8px;
  background: var(--white);
}

.bucket-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 0 12px;
  list-style: none;
  cursor: pointer;
}

.bucket-group > summary::-webkit-details-marker {
  display: none;
}

.bucket-group > summary strong {
  font-size: 0.96rem;
}

.bucket-group > summary span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.bucket-group-list {
  display: grid;
  gap: 8px;
  padding: 0 8px 8px;
  background: var(--paper);
}

.bucket-group-list article {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid rgba(29, 29, 31, 0.08);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 24px rgba(29, 29, 31, 0.05);
}

.bucket-age {
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 900;
}

.bucket-list p {
  line-height: 1.45;
}

.bucket-planner {
  margin-top: 22px;
}

.bucket-nudge {
  padding: 16px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
}

.bucket-nudge .mini-label {
  color: rgba(255, 255, 255, 0.64);
}

.bucket-nudge p {
  margin-top: 8px;
  font-size: 1.28rem;
  font-weight: 900;
  line-height: 1.35;
}

.bucket-nudge-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.bucket-nudge-actions button {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-weight: 900;
}

.bucket-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 16px;
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.bucket-form h3 {
  font-size: 1.25rem;
}

.bucket-form label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.bucket-form input,
.bucket-form select,
.bucket-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfd;
  color: var(--ink);
}

.bucket-form textarea {
  min-height: 96px;
  padding-top: 10px;
  resize: vertical;
  line-height: 1.45;
  font-weight: 800;
}

.bucket-bulk-form {
  background: rgba(255, 255, 255, 0.82);
  box-shadow: none;
  border: 1px dashed rgba(29, 29, 31, 0.18);
}

.bucket-card-head,
.bucket-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bucket-card-title {
  font-size: 1.05rem;
  font-weight: 900;
}

.bucket-meta {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.bucket-meta label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.bucket-meta select,
.bucket-meta input {
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.bucket-card-actions button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-weight: 900;
}

.bucket-card-actions button.done {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

.bucket-action-editor summary {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  cursor: pointer;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 6px;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(calc(100% - 52px), 380px);
  min-height: 36px;
  overflow: hidden;
  transform: translateX(-50%);
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.bottom-nav a {
  display: grid;
  place-items: center;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 900;
}

.bottom-nav a:nth-child(1) {
  color: var(--blue);
}

.bottom-nav a:nth-child(2) {
  color: var(--green);
}

.bottom-nav a:nth-child(4) {
  color: var(--red);
}

.bottom-nav a + a {
  border-left: 1px solid var(--line);
}

.life-toast {
  position: fixed;
  left: 50%;
  bottom: 58px;
  z-index: 20;
  min-width: min(calc(100% - 44px), 360px);
  padding: 12px 16px;
  transform: translate(-50%, 12px);
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  font-weight: 900;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.life-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes task-lift {
  0% {
    transform: translateY(0);
  }
  42% {
    transform: translateY(-4px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes future-ring {
  0% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(0.55);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.6);
  }
}

@keyframes future-check {
  0% {
    opacity: 0;
    transform: translate(-50%, -58%) rotate(42deg) scale(0.3);
  }
  45% {
    opacity: 1;
    transform: translate(-50%, -58%) rotate(42deg) scale(1.12);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -58%) rotate(42deg) scale(1);
  }
}

@keyframes xp-rise {
  0% {
    color: var(--ink);
    transform: translateY(0) scale(1);
  }
  45% {
    color: var(--lime);
    transform: translateY(-8px) scale(1.18);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

.session-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  align-items: end;
  padding: 14px;
  background: rgba(29, 29, 31, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.reply-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  align-items: end;
  padding: 14px;
  background: rgba(29, 29, 31, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.reply-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.reply-card {
  width: min(100%, 520px);
  max-height: calc(100svh - 28px);
  overflow: auto;
  margin: 0 auto;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 30px 80px rgba(29, 29, 31, 0.26);
  backdrop-filter: blur(20px);
}

.reply-card h2 {
  margin-top: 8px;
}

.tone-group {
  margin-bottom: 12px;
}

.reply-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.session-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.session-card {
  width: min(100%, 520px);
  max-height: calc(100svh - 28px);
  overflow: auto;
  margin: 0 auto;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 30px 80px rgba(29, 29, 31, 0.26);
  backdrop-filter: blur(20px);
}

.session-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.session-close {
  border-color: var(--line);
  font-size: 1rem;
}

.session-card h2 {
  margin-top: 8px;
}

.session-subtitle {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.timer-face {
  display: grid;
  place-items: center;
  min-height: 154px;
  margin-top: 18px;
  border-radius: 18px;
  background: var(--ink);
  color: var(--white);
}

.timer-face span {
  font-size: 4.15rem;
  font-weight: 900;
  line-height: 1;
}

.control-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.control-group + .control-group {
  grid-template-columns: repeat(2, 1fr);
}

.option-button,
.primary-action,
.secondary-action {
  min-height: 46px;
  border-radius: 999px;
  font-weight: 900;
}

.option-button {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}

.option-button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

.session-actions {
  display: grid;
  grid-template-columns: 1fr 0.8fr 0.8fr;
  gap: 8px;
  margin-top: 14px;
}

.primary-action {
  border: 0;
  background: var(--blue);
  color: var(--white);
}

.secondary-action {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}

.sound-frame {
  min-height: 0;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--ink);
}

.youtube-sound-note {
  padding: 9px 12px;
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.4;
}

.youtube-open-button {
  width: 100%;
  min-height: 44px;
  margin-top: 12px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-weight: 900;
}

.youtube-open-button:hover {
  background: var(--paper);
}

.youtube-open-button:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.24);
  outline-offset: 2px;
}

.youtube-open-button::before {
  margin-right: 6px;
  color: var(--red);
  content: "▶";
}

@media (min-width: 760px) {
  body {
    padding: 28px;
  }

  .app-shell {
    box-shadow: var(--shadow);
  }

  .hero-panel,
  .focus-band,
  .timeline-band,
  .future-band,
  .habit-band,
  .self-band {
    padding-inline: 34px;
  }

  .focus-band {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 28px;
    align-items: start;
  }

  .focus-band .section-head {
    grid-column: 1 / -1;
  }

  .mission-card {
    margin-top: 0;
  }

  .task-list {
    margin-top: 0;
  }

  .habit-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  h1 {
    font-size: 2.8rem;
  }

  h2 {
    font-size: 2.8rem;
  }

  .session-modal {
    align-items: center;
  }

  .reply-modal {
    align-items: center;
  }

  .quit-modal {
    align-items: center;
  }
}
