:root {
  --color-primary: #2e2033;
  --color-accent: #f16d55;
  --color-peach: #fce7df;
  --color-background: #fcf9f5;
  --color-text: #302236;
  --muted: #8a808d;
  --border: #eee5e0;
  --white: #fffdfb;
  --green: #259979;
  --green-bg: #e8f5ef;
  --amber: #ba7a23;
  --amber-bg: #fff0dc;
  --red: #d35562;
  --red-bg: #ffe8e8;
  --shadow: 0 8px 28px #53322706;
  --radius: 22px;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
input,
select,
textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  padding: 12px 15px;
  color: var(--color-text);
  outline: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px #f16d5514;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 4px;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 650;
}
label input,
label select,
label textarea {
  margin-top: 7px;
}
p {
  color: var(--muted);
  margin: 7px 0 0;
}
h1,
h2,
h3 {
  letter-spacing: -0.035em;
  line-height: 1.2;
  margin: 0;
}
h1 {
  font-size: 38px;
  font-weight: 750;
}
h2 {
  font-size: 26px;
}
h3 {
  font-size: 19px;
}
.coral {
  color: var(--color-accent);
}
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
  vertical-align: middle;
}
.app-shell {
  max-width: 1500px;
  margin: auto;
  padding: 0 48px;
}
.topbar {
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.brand {
  flex-shrink: 0;
  display: block;
  width: 196px;
}
.brand img {
  display: block;
  width: 100%;
}
.main-nav {
  display: flex;
  gap: 9px;
  align-items: center;
}
.main-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 17px;
  border-radius: 16px;
  font-size: 13px;
  color: #75697b;
  white-space: nowrap;
  transition: background 0.2s;
}
.main-nav a:hover,
.main-nav a.active {
  background: #feebe6;
  color: var(--color-accent);
}
.main-nav a.active {
  font-weight: 650;
}
.profile {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  font-weight: 600;
}
.profile strong {
  display: block;
  font-size: 12px;
}
.profile div > span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--color-text);
  flex-shrink: 0;
}
.profile .icon-button {
  border: 0;
}
.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 0 0 15px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}
.subnav a:hover {
  color: var(--color-accent);
}
.greeting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 40px 0 34px;
  gap: 20px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2.2px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 13px;
}
.greeting p {
  font-size: 16px;
  margin-top: 10px;
}
.cheers {
  display: flex;
  align-items: center;
  gap: 19px;
  background: linear-gradient(115deg, #fff0e9, #fce8e1);
  padding: 22px 30px;
  border-radius: 65px;
  font-size: 13px;
  line-height: 1.6;
}
.cheers .icon {
  width: 43px;
  height: 43px;
  color: var(--color-accent);
}
.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 334px;
  gap: 26px;
  align-items: start;
}
.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 5px 0 22px;
}
.section-heading > div:first-child {
  margin-right: auto;
}
.section-heading h2 {
  font-size: 24px;
  white-space: nowrap;
}
.count {
  font-size: 12px;
  letter-spacing: 0;
  background: var(--color-peach);
  color: var(--color-accent);
  border-radius: 8px;
  padding: 3px 8px;
  vertical-align: middle;
  margin-left: 5px;
}
.sync {
  display: block;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.15px;
  margin-top: 6px;
}
.sync:before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--green);
  border-radius: 50%;
  margin-right: 6px;
}
.sync.stale {
  color: var(--red);
}
.sync.stale:before {
  background: var(--red);
}
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 25px;
  background: var(--white);
  padding: 0 14px;
  max-width: 240px;
  font-weight: 400;
}
.search .icon {
  width: 17px;
}
.search input {
  border: 0;
  background: transparent;
  min-height: 40px;
  padding: 0;
  margin: 0;
  font-size: 11px;
  box-shadow: none;
}
.pot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.pot-card {
  display: flex;
  text-align: left;
  flex-direction: column;
  align-items: flex-start;
  min-height: 220px;
  padding: 21px 20px 17px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--color-text);
  box-shadow: var(--shadow);
  transition:
    border-color 0.18s,
    transform 0.18s,
    box-shadow 0.18s;
  position: relative;
}
.pot-card:hover {
  transform: translateY(-2px);
  border-color: #f7b4a2;
  box-shadow: 0 10px 24px #f16d5510;
}
.pot-card.selected {
  border: 1.5px solid var(--color-accent);
  background: linear-gradient(145deg, #fffefa, #fff8f4);
  box-shadow: 0 6px 20px #f16d550a;
}
.icon-disc {
  display: grid;
  place-items: center;
  width: 51px;
  height: 51px;
  background: linear-gradient(140deg, #ffe0d5, #fff3ed);
  border-radius: 50%;
  margin-bottom: 13px;
}
.icon-disc .icon {
  width: 28px;
  height: 28px;
}
.pot-card h3 {
  font-size: 15px;
  letter-spacing: -0.3px;
  min-height: 20px;
  overflow-wrap: anywhere;
}
.pot-card .amount {
  font-size: 29px;
  line-height: 1.3;
  font-weight: 750;
  letter-spacing: -1px;
  margin: 6px 0;
}
.participants {
  font-size: 10px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}
.participants .icon {
  width: 15px;
  height: 15px;
}
.tile-bottom {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
}
.tile-bottom > .icon {
  width: 16px;
  height: 16px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 20px;
  padding: 5px 10px;
  font-size: 10px;
  background: var(--green-bg);
  color: var(--green);
  white-space: nowrap;
  letter-spacing: 0;
  font-weight: 550;
}
.badge:before {
  content: "";
  width: 7px;
  height: 7px;
  background: currentColor;
  border-radius: 50%;
}
.badge.low {
  background: var(--amber-bg);
  color: var(--amber);
}
.badge.empty-badge {
  background: var(--red-bg);
  color: var(--red);
}
.badge.closed {
  background: var(--border);
  color: var(--muted);
}
.debit-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 21px;
  box-shadow: var(--shadow);
  min-height: 550px;
}
.selected-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.selected-heading .icon-disc {
  margin: 0;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}
.selected-heading h3 {
  font-size: 15px;
  margin-bottom: 8px;
}
.selected-heading .badge {
  margin-left: auto;
  font-size: 9px;
  padding: 4px 7px;
}
.balance-box {
  margin: 20px 0;
  padding: 20px 18px;
  border-radius: 17px;
  background: linear-gradient(120deg, #fce6dc, #fff0e9);
  position: relative;
  overflow: hidden;
}
.balance-box:after {
  content: "◎";
  position: absolute;
  right: 18px;
  bottom: 4px;
  font-size: 70px;
  color: #f5b9a4;
  opacity: 0.6;
}
.balance-box > span {
  font-size: 12px;
  font-weight: 600;
}
.balance-box strong {
  display: block;
  font-size: 42px;
  line-height: 1.3;
  letter-spacing: -1.7px;
  margin-top: 7px;
  position: relative;
  z-index: 1;
}
.debit-form {
  padding-top: 3px;
}
.money-input {
  position: relative;
  display: flex;
  align-items: center;
  margin: 8px 0 12px;
}
.money-input > span {
  position: absolute;
  left: 18px;
  font-size: 22px;
  font-weight: 600;
}
.money-input input {
  padding: 13px 20px 13px 46px;
  border-color: #f6a48f;
  font-size: 25px;
  font-weight: 650;
  margin: 0;
  height: 63px;
}
.primary {
  border: 0;
  border-radius: 13px;
  min-height: 50px;
  background: linear-gradient(120deg, #fb7c61, #ed644d);
  color: white;
  font-weight: 650;
  padding: 14px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  box-shadow: 0 4px 9px #ef715611;
}
.primary:hover {
  filter: brightness(0.97);
}
.debit-form .primary,
.auth-panel .primary {
  width: 100%;
}
.quick-amounts {
  display: flex;
  gap: 7px;
  margin: 14px 0 20px;
}
.quick-amounts button {
  flex: 1;
  min-height: 40px;
  border: 1px solid #fae4da;
  background: #fff8f3;
  border-radius: 11px;
  font-size: 12px;
  color: var(--color-text);
  padding: 6px;
}
.quick-amounts button:hover,
.quick-amounts button.chosen {
  border-color: var(--color-accent);
  background: var(--color-peach);
}
.recent-button {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff0e9;
  padding: 16px 14px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 650;
  margin-top: 25px;
}
.recent-button > .icon:first-child {
  color: var(--color-accent);
}
.recent-button > .icon:last-child {
  margin-left: auto;
  width: 16px;
}
.panel-footnote {
  font-size: 10px;
  text-align: center;
  margin: 14px 0 0;
}
.together-banner {
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 23px 22px;
  margin-top: 22px;
  border: 1px solid #fae4da;
  border-radius: 20px;
  background: linear-gradient(110deg, #fce6dc, #fff5ed 60%, #f9dccc);
  position: relative;
  overflow: hidden;
}
.together-banner > .icon {
  width: 35px;
  height: 40px;
  color: var(--color-accent);
  stroke-width: 3.5;
}
.together-banner strong {
  font-size: 13px;
}
.together-banner p {
  font-size: 11px;
  margin-top: 3px;
}
.handwritten {
  font-family: "Segoe Print", cursive;
  font-size: 17px;
  font-style: italic;
  text-align: center;
  line-height: 1.25;
  transform: rotate(-7deg);
  margin-left: auto;
}
.empty {
  color: var(--muted);
  padding: 45px 20px;
  text-align: center;
  grid-column: 1/-1;
}
.empty > .icon {
  width: 50px;
  height: 50px;
  color: #edb8a6;
  margin: 20px;
}
.empty h3 {
  color: var(--color-text);
  line-height: 1.4;
}
.empty p {
  font-size: 13px;
  margin-top: 10px;
}
.empty .primary {
  margin-top: 20px;
  font-size: 13px;
}
.pot-grid > .empty {
  min-height: 455px;
  border: 1px dashed var(--border);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: var(--muted);
  font-size: 10px;
  border-top: 1px solid var(--border);
  margin-top: 35px;
  padding: 21px 0 25px;
}
.footer-dot {
  color: var(--color-accent);
  padding: 0 6px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 36px 0 28px;
}
.page-content {
  min-height: 440px;
}
.panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 25px;
  margin-bottom: 20px;
}
.panel h2 {
  font-size: 20px;
  margin-bottom: 17px;
}
.panel > p {
  margin-bottom: 20px;
  font-size: 13px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 17px;
  min-height: 45px;
  background: var(--white);
  color: var(--color-text);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 13px;
}
.secondary:hover {
  border-color: var(--color-accent);
}
.danger {
  color: var(--red);
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--white);
  margin: 18px 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
  white-space: nowrap;
}
th {
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  background: #fcf5f0;
  color: var(--muted);
  font-weight: 650;
}
td,
th {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
tbody tr:last-child td {
  border-bottom: 0;
}
td .secondary {
  padding: 7px 11px;
  min-height: 35px;
  font-size: 11px;
}
td .secondary + .secondary {
  margin-left: 6px;
}
.positive {
  color: var(--green);
  font-weight: 650;
}
.negative {
  color: var(--color-accent);
  font-weight: 650;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}
.stat {
  padding: 23px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
}
.stat > span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.stat strong {
  font-size: 31px;
  letter-spacing: -1px;
  display: block;
  margin: 9px 0;
}
.stat small {
  font-size: 10px;
  color: var(--muted);
}
.notice {
  padding: 15px 18px;
  background: var(--color-peach);
  border-radius: 12px;
  font-size: 12px;
  margin-bottom: 20px;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
}
.toolbar p {
  font-size: 13px;
}
.form-error {
  color: var(--red);
  font-size: 13px;
  margin: 10px 0;
  line-height: 1.5;
}
.form-hint {
  font-size: 11px;
  line-height: 1.7;
}
.muted {
  color: var(--muted);
}
.small-pill {
  font-size: 10px;
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 7px 13px;
  color: var(--muted);
  white-space: nowrap;
}
.public-shell {
  max-width: 1150px;
  margin: auto;
  padding: 0 45px;
}
.public-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 35px 0;
}
.public-header .brand {
  width: 165px;
}
.login-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 100px;
  align-items: center;
  padding: 48px 0 55px;
}
.login-story h1 {
  font-size: 49px;
  line-height: 1.15;
}
.login-story > p {
  font-size: 15px;
  max-width: 350px;
  margin-top: 18px;
}
.story-card {
  margin-top: 45px;
  width: 340px;
  height: 215px;
  background: #fffcf7;
  box-shadow: 0 18px 30px #36232b17;
  border: 1px solid #eee1d9;
  border-radius: 17px;
  padding: 26px;
  transform: rotate(-6deg);
  position: relative;
  overflow: hidden;
}
.story-card:after,
.physical-card.card-front:after {
  content: "";
  position: absolute;
  width: 170px;
  height: 230px;
  border-radius: 90px;
  background: var(--color-accent);
  right: -110px;
  bottom: -80px;
  box-shadow: -43px -9px 0 5px #fbc8b4;
  transform: rotate(34deg);
}
.story-card img {
  width: 170px;
  display: block;
}
.story-card span {
  font-size: 19px;
  line-height: 1.25;
  display: block;
  margin-top: 12px;
}
.story-card small {
  font-size: 6px;
  letter-spacing: 2.5px;
  display: block;
  margin-top: 23px;
}
.story-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
  font-size: 12px;
  color: var(--muted);
}
.story-note .icon {
  color: var(--color-accent);
}
.auth-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 36px;
  box-shadow: var(--shadow);
}
.auth-panel h2 {
  font-size: 29px;
}
.auth-panel > p {
  font-size: 13px;
  margin: 12px 0 26px;
}
.auth-panel form label {
  margin-top: 17px;
}
.auth-panel .primary {
  margin-top: 12px;
  justify-content: space-between;
}
.auth-panel .form-hint {
  margin: 24px 0 0;
  text-align: center;
}
.invite-panel {
  max-width: 480px;
  margin: 45px auto 90px;
}
.invite-panel h1 {
  font-size: 31px;
}
.error-logo {
  width: 170px;
  margin-bottom: 30px;
}
.participant-wrap {
  max-width: 510px;
  margin: 15px auto 50px;
}
.participant-title {
  text-align: center;
  margin: 25px 0;
}
.participant-title h1 {
  font-size: 30px;
}
.participant-title p {
  font-size: 12px;
}
.participant-balance {
  background: linear-gradient(135deg, #fce1d4, #fff0e7);
  border: 1px solid #f6dace;
  border-radius: 24px;
  padding: 30px;
  text-align: center;
  margin: 22px 0;
}
.participant-balance > span {
  font-size: 13px;
}
.participant-balance strong {
  font-size: 49px;
  letter-spacing: -2px;
  display: block;
  margin: 5px 0;
}
.participant-balance .sync {
  font-size: 10px;
}
.deposit-panel .primary {
  width: 100%;
  margin-top: 16px;
}
.deposit-panel label {
  margin: 18px 0 5px;
}
.deposit-panel .quick-amounts {
  margin-bottom: 10px;
}
.fee-summary {
  background: #fcf7f2;
  border-radius: 12px;
  padding: 14px 17px;
  margin-top: 20px;
  font-size: 12px;
}
.fee-summary div {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
}
.fee-summary .total {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 12px;
  font-weight: 700;
  font-size: 15px;
}
.activity {
  margin-top: 30px;
}
.activity h2 {
  font-size: 20px;
  margin-bottom: 20px;
}
.activity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}
.activity-row .icon-disc {
  margin: 0;
  width: 37px;
  height: 37px;
}
.activity-row .icon {
  width: 18px;
  height: 18px;
}
.activity-row strong {
  font-size: 13px;
}
.activity-row small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.activity-row .value {
  margin-left: auto;
  font-size: 15px;
  font-weight: 650;
}
.test-banner {
  background: var(--color-primary);
  color: white;
  font-size: 11px;
  letter-spacing: 2px;
  text-align: center;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 25px;
}
.payment-buttons {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}
.payment-buttons button {
  width: 100%;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: white;
  border-radius: 14px;
  padding: 15px 23px;
  box-shadow: 0 8px 40px #0002;
  font-size: 13px;
  z-index: 20;
  max-width: 90vw;
}
.toast[hidden] {
  display: none;
}
dialog {
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 30px;
  width: 460px;
  max-width: calc(100vw - 32px);
  color: var(--color-text);
  box-shadow: 0 20px 100px #28192c24;
  background: var(--white);
}
dialog::backdrop {
  background: #2e203368;
  backdrop-filter: blur(4px);
}
dialog h2 {
  font-size: 24px;
  line-height: 1.3;
  margin-bottom: 18px;
}
dialog .form-actions {
  justify-content: stretch;
}
dialog .form-actions > * {
  flex: 1;
}
dialog video {
  width: 100%;
  border-radius: 16px;
  margin: 15px 0;
}
dialog pre,
.log-block {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 11px;
}
.print-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  max-width: 1000px;
  margin: 35px auto;
  padding: 0 25px;
}
.card-sheet {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 50px;
}
.physical-card {
  width: 85.6mm;
  height: 53.98mm;
  border-radius: 3.5mm;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px #2e203322;
  flex-shrink: 0;
}
.card-front {
  padding: 8mm;
  background: #fffaf4;
}
.card-front > img {
  width: 49mm;
  position: relative;
  z-index: 1;
}
.card-front h1 {
  font-size: 5.3mm;
  font-weight: 450;
  line-height: 1.3;
  letter-spacing: -0.2mm;
  margin-top: 3mm;
}
.card-front > small {
  font-size: 1.8mm;
  letter-spacing: 0.6mm;
  position: absolute;
  bottom: 5mm;
}
.card-back {
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4mm;
  gap: 2mm;
}
.back-logo {
  width: 32mm;
  filter: brightness(0) invert(1);
  display: block;
  margin-bottom: 3mm;
}
.card-back strong {
  font-size: 2.7mm;
  letter-spacing: 0.3mm;
}
.card-back p {
  font-size: 2.7mm;
  color: #fbd5c3;
  margin-top: 8mm;
}
.card-back small {
  font-size: 2.3mm;
}
.qr-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 40mm;
  padding: 1.5mm 1mm;
  background: #fffdf9;
  border-radius: 3mm;
  color: var(--color-primary);
}
.qr-block img {
  width: 35mm;
  height: 35mm;
}
.qr-block strong {
  font-size: 2.5mm;
  letter-spacing: 0;
}
.qr-block span {
  font-size: 3mm;
  color: var(--color-accent);
  font-weight: 700;
}
.card-front:after {
  width: 40mm !important;
  height: 55mm !important;
  right: -25mm !important;
  bottom: -25mm !important;
}
@media (min-width: 1400px) {
  .pot-card {
    min-height: 238px;
  }
  .debit-panel {
    min-height: 604px;
  }
  .pot-card h3 {
    font-size: 17px;
  }
  .pot-card .amount {
    font-size: 33px;
  }
  .participants {
    font-size: 11px;
  }
  .pot-card .icon-disc {
    width: 57px;
    height: 57px;
  }
  .together-banner {
    margin-top: 24px;
  }
  .dashboard {
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 30px;
  }
}
@media (max-width: 1150px) {
  .app-shell {
    padding: 0 28px;
  }
  .topbar {
    gap: 18px;
    height: 115px;
  }
  .brand {
    width: 165px;
  }
  .main-nav {
    gap: 0;
  }
  .main-nav a {
    padding: 12px;
    gap: 7px;
    font-size: 12px;
  }
  .profile div {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .profile {
    gap: 8px;
  }
  .profile .icon-button {
    width: 30px;
  }
  .dashboard {
    grid-template-columns: minmax(0, 1fr) 305px;
    gap: 18px;
  }
  .pot-grid {
    gap: 12px;
  }
  .pot-card {
    padding: 18px 15px;
    min-height: 216px;
  }
  .pot-card h3 {
    font-size: 13px;
  }
  .pot-card .amount {
    font-size: 26px;
  }
  .search {
    max-width: 200px;
  }
  .section-heading h2 {
    font-size: 22px;
  }
  .section-heading .icon-button {
    width: 38px;
    height: 38px;
  }
  .handwritten {
    font-size: 14px;
  }
  .greeting h1 {
    font-size: 34px;
  }
  .greeting p {
    font-size: 14px;
  }
  .cheers {
    font-size: 11px;
    padding: 20px 23px;
  }
  .debit-panel {
    padding: 20px 17px;
  }
  .selected-heading {
    gap: 8px;
  }
  .selected-heading h3 {
    font-size: 13px;
  }
  .selected-heading .badge {
    display: none;
  }
  .balance-box strong {
    font-size: 39px;
  }
  .login-layout {
    gap: 50px;
  }
  .login-story h1 {
    font-size: 42px;
  }
}
@media (max-width: 900px) {
  .profile div {
    display: none;
  }
  .main-nav a {
    padding: 12px 14px;
  }
  .greeting {
    margin: 25px 0;
  }
  .cheers {
    display: none;
  }
  .dashboard {
    grid-template-columns: minmax(0, 1fr) 285px;
  }
  .pot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .section-heading {
    flex-wrap: wrap;
  }
  .section-heading > div:first-child {
    width: 100%;
    margin-bottom: 5px;
  }
  .search {
    max-width: none;
    flex: 1;
  }
  .pot-card {
    min-height: 210px;
  }
  .handwritten {
    display: none;
  }
  .together-banner {
    padding: 18px 15px;
  }
  .together-banner strong {
    font-size: 11px;
  }
  .together-banner p {
    font-size: 10px;
  }
  .together-banner > .icon {
    width: 27px;
  }
  .debit-panel {
    margin-top: 0;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .login-layout {
    gap: 30px;
  }
  .login-story h1 {
    font-size: 35px;
  }
  .story-card {
    width: 280px;
    height: 190px;
    padding: 20px;
  }
  .story-card img {
    width: 150px;
  }
  .story-card span {
    font-size: 17px;
  }
  .auth-panel {
    padding: 27px;
  }
  .public-shell {
    padding: 0 25px;
  }
  .login-layout {
    padding-top: 30px;
  }
  .auth-panel h2 {
    font-size: 26px;
  }
}
@media (max-width: 650px) {
  .app-shell {
    padding: 0 18px;
  }
  .topbar {
    height: auto;
    min-height: 95px;
    flex-wrap: wrap;
    gap: 0;
    padding: 20px 0 10px;
  }
  .brand {
    width: 145px;
  }
  .profile {
    margin-left: auto;
  }
  .avatar {
    width: 36px;
    height: 36px;
    font-size: 12px;
  }
  .main-nav {
    order: 3;
    justify-content: space-between;
    width: 100%;
    margin: 18px 0 3px;
  }
  .main-nav a {
    padding: 12px 14px;
    font-size: 10px;
    gap: 7px;
  }
  .main-nav .icon {
    width: 18px;
    height: 18px;
  }
  .subnav {
    gap: 15px;
    font-size: 11px;
    padding: 8px 0 13px;
  }
  .greeting h1 {
    font-size: 32px;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 1.6px;
  }
  .greeting {
    margin: 25px 0;
  }
  .greeting p {
    font-size: 13px;
    max-width: 300px;
  }
  .dashboard {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .pots-area,
  .debit-panel {
    width: 100%;
  }
  .section-heading > div:first-child {
    width: auto;
    margin: 0 auto 0 0;
  }
  .section-heading h2 {
    font-size: 21px;
  }
  .search {
    order: 3;
    flex: 1 0 100%;
    margin-top: 4px;
  }
  .pot-card {
    padding: 18px;
    min-height: 211px;
  }
  .pot-card h3 {
    font-size: 14px;
  }
  .pot-card .amount {
    font-size: 28px;
  }
  .debit-panel {
    min-height: 0;
  }
  .debit-panel .empty {
    padding: 10px 20px 25px;
  }
  .selected-heading .badge {
    display: inline-flex;
  }
  .selected-heading h3 {
    font-size: 16px;
  }
  .selected-heading {
    gap: 13px;
  }
  .balance-box strong {
    font-size: 44px;
  }
  .together-banner {
    display: none;
  }
  footer {
    flex-wrap: wrap;
    font-size: 9px;
    gap: 8px;
    margin-top: 28px;
  }
  footer span:last-child {
    display: none;
  }
  .page-heading {
    margin: 26px 0 22px;
  }
  .page-heading h1 {
    font-size: 29px;
  }
  .page-heading p {
    font-size: 12px;
  }
  .page-heading .sync {
    font-size: 9px;
  }
  .panel {
    padding: 20px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .stats {
    gap: 12px;
  }
  .stat {
    padding: 17px;
  }
  .stat strong {
    font-size: 26px;
  }
  .stat > span {
    font-size: 11px;
  }
  .toolbar {
    align-items: flex-start;
  }
  .toolbar .primary {
    font-size: 12px;
    padding: 12px;
  }
  .public-shell {
    padding: 0 20px;
  }
  .public-header {
    padding: 25px 0;
  }
  .public-header .brand {
    width: 145px;
  }
  .login-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 20px 0 30px;
    align-items: stretch;
  }
  .login-story {
    text-align: center;
  }
  .login-story h1 {
    font-size: 38px;
  }
  .login-story > p {
    font-size: 13px;
    margin: 14px auto 0;
    max-width: 290px;
  }
  .story-card,
  .story-note {
    display: none;
  }
  .auth-panel {
    padding: 26px;
  }
  .auth-panel > p {
    font-size: 12px;
  }
  .login-story .eyebrow {
    display: none;
  }
  .auth-panel .icon-disc {
    display: none;
  }
  .invite-panel {
    margin: 25px auto 50px;
  }
  .participant-wrap {
    margin-top: 10px;
  }
  .participant-title h1 {
    font-size: 27px;
  }
  .participant-balance {
    padding: 25px;
  }
  .participant-balance strong {
    font-size: 44px;
  }
  .print-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .card-sheet {
    padding: 20px;
    gap: 25px;
  }
}
@media print {
  @page {
    size: A4;
    margin: 15mm;
  }
  body {
    background: white;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .print-toolbar {
    display: none;
  }
  .card-sheet {
    padding: 0;
    display: flex;
    gap: 10mm;
    justify-content: flex-start;
  }
  .physical-card {
    box-shadow: none;
    border: 0.2mm solid #ddd;
    break-inside: avoid;
  }
}
