:root {
  color-scheme: light;
  --ink: #26312d;
  --muted: #68746d;
  --soft-ink: #47544d;
  --paper: #fffefa;
  --canvas: #f4f3ed;
  --sage: #e5ebe2;
  --sage-dark: #496554;
  --line: #dfe3db;
  --rose: #a76e72;
  --shadow: 0 14px 40px rgba(48, 62, 51, .07);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: radial-gradient(ellipse at 15% 0%, rgba(231, 235, 222, .72), transparent 37rem), var(--canvas);
  font-size: 15px;
  line-height: 1.7;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid #799681;
  outline-offset: 3px;
}
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.topbar {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  height: 72px;
  padding: 0 28px;
  margin: 0 auto;
  background: rgba(244, 243, 237, .88);
  backdrop-filter: blur(16px);
}
.brand, .nav-button, .text-button, .back-link, .icon-button { border: 0; background: transparent; cursor: pointer; }
.brand { display: inline-flex; align-items: center; gap: 11px; padding: 7px 0; font-size: 14px; font-weight: 750; letter-spacing: .02em; }
.brand-mark { display: grid; width: 35px; height: 35px; place-items: center; overflow: hidden; border-radius: 13px; background: #e2e9de; }
.brand-mark img { width: 29px; height: 29px; }
.topnav { display: flex; align-items: center; gap: 8px; }
.nav-button { min-height: 42px; padding: 8px 15px; border-radius: 999px; color: var(--soft-ink); font-size: 13px; }
.nav-button:hover { background: rgba(224, 230, 220, .72); }

#appMain { max-width: 920px; min-height: calc(100vh - 72px); padding: 14px 28px 96px; margin: 0 auto; }
.screen { animation: appear .28s ease both; }
@keyframes appear { from { opacity: .4; } to { opacity: 1; } }
#experienceScreen { padding-bottom: 112px; }
.hero { padding: 22px 4px 15px; }
.eyebrow { margin: 0 0 8px; color: var(--sage-dark); font-size: 11px; font-weight: 750; letter-spacing: .11em; }
h1, h2, p { overflow-wrap: anywhere; }
.hero h1 { margin: 0; font-size: clamp(27px, 4vw, 34px); font-weight: 650; letter-spacing: -.045em; line-height: 1.3; }
.hero-copy { margin: 15px 0 0; color: var(--muted); font-size: 14px; }
.proposal-card { position: relative; padding: 15px 18px 9px; border: 1px solid #e7e5da; border-radius: 18px; background: rgba(255, 254, 250, .76); box-shadow: 0 8px 24px rgba(59, 67, 54, .035); }
.proposal-mark { color: #8a7968; font-size: 10px; font-weight: 740; letter-spacing: .09em; }
.proposal-card blockquote { margin: 5px 0 7px; color: #39453e; font-size: 13px; line-height: 1.65; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.text-button { min-height: 40px; padding: 6px 8px; color: var(--sage-dark); font-size: 12px; font-weight: 650; text-align: left; }
.text-button:hover, .back-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.proposal-form textarea { width: 100%; min-height: 80px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 13px; resize: vertical; background: var(--paper); }
.proposal-form .button-row { margin-top: 9px; }

.next-suggestion { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; margin-top: 12px; border: 1px solid #e4e8df; border-radius: 16px; background: rgba(236, 240, 232, .76); }
.next-copy p:last-child { margin: 0; color: var(--soft-ink); font-size: 13px; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 10px 17px; border: 1px solid transparent; border-radius: 13px; cursor: pointer; font-size: 13px; font-weight: 700; text-decoration: none; transition: background .15s ease, transform .15s ease; }
.button:hover { transform: translateY(-1px); }
.button-dark { color: #fffefa; background: #465c4d; }
.button-dark:hover { background: #374d3f; }
.button-soft { color: #3c5948; background: #e7ede4; }
.button-soft:hover { background: #dce6da; }
.button-outline { border-color: #d8ded5; color: #435c4b; background: rgba(255, 254, 250, .64); }
.button-outline:hover { background: #fffefa; }
.button-danger-outline { border-color: #dfcbc6; color: #8d4e49; background: #fffefa; }
.icon-button { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; color: var(--muted); font-size: 24px; }
.icon-button:hover { background: rgba(40, 55, 45, .07); }

.choice-section { margin-top: 18px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin: 0 2px 15px; }
.section-heading .eyebrow { margin-bottom: 2px; }
.section-heading h2, .saved-logs-section h2 { margin: 0; font-size: 21px; font-weight: 650; letter-spacing: -.035em; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice-card { display: flex; min-height: 105px; flex-direction: column; align-items: flex-start; padding: 13px 15px; border: 1px solid #e2e5dd; border-radius: 17px; background: rgba(255, 254, 250, .77); cursor: pointer; text-align: left; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.choice-card:hover { transform: translateY(-2px); border-color: #c8d3c7; box-shadow: var(--shadow); }
.choice-symbol { display: grid; width: 27px; height: 27px; place-items: center; margin-bottom: 6px; border-radius: 9px; color: #536d5b; background: #e9eee6; font-size: 15px; }
.choice-title { font-size: 13px; font-weight: 720; line-height: 1.4; }
.choice-detail { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.choice-card-rest { background: rgba(255, 254, 250, .77); }
.choice-card-rest .choice-symbol { color: #536d5b; background: #e9eee6; }
.quiet-note { margin: 17px 3px 0; color: var(--muted); font-size: 12px; }
.reminder-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; margin: 0 0 14px; border: 1px solid #dfddd1; border-radius: 17px; background: #fbfaf4; }
.reminder-copy { margin: 0; color: var(--soft-ink); font-size: 13px; }
.storage-notice { padding: 10px 14px; border: 1px solid #dec4bc; border-radius: 12px; color: #804b41; background: #fbefeb; font-size: 12px; }

.page-heading { padding: 18px 4px 14px; }
.back-link { display: inline-block; min-height: 36px; padding: 5px 7px 5px 0; margin-bottom: 8px; color: var(--sage-dark); font-size: 12px; font-weight: 680; }
.page-heading .eyebrow { margin-bottom: 6px; }
.page-heading h1 { margin: 0; font-size: clamp(26px, 4vw, 32px); font-weight: 650; letter-spacing: -.045em; line-height: 1.3; }
.page-heading > p:not(.eyebrow) { max-width: 660px; margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.category-list, .stack-list, .disgust-options { display: grid; gap: 11px; }
.category-card, .list-card { padding: 16px 18px; border: 1px solid #e1e5dc; border-radius: 17px; background: rgba(255, 254, 250, .82); }
.category-top, .list-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 13px; }
.category-name, .list-card-title { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.45; }
.category-hint, .list-card-description { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.category-tag { flex: 0 0 auto; padding: 4px 9px; border-radius: 999px; color: #5a6c5d; background: #edf0e9; font-size: 10px; }
.category-button { display: grid; width: 100%; grid-template-columns: 38px minmax(0, 1fr) 20px; align-items: center; gap: 11px; color: var(--ink); cursor: pointer; text-align: left; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.category-button:hover { transform: translateY(-1px); border-color: #bdcbbd; box-shadow: var(--shadow); }
.category-symbol { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 12px; color: #526b58; background: #e9eee6; font-size: 17px; font-weight: 700; }
.category-copy { min-width: 0; }
.category-arrow { color: #6a806d; font-size: 18px; text-align: right; }
.more-button { margin-top: 9px; }
.inline-option { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding-top: 17px; margin-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.saved-logs-section { margin-top: 27px; }
.saved-logs-section h2 { margin-bottom: 12px; font-size: 17px; }
.saved-item-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.saved-item-actions .button { min-height: 40px; }
.small-delete { padding: 5px 7px; border: 0; color: #8a625d; background: transparent; cursor: pointer; font-size: 11px; }
.add-from-saved { margin-top: 18px; }
.empty-state { padding: 22px; border: 1px dashed #d7ddd3; border-radius: 18px; color: var(--muted); background: rgba(255,254,250,.45); font-size: 13px; }

.form-card, .experience-card, .detail-card, .settings-card { padding: 21px; border: 1px solid #e1e5dc; border-radius: 20px; background: rgba(255, 254, 250, .83); }
.form-card { display: grid; gap: 9px; }
.field-label { display: block; margin: 11px 0 0; color: var(--soft-ink); font-size: 12px; font-weight: 700; }
.field-label span { margin-left: 5px; color: #8a938b; font-size: 10px; font-weight: 500; }
input[type="text"], input[type="url"], select, textarea { width: 100%; min-height: 46px; padding: 9px 12px; border: 1px solid #dce1d9; border-radius: 12px; color: var(--ink); background: #fffefa; }
select { cursor: pointer; }
.field-help { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 13px; margin-top: 12px; }
.form-actions > .text-button { min-height: 44px; }
.experience-prompt { max-width: 650px; }
.experience-meta { margin: 0 0 15px; color: var(--muted); font-size: 11px; }
.external-link { display: inline-flex; min-height: 44px; align-items: center; margin: 0 0 16px; color: #496b55; font-size: 13px; font-weight: 680; text-underline-offset: 4px; }
.timer-box { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px; border: 1px solid #e5e7df; border-radius: 16px; background: #f8f8f2; }
.timer-box .field-label { margin: 0; }
.timer-status { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.timer-controls { display: flex; align-items: center; gap: 8px; }
.timer-controls select { width: auto; min-width: 83px; }
.timer-display { margin: 15px 0 0; color: #435d4a; font-size: 30px; font-variant-numeric: tabular-nums; font-weight: 650; text-align: center; }
.save-experience { margin-top: 10px; }
.experience-sticky { position: fixed; z-index: 4; right: 0; bottom: 0; left: 0; display: flex; min-height: 92px; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 10px max(22px, env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(213, 218, 208, .8); background: rgba(244, 243, 237, .93); backdrop-filter: blur(16px); }
.stop-button { width: min(100%, 480px); }
.experience-sticky .text-button { min-height: 34px; }
.reaction-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.reaction-card { display: flex; min-height: 70px; align-items: center; gap: 10px; padding: 13px; border: 1px solid #e0e4dc; border-radius: 16px; background: #fffefa; cursor: pointer; font-size: 13px; font-weight: 650; text-align: left; }
.reaction-card:hover { border-color: #bfcbbd; background: #fcfcf7; }
.reaction-card:last-child { grid-column: 1 / -1; }
.reaction-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: #9ba59d; }
.dot-blue { background: #8297a5; }.dot-rose { background: #b07d80; }.dot-amber { background: #b39669; }.dot-sage { background: #7c927c; }.dot-muted { background: #a8aca5; }
.reflect-activity-title { margin: 0 0 14px; color: var(--muted); font-size: 12px; }
.close-reflect { margin-top: 13px; }
.disgust-option { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 17px; border: 1px solid #e2e3dc; border-radius: 15px; background: #fffefa; cursor: pointer; font-size: 13px; font-weight: 650; text-align: left; }
.disgust-option:hover { border-color: #d2d8cc; background: #fbfaf5; }
.option-quiet { color: var(--muted); font-weight: 550; }
.detail-card .reflect-activity-title { margin-bottom: 17px; }
.emotion-choices { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.emotion-chip { min-height: 39px; padding: 7px 13px; border: 1px solid #dfe4db; border-radius: 999px; color: #516357; background: #fbfcf8; cursor: pointer; font-size: 12px; }
.emotion-chip[aria-pressed="true"] { border-color: #98ac98; color: #354e3d; background: #e8eee5; }
.detail-card .field-label { margin-top: 13px; }

.history-card { padding: 17px 19px; border: 1px solid #e1e5dc; border-radius: 18px; background: rgba(255, 254, 250, .84); }
.history-card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 3px 12px; }
.history-card-title { margin: 0; font-size: 14px; font-weight: 700; }
.history-date { color: var(--muted); font-size: 10px; }
.history-response { display: inline-block; margin-top: 9px; padding: 3px 9px; border-radius: 999px; color: #516456; background: #edf0e9; font-size: 10px; }
.history-emotions { margin: 8px 0 0; color: #765e61; font-size: 11px; }
.history-note { margin: 6px 0 0; color: var(--soft-ink); font-size: 12px; }
.history-card .text-button { margin-top: 5px; }
.settings-card { margin-bottom: 12px; }
.settings-card h2 { margin: 0; font-size: 16px; font-weight: 700; }
.settings-card > p { margin: 6px 0 12px; color: var(--muted); font-size: 12px; }
.toggle-row { display: flex; min-height: 46px; align-items: center; justify-content: space-between; gap: 14px; margin: 10px 0; font-size: 13px; font-weight: 650; }
.toggle-row input { width: 21px; height: 21px; accent-color: #526b58; }
.settings-card > select { max-width: 240px; }
.settings-actions { gap: 8px; }
.settings-actions .button { margin: 0; }
.excluded-list { display: flex; flex-wrap: wrap; gap: 7px; }
.excluded-chip { display: inline-flex; min-height: 38px; align-items: center; gap: 8px; padding: 5px 9px 5px 12px; border: 1px solid #e4e5dd; border-radius: 999px; color: var(--soft-ink); background: #fffefa; font-size: 11px; }
.excluded-chip button { min-width: 28px; min-height: 28px; border: 0; border-radius: 50%; color: #496b55; background: #edf0e9; cursor: pointer; }
.privacy-note { margin: 22px 4px 0; color: var(--muted); font-size: 11px; }
.toast { position: fixed; z-index: 8; right: 18px; bottom: calc(104px + env(safe-area-inset-bottom)); left: 18px; width: fit-content; max-width: min(540px, calc(100vw - 36px)); padding: 11px 16px; margin: 0 auto; border: 1px solid #d9e0d7; border-radius: 13px; color: #3d5545; background: #fffefa; box-shadow: var(--shadow); font-size: 12px; }

@media (min-width: 760px) {
  #appMain { padding-top: 20px; }
  .hero { padding-top: 22px; }
  .experience-card, .form-card, .detail-card, .settings-card { padding: 25px; }
  .category-card, .list-card { padding: 22px 24px; }
}
@media (max-width: 600px) {
  .topbar { height: 62px; padding: 0 17px; }
  .brand { gap: 8px; font-size: 12px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-mark img { width: 26px; height: 26px; }
  .topnav { gap: 0; }
  .nav-button { min-width: 48px; padding: 7px 9px; font-size: 12px; }
  #appMain { min-height: calc(100vh - 62px); padding: 9px 17px 78px; }
  .hero { padding: 20px 2px 13px; }
  .hero h1 { font-size: 27px; }
  .desktop-break { display: none; }
  .proposal-card { padding: 14px 14px 8px; }
  .proposal-card blockquote { font-size: 12px; }
  .proposal-card .button-row { gap: 1px 8px; }
  .text-button { font-size: 11px; }
  .next-suggestion { align-items: flex-start; flex-direction: column; padding: 16px; }
  .choice-section { margin-top: 15px; }
  .choice-grid { gap: 8px; }
  .choice-card { min-height: 96px; padding: 11px 12px; border-radius: 15px; }
  .choice-title { font-size: 12px; }
  .choice-detail { font-size: 9px; }
  .choice-symbol { width: 26px; height: 26px; }
  .page-heading { padding: 15px 2px 12px; }
  .page-heading h1 { font-size: 26px; }
  .page-heading > p:not(.eyebrow) { font-size: 12px; }
  .category-card, .list-card, .form-card, .experience-card, .detail-card, .settings-card { padding: 16px; border-radius: 17px; }
  .category-name, .list-card-title { font-size: 14px; }
  .timer-box { align-items: flex-start; flex-direction: column; }
  .timer-controls { width: 100%; }
  .timer-controls select { flex: 0 0 80px; }
  .timer-controls .button { flex: 1; }
  .reaction-grid { grid-template-columns: 1fr; gap: 8px; }
  .reaction-card, .reaction-card:last-child { min-height: 58px; grid-column: auto; }
  .settings-actions { align-items: stretch; flex-direction: column; }
  .settings-actions .button { width: 100%; }
  .reminder-card { align-items: flex-start; flex-direction: column; }
  .reminder-card > .button-row { width: 100%; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
