:root {
  --bg: #f7f6f0;
  --surface: #fffefb;
  --ink: #23352e;
  --muted: #6a786f;
  --line: #e1e5dc;
  --green: #325b49;
  --soft: #eaf0e6;
  --orange: #a76635;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    16px/1.65 -apple-system,
    BlinkMacSystemFont,
    "Noto Sans JP",
    "Hiragino Kaku Gothic ProN",
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #b49952;
  outline-offset: 3px;
}
aside {
  width: 250px;
  background: var(--surface);
  position: fixed;
  inset: 0 auto 0 0;
  border-right: 1px solid var(--line);
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.04em;
}
.brandmark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 42px;
  background: var(--green);
  color: white;
  border-radius: 12px;
  font-size: 29px;
}
.brand small {
  font-size: 12px;
  letter-spacing: 0;
  font-weight: 400;
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.household {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 32px 0;
  padding: 15px 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.household small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.avatars {
  display: flex;
  align-items: center;
  padding-right: 7px;
  font-size: 13px;
}
.avatars,
.avatars span {
  background: #e3e9de;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  justify-content: center;
}
.avatars span {
  background: #ede2ce;
  border: 2px solid var(--surface);
  margin-right: -13px;
}
#nav {
  display: grid;
  gap: 7px;
}
#nav a {
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 11px;
  font-size: 15px;
}
#nav a.active {
  background: var(--soft);
  color: var(--green);
  font-weight: 700;
}
.nav-icon {
  width: 22px;
  font-size: 22px;
  text-align: center;
}
.aside-bottom {
  margin-top: auto;
  padding: 20px 10px 0;
}
.aside-bottom p {
  font-size: 12px;
  color: var(--muted);
}
.pill,
.badge {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--soft);
  color: var(--green);
  display: inline-block;
}
.badge.orange {
  background: #fbefdb;
  color: var(--orange);
}
.workspace {
  margin-left: 250px;
}
header {
  height: 86px;
  border-bottom: 1px solid var(--line);
  margin: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.sample {
  font-size: 12px;
}
button.primary,
.primary-link {
  border: 0;
  background: var(--green);
  color: white;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 650;
  min-height: 44px;
}
.primary-link {
  display: inline-block;
}
button.secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  min-height: 44px;
}
.text {
  background: none;
  border: 0;
  padding: 6px 0;
  color: var(--green);
  font-size: 14px;
}
.icon-button {
  border: 0;
  background: var(--soft);
  border-radius: 50%;
  height: 36px;
  width: 36px;
  font-size: 24px;
}
main {
  max-width: 1250px;
  margin: auto;
  padding: 32px 40px 60px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 28px;
  gap: 16px;
}
.eyebrow {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.13em;
}
h1 {
  font-size: 30px;
  margin: 6px 0;
  font-weight: 720;
  letter-spacing: -0.04em;
}
h2 {
  font-size: 18px;
  margin: 0 0 16px;
}
h3 {
  font-size: 16px;
  margin: 0;
}
.subtitle {
  font-size: 14px;
  color: var(--muted);
  margin: 4px 0;
}
.date {
  font-size: 14px;
  color: var(--muted);
}
.grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.card-head h2 {
  margin: 0;
}
.hero {
  background: var(--green);
  color: #fff;
  border: 0;
}
.hero .muted {
  color: #d1dfd4;
}
.hero .badge {
  background: #ffffff20;
  color: #fff;
}
.amount {
  font-size: 36px;
  letter-spacing: -0.03em;
  font-weight: 650;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.hero-main {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 12px 0 22px;
}
.hero-main small {
  font-size: 14px;
}
.moneygrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-top: 18px;
  border-top: 1px solid #ffffff35;
}
.moneygrid strong {
  display: block;
  font-size: 22px;
  font-weight: 600;
}
.muted {
  color: var(--muted);
  font-size: 14px;
}
.progress {
  height: 7px;
  background: #ffffff28;
  border-radius: 20px;
  margin: 15px 0 9px;
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  background: #ddcf94;
  border-radius: 20px;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.row:last-child {
  border-bottom: 0;
}
.row small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.row strong {
  font-size: 15px;
}
.row .right {
  text-align: right;
  white-space: nowrap;
}
.row a {
  font-size: 14px;
  color: var(--green);
}
.notice-icon {
  background: #f5ead7;
  color: #977447;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: none;
}
.row-title {
  display: flex;
  gap: 12px;
  align-items: center;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 32px 0 14px;
}
.section-title h2 {
  margin: 0;
}
.features {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 21px 18px;
  border-radius: 15px;
  transition:
    transform 0.15s,
    border-color 0.15s;
}
.feature:hover {
  transform: translateY(-3px);
  border-color: #8b9f8a;
}
.feature-icon {
  font-size: 24px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--soft);
  border-radius: 12px;
  margin-bottom: 14px;
}
.feature p {
  font-size: 12px;
  color: var(--muted);
  margin: 7px 0;
}
.feature small {
  font-size: 12px;
  color: var(--green);
}
.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  overflow-x: auto;
}
.tabs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 12px 18px;
  white-space: nowrap;
  font-size: 14px;
  border-bottom: 3px solid transparent;
}
.tabs button.active {
  color: var(--green);
  font-weight: 700;
  border-color: var(--green);
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stats .amount {
  font-size: 28px;
  margin-top: 9px;
}
.list-card {
  margin-bottom: 18px;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.toolbar input {
  width: 240px;
  max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 10px;
}
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.recipe {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.recipe img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}
.recipe div {
  padding: 20px;
}
.recipe .muted {
  margin: 8px 0 16px;
}
.recipe button {
  width: 100%;
}
.check {
  width: 22px;
  height: 22px;
  accent-color: var(--green);
  flex: none;
  cursor: pointer;
}
.completed strong {
  text-decoration: line-through;
  color: var(--muted);
}
.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.calendar div {
  min-height: 95px;
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.calendar .day {
  min-height: auto;
  background: var(--soft);
  text-align: center;
}
.calendar .today {
  background: #eaf0e6;
}
.calendar small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  background: #efe7d4;
  padding: 3px;
  border-radius: 4px;
}
.chart {
  height: 160px;
  display: flex;
  align-items: end;
  gap: 16px;
  margin-top: 22px;
}
.chart div {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  height: 100%;
}
.chart i {
  display: block;
  width: 70%;
  background: #a5b89c;
  border-radius: 6px 6px 0 0;
}
.chart small {
  font-size: 12px;
  margin-top: 8px;
  color: var(--muted);
}
.callout {
  background: var(--soft);
  padding: 18px;
  border-radius: 12px;
  margin-top: 20px;
  font-size: 14px;
}
.feature-page .features {
  grid-template-columns: repeat(3, 1fr);
}
footer {
  margin: 0 40px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}
.mobile {
  display: none;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  padding: 26px;
  width: 480px;
  max-width: calc(100% - 32px);
}
dialog::backdrop {
  background: #172c2470;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.dialog-head h2 {
  margin: 0;
}
dialog label {
  display: block;
  margin: 14px 0;
  font-size: 14px;
}
dialog input,
dialog select {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  margin-top: 6px;
}
dialog .primary {
  width: 100%;
  margin-top: 16px;
}
.choice {
  display: block;
  width: 100%;
  padding: 15px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  margin: 10px 0;
}
.ingredients {
  list-style: none;
  padding: 0;
}
.ingredients li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  background: var(--ink);
  color: white;
  border-radius: 12px;
  z-index: 100;
  display: none;
  font-size: 14px;
  max-width: 90vw;
}
.empty {
  padding: 35px;
  text-align: center;
  color: var(--muted);
}
@media (min-width: 1500px) {
  main {
    padding-top: 42px;
  }
}
@media (max-width: 1150px) {
  aside {
    width: 220px;
  }
  .workspace {
    margin-left: 220px;
  }
  main {
    padding: 28px 24px;
  }
  header {
    margin: 0 24px;
  }
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid {
    grid-template-columns: 1fr 1fr;
  }
  .recipe-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 760px) {
  aside {
    display: none;
  }
  .workspace {
    margin: 0;
  }
  header {
    height: 68px;
    margin: 0 20px;
  }
  .sample {
    display: none;
  }
  main {
    padding: 24px 20px 90px;
  }
  .page-heading {
    align-items: start;
  }
  h1 {
    font-size: 26px;
  }
  .date {
    font-size: 12px;
  }
  .grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .features,
  .feature-page .features {
    grid-template-columns: repeat(2, 1fr);
  }
  .feature {
    padding: 18px;
  }
  .stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .stats .card {
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .stats .amount {
    margin: 0;
    font-size: 24px;
  }
  .recipe-grid {
    grid-template-columns: 1fr;
  }
  .mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 7px 0 calc(7px + env(safe-area-inset-bottom));
    z-index: 20;
  }
  .mobile a,
  .mobile button {
    display: flex;
    align-items: center;
    flex-direction: column;
    font-size: 23px;
    border: 0;
    background: none;
    color: var(--green);
    min-height: 48px;
  }
  .mobile span {
    font-size: 12px;
  }
  footer {
    display: none;
  }
  .calendar div {
    min-height: 65px;
    padding: 5px;
  }
  .calendar small {
    font-size: 10px;
  }
  .hero-main {
    gap: 12px;
  }
  .amount {
    font-size: 32px;
  }
  .row {
    gap: 10px;
  }
  .row .right {
    white-space: normal;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  #toast {
    bottom: 90px;
  }
  .tabs button {
    padding: 12px;
  }
  .subtitle {
    font-size: 14px;
  }
}

/* Home: task-specific entry points, independent of feature navigation. */
.home-context {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  padding: 16px 20px;
  background: var(--soft);
  border-radius: 12px;
  font-size: 14px;
}
.home-context strong {
  margin-left: 8px;
}
.journey-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.journey {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.journey .card-head {
  align-items: start;
}
.journey .card-head .muted {
  font-size: 12px;
  white-space: nowrap;
}
.journey-body {
  flex: 1;
  margin-bottom: 20px;
}
.journey-body p {
  margin: 0 0 12px;
}
.journey > .primary,
.journey > .primary-link {
  align-self: start;
}
.mini-task {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  font-size: 15px;
}
.mini-task span {
  flex: 1;
}
.mini-task small {
  font-size: 12px;
  color: var(--muted);
}
.recipe-preview {
  display: flex;
  gap: 16px;
  align-items: center;
}
.recipe-preview img {
  width: 104px;
  height: 100px;
  object-fit: cover;
  border-radius: 12px;
}
.recipe-preview strong {
  font-size: 15px;
}
.recipe-preview .muted {
  margin: 6px 0 0;
  font-size: 13px;
}
.goal-track {
  height: 7px;
  background: var(--soft);
  border-radius: 8px;
  margin: 16px 0;
}
.goal-track i {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: 8px;
}
.action-list .row {
  padding: 18px 0;
}
.journey .amount small {
  font-weight: 400;
}
@media (max-width: 760px) {
  .journey-grid {
    grid-template-columns: 1fr;
  }
  .home-context {
    gap: 8px 18px;
    padding: 14px;
    font-size: 13px;
  }
  .home-context strong {
    margin-left: 5px;
  }
  .recipe-preview img {
    width: 90px;
    height: 90px;
  }
  .action-list .row {
    align-items: start;
  }
  .action-list .right {
    min-width: 84px;
  }
}

.original-frame {
  border: 0;
  width: 100%;
  min-height: 850px;
  border-radius: 16px;
  display: block;
  background: var(--bg);
}
.original-note {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 0 16px;
  font-size: 12px;
  color: var(--muted);
}
dialog:has(.original-frame) {
  width: 680px;
  max-height: 90vh;
}
dialog .original-frame {
  min-height: 700px;
}
.original-note .badge {
  white-space: nowrap;
}
@media (max-width: 760px) {
  .original-note {
    align-items: start;
    flex-direction: column;
    gap: 6px;
  }
  .original-frame {
    min-height: 1100px;
  }
}
:root {
  color-scheme: light;
}
.hero {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}
.hero .muted {
  color: var(--muted);
}
.hero .badge {
  background: var(--soft);
  color: var(--green);
}
.tabs {
  flex-wrap: wrap;
  overflow: visible;
}
.tabs button {
  padding: 10px 12px;
}
.home-context {
  color: var(--ink);
}
@media (max-width: 760px) {
  main {
    padding: 16px 14px 80px;
  }
  .page-heading {
    margin-bottom: 16px;
  }
  .page-heading .date,
  .eyebrow {
    display: none;
  }
  h1 {
    font-size: 23px;
  }
  .subtitle {
    font-size: 13px;
  }
  .section-title {
    margin: 20px 0 10px;
  }
  .journey-grid {
    gap: 10px;
  }
  .journey {
    padding: 15px;
  }
  .journey .card-head {
    margin-bottom: 8px;
  }
  .journey-body {
    margin-bottom: 10px;
  }
  .journey-body p {
    margin-bottom: 5px;
  }
  .journey .recipe-preview img {
    display: none;
  }
  .journey .recipe-preview .muted {
    display: none;
  }
  .journey .mini-task {
    padding: 3px 0;
  }
  .journey .primary,
  .journey .primary-link {
    padding: 9px 14px;
    min-height: 42px;
  }
  .home-context {
    padding: 10px;
    font-size: 12px;
  }
  .tabs {
    gap: 0;
    margin-bottom: 14px;
  }
  .tabs button {
    font-size: 13px;
    padding: 9px 10px;
  }
  .original-note {
    display: none;
  }
  .original-frame {
    border-radius: 10px;
    min-height: 450px;
  }
  .card.action-list {
    padding: 12px;
  }
  .action-list .row {
    padding: 12px 0;
  }
  .header-actions .primary {
    display: none;
  }
  header {
    height: 48px;
  }
  .home-more {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    padding: 0 14px;
    margin-top: 14px;
  }
  .home-more > summary {
    padding: 14px 0;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
  }
  .home-more .section-title {
    margin: 10px 0;
  }
  .home-more .journey-grid {
    margin-bottom: 12px;
  }
}

.meal-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}
.meal-tabs button {
  min-width: 0;
  min-height: 44px;
  text-align: center;
}
.meal-tabs button.active {
  background: var(--soft);
}
@media (max-width: 760px) {
  .meal-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .meal-tabs button {
    padding: 10px 8px;
  }
}

.inline-entry {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 20px;
}
.inline-entry label {
  display: grid;
  gap: 4px;
  font-size: 14px;
}
.inline-entry input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.calendar-event {
  display: block;
  width: 100%;
  border: 0;
  background: var(--soft);
  color: var(--green);
  font-size: 12px;
  text-align: left;
  overflow-wrap: anywhere;
  border-radius: 4px;
  padding: 3px;
  margin-top: 3px;
}
.help-copy .row {
  align-items: start;
}
.help-copy .right {
  white-space: normal;
}
.plan-bottom {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.form-error {
  color: #a54735;
}
aside {
  overflow-y: auto;
}
.aside-bottom {
  margin-top: 20px;
}
@media (max-width: 760px) {
  .inline-entry {
    grid-template-columns: 1fr;
  }
  .calendar > div {
    min-width: 0;
    padding: 5px 2px !important;
  }
  .help-copy .row {
    flex-direction: column;
    gap: 4px;
  }
  .help-copy .right {
    text-align: left;
  }
}

.has-original-modal .mobile {
  display: none;
}

@media (min-width: 761px) and (max-width: 1100px) {
  .meal-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
