/* Splitly — a quieter interface. Presentation only; app and cloud logic unchanged. */
:root {
  color-scheme: light;
  --paper: #f5f5f7;
  --ink: #1d1d1f;
  --green: #0071e3;
  --muted: #6e6e73;
  --line: #e5e5e9;
  --soft: #fff;
  --blue: #0071e3;
  --radius: 24px;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -.015em;
}
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button {
  border: 0;
  cursor: pointer;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}
button:active:not(:disabled) { transform: scale(.98); }
button:disabled { opacity: .42; cursor: not-allowed; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid #0071e380;
  outline-offset: 4px;
}
input:focus, select:focus, textarea:focus {
  outline: 3px solid #0071e338;
  outline-offset: 2px;
  border-color: var(--blue);
}
.top {
  padding: 18px max(32px, calc((100vw - 1120px) / 2));
  min-height: 76px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: #ffffffd9;
  border-bottom: 1px solid #00000008;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 24px; letter-spacing: -.045em; font-weight: 650; }
.logo { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--ink); color: #fff; font: 650 24px/1 -apple-system, BlinkMacSystemFont, sans-serif; letter-spacing: -.07em; padding-right: 2px; padding-bottom: 3px; }
.brand-note { margin-left: 16px; color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: 0; }
#save-state { max-width: 220px; color: var(--muted); text-align: right; font-size: 12px; line-height: 1.6; }
main { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.intro { display: flex; justify-content: center; text-align: center; padding: 76px 0 66px; }
.intro > div:first-child { width: 100%; }
.eyebrow { color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: .16em; margin: 0 0 15px; }
h1 { margin: 0; font-size: clamp(48px, 5.5vw, 72px); font-weight: 650; letter-spacing: -.055em; line-height: 1.2; }
h1 span { color: var(--blue); }
.subtitle { font-size: 17px; line-height: 1.8; color: var(--muted); margin: 24px 0 0; letter-spacing: 0; }
.paper-art { display: none; }
h2 { margin: 0; font-size: 26px; line-height: 1.35; font-weight: 600; letter-spacing: -.035em; }
h2, h4, .person-chip { overflow-wrap: anywhere; }
h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 18px; line-height: 1.4; font-weight: 600; letter-spacing: -.025em; }
.cloud-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 28px; }
.recent-label { color: var(--muted); font-size: 12px; max-width: 320px; min-width: 0; flex: 1; margin: 0; }
.recent-label select { margin-top: 8px; background: #fff; border-color: transparent; border-radius: 14px; padding-right: 28px; font-size: 14px; box-shadow: 0 2px 10px #00000002; }
.welcome { background: #fff; border-radius: 28px; padding: 58px 32px; text-align: center; margin: 0 0 56px; box-shadow: 0 4px 28px #00000002; }
.welcome h2 { font-size: 36px; font-weight: 600; letter-spacing: -.045em; }
.welcome > p:not(.eyebrow):not(.hint) { color: var(--muted); font-size: 16px; line-height: 1.9; margin: 20px 0 26px; }
.welcome .hint { margin: 24px 0 0; }
.welcome .primary { padding-inline: 26px; }
.book-head { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 38px 0 24px; }
.book-head .eyebrow { margin-bottom: 8px; font-size: 9px; }
.title-button { display: flex; align-items: center; gap: 12px; background: none; padding: 0; text-align: left; min-width: 0; }
.title-button > span { color: #86868b; font-size: 18px; }
.book-actions { display: flex; align-items: center; flex-shrink: 0; gap: 24px; }
.summary { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.summary > div { display: flex; flex-direction: column; gap: 8px; background: #fff; padding: 28px 30px 25px; border-radius: var(--radius); min-width: 0; }
.summary > div:first-child { background: var(--ink); color: #fff; }
.summary > div:first-child span, .summary > div:first-child small { color: #c4c4c9; }
.summary span { color: var(--muted); font-size: 13px; }
.summary strong { font-size: 42px; font-weight: 550; line-height: 1.25; letter-spacing: -.045em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.summary b { font-weight: inherit; }
.summary em { font-style: normal; font-size: 14px; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-left: 3px; }
.summary small { color: var(--muted); font-size: 11px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 336px; align-items: start; gap: 24px; }
.entries { min-width: 0; background: #fff; border-radius: var(--radius); padding: 30px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 22px; }
.step { color: var(--muted); font-size: 10px; font-weight: 500; line-height: 24px; text-align: center; min-width: 24px; height: 24px; background: #f5f5f7; border-radius: 8px; letter-spacing: 0; }
.muted { color: var(--muted); font-size: 12px; line-height: 1.8; }
.people { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 18px; }
.person-chip { display: inline-flex; align-items: center; gap: 8px; background: #f5f5f7; border-radius: 999px; padding: 6px 8px 6px 6px; font-size: 13px; }
.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; background: #e7edf5; color: #3c6085; font-weight: 500; font-size: 12px; }
.person-chip:nth-child(3n+2) .avatar { background: #eee9f5; color: #705993; }
.person-chip:nth-child(3n) .avatar { background: #e5efea; color: #47735c; }
.remove { display: grid; place-items: center; min-width: 28px; min-height: 30px; color: #747479; background: none; font-size: 18px; padding: 0; border-radius: 50%; }
.remove:hover { background: #e8e8ed; }
.person-form { display: flex; gap: 10px; }
.person-form input { min-width: 0; flex: 1; }
input, select, textarea { width: 100%; background: #fafafa; border: 1px solid #dcdce0; border-radius: 12px; padding: 13px 14px; font-size: 14px; min-height: 46px; transition: border-color .18s, outline .18s; }
input::placeholder { color: #86868b; }
.primary, .outline { min-height: 44px; padding: 12px 20px; border-radius: 999px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.primary { background: var(--blue); color: #fff; }
.primary:hover:not(:disabled) { background: #0077ed; box-shadow: 0 3px 12px #0071e318; }
.outline { background: #e8e8ed; color: var(--ink); }
.outline:hover:not(:disabled) { background: #dfdfe5; }
.quiet { color: var(--blue); font-size: 12px; background: none; padding: 8px 0; min-height: 36px; }
.quiet:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 3px; }
.wide { width: 100%; }
.hint { font-size: 11px; line-height: 1.85; color: var(--muted); margin: 12px 0; }
.expense-heading { margin-top: 30px; padding-top: 28px; border-top: 1px solid var(--line); }
.empty { border-radius: 16px; padding: 35px 18px; background: #fafafa; color: var(--muted); text-align: center; font-size: 13px; line-height: 1.9; }
.empty-symbol { color: #9d9da3; font-size: 28px; line-height: 1.4; margin-bottom: 12px; }
.expense { display: flex; gap: 13px; padding: 22px 0; border-bottom: 1px solid #ededf0; }
.expense:last-child { border-bottom: 0; padding-bottom: 0; }
.expense-icon { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; color: #707078; background: #f5f5f7; font-size: 18px; }
.expense-body { flex: 1; min-width: 0; }
.expense-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.expense h4 { font-size: 15px; font-weight: 550; line-height: 1.6; margin: 0 0 7px; }
.expense strong { font-size: 19px; font-weight: 550; white-space: nowrap; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.expense p { color: var(--muted); font-size: 11px; line-height: 1.9; overflow-wrap: anywhere; margin: 0; }
.expense-actions { display: flex; gap: 20px; margin-top: 7px; }
.expense-actions button { font-size: 11px; min-height: 32px; padding: 5px 0; }
.danger { color: #c33b33; }
.settlement { background: #fff; border-radius: var(--radius); padding: 28px; position: sticky; top: 24px; min-width: 0; }
.settlement .section-heading { margin-bottom: 12px; }
.seal { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: #eaf3ff; color: var(--blue); font-size: 10px; font-weight: 600; letter-spacing: -.03em; }
.settlement > .muted { margin: 0 0 8px; }
.settlement .empty { background: #fff; padding: 30px 6px; }
.transfer { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 23px 0; border-bottom: 1px solid var(--line); }
.transfer:last-child { border: 0; margin-bottom: 20px; }
.transfer div { font-size: 13px; overflow-wrap: anywhere; line-height: 1.8; }
.transfer .arrow { margin: 0 8px; color: #86868b; }
.transfer strong { font-size: 21px; font-weight: 550; letter-spacing: -.035em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.settlement > .primary { min-height: 46px; }
#details-toggle { margin-top: 5px; }
.balance { border-top: 1px solid var(--line); padding: 13px 0; font-size: 12px; line-height: 1.9; overflow-wrap: anywhere; }
.balance strong { float: right; font-weight: 550; }
.balance small { display: block; color: var(--muted); font-size: 11px; clear: both; }
.settle-note { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 22px; margin: 18px 0 0; color: var(--muted); font-size: 11px; }
.settle-note span { font-size: 20px; color: #86868b; }
.recycle { margin-top: 24px; background: #fff; border-radius: 18px; padding: 16px 24px; font-size: 12px; color: var(--muted); }
.recycle summary { cursor: pointer; padding: 4px 0; min-height: 26px; }
.recycle summary span { margin-left: 8px; font-variant-numeric: tabular-nums; }
.deleted-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.deleted-row span { overflow-wrap: anywhere; }
.footnote { display: flex; justify-content: space-between; align-items: start; gap: 28px; margin-top: 32px; padding: 0 4px 34px; color: var(--muted); }
.footnote b { color: #515156; font-size: 12px; font-weight: 500; }
.footnote p { font-size: 11px; line-height: 1.9; max-width: 640px; margin: 8px 0; }
.data-actions { display: flex; flex-wrap: wrap; flex-shrink: 0; gap: 16px; }
footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--muted); border-top: 1px solid var(--line); padding: 27px 4px 38px; font-size: 11px; }
footer .brand { color: #86868b; font-size: 18px; }
footer > span:last-child { font-size: 9px; letter-spacing: .1em; }
dialog { color: var(--ink); background: #fff; border: 1px solid #ffffff80; border-radius: 26px; padding: 32px; width: 480px; max-width: calc(100% - 32px); max-height: 88dvh; overflow: auto; box-shadow: 0 24px 100px #00000026; }
dialog::backdrop { background: #00000040; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.dialog-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 28px; }
.dialog-head .eyebrow { margin-bottom: 9px; }
.dialog-head h2 { font-size: 25px; }
.icon { display: grid; place-items: center; flex-shrink: 0; width: 30px; height: 30px; padding: 0; border-radius: 50%; background: #f0f0f3; color: #6e6e73; font-size: 23px; line-height: 1; }
label { display: block; font-size: 13px; font-weight: 400; margin-bottom: 20px; }
label input, label select { margin-top: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
fieldset { border: 0; margin: 0; padding: 12px 0; min-width: 0; }
legend { font-size: 13px; }
.select-actions { display: flex; gap: 22px; margin: 1px 0 7px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { display: flex; align-items: center; gap: 8px; border: 1px solid #e0e0e5; padding: 10px 13px; background: #fff; border-radius: 12px; margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.choices label:has(input:checked) { background: #f0f7ff; border-color: #b9d8fb; }
.choices input { min-height: 0; width: 16px; height: 16px; padding: 0; margin: 0; accent-color: var(--blue); }
textarea { resize: vertical; line-height: 1.85; font-size: 13px; }
#new-title { margin-top: 18px; }
#rename-form > h2 { margin-bottom: 24px; }
.error { color: #ad3029; font-size: 12px; line-height: 1.9; }
#cloud-error { padding: 16px 20px; margin-bottom: 24px; border-radius: 14px; border: 1px solid #efd5d1; background: #fff5f3; }
#confirm-message { color: var(--muted); font-size: 14px; line-height: 1.9; margin-top: 18px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 28px; }
#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(140px); opacity: 0; pointer-events: none; color: #fff; background: #1d1d1ff2; border-radius: 18px; padding: 14px 24px; max-width: calc(100% - 36px); text-align: center; font-size: 13px; line-height: 1.7; box-shadow: 0 6px 24px #00000015; transition: transform .25s ease, opacity .25s ease; z-index: 20; }
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
@media (max-width: 900px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; }
  .entries, .settlement { padding: 24px; }
  .summary > div { padding: 24px; }
  .summary strong { font-size: 35px; }
  .brand-note { display: none; }
}
@media (max-width: 720px) {
  .top { padding: 16px 22px; min-height: 68px; }
  .brand { font-size: 22px; }
  .logo { width: 30px; height: 30px; font-size: 22px; border-radius: 9px; }
  #save-state { max-width: 145px; font-size: 10px; }
  main { padding: 0 20px; }
  .intro { padding: 50px 0 44px; }
  h1 { font-size: 48px; line-height: 1.22; }
  .intro .eyebrow { font-size: 8px; letter-spacing: .14em; margin-bottom: 18px; }
  .subtitle { font-size: 14px; margin-top: 20px; }
  .cloud-toolbar { gap: 12px; margin-bottom: 24px; }
  .recent-label { max-width: 270px; font-size: 11px; }
  .recent-label select { font-size: 12px; padding: 12px; }
  .cloud-toolbar > .outline { padding: 12px 16px; font-size: 12px; }
  .welcome { padding: 38px 20px; border-radius: 24px; margin-bottom: 38px; }
  .welcome h2 { font-size: 28px; }
  .welcome > p:not(.eyebrow):not(.hint) { font-size: 14px; }
  .welcome .hint { font-size: 10px; }
  .book-head { align-items: start; gap: 16px; margin: 30px 0 20px; }
  h2 { font-size: 22px; }
  .book-head .eyebrow { font-size: 8px; letter-spacing: .12em; }
  .title-button { gap: 8px; }
  .book-actions { flex-direction: column-reverse; align-items: flex-end; gap: 3px; }
  .book-actions .outline { padding: 10px 15px; font-size: 12px; min-height: 40px; }
  .book-actions .quiet { font-size: 11px; min-height: 30px; }
  .summary { gap: 10px; grid-template-columns: 1.3fr 1fr 1fr; margin-bottom: 20px; }
  .summary > div { padding: 19px 14px; border-radius: 18px; gap: 10px; }
  .summary span { font-size: 11px; }
  .summary strong { font-size: 29px; }
  .summary > div:first-child strong { font-size: 27px; }
  .summary em { font-size: 12px; margin-left: 1px; }
  .summary small { font-size: 9px; line-height: 1.6; }
  .workspace { display: flex; flex-direction: column; gap: 20px; }
  .entries, .settlement { width: 100%; border-radius: 22px; padding: 24px 22px; }
  .settlement { position: static; }
  h3 { font-size: 17px; }
  .section-heading { gap: 8px; }
  .section-heading > .muted { font-size: 10px; }
  .person-form { gap: 8px; }
  .person-form .outline { padding: 12px 15px; font-size: 12px; }
  .person-form input { font-size: 13px; }
  .expense-heading { margin-top: 25px; padding-top: 25px; }
  .expense-heading .primary { padding: 10px 17px; min-height: 42px; font-size: 12px; }
  .expense { gap: 11px; padding: 22px 0; }
  .expense-icon { width: 34px; height: 34px; font-size: 16px; border-radius: 10px; }
  .expense h4 { font-size: 14px; }
  .expense strong { font-size: 17px; }
  .expense-top { gap: 8px; }
  .expense p { font-size: 10px; }
  .expense-actions button { min-height: 36px; }
  .transfer { padding: 24px 0; }
  .transfer strong { font-size: 23px; }
  .footnote { display: block; padding: 0 3px 22px; margin-top: 26px; }
  .footnote p { font-size: 10px; }
  .data-actions { margin-top: 10px; }
  .recycle { border-radius: 16px; padding: 15px 20px; }
  footer { padding: 24px 3px 32px; font-size: 10px; }
  footer > span:last-child { display: none; }
  dialog { padding: 26px 24px; border-radius: 24px; }
  .dialog-head h2 { font-size: 23px; }
  .form-grid { gap: 12px; }
  #toast { font-size: 12px; padding: 12px 20px; bottom: 22px; }
}
@media (max-width: 360px) {
  main { padding: 0 16px; }
  .top { padding-inline: 18px; }
  h1 { font-size: 42px; }
  .subtitle { font-size: 12px; }
  .summary { gap: 8px; }
  .summary > div { padding: 17px 10px; border-radius: 16px; }
  .summary > div:first-child strong { font-size: 24px; }
  .summary strong { font-size: 26px; }
  .entries, .settlement { padding: 22px 18px; }
  .person-form .outline { padding-inline: 11px; }
  h2 { font-size: 20px; }
  .book-actions .outline { padding-inline: 13px; }
  .expense-icon { display: none; }
  .welcome h2 { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
