:root {
  color-scheme: light;
  --ink: #163b36;
  --muted: #64817c;
  --line: #dce8e2;
  --paper: #f6f7f1;
  --white: #fff;
  --mint: #c7e8d3;
  --green: #175947;
  --lime: #daf27e;
  --red: #a04c3b;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .58; }
a { color: inherit; }
.hidden { display: none !important; }
.page-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-header { height: 78px; padding: 0 clamp(22px, 5vw, 88px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.75); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 26px; font-weight: 800; letter-spacing: -.055em; text-decoration: none; }
.brand-mark { display: block; height: 36px; width: 36px; border-radius: 10px; }
.brand-dot { color: #9bbd5b; }
.header-right { display: flex; align-items: center; gap: 20px; }
.header-tag { font-size: 12px; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; color: var(--muted); }
.text-button, .back-button { border: 0; background: transparent; color: var(--green); font-weight: 700; padding: 8px 0; }
.text-button:hover, .back-button:hover { text-decoration: underline; }
main { width: min(1440px, 100%); margin: 0 auto; flex: 1; }
.site-footer { display: flex; justify-content: space-between; gap: 16px; padding: 24px clamp(22px, 5vw, 88px); color: var(--muted); font-size: 12px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 10px 35px rgba(26, 70, 56, .035); }
.eyebrow { display: block; color: #397d63; font-size: 11px; letter-spacing: .16em; font-weight: 800; text-transform: uppercase; }
.notice { max-width: 1020px; margin: 18px auto 0; padding: 13px 18px; border: 1px solid #9fceb0; border-radius: 12px; background: #eaf8ed; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #215b40; font-size: 14px; }
.notice-error { background: #fff0ec; border-color: #ecc0b5; color: #913c2c; }

.auth-layout { min-height: 620px; display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 7vw, 120px); align-items: center; padding: 70px clamp(22px, 7vw, 112px) 90px; }
.hero-copy { max-width: 630px; }
.hero-copy h1 { font-size: clamp(45px, 5.8vw, 82px); line-height: 1.02; letter-spacing: -.065em; margin: 18px 0 26px; }
.hero-copy h1 em { color: #4d9a72; font-style: normal; }
.hero-copy p { max-width: 510px; color: #5d7670; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.55; }
.hero-points { display: grid; gap: 15px; margin-top: 44px; color: var(--green); font-weight: 600; }
.hero-points span span { display: inline-grid; place-items: center; margin-right: 10px; width: 28px; height: 28px; border-radius: 50%; background: #e1efe3; }
.auth-card { padding: clamp(26px, 3vw, 42px); max-width: 480px; width: 100%; justify-self: center; }
.tab-row { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: #f0f4ee; border-radius: 12px; margin-bottom: 28px; }
.tab { border: 0; border-radius: 9px; background: transparent; color: var(--muted); padding: 11px; font-size: 14px; font-weight: 700; }
.tab.active { background: var(--white); color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.form-stack { display: grid; gap: 18px; }
.form-stack h2 { font-size: 27px; letter-spacing: -.035em; margin: 0 0 4px; }
.form-stack p { margin: 0; color: var(--muted); line-height: 1.45; }
.form-stack label:not(.inline-check) { display: grid; gap: 8px; font-size: 13px; color: var(--ink); font-weight: 700; }
.form-stack input:not([type=checkbox]), .form-stack select { min-height: 47px; width: 100%; border: 1px solid #cadbd2; border-radius: 10px; padding: 0 13px; background: var(--white); color: var(--ink); outline: none; }
.form-stack input:focus, .form-stack select:focus { border-color: #3d9672; box-shadow: 0 0 0 3px #dff0e4; }
.button { min-height: 45px; border-radius: 10px; padding: 11px 17px; font-size: 14px; font-weight: 800; text-decoration: none; display: inline-flex; justify-content: center; align-items: center; text-align: center; gap: 8px; }
.button-primary { border: 1px solid var(--green); background: var(--green); color: white; }
.button-primary:hover { background: #0d4636; }
.button-outline { border: 1px solid #a5c5b2; background: var(--white); color: var(--green); }
.button-outline:hover { background: #f0f8f0; }
.button-small { min-height: 34px; padding: 7px 12px; white-space: nowrap; }
.auth-footnote { font-size: 12px; color: var(--muted); text-align: center; margin: 24px 0 0; }
.policy-check { align-items: flex-start; line-height: 1.45; }.policy-check input { flex: 0 0 auto; margin-top: 2px; }.policy-check a { color: var(--green); }
.invite-preview { margin-bottom: 22px; padding: 14px; border-radius: 12px; background: #eff8e6; border: 1px solid #d7eab6; }
.invite-preview strong { font-size: 14px; }.invite-preview p { margin: 5px 0 0; font-size: 13px; }

.app-layout { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: clamp(20px, 3vw, 42px); padding: 36px clamp(22px, 5vw, 88px) 80px; }
.sidebar { align-self: start; min-height: 600px; padding: 26px 16px; display: flex; flex-direction: column; }
.sidebar-heading { padding: 0 13px 25px; }.sidebar-heading h2 { margin: 7px 0 0; font-size: 25px; letter-spacing: -.04em; }
.nav-item { min-height: 42px; display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 13px; border: 0; border-radius: 9px; background: transparent; text-align: left; color: #46645d; font-size: 14px; font-weight: 650; }
.nav-item:hover, .nav-item.active { background: #eaf4e9; color: var(--green); }
.nav-item > span { font-size: 22px; font-weight: 500; }
.nav-section-title { margin: 28px 13px 12px; display: flex; justify-content: space-between; align-items: center; color: #7a9288; font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.icon-button { border: 0; background: #eaf4e9; color: var(--green); font-size: 20px; height: 28px; width: 28px; border-radius: 8px; }
.group-nav { display: grid; gap: 3px; max-height: 400px; overflow: auto; }
.sidebar-footer { margin: auto 13px 0; padding-top: 32px; color: #93a89c; font-size: 12px; line-height: 1.5; }
.workspace { min-width: 0; }
.section-intro { margin: 18px 0 36px; }.section-intro h1, .group-header h1 { font-size: clamp(34px, 3.2vw, 48px); margin: 10px 0; letter-spacing: -.055em; }.section-intro p, .group-header p { color: var(--muted); margin: 0; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 17px; margin-bottom: 42px; }
.balance-card { min-height: 160px; padding: 24px; display: flex; flex-direction: column; justify-content: center; background: #edf5e8; border-color: #d5e6d4; }.balance-card.owing { background: #fff3e9; border-color: #f0d9c5; }
.balance-label { color: #548267; font-size: 11px; font-weight: 800; letter-spacing: .12em; }.owing .balance-label { color: var(--red); }
.balance-amount { margin-top: 10px; font-size: clamp(28px, 2.4vw, 36px); letter-spacing: -.05em; white-space: nowrap; }.balance-caption { color: var(--muted); font-size: 12px; margin-top: 5px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }.section-heading h2 { font-size: 24px; letter-spacing: -.035em; margin: 0; }
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.friend-grid { margin-bottom: 42px; }.empty-friends { grid-column: 1/-1; margin: 0; color: var(--muted); font-size: 14px; }
.group-card { min-height: 195px; padding: 22px; text-align: left; display: flex; flex-direction: column; align-items: flex-start; transition: transform .15s, box-shadow .15s; }.group-card:hover { transform: translateY(-2px); box-shadow: 0 13px 33px rgba(26,70,56,.10); }
.group-card-icon { display: grid; place-items: center; width: 42px; height: 42px; background: #e6f2df; color: var(--green); border-radius: 12px; font-size: 21px; margin-bottom: 17px; }.group-card strong { font-size: 17px; }.group-card-meta { margin-top: 5px; color: var(--muted); font-size: 12px; }.group-card-arrow { margin-top: auto; color: var(--green); font-size: 12px; font-weight: 800; }
.empty-card { grid-column: 1/-1; padding: 48px 25px; text-align: center; display: flex; align-items: center; flex-direction: column; }.empty-card h3 { margin: 7px 0; font-size: 20px; }.empty-card p { color: var(--muted); margin: 0 0 23px; }.empty-icon { display: block; font-size: 34px; color: #72ad78; }
.group-header { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin: 0 0 38px; }.group-header .eyebrow { margin-top: 22px; }
.expense-list { overflow: hidden; }.expense-list.empty-list { padding: 45px 20px; text-align: center; }.empty-list h3 { margin-bottom: 5px; }.empty-list p { color: var(--muted); }
.expense-row + .expense-row { border-top: 1px solid var(--line); }.expense-summary { list-style: none; display: flex; justify-content: space-between; gap: 12px; padding: 18px 22px; cursor: pointer; }.expense-summary::-webkit-details-marker { display: none; }.expense-summary:hover { background: #f8fbf7; }.expense-info { display: grid; gap: 5px; }.expense-info small { color: var(--muted); }.expense-total { white-space: nowrap; }.expense-details { padding: 3px 22px 16px; color: var(--muted); font-size: 13px; }.expense-details p { margin: 6px 0; }
.expense-void .expense-summary { opacity: .58; }.expense-void .expense-info strong { text-decoration: line-through; }.expense-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }.danger-button { color: var(--red); border-color: #e4b6a9; }.expense-history { border-top: 1px solid var(--line); margin-top: 15px; padding-top: 12px; }.expense-history summary { color: var(--green); font-weight: 700; cursor: pointer; }.expense-history p { margin: 9px 0 0; }.expense-history small { display: block; color: var(--muted); }
.expense-comments { border-top: 1px solid var(--line); margin-top: 15px; padding-top: 12px; }.expense-comments summary { color: var(--green); font-weight: 700; cursor: pointer; }.comment-list { margin: 10px 0; }.comment-row { padding: 10px 0; border-bottom: 1px solid var(--line); }.comment-row strong { color: var(--ink); }.comment-row small { margin-left: 8px; }.comment-row p { white-space: pre-wrap; overflow-wrap: anywhere; }.comment-delete { font-size: 12px; }.comment-form { display: flex; gap: 8px; margin-top: 12px; }.comment-form input { min-width: 0; flex: 1; border: 1px solid #cadbd2; border-radius: 9px; padding: 8px 10px; }.activity-heading { margin-top: 38px; }.activity-list { padding: 9px 22px; }.activity-list > p { color: var(--muted); }.activity-row { padding: 12px 0; font-size: 13px; }.activity-row + .activity-row { border-top: 1px solid var(--line); }.activity-row strong { font-weight: 650; }.activity-row p { margin: 5px 0; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }.activity-row small { display: block; margin-top: 5px; color: var(--muted); }
.settlement-panel { padding: 17px 22px; margin-bottom: 18px; }.settlement-panel p { margin: 5px 0; color: var(--muted); font-size: 13px; }.settled-title { color: var(--green); }.settlement-intro { margin-bottom: 12px !important; }.settlement-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 0; }.settlement-row + .settlement-row { border-top: 1px solid var(--line); }.settlement-row-copy { display: grid; gap: 5px; }.settlement-row-copy strong { font-size: 14px; }.settlement-row-copy small { color: var(--muted); font-size: 12px; }.settlement-history { margin-bottom: 42px; }.settlement-history > summary { color: var(--green); font-weight: 750; cursor: pointer; padding: 6px 0 13px; font-size: 13px; }.settlement-warning { padding: 12px 14px; border-radius: 10px; background: #fff5e8; color: #87532c !important; font-size: 13px; border: 1px solid #f0dec5; }
.party-list { display: grid; gap: 8px; }.party-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }.party-card span { display: grid; gap: 3px; }.party-card small { color: var(--muted); }.party-members { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }.party-members legend { font-weight: 750; font-size: 13px; }.party-members .inline-check { display: flex; margin: 9px 0; }
.legal-page { width: min(820px, calc(100% - 32px)); margin: 48px auto; padding: clamp(26px, 5vw, 58px); line-height: 1.65; }.legal-page h1 { margin: 8px 0 4px; font-size: clamp(36px, 5vw, 54px); letter-spacing: -.05em; }.legal-page h2 { margin: 32px 0 6px; font-size: 20px; }.legal-page p { color: #46645d; }.legal-page a { color: var(--green); }.legal-back { margin-top: 38px; }
.offline-page { min-height: calc(100vh - 78px); display: grid; place-items: center; padding: 30px; }.offline-card { width: min(540px, 100%); padding: clamp(30px, 6vw, 58px); text-align: center; }.offline-card h1 { margin: 12px 0; font-size: clamp(34px, 7vw, 52px); letter-spacing: -.05em; }.offline-card p { color: var(--muted); line-height: 1.6; margin: 0 auto 28px; max-width: 420px; }

.modal { width: min(460px, calc(100vw - 30px)); max-height: calc(100vh - 30px); overflow-y: auto; border: 1px solid var(--line); border-radius: 20px; padding: 30px; box-shadow: 0 28px 80px rgba(9,44,32,.2); color: var(--ink); }.modal-wide { width: min(630px, calc(100vw - 30px)); }.modal::backdrop { background: rgba(10,34,30,.45); backdrop-filter: blur(3px); }.modal-top { display: flex; justify-content: space-between; align-items: center; }.close-button { border: 0; background: transparent; color: #728d7e; font-size: 30px; line-height: 1; }.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }.form-section { border-top: 1px solid var(--line); padding-top: 17px; }.form-section strong { font-size: 14px; }.form-section p, .form-help { font-size: 12px; }.form-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }.inline-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }.inline-check input { accent-color: var(--green); width: 17px; height: 17px; }.member-input-row { display: grid; grid-template-columns: 1fr 120px; align-items: center; margin-top: 10px; }.participant-row { display: flex; justify-content: space-between; align-items: center; gap: 15px; min-height: 47px; padding: 7px 0; border-bottom: 1px solid #edf2ec; }.share-input-label { max-width: 120px; }.share-input-label input { min-height: 38px !important; }.action-row { display: flex; flex-wrap: wrap; gap: 9px; }

@media (max-width: 860px) {
  .auth-layout { grid-template-columns: 1fr; padding-top: 48px; gap: 38px; }.auth-card { justify-self: start; }.hero-copy h1 { max-width: 660px; }.hero-points { margin-top: 28px; }
  .app-layout { grid-template-columns: 1fr; }.sidebar { min-height: 0; padding: 16px; }.sidebar-heading, .sidebar-footer, .nav-section-title, .group-nav { display: none; }.sidebar .nav-item { width: auto; }.sidebar { flex-direction: row; }
}
@media (max-width: 550px) {
  .site-header { height: 67px; }.brand { font-size: 23px; }.brand-mark { height: 32px; width: 32px; }.header-tag { display: none; }
  .auth-layout { padding-top: 26px; padding-bottom: 50px; }.auth-card { order: -1; padding: 24px; }.hero-copy h1 { font-size: 43px; }.hero-copy p { font-size: 16px; }.hero-points { font-size: 13px; }
  .app-layout { padding-top: 20px; }.section-intro { margin-top: 12px; }.summary-grid { margin-bottom: 32px; }.group-header { align-items: flex-start; }.group-header .button { padding: 9px; min-width: 72px; }.section-heading .button { padding: 9px; }.section-heading h2 { font-size: 21px; }.form-row { grid-template-columns: 1fr 1fr; }.modal { padding: 22px; }
  .site-footer { flex-direction: column; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
