:root {
  --page: #f5f2ff;
  --paper: #fff;
  --ink: #2a1e49;
  --quiet: #5b5074;
  --line: #dfd5f3;
  --control-line: #aa99ca;
  --soft: #f0e9ff;
  --grape: #623cad;
  --grape-dark: #50369b;
  --sky: #dceeff;
  --sky-ink: #245f9e;
  --lime: #e5f2a3;
  --lime-ink: #394514;
  --orange: #944114;
  --caution: #fff0de;
  --red: #952f43;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
}
* { box-sizing: border-box }
body { margin: 0 }
[hidden] { display: none !important }
a { color: var(--grape-dark) }
button, input, select, textarea { font: inherit }
button, .button {
  border: 1px solid var(--control-line);
  border-radius: .65rem;
  min-height: 42px;
  background: white;
  color: var(--ink);
  padding: .42rem .75rem;
  cursor: pointer;
  font-weight: 620;
  text-decoration: none;
}
button:hover:not(:disabled), .button:hover { background: var(--soft) }
button:disabled { cursor: default; opacity: .56 }
button.primary { background: var(--grape); color: white; border-color: var(--grape) }
button.primary:hover:not(:disabled) { background: var(--grape-dark) }
button.danger { color: var(--red) }
:focus-visible { outline: 3px solid var(--sky-ink); outline-offset: 2px }
h1, h2, h3, p { margin: 0 }
h1 { font-size: clamp(1.55rem, 3.5vw, 2.15rem); line-height: 1.2; letter-spacing: -.045em }
h2 { font-size: 1.2rem; line-height: 1.3; letter-spacing: -.02em }
h3 { font-size: 1rem }
small, .muted { color: var(--quiet) }
.shell { width: min(100% - 2rem, 75rem); margin-inline: auto }
.site-header { background: var(--paper); border-bottom: 1px solid var(--line) }
.header-band { background: var(--grape-dark); color: white }
.header-band :focus-visible { outline-color: white }
.header-main { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding-block: .55rem }
.brand { text-decoration: none; color: inherit; font-weight: 780; font-size: 1.13rem; letter-spacing: -.02em; display: inline-flex; gap: .5rem; align-items: center }
.brand span { display: inline-grid; place-items: center; height: 34px; width: 34px; color: var(--lime-ink); background: var(--lime); border-radius: .65rem; font-size: 1.35rem; line-height: 1 }
.profile, .person, .bar, .controls, .row-tools, .main-nav, .sub-nav { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap }
.header-main .profile { justify-content: end }
.main-nav { gap: .25rem; padding-block: .28rem }
.main-nav a, .sub-nav a { text-decoration: none; color: var(--quiet); font-weight: 675; padding: .52rem .72rem; border-radius: .65rem }
.main-nav a { display: inline-flex; align-items: center; gap: .38rem; min-height: 44px }
.main-nav a:hover, .sub-nav a:hover { background: var(--soft); color: var(--ink) }
.main-nav a[aria-current="page"], .sub-nav a[aria-current="page"] { color: var(--grape-dark); background: #eadfff; font-weight: 800 }
.nav-icon { color: var(--grape); font-size: 1.16rem; line-height: 1 }
.main-nav a[href="#week"] .nav-icon, .main-nav a[href="#hobbies"] .nav-icon { color: var(--sky-ink) }
.main-nav a[href="#rewards"] .nav-icon { color: var(--orange) }
.sub-nav { background: white; border: 1px solid var(--line); border-radius: .85rem; padding: .35rem }
.main { padding: 1.25rem 0 3rem }
.bar { justify-content: space-between }
.stack > * + * { margin-top: .8rem }
.screen-stack > * + * { margin-top: 1.15rem }
.panel { background: var(--paper); padding: 1rem; border: 1px solid var(--line); border-radius: .9rem }
.panel-title { margin-bottom: .65rem }
.narrow { width: min(100%, 29rem); margin: min(9vh, 4rem) auto 1rem }
.family-option { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .7rem; padding: .7rem 0; border-bottom: 1px solid var(--line) }
.family-option > div { overflow-wrap: anywhere }
.family-option + :is(button, a) { display: inline-block; margin-top: .75rem }
.avatar { display: inline-grid; flex: 0 0 30px; place-items: center; width: 30px; height: 30px; border-radius: 50%; overflow: hidden; background: var(--avatar-bg); color: var(--avatar-ink); outline: 2px solid var(--avatar-bg); outline-offset: 1px; font-size: .73rem; font-weight: 750; user-select: none }
.avatar-0 { --avatar-bg: #efdefc; --avatar-ink: #643485 }
.avatar-1 { --avatar-bg: #d6ebff; --avatar-ink: #185c89 }
.avatar-2 { --avatar-bg: #fce4ba; --avatar-ink: #774714 }
.avatar-3 { --avatar-bg: #edf5c3; --avatar-ink: #485615 }
.avatar-4 { --avatar-bg: #fadce7; --avatar-ink: #8c3157 }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover }
.today-banner { isolation: isolate; overflow: hidden; position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 8.5rem; padding: 1.12rem 1.3rem; border-radius: 1rem; background: var(--sky) }
.today-banner h1 { font-size: clamp(2.1rem, 5vw, 2.85rem); font-weight: 820 }
.today-banner p { color: var(--quiet); overflow-wrap: anywhere }
.today-wallet { min-width: 7.5rem; flex: 0 0 auto; display: grid; place-items: center; text-align: center; text-decoration: none; padding: .65rem .8rem; background: var(--lime); color: var(--lime-ink); border-radius: .8rem; font-size: .85rem; font-weight: 680 }
.today-wallet:hover { background: #d8ea86; color: var(--lime-ink) }
.today-wallet strong { font-size: 1.75rem; line-height: 1.14; font-variant-numeric: tabular-nums }
.clubhouse-shapes { position: absolute; right: clamp(8rem, 25%, 16rem); top: 0; width: 31%; height: 100%; z-index: -1; pointer-events: none }
.clubhouse-shapes i { position: absolute; right: 6%; top: -1.75rem; width: 7rem; height: 7rem; border-radius: 2rem; background: #b49bea; rotate: 24deg }
.clubhouse-shapes i:nth-child(2) { right: 49%; top: auto; bottom: -.42rem; width: 3.3rem; height: 3.3rem; border-radius: .9rem; background: #ffbf83; rotate: -23deg }
.clubhouse-shapes i:nth-child(3) { right: 29%; top: 45%; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: #ffffffad }
.today-controls { justify-content: flex-end; align-items: end }
.activity-summary { padding-block: .75rem }
.activity-summary > p { margin-top: .5rem }
.streak-line { display: flex; gap: .65rem; align-items: center }
.streak-icon { flex: 0 0 auto; display: grid; width: 2.2rem; height: 2.2rem; place-items: center; color: var(--orange); background: var(--caution); border-radius: .68rem; font-size: 1.15rem }
.skip-link { position: fixed; top: .4rem; left: .45rem; z-index: 2; background: #fff; padding: .5rem .85rem; transform: translateY(-175%) }
.skip-link:focus { transform: translateY(0) }
#notice:empty, #dialog-status:empty { display: none }
#notice { margin-bottom: .95rem }
#dialog-status { margin-top: .7rem }
.notice { color: var(--grape-dark); background: var(--soft); border: 1px solid var(--line); border-radius: .6rem; padding: .6rem .8rem }
.notice.error { color: var(--red); background: #fff0ec; border-color: #e6b8ac }
.notice.caution { color: var(--orange); background: var(--caution); border-color: #e4c8ab }
.table-wrap, .month-wrap { overflow-x: auto; max-width: 100% }
table { border-collapse: collapse; width: 100%; font-size: .92rem; text-align: left }
th, td { padding: .5rem .55rem; border-bottom: 1px solid var(--line); vertical-align: top }
th { background: var(--soft); white-space: nowrap; font-weight: 700 }
tbody tr:last-child td { border-bottom: 0 }
td .person { flex-wrap: nowrap }
.task-table .task-name { width: 34% }
.task-table .tools { min-width: 155px }
.task-table th:first-child { border-start-start-radius: .55rem }
.task-table th:last-child { border-start-end-radius: .55rem }
.task-title { display: flex; align-items: flex-start; gap: .5rem; overflow-wrap: anywhere }
.completion-button, .completion-mark { flex: 0 0 44px; height: 44px; display: inline-grid; place-items: center; padding: 0; border: 0; background: transparent }
.completion-button::before, .completion-mark::before { content: ''; width: 25px; height: 25px; display: grid; place-items: center; border-radius: .52rem; border: 2px solid var(--grape); box-sizing: border-box }
.completion-mark::before { content: '✓'; background: var(--grape); color: white; font-size: 1.08rem; font-weight: 800; line-height: 1 }
.completion-mark.submitted::before { background: var(--sky); border-color: var(--sky-ink); color: var(--sky-ink) }
.mobile-owner, .mobile-task-meta, .month-count { display: none }
.code-value { overflow-wrap: anywhere }
.row-tools { gap: .23rem; white-space: nowrap }
.icon-button { min-width: 42px; height: 42px; padding: .08rem .3rem; font-size: 1.22rem; line-height: 1; display: inline-grid; place-items: center }
.row-tools .icon-button { font-size: 1.12rem }
.subline { display: block; margin-top: .16rem; color: var(--quiet) }
.badge { border-radius: .45rem; padding: .12rem .42rem; display: inline-block; background: var(--soft); font-size: .81rem; font-weight: 675; color: var(--grape-dark) }
.badge.warn { background: var(--caution); color: var(--orange) }
.badge.wait { background: var(--sky); color: var(--sky-ink) }
.period { display: inline-flex; align-items: center; gap: .28rem }
.period span { font-size: 1.1rem; line-height: 1; color: var(--orange) }
form { margin: 0 }
.field { display: flex; flex-direction: column; gap: .22rem; font-weight: 600; min-width: 0 }
.field small { font-weight: 450 }
input:not([type=checkbox]), textarea, select { border: 1px solid var(--control-line); border-radius: .55rem; background: white; color: var(--ink); min-height: 42px; padding: .4rem .55rem; max-width: 100% }
input[type=checkbox] { width: 1.12rem; height: 1.12rem; margin: 0; accent-color: var(--grape) }
.check { display: flex; align-items: center; gap: .45rem }
.controls .field { min-width: 0 }
textarea { resize: vertical; min-height: 5rem }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .8rem }
.repeat-options { margin: 0; padding: 0; border: 0; min-width: 0 }
.repeat-days { margin: 0; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: .4rem; min-width: 0 }
.repeat-days p { margin: .4rem 0 0 }
dialog { color: var(--ink); width: min(100% - 1.25rem, 37rem); padding: 1rem; border: 1px solid var(--line); border-radius: .9rem; max-height: calc(100% - 1.25rem); overflow: auto }
dialog::backdrop { background: #211737b0 }
.dialog-header { display: flex; justify-content: space-between; gap: .6rem; align-items: center; margin-bottom: .75rem }
.metric { font-size: 1.68rem; color: var(--grape-dark); font-weight: 750; display: block; line-height: 1.16 }
.month { display: grid; grid-template-columns: repeat(7, minmax(4.25rem, 1fr)); min-width: 31rem; border-left: 1px solid var(--line); border-top: 1px solid var(--line) }
.month > * { border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; padding: .4rem; }
.month-head { background: var(--soft); text-align: center; font-size: .82rem; font-weight: 700 }
.month-day { min-height: 77px; text-align: start; font-weight: 610; display: flex; flex-direction: column; gap: .12rem }
.month-day.other { color: var(--quiet); background: #faf8ff }
.month-day.current { box-shadow: inset 0 0 0 2px var(--grape) }
.month-day small { font-size: .77rem; overflow-wrap: anywhere }
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1rem; align-items: start }
.hobby-photo { display: block; width: 100%; max-height: 28rem; object-fit: contain; object-position: left center; background: var(--soft); border-radius: .35rem }
.goals-table th { white-space: normal }
.options-list { display: flex; flex-direction: column; align-items: stretch; gap: .36rem }
.options-list button { text-align: left }
.action-text { white-space: pre-line }
@media (max-width: 570px) {
  .shell { width: calc(100% - 1rem) }
  .header-main { flex-wrap: wrap }
  .header-main .profile .profile-name { display: none }
  .main-nav { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: stretch; gap: .12rem }
  .main-nav a { flex-direction: column; justify-content: start; text-align: center; text-wrap: balance; line-height: 1.2; gap: .24rem; padding: .4rem .08rem; font-size: .76rem }
  .main { padding-top: .9rem }
  .panel { padding: .63rem }
  .today-banner { min-height: 7.25rem; padding: .9rem; gap: .6rem }
  .today-wallet { min-width: 0; padding: .6rem; font-size: .75rem }
  .clubhouse-shapes { right: 5.2rem; opacity: .62 }
  .clubhouse-shapes i { width: 4.8rem; height: 4.8rem; border-radius: 1.3rem }
  .clubhouse-shapes i:nth-child(2) { width: 2.2rem; height: 2.2rem; right: 34% }
  .clubhouse-shapes i:nth-child(3) { right: 25%; width: .9rem; height: .9rem }
  .today-controls { justify-content: flex-start }
  .task-table th:nth-child(2), .task-table td:nth-child(2) { display: none }
  .task-table th:nth-child(3), .task-table td:nth-child(3),
  .task-table th:nth-child(4), .task-table td:nth-child(4) { display: none }
  .task-table .task-name { width: auto }
  .mobile-owner { display: block; margin-top: .22rem; color: var(--quiet); font-size: .79rem }
  .mobile-owner .person { gap: .38rem }
  .mobile-owner .avatar { flex-basis: 19px; width: 19px; height: 19px; font-size: .61rem; outline-width: 1px }
  .task-table th, .task-table td { padding: .35rem .28rem }
  .task-table .tools { min-width: 0; width: 6.25rem }
  .task-table .row-tools { column-gap: .14rem; flex-wrap: wrap }
  .task-table .row-tools button { min-width: 44px; min-height: 44px }
  .task-table .period { display: inline }
  .mobile-task-meta { display: block; margin-top: .24rem }
  .month { min-width: 0; grid-template-columns: repeat(7, minmax(0, 1fr)) }
  .month > * { padding: .25rem .13rem }
  .month-day { min-height: 48px; align-items: center }
  .month-summary { display: none }
  .month-count { display: block; color: var(--grape-dark); font-size: .75rem }
  .panel td { overflow-wrap: anywhere }
}
