@import url("/base.css");
:root {
  --green: #23594d;
  --ink: #24352e;
  --muted: #69766c;
  --cream: #f7f5ef;
  --line: #dfe4da;
  --white: #fffefb;
  --coral: #bd5b3a;
  --soft: #eaf1e8;
  --red: #a02f32;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
a {
  color: var(--green);
  text-underline-offset: 3px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #d2835d;
  outline-offset: 3px;
}
.topbar {
  height: 86px;
  max-width: 1200px;
  margin: auto;
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 18px;
}
.brand {
  font-size: 29px;
  font-weight: 780;
  letter-spacing: -1.4px;
  text-decoration: none;
  display: flex;
  gap: 9px;
  align-items: center;
}
.brand-dot {
  color: var(--coral);
  margin-left: -9px;
}
nav {
  display: flex;
  gap: 10px;
  align-items: center;
}
nav a {
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 12px;
}
nav a:hover,
nav a.active {
  background: var(--soft);
}
main {
  max-width: 1128px;
  min-height: calc(100vh - 185px);
  margin: auto;
  padding: 46px 0 70px;
}
footer {
  max-width: 1128px;
  margin: auto;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(30px, 4vw, 45px);
  line-height: 1.12;
  letter-spacing: -1.6px;
  margin-bottom: 15px;
  font-weight: 720;
}
h2 {
  font-size: 23px;
  letter-spacing: -0.55px;
}
h3 {
  font-size: 17px;
  letter-spacing: -0.25px;
}
p {
  line-height: 1.6;
}
small,
.muted {
  color: var(--muted);
}
small {
  font-size: 12px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.9px;
  text-transform: uppercase;
  font-weight: 750;
  color: var(--coral);
  margin-bottom: 18px;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.page-head p {
  margin: 0;
  color: var(--muted);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  background: var(--white);
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
}
.button:hover {
  background: var(--soft);
  border-color: #b3c7b8;
}
.button.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.button.primary:hover {
  background: #194a3f;
}
.button.danger {
  color: var(--red);
  border-color: #e6c6c6;
}
.button.small {
  font-size: 12px;
  padding: 8px 12px;
  min-height: 36px;
}
.button.link {
  border-color: transparent;
  background: none;
  padding: 6px 0;
  min-height: 30px;
  color: var(--green);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.stack {
  display: grid;
  gap: 18px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 25px;
}
.group-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  min-height: 220px;
  transition:
    transform 0.15s,
    border-color 0.15s;
}
.group-card:hover {
  transform: translateY(-3px);
  border-color: #9bad9f;
}
.group-card h3 {
  font-size: 21px;
  margin: 15px 0 8px;
}
.group-card p {
  font-size: 13px;
  margin-bottom: 24px;
}
.card-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}
.badge {
  display: inline-block;
  border-radius: 7px;
  background: var(--soft);
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
  width: max-content;
}
.badge.warm {
  background: #faeadf;
  color: #925238;
}
.positive {
  color: var(--green);
}
.negative {
  color: var(--coral);
}
.balance {
  font-size: 26px;
  font-weight: 730;
  letter-spacing: -0.7px;
  font-variant-numeric: tabular-nums;
}
.summary {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 16px;
  margin: 28px 0;
}
.summary .card {
  padding: 23px;
}
.summary .highlight {
  background: var(--green);
  color: var(--white);
  border: 0;
}
.summary .highlight small {
  color: #d3e4d9;
}
.summary .balance {
  margin-top: 10px;
}
.tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  margin: 30px 0 24px;
  overflow: auto;
}
.tabs button {
  white-space: nowrap;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  font-size: 14px;
  color: var(--muted);
  padding: 0 0 14px;
  font-weight: 650;
}
.tabs button.active {
  color: var(--green);
  border-color: var(--green);
}
.empty {
  text-align: center;
  padding: 55px 22px;
  background: var(--white);
  border: 1px dashed #c6d2c5;
  border-radius: 20px;
}
.empty .symbol {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  background: var(--soft);
  color: var(--green);
  font-size: 32px;
  border-radius: 20px;
  margin: 0 auto 24px;
}
.empty p {
  color: var(--muted);
  max-width: 460px;
  margin: 0 auto 22px;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.list {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.list-row {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  padding: 18px 22px;
  background: var(--white);
  border: 0;
  text-align: left;
  color: var(--ink);
}
button.list-row:hover {
  background: #f0f4ed;
}
.list-row .grow {
  flex: 1;
  min-width: 0;
}
.list-row strong {
  display: block;
  font-size: 14px;
  margin-bottom: 5px;
  overflow-wrap: anywhere;
}
.list-row small {
  display: block;
}
.list-row .amount {
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.avatar {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border-radius: 13px;
  background: #e9eee4;
  color: var(--green);
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.filters input,
.filters select {
  width: auto;
  min-width: 120px;
  flex: 1;
}
.filters input[type="date"] {
  max-width: 180px;
}
.split-layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 24px;
}
.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 5px 0 18px;
}
.panel-title h2 {
  margin: 0;
}
.payment {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
}
.payment:last-child {
  border: 0;
}
.payment strong {
  display: block;
  margin-bottom: 8px;
}
.payment .amount {
  font-size: 22px;
  font-weight: 700;
  color: var(--green);
}
label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 620;
  min-width: 0;
}
input,
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccd5ca;
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  min-height: 44px;
}
textarea {
  resize: vertical;
  min-height: 82px;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--green);
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.span-2 {
  grid-column: 1/-1;
}
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 24px;
}
.form-error {
  color: var(--red);
  font-size: 13px;
  margin: 12px 0;
  line-height: 1.5;
}
.form-error:empty {
  display: none;
}
.help {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
  margin: 8px 0 0;
}
.fieldset {
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 15px;
  margin: 0 0 18px;
}
.fieldset legend {
  font-size: 14px;
  font-weight: 750;
  padding: 0 8px;
}
.people-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 0;
}
.person-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--cream);
  font-size: 13px;
}
.person-input input[type="text"],
.person-input input[type="number"] {
  width: 100%;
  text-align: right;
  background: white;
  padding: 8px;
}
.person-input span {
  overflow-wrap: anywhere;
}
.item {
  padding: 16px;
  margin: 12px 0;
  background: var(--cream);
  border-radius: 13px;
}
.item-fields {
  display: grid;
  grid-template-columns: 1fr 75px 110px auto;
  gap: 9px;
  align-items: end;
}
.preview {
  background: var(--soft);
  padding: 18px;
  border-radius: 14px;
  font-size: 13px;
  margin-top: 18px;
}
.preview .row {
  padding: 5px 0;
}
.preview.error {
  background: #faeee6;
  color: #934c30;
}
.preview h3 {
  margin-bottom: 12px;
}
.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 23px 0;
}
.auth-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 90px;
  align-items: center;
  max-width: 980px;
  margin: 25px auto;
}
.auth-story h1 {
  font-size: clamp(42px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -2.8px;
  margin-bottom: 25px;
}
.auth-story h1 em {
  font-style: normal;
  color: var(--green);
}
.auth-story > p {
  color: var(--muted);
  font-size: 16px;
  max-width: 360px;
}
.auth-card {
  padding: 34px;
}
.auth-card h2 {
  font-size: 26px;
  margin-bottom: 10px;
}
.auth-card > p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 25px;
}
.auth-card form {
  display: grid;
  gap: 17px;
}
.auth-card .button.primary {
  width: 100%;
  margin-top: 5px;
}
.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 23px;
  font-size: 13px;
}
.mini-bill {
  background: #fffefb;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 23px;
  max-width: 345px;
  transform: rotate(-3deg);
  margin-top: 35px;
  box-shadow: 0 12px 30px #253d2c08;
}
.mini-bill .row {
  padding: 9px 0;
  font-size: 13px;
}
.mini-bill .row.total {
  border-top: 1px dashed #b9c7b8;
  margin-top: 8px;
  padding-top: 15px;
  font-weight: 700;
  color: var(--green);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--green);
  background: var(--soft);
  border-radius: 20px;
  padding: 7px 12px;
  margin-top: 15px;
}
.pill:before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
}
dialog {
  border: 0;
  border-radius: 22px;
  padding: 0;
  width: min(780px, calc(100vw - 24px));
  max-height: 92dvh;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 20px 100px #142a2550;
}
dialog::backdrop {
  background: #1e342b75;
  backdrop-filter: blur(3px);
}
#dialog-content {
  padding: 28px;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.dialog-head h2 {
  margin: 0;
}
.close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--cream);
  font-size: 24px;
  color: var(--muted);
}
#notice {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: white;
  border-radius: 13px;
  padding: 14px 22px;
  font-size: 14px;
  box-shadow: 0 5px 25px #16382c22;
  max-width: calc(100vw - 32px);
  z-index: 20;
  display: none;
}
#notice.visible {
  display: block;
}
.receipt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.receipt-grid img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  background: var(--cream);
  border-radius: 10px;
}
.qr {
  width: 210px;
  height: 210px;
  display: block;
  margin: 20px auto;
}
.break {
  overflow-wrap: anywhere;
}
.danger-zone {
  border-color: #e7c9c3;
}
.danger-zone h2 {
  color: var(--red);
}
.loading {
  text-align: center;
  color: var(--muted);
  padding: 60px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th,
td {
  padding: 12px 9px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
th {
  color: var(--muted);
  font-weight: 600;
}
td.num,
th.num {
  text-align: right;
  white-space: nowrap;
}
.section-space {
  margin-top: 25px;
}
.inline-note {
  background: #f7ebdc;
  border-radius: 12px;
  padding: 14px 17px;
  font-size: 13px;
  line-height: 1.55;
}
.hidden {
  display: none !important;
}
.session {
  display: grid;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
}
.session small {
  overflow-wrap: anywhere;
}
.back {
  font-size: 13px;
  margin-bottom: 24px;
  display: inline-block;
  text-decoration: none;
}
.wide {
  width: 100%;
}
.notice-banner {
  padding: 14px 20px;
  border: 1px solid #d9bf95;
  border-radius: 12px;
  background: #fff4df;
  margin-bottom: 20px;
  font-size: 13px;
}
.muted-text {
  color: var(--muted);
}
@media (max-width: 1200px) {
  main,
  footer {
    margin-left: 30px;
    margin-right: 30px;
  }
}
@media (max-width: 850px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .auth-layout {
    gap: 40px;
  }
  .auth-story h1 {
    font-size: 48px;
  }
  .split-layout {
    grid-template-columns: 1fr;
  }
  .summary {
    grid-template-columns: 1.3fr 1fr 1fr;
  }
  .summary .card {
    padding: 18px;
  }
  .balance {
    font-size: 22px;
  }
}
@media (max-width: 600px) {
  .topbar {
    height: 72px;
    padding: 0 18px;
  }
  .brand {
    font-size: 26px;
  }
  .brand img {
    width: 30px;
    height: 30px;
  }
  nav {
    gap: 0;
  }
  nav a {
    padding: 8px 10px;
    font-size: 12px;
  }
  main {
    margin: 0;
    padding: 30px 18px 45px;
  }
  footer {
    margin: 0 18px;
    display: block;
    line-height: 1.8;
  }
  footer span {
    display: block;
  }
  .page-head {
    align-items: flex-start;
    gap: 12px;
  }
  .page-head h1 {
    font-size: 31px;
  }
  .page-head .button {
    padding: 11px 13px;
    white-space: nowrap;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .summary {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .summary .highlight {
    grid-column: 1/-1;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .summary .highlight .balance {
    margin-top: 0;
    font-size: 29px;
  }
  .summary .card {
    border-radius: 16px;
  }
  .auth-layout {
    display: block;
    margin: 0;
  }
  .auth-story {
    margin-bottom: 26px;
  }
  .auth-story h1 {
    font-size: 43px;
    letter-spacing: -1.7px;
  }
  .auth-story > p {
    font-size: 14px;
    max-width: none;
  }
  .mini-bill {
    display: none;
  }
  .auth-card {
    padding: 24px;
  }
  .card {
    padding: 21px;
  }
  .form-grid {
    gap: 13px;
  }
  .people-inputs {
    grid-template-columns: 1fr;
  }
  .item-fields {
    grid-template-columns: 1fr 65px 95px;
  }
  .item-fields label:first-child {
    grid-column: 1/-1;
  }
  .item-fields .button {
    grid-column: 3;
  }
  .item {
    padding: 12px;
  }
  .tabs {
    gap: 21px;
  }
  .tabs button {
    font-size: 13px;
  }
  #dialog-content {
    padding: 21px 17px;
  }
  .receipt-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .list-row {
    padding: 16px 14px;
    gap: 12px;
  }
  .list-row .amount {
    font-size: 15px;
  }
  .payment {
    grid-template-columns: 1fr auto;
  }
  .filters input,
  .filters select {
    min-width: 100px;
  }
  .auth-links {
    font-size: 12px;
  }
  .span-mobile {
    grid-column: 1/-1;
  }
  .form-actions {
    flex-wrap: wrap;
  }
  .form-actions .button {
    flex: 1;
  }
  .item .people-inputs {
    grid-template-columns: 1fr 1fr;
  }
  .item .person-input {
    padding: 6px;
    gap: 4px;
    font-size: 12px;
  }
  .item .person-input input[type="number"] {
    width: 48px;
  }
  .row.wrap {
    flex-wrap: wrap;
  }
}
.person-input.check {
  grid-template-columns: minmax(0, 1fr) 18px;
}
.person-input > span:first-child {
  min-width: 0;
}
.number-field {
  display: block;
  position: relative;
  min-width: 0;
  width: 100%;
}
.number-field input,
.person-input .number-field input {
  width: 100%;
  padding-right: 30px;
}
.input-unit {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  font-weight: 500;
}
.refund-options {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.refund-options summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}
.refund-options label {
  margin-top: 12px;
}
.balance-marker {
  display: inline-flex;
  gap: 6px;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 650;
  margin-bottom: 10px;
}
.balance-marker.owes {
  color: #914224;
  background: #fbe9df;
}
.balance-marker.receives {
  color: #23594d;
  background: #e3f0e5;
}
.payment-confirmation {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  text-align: center;
  padding: 24px 16px;
  background: var(--soft);
  border-radius: 16px;
  overflow-wrap: anywhere;
}
.payment-confirmation strong {
  grid-column: 1/-1;
  font-size: 32px;
  color: var(--green);
}
.participant-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}
.participant-row > button {
  margin-top: 25px;
}
.participant-entry {
  position: relative;
  min-width: 0;
}
.participant-entry label {
  margin-bottom: 7px;
}
.participant-state {
  display: block;
  margin: 6px 0;
  line-height: 1.5;
}
.participant-options {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 8px 25px #16382c16;
  overflow: hidden;
  margin-top: 7px;
}
.participant-options button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  padding: 14px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}
.participant-options button:hover,
.participant-options button:focus-visible {
  background: var(--soft);
  outline-offset: -3px;
}
.participant-options p {
  padding: 12px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.control-wrap {
  display: block;
  position: relative;
  min-width: 0;
  width: 100%;
}
.control-trigger {
  display: none;
}
.control-popup {
  margin: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 12px 35px #173b302b;
  max-height: min(400px, 80dvh);
  overflow-y: auto;
}
.control-popup [role="option"] {
  display: block;
  border: 0;
  width: 100%;
  min-height: 44px;
  background: none;
  border-radius: 8px;
  text-align: left;
  padding: 12px;
  color: var(--ink);
  font-size: 14px;
}
.control-popup [role="option"]:hover,
.control-popup [role="option"]:focus-visible,
.control-popup [aria-selected="true"] {
  background: var(--soft);
}
.control-popup button:focus-visible {
  outline-offset: -3px;
}
.calendar {
  padding: 14px;
}
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 14px;
}
.calendar-weekdays,
.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
  gap: 2px;
}
.calendar-weekdays {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 7px;
}
.calendar-days button {
  border: 0;
  background: transparent;
  border-radius: 8px;
  color: var(--ink);
  width: 100%;
  aspect-ratio: 1;
  padding: 6px;
  font-size: 13px;
}
.calendar-days button:hover {
  background: var(--soft);
}
.calendar-days button.selected {
  background: var(--green);
  color: white;
}
.calendar-days button[aria-current="date"] {
  box-shadow: inset 0 0 0 1px var(--green);
  font-weight: 750;
}
.calendar-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
body:has(dialog[open]) {
  overflow: hidden;
}
@media (min-width: 601px) {
  .control-native {
    display: none;
  }
  .control-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    text-align: left;
    width: 100%;
    min-height: 44px;
    padding: 12px;
    border: 1px solid #ccd5ca;
    border-radius: 10px;
    background: var(--white);
    color: var(--ink);
    font: inherit;
    font-weight: 400;
  }
  .control-trigger::after {
    content: "⌄";
    color: var(--muted);
  }
  .filters .control-wrap {
    flex: 1;
    min-width: 130px;
    width: auto;
  }
}
@media (max-width: 600px) {
  dialog {
    position: fixed;
    inset: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    overscroll-behavior: contain;
  }
  #dialog-content {
    padding: 0 18px max(22px, env(safe-area-inset-bottom));
  }
  .dialog-head {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--white);
    padding: max(18px, env(safe-area-inset-top)) 0 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--line);
  }
  .dialog-head .close {
    min-width: 44px;
    min-height: 44px;
  }
  dialog .form-grid {
    grid-template-columns: 1fr;
  }
  .fieldset {
    padding: 14px 12px;
  }
  .fieldset legend {
    max-width: 100%;
    line-height: 1.5;
  }
  .person-input {
    grid-template-columns: minmax(0, 1fr) 112px;
  }
  .item .people-inputs {
    grid-template-columns: 1fr;
  }
  .item .person-input {
    grid-template-columns: minmax(0, 1fr) 80px;
    padding: 7px 10px;
    font-size: 13px;
  }
  .item .person-input input[type="text"] {
    width: 100%;
  }
  input,
  select,
  textarea {
    font-size: 16px;
  }
  .filters .control-wrap {
    flex: 1;
    min-width: 130px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
