@font-face {
  font-family: Vazirmatn;
  src: url("/fonts/Vazirmatn.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --teal-light: #f0fdfa;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-500: #64748b;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --radius: 16px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--slate-50);
  color: var(--slate-700);
  font-family: Vazirmatn, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.7;
}
::selection {
  background: #ccfbf1;
  color: #134e4a;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
a:focus-visible,
button:focus-visible {
  outline: 3px solid #5eead4;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 24px;
  font-weight: 900;
  line-height: 1.5;
  color: var(--slate-900);
}
h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--slate-900);
}
h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--slate-900);
}
p {
  margin-top: 6px;
}
small {
  font-size: 11px;
}
strong {
  font-weight: 700;
}
.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}
.muted {
  color: var(--slate-500);
  font-size: 12px;
  font-weight: 400;
}
.help {
  font-size: 11px;
  color: var(--slate-500);
  margin: 5px 0 14px;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.center {
  text-align: center;
}
.card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 1px 2px #0f172a05;
}
.card + .card,
.card + section,
.card + .section-heading {
  margin-top: 24px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.section-heading h1,
.section-heading h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-heading form {
  display: flex;
  gap: 8px;
  align-items: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--teal);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 16px;
  line-height: 1.7;
  white-space: nowrap;
  transition:
    background 0.15s,
    box-shadow 0.15s;
  box-shadow: 0 1px 2px #0d948811;
}
.btn:hover {
  background: var(--teal-dark);
}
.btn-small {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
}
.btn.secondary {
  color: var(--slate-700);
  background: var(--slate-100);
  border-color: var(--slate-200);
  box-shadow: none;
}
.btn.secondary:hover {
  background: var(--slate-200);
}
.btn.danger {
  color: #be123c;
  background: #fff1f2;
  border-color: #ffe4e6;
}
.btn.danger:hover {
  background: #ffe4e6;
}
.full {
  width: 100%;
  margin-top: 20px;
  padding: 12px;
}
.badge {
  display: inline-flex;
  padding: 3px 10px;
  color: var(--teal-dark);
  background: var(--teal-light);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}
.type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex-shrink: 0;
}
.type-icon.large {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}
.type-icon.large .icon {
  width: 25px;
  height: 25px;
}
.type-icon.building {
  background: #fef3c7;
  color: #b45309;
}
.type-icon.travel {
  background: #ccfbf1;
  color: var(--teal-dark);
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}
.avatar.large {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  font-size: 24px;
}
.header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #ffffffed;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-100);
}
.header-inner {
  max-width: 1152px;
  margin: auto;
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}
.logo-symbol {
  width: 36px;
  height: 36px;
  background: var(--teal);
  color: white;
  border-radius: 12px;
  padding: 3px;
  box-shadow: 0 1px 3px #0d948844;
}
.logo-symbol svg {
  transform: rotate(-12deg);
  width: 100%;
  height: 100%;
}
.logo strong {
  display: block;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: var(--slate-900);
}
.logo small {
  display: block;
  font-size: 10px;
  color: var(--teal-dark);
  letter-spacing: 1px;
  line-height: 1.4;
}
.top-nav {
  display: flex;
  padding: 4px;
  border-radius: 12px;
  background: #f1f5f9b3;
  gap: 4px;
}
.top-nav a {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 8px;
}
.top-nav a.active {
  background: #fff;
  color: #115e59;
  box-shadow: 0 1px 2px #00000008;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.profile-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 4px;
  border-radius: 10px;
}
.profile-link small {
  display: block;
  color: var(--slate-500);
  font-size: 10px;
}
.app-shell {
  display: flex;
  min-height: calc(100vh - 64px);
}
.sidebar {
  width: 256px;
  padding: 16px;
  background: white;
  border-left: 1px solid var(--slate-200);
  flex-shrink: 0;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}
.sidebar nav .icon {
  color: var(--teal);
  width: 16px;
  height: 16px;
}
.sidebar a.active {
  background: var(--teal-light);
  color: #115e59;
}
.sidebar a:hover {
  background: var(--slate-50);
}
.sidebar .section-heading {
  margin: 0 8px 10px;
  font-size: 11px;
}
.sidebar-group {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 12px;
}
.sidebar-group .type-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
}
.sidebar-group .icon {
  width: 14px;
  height: 14px;
}
.sidebar-group span:nth-child(2) {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-group small {
  font-size: 10px;
  color: var(--slate-500);
}
.dashed-button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  margin-top: 18px;
  border: 1px dashed #5eead4;
  border-radius: 12px;
  color: var(--teal-dark);
  font-size: 12px;
  background: white;
  width: 100%;
}
.main-content {
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
  padding: 32px;
  min-width: 0;
  padding-bottom: 90px;
}
.public-shell {
  display: block;
}
.public-content {
  max-width: none;
  padding: 0;
}
.greeting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.balance-summary {
  padding: 14px;
  background: var(--slate-50);
  border: 1px solid var(--slate-100);
  border-radius: 12px;
}
.balance-summary > .muted {
  display: block;
  margin-bottom: 4px;
}
.balance-badge {
  font-weight: 900;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 14px;
}
.balance-badge small {
  font-weight: 600;
  font-size: 11px;
}
.balance-positive {
  color: #047857;
}
.balance-negative {
  color: #be123c;
}
.balance-zero {
  color: #475569;
}
.invitations {
  padding: 20px;
  margin-bottom: 24px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 16px;
}
.invitations h2 {
  color: #92400e;
  font-size: 13px;
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}
.invitation-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  background: white;
  border: 1px solid #fef3c7;
  border-radius: 12px;
  font-size: 12px;
}
.invitation-card + .invitation-card {
  margin-top: 10px;
}
.invitation-card form {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.group-card {
  padding: 20px;
  transition:
    border 0.15s,
    box-shadow 0.15s;
}
.group-card:hover {
  border-color: #99f6e4;
  box-shadow: 0 4px 12px #0f172a08;
}
.group-card > .row {
  justify-content: space-between;
  margin-bottom: 16px;
}
.group-card h3 {
  margin-bottom: 4px;
}
.group-card-balance {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: var(--slate-50);
  border-radius: 12px;
  padding: 12px;
  margin-top: 18px;
}
.group-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  font-size: 11px;
  color: var(--teal-dark);
}
.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--slate-100);
  padding: 4px;
  border-radius: 12px;
  margin: 0 0 20px;
  width: fit-content;
}
.tabs a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.tabs .active {
  background: white;
  color: var(--slate-900);
  box-shadow: 0 1px 2px #0f172a10;
}
.tabs .icon {
  width: 16px;
  height: 16px;
}
.group-tabs {
  width: 100%;
  margin-top: 20px;
}
.group-tabs a {
  flex: 1;
  padding: 12px;
}
.two-grid,
.three-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.three-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.soft-panel {
  background: var(--slate-50);
  border: 1px solid var(--slate-100);
  padding: 16px;
  border-radius: 12px;
  margin: 20px 0;
}
.summary-grid .soft-panel {
  margin: 0;
}
.soft-panel p:first-child {
  margin-top: 0;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  font-size: 12px;
}
.expense-row,
.member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--slate-100);
  font-size: 12px;
}
.expense-row:last-child,
.member-row:last-child {
  border: 0;
}
.expense-row > div,
.member-row > div {
  flex: 1;
  min-width: 0;
}
.expense-row small,
.member-row small {
  display: block;
  margin-top: 4px;
}
.expense-row:hover {
  background: var(--slate-50);
}
.expense-row > strong {
  flex-shrink: 0;
}
.expense-row .icon:last-child {
  color: #94a3b8;
}
.member-row .balance-badge {
  margin-right: auto;
}
.transfer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--teal-light);
  border: 1px solid #ccfbf1;
  border-radius: 12px;
  margin-top: 12px;
  font-size: 12px;
}
.transfer-row p {
  margin: 0;
}
.form-card {
  max-width: 620px;
  margin: 0 auto;
}
.form-card h1 {
  font-size: 20px;
}
.form-card > .muted {
  margin-bottom: 18px;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin: 16px 0 6px;
  color: var(--slate-700);
}
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #cbd5e1;
  background: white;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 13px;
  color: var(--slate-900);
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px #0d948822;
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--teal);
  width: 17px;
  height: 17px;
  vertical-align: middle;
}
input[dir="ltr"] {
  text-align: left;
}
textarea {
  min-height: 90px;
  resize: vertical;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 20px 0;
  min-width: 0;
}
legend {
  font-size: 16px;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 12px;
}
.validation {
  color: #be123c;
  font-size: 12px;
}
.validation-summary-errors {
  padding: 12px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 12px;
  margin: 12px 0;
}
.validation-summary-valid {
  display: none;
}
.validation ul {
  margin: 0;
  padding-right: 18px;
}
.input-validation-error {
  border-color: #fb7185 !important;
}
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.wizard-progress {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 16px 0 24px;
  background: var(--slate-100);
  border-radius: 12px;
}
.wizard-progress li {
  flex: 1;
  padding: 10px 4px;
  text-align: center;
  font-size: 12px;
}
.wizard-progress .active {
  color: var(--teal-dark);
  background: var(--teal-light);
  border-radius: 12px;
  font-weight: 800;
}
.type-choice {
  border: 2px solid var(--slate-200);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  cursor: pointer;
}
.type-choice:has(input:checked) {
  border-color: var(--teal);
  background: var(--teal-light);
}
.type-choice input {
  position: absolute;
  left: 16px;
  top: 16px;
}
.type-choice strong {
  font-size: 16px;
}
.type-choice small {
  color: var(--slate-500);
  font-size: 12px;
}
.wizard-next {
  margin-top: 20px;
}
.suggestion-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.suggestion-chips button {
  border: 0;
  border-radius: 8px;
  background: var(--slate-100);
  padding: 6px 10px;
  font-size: 11px;
  color: var(--slate-700);
}
.invite-row + .invite-row {
  border-top: 1px solid var(--slate-100);
  margin-top: 12px;
}
.participant-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--slate-50);
  border: 1px solid var(--slate-100);
  border-radius: 12px;
  margin-top: 8px;
}
.participant-row > label {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0;
}
.custom-share {
  max-width: 170px;
}
.custom-share label {
  font-size: 10px;
  margin: 0 0 2px;
}
.custom-share input {
  padding: 6px 10px !important;
}
.expense-detail {
  max-width: 660px;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
}
.detail-banner {
  background: var(--teal-dark);
  color: white;
  padding: 24px;
}
.detail-banner h1 {
  color: white;
  margin-top: 8px;
}
.detail-banner p,
.detail-banner span {
  font-size: 12px;
  color: #ccfbf1;
}
.detail-body {
  padding: 24px;
}
.detail-body h2 {
  font-size: 14px;
  margin: 20px 0 10px;
}
.breakdown-row {
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 8px;
  border: 1px solid var(--slate-200);
}
.breakdown-row.balance-positive {
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.breakdown-row.balance-negative {
  background: #fff1f2;
  border-color: #fecdd3;
}
.timeline {
  border-right: 2px solid var(--slate-100);
  padding-right: 20px;
  margin-top: 20px;
}
.timeline-item {
  position: relative;
  background: var(--slate-50);
  border: 1px solid var(--slate-100);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 12px;
}
.timeline-item:before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid #14b8a6;
  background: white;
  border-radius: 50%;
  right: -28px;
  top: 20px;
}
.timeline-item time {
  margin-right: auto;
  font-size: 11px;
}
.timeline-item p {
  font-weight: 600;
  margin-top: 10px;
}
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
}
.empty-state > .icon {
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
}
.empty-state h3 {
  color: var(--slate-500);
  font-size: 14px;
}
.empty-state p {
  font-size: 12px;
}
.alert {
  padding: 14px 16px;
  margin-bottom: 20px;
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  color: #047857;
  border-radius: 12px;
  font-size: 12px;
}
.login-wrapper {
  max-width: 384px;
  margin: 56px auto;
  padding: 0 16px;
}
.login-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}
.login-brand .logo-symbol {
  width: 44px;
  height: 44px;
}
.login-brand .logo strong {
  font-size: 30px;
}
.login-card {
  padding: 28px;
  box-shadow: 0 10px 20px #0f172a0a;
}
.login-card h1 {
  font-size: 20px;
}
.login-wrapper > .back-link {
  display: block;
  text-align: center;
  margin-top: 16px;
}
.hero {
  text-align: center;
  padding: 64px 24px;
  background: linear-gradient(#f0fdfa80, #fff, var(--slate-50));
  border-bottom: 1px solid var(--slate-200);
}
.hero-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 5px 14px;
  background: #ccfbf1;
  color: #115e59;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: 54px;
  line-height: 1.4;
  max-width: 850px;
  margin: auto;
}
.hero h1 em {
  font-style: normal;
  color: var(--teal-dark);
  text-decoration: underline wavy #5eead4 2px;
  text-underline-offset: 8px;
}
.hero > p {
  font-size: 18px;
  max-width: 660px;
  margin: 24px auto 32px;
  color: #475569;
  line-height: 1.9;
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 56px;
}
.hero-actions .btn {
  padding: 14px 24px;
  font-size: 14px;
}
.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 850px;
  margin: auto;
  text-align: right;
}
.features .type-icon {
  margin-bottom: 20px;
}
.features p {
  font-size: 13px;
  color: var(--slate-500);
  margin-top: 10px;
}
.how {
  padding: 64px 24px;
  max-width: 1000px;
  margin: auto;
  text-align: center;
}
.how h2 {
  margin-bottom: 24px;
  font-size: 24px;
}
.how .btn {
  margin-top: 30px;
}
.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--teal);
  color: white;
  border-radius: 50%;
  margin: 0 auto 16px;
  font-size: 18px;
  font-weight: 900;
}
.error-card {
  margin-top: 64px;
  text-align: center;
}
.error-card .btn {
  margin-top: 24px;
}
.bottom-nav {
  display: none;
}
.js-only {
  display: none;
}
.js .js-only {
  display: flex;
}
.js [hidden],
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.skip-link {
  position: absolute;
  top: -100px;
  background: var(--teal);
  color: white;
  padding: 10px;
  z-index: 100;
}
.skip-link:focus {
  top: 0;
}
@media (max-width: 1100px) {
  .sidebar {
    width: 224px;
  }
  .main-content {
    padding: 24px;
  }
  .hero h1 {
    font-size: 44px;
  }
  .expense-row {
    gap: 8px;
  }
  .group-card-balance {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (max-width: 767px) {
  .sidebar,
  .top-nav {
    display: none;
  }
  .main-content {
    padding: 20px 16px 110px;
  }
  .public-content {
    padding: 0;
  }
  .header-inner {
    padding: 0 16px;
  }
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    z-index: 30;
    background: #fffffff2;
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--slate-200);
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    justify-content: space-around;
    box-shadow: 0 -2px 12px #0f172a08;
  }
  .bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 11px;
    color: #475569;
  }
  .bottom-nav .icon {
    width: 20px;
    height: 20px;
  }
  .bottom-nav .expense-fab {
    position: relative;
    top: -20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--teal);
    color: white;
    border: 4px solid white;
    box-shadow: 0 4px 12px #0d948844;
  }
  .greeting {
    align-items: flex-start;
    flex-direction: column;
  }
  .greeting h1 {
    font-size: 22px;
  }
  .balance-summary {
    width: 100%;
  }
  .group-tabs a {
    font-size: 11px;
    padding: 10px 4px;
    gap: 4px;
  }
  .card {
    padding: 20px;
  }
  .expense-detail {
    padding: 0;
  }
  .hero {
    padding: 42px 20px;
  }
  .hero h1 {
    font-size: 34px;
  }
  .hero > p {
    font-size: 16px;
  }
  .hero-actions {
    flex-direction: column;
    margin-bottom: 32px;
  }
  .three-grid {
    grid-template-columns: 1fr;
  }
  .how {
    padding: 40px 20px;
  }
  .section-heading {
    gap: 12px;
  }
  .summary-grid {
    gap: 10px;
  }
  .expense-row {
    flex-wrap: wrap;
  }
  .expense-row > div {
    min-width: 150px;
  }
  .expense-row > strong {
    margin-right: 46px;
  }
  .expense-row > .icon:last-child {
    margin-right: auto;
  }
  .member-row {
    flex-wrap: wrap;
  }
  .member-row .balance-badge {
    margin-right: 44px;
  }
  .timeline-item .row {
    gap: 8px;
  }
  .timeline-item time {
    font-size: 10px;
  }
  .transfer-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .form-card h1 {
    font-size: 18px;
  }
  .section-heading form select {
    font-size: 11px;
    padding: 8px;
    max-width: 130px;
  }
  .features {
    gap: 12px;
  }
  .features h2 {
    font-size: 16px;
  }
  .invitations {
    padding: 16px;
  }
  .invitation-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .invitation-card form {
    align-self: flex-end;
  }
  .hero-badge {
    font-size: 10px;
  }
  .two-grid.invite-row {
    gap: 10px;
  }
  .type-choice {
    padding: 16px;
  }
  .type-choice small {
    font-size: 11px;
  }
  .soft-panel {
    padding: 12px;
  }
}
@media (max-width: 480px) {
  .desktop-only {
    display: none;
  }
  .group-grid,
  .features {
    grid-template-columns: 1fr;
  }
  .group-card-balance {
    flex-direction: row;
    align-items: center;
  }
  .hero h1 {
    font-size: 30px;
  }
  .card {
    padding: 18px;
  }
  .expense-detail {
    padding: 0;
  }
  .section-heading > .btn {
    padding: 9px 12px;
    font-size: 11px;
  }
  .summary-grid {
    grid-template-columns: 1fr;
  }
  .greeting .muted {
    font-size: 11px;
  }
  .type-choices {
    grid-template-columns: 1fr;
  }
  .type-choice {
    min-height: 130px;
  }
  .form-actions {
    gap: 8px;
  }
  .form-actions .btn {
    font-size: 11px;
  }
  .login-wrapper {
    margin-top: 32px;
  }
  .two-grid:not(.type-choices):not(.invite-row):not(.summary-grid) {
    gap: 12px;
  }
  .participant-row {
    gap: 8px;
  }
  .custom-share {
    max-width: 135px;
  }
  .detail-body {
    padding: 18px;
  }
  .breakdown-row .balance-badge {
    margin-right: 0;
  }
  .breakdown-row {
    display: block;
  }
  .group-tabs .icon {
    width: 14px;
    height: 14px;
  }
  .group-tabs a {
    font-size: 10px;
  }
}
/* Let long group names and primary actions wrap within the mobile card. */
@media (max-width: 767px) {
  .section-heading {
    flex-wrap: wrap;
  }
  .section-heading > .row {
    min-width: 0;
    width: 100%;
    align-items: flex-start;
  }
  .section-heading > .row > div {
    min-width: 0;
  }
  .section-heading h1 {
    overflow-wrap: anywhere;
  }
  .section-heading > form {
    max-width: 100%;
  }
  .group-tabs {
    min-width: 0;
  }
  .member-row > div {
    overflow-wrap: anywhere;
  }
}
.group-grid > .card {
  margin: 0;
}
