:root {
  --ink: #18332d;
  --ink-soft: #5e706b;
  --forest: #173f35;
  --forest-bright: #245f50;
  --forest-pale: #dce9e3;
  --paper: #f5f2e9;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --line: #dedfd8;
  --gold: #e8a94e;
  --gold-soft: #f8e5c2;
  --danger: #b84f46;
  --danger-soft: #f8e1de;
  --shadow: 0 18px 45px rgba(28, 57, 49, 0.09);
  --radius-large: 28px;
  --radius-medium: 20px;
  --radius-small: 14px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, ui-rounded, "SF Pro Rounded", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(circle at 10% -5%, rgba(232, 169, 78, 0.18), transparent 30rem),
    radial-gradient(circle at 100% 35%, rgba(36, 95, 80, 0.10), transparent 35rem),
    var(--paper);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select,
input[type="date"],
input[type="time"],
input[type="month"] {
  cursor: pointer;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(232, 169, 78, 0.55);
  outline-offset: 2px;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  width: min(100%, 860px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  position: relative;
  padding-bottom: calc(106px + var(--safe-bottom));
}

.topbar {
  min-height: calc(82px + env(safe-area-inset-top, 0px));
  padding: calc(16px + env(safe-area-inset-top, 0px)) clamp(18px, 5vw, 34px) 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(23, 63, 53, 0.18);
}

.brand span {
  display: grid;
  gap: 1px;
}

.brand strong {
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

.brand small {
  color: var(--ink-soft);
  font-size: 0.71rem;
}

.local-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid rgba(23, 63, 53, 0.12);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.64);
  color: var(--ink-soft);
  font-size: 0.73rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4c9b77;
  box-shadow: 0 0 0 3px rgba(76, 155, 119, 0.14);
}

main {
  padding: 0 clamp(16px, 5vw, 34px);
}

.view {
  animation: view-in 220ms ease-out;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero {
  min-height: 244px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: clamp(24px, 7vw, 38px);
  border-radius: 34px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.07), transparent 55%),
    var(--forest);
  box-shadow: 0 22px 60px rgba(23, 63, 53, 0.22);
  isolation: isolate;
}

.hero .eyebrow {
  color: rgba(255, 255, 255, 0.7);
}

.hero h1 {
  margin: 4px 0 8px;
  font-size: clamp(2.35rem, 10vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
}

.hero-meta {
  display: flex;
  gap: 8px;
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.87rem;
}

.primary-action {
  min-height: 48px;
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 19px;
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  color: #24352e;
  font-weight: 850;
  box-shadow: 0 10px 22px rgba(13, 30, 25, 0.22);
}

.primary-action span {
  font-size: 1.25rem;
  line-height: 1;
}

.hero-orb {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

.hero-orb-one {
  width: 200px;
  height: 200px;
  right: -56px;
  top: -64px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: inset 0 0 60px rgba(255, 255, 255, 0.04);
}

.hero-orb-two {
  width: 114px;
  height: 114px;
  right: 44px;
  bottom: -55px;
  background: rgba(232, 169, 78, 0.12);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 34px 3px 14px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.text-button,
.filter-reset {
  min-height: 42px;
  padding: 0 7px;
  border: 0;
  background: transparent;
  color: var(--forest-bright);
  font-size: 0.83rem;
  font-weight: 800;
}

.record-stack {
  display: grid;
  gap: 10px;
}

.record-card {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 15px;
  border: 1px solid rgba(30, 62, 54, 0.08);
  border-radius: var(--radius-medium);
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 8px 28px rgba(28, 57, 49, 0.045);
}

.record-card-main {
  min-width: 0;
}

.record-card-main h3 {
  overflow: hidden;
  margin: 0 0 5px;
  font-size: 0.96rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-card-main p {
  overflow: hidden;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-amount {
  text-align: right;
}

.record-amount strong {
  display: block;
  font-size: 0.98rem;
  font-variant-numeric: tabular-nums;
}

.record-amount small {
  color: var(--ink-soft);
  font-size: 0.7rem;
}

.category-symbol {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  font-size: 0.78rem;
  font-weight: 900;
}

.category-food {
  color: #9b5a20;
  background: #fae5ca;
}

.category-beauty {
  color: #9a526b;
  background: #f6dce6;
}

.category-toys {
  color: #6055a3;
  background: #e6e0fa;
}

.category-transport {
  color: #286d75;
  background: #d9edf0;
}

.category-shopping {
  color: #3d7653;
  background: #dcebdd;
}

.category-fun {
  color: #916a24;
  background: #f4eacb;
}

.category-other {
  color: #65716d;
  background: #e7e9e7;
}

.record-actions {
  grid-column: 2 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(30, 62, 54, 0.08);
}

.record-actions button {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: var(--forest-pale);
  color: var(--forest);
  font-size: 0.76rem;
  font-weight: 800;
}

.record-actions .delete-record {
  color: var(--danger);
  background: var(--danger-soft);
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 28px 2px 0;
  padding: 17px;
  border: 1px solid rgba(36, 95, 80, 0.11);
  border-radius: var(--radius-medium);
  color: var(--ink-soft);
  background: rgba(220, 233, 227, 0.55);
}

.privacy-note strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 0.84rem;
}

.privacy-note p {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.5;
}

.privacy-icon {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  font-size: 0.73rem;
  font-weight: 900;
}

.empty-state {
  padding: 42px 24px;
  text-align: center;
  color: var(--ink-soft);
}

.empty-state.compact {
  padding: 28px 18px;
}

.empty-state h3 {
  margin: 8px 0 5px;
  color: var(--ink);
  font-size: 1rem;
}

.empty-state p {
  max-width: 360px;
  margin: 0 auto;
  font-size: 0.78rem;
  line-height: 1.5;
}

.empty-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 17px;
  background: var(--forest-pale);
  color: var(--forest-bright);
  font-size: 1.35rem;
  font-weight: 800;
}

.page-heading {
  margin: 12px 2px 25px;
}

.page-heading.inline-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.page-heading h1 {
  margin: 0;
  font-size: clamp(1.85rem, 7vw, 2.7rem);
  letter-spacing: -0.045em;
}

.page-heading p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.round-add {
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 17px;
  background: var(--forest);
  color: #fff;
  font-size: 1.55rem;
  box-shadow: 0 10px 25px rgba(23, 63, 53, 0.18);
}

.ledger-form {
  display: grid;
  gap: 13px;
}

.form-card {
  padding: 18px;
  border: 1px solid rgba(30, 62, 54, 0.08);
  border-radius: var(--radius-medium);
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 8px 28px rgba(28, 57, 49, 0.04);
}

.amount-field > label,
.field label,
.category-fieldset legend {
  display: block;
  margin-bottom: 9px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.amount-input-wrap {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.amount-input-wrap span {
  color: var(--forest-bright);
  font-size: 1.1rem;
  font-weight: 900;
}

.amount-input-wrap input {
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: clamp(2.3rem, 10vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
}

.amount-input-wrap input::placeholder {
  color: #c4cbc7;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-list {
  display: grid;
  gap: 14px;
}

.field-list .field + .field {
  padding-top: 14px;
  border-top: 1px solid rgba(30, 62, 54, 0.08);
}

.field input,
.field textarea,
.filter-panel input,
.filter-panel select,
.month-picker input {
  width: 100%;
  min-height: 45px;
  padding: 10px 12px;
  border: 1px solid #d8dcd7;
  border-radius: 13px;
  outline: 0;
  background: #f9f8f3;
  color: var(--ink);
}

.field input:focus,
.field textarea:focus,
.filter-panel input:focus,
.filter-panel select:focus,
.month-picker input:focus {
  border-color: var(--forest-bright);
  box-shadow: 0 0 0 3px rgba(36, 95, 80, 0.1);
}

.field textarea {
  min-height: 92px;
  resize: vertical;
  cursor: text;
  line-height: 1.5;
}

.optional {
  color: #929c98;
  font-weight: 600;
}

.character-count {
  margin: 7px 2px 0;
  color: #8c9692;
  text-align: right;
  font-size: 0.7rem;
}

.field-error {
  min-height: 0;
  margin: 7px 0 0;
  color: var(--danger);
  font-size: 0.76rem;
  font-weight: 700;
}

.field-error:empty {
  display: none;
}

.category-fieldset {
  min-width: 0;
  margin: 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.category-option {
  min-width: 0;
  position: relative;
  display: grid;
  place-items: center;
  gap: 7px;
  padding: 11px 4px;
  border: 1px solid transparent;
  border-radius: 15px;
  color: var(--ink-soft);
  font-size: 0.71rem;
  font-weight: 750;
  cursor: pointer;
}

.category-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.category-option .category-symbol {
  width: 39px;
  height: 39px;
  border-radius: 13px;
}

.category-option:has(input:checked) {
  border-color: rgba(23, 63, 53, 0.22);
  background: var(--forest-pale);
  color: var(--forest);
}

.category-option:has(input:focus-visible) {
  outline: 3px solid rgba(232, 169, 78, 0.55);
  outline-offset: 2px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.submit-button,
.secondary-button,
.danger-button,
.danger-outline-button {
  min-height: 50px;
  border-radius: 15px;
  font-weight: 850;
}

.submit-button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 19px;
  border: 0;
  background: var(--forest);
  color: #fff;
  box-shadow: 0 12px 28px rgba(23, 63, 53, 0.19);
}

.secondary-button {
  padding: 0 18px;
  border: 1px solid rgba(23, 63, 53, 0.18);
  background: var(--surface);
  color: var(--forest);
}

.secondary-button.full-width {
  width: 100%;
}

.danger-button {
  padding: 0 20px;
  border: 0;
  background: var(--danger);
  color: #fff;
}

.danger-outline-button {
  padding: 0 16px;
  border: 1px solid rgba(184, 79, 70, 0.2);
  background: var(--danger-soft);
  color: var(--danger);
}

.filter-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 13px;
  border: 1px solid rgba(30, 62, 54, 0.08);
  border-radius: var(--radius-medium);
  background: rgba(255, 253, 248, 0.92);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
}

.search-box input {
  min-width: 0;
  border: 0;
  background: transparent;
  cursor: text;
}

.search-box input:focus {
  box-shadow: none;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.filter-row label {
  min-width: 0;
}

.filter-row input,
.filter-row select {
  min-width: 0;
  height: 42px;
  min-height: 42px;
  padding: 6px 9px;
  font-size: 0.76rem;
}

.full-list .record-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.month-picker input {
  width: 142px;
  min-height: 43px;
  background: var(--surface);
  font-size: 0.79rem;
  font-weight: 750;
}

.stats-hero {
  padding: 26px;
  border-radius: var(--radius-large);
  color: #fff;
  background:
    radial-gradient(circle at 95% 10%, rgba(232, 169, 78, 0.3), transparent 10rem),
    var(--forest);
  box-shadow: 0 18px 45px rgba(23, 63, 53, 0.18);
}

.stats-hero p {
  margin: 0 0 7px;
  color: rgba(255, 255, 255, 0.67);
  font-size: 0.78rem;
  font-weight: 750;
}

.stats-hero > strong {
  display: block;
  margin-bottom: 20px;
  font-size: clamp(2.1rem, 9vw, 3.55rem);
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.stats-hero > div {
  display: flex;
  gap: 24px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.75rem;
}

.stats-hero > div span {
  display: grid;
  gap: 3px;
}

.stats-hero b {
  color: #fff;
  font-size: 0.9rem;
}

.breakdown-card {
  display: grid;
  gap: 17px;
  padding: 20px;
  border: 1px solid rgba(30, 62, 54, 0.08);
  border-radius: var(--radius-large);
  background: rgba(255, 253, 248, 0.93);
}

.breakdown-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.breakdown-row .category-symbol {
  width: 39px;
  height: 39px;
  border-radius: 13px;
}

.breakdown-content {
  min-width: 0;
}

.breakdown-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  font-size: 0.77rem;
  font-weight: 800;
}

.breakdown-label span:last-child {
  color: var(--ink-soft);
  font-weight: 650;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9ebe7;
}

.progress-bar {
  height: 100%;
  min-width: 3px;
  border-radius: inherit;
  background: var(--forest-bright);
  transform-origin: left;
  animation: progress-in 500ms ease-out both;
}

@keyframes progress-in {
  from {
    transform: scaleX(0);
  }
}

.breakdown-amount {
  font-size: 0.79rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.settings-stack {
  display: grid;
  gap: 13px;
}

.settings-card {
  padding: 19px;
  border: 1px solid rgba(30, 62, 54, 0.08);
  border-radius: var(--radius-medium);
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 8px 28px rgba(28, 57, 49, 0.04);
}

.settings-card-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-card-heading > div {
  min-width: 0;
  flex: 1;
}

.settings-card h2 {
  margin: 0 0 4px;
  font-size: 0.96rem;
}

.settings-card-heading p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.settings-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--forest-pale);
  color: var(--forest);
  font-size: 0.76rem;
  font-weight: 900;
}

.coming-badge {
  padding: 5px 9px;
  border-radius: 999px;
  color: #80591f;
  background: var(--gold-soft);
  font-size: 0.67rem;
  font-weight: 850;
}

.api-card {
  background:
    linear-gradient(135deg, rgba(220, 233, 227, 0.5), rgba(255, 253, 248, 0.94));
}

.settings-copy {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 0.77rem;
  line-height: 1.55;
}

.url-preview {
  overflow: hidden;
  margin: 15px 0 10px;
  padding: 12px;
  border: 1px dashed rgba(23, 63, 53, 0.2);
  border-radius: 12px;
  background: #f3f4ef;
  color: var(--ink-soft);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.68rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.settings-card details {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.55;
}

.settings-card summary {
  color: var(--forest-bright);
  font-weight: 800;
  cursor: pointer;
}

.settings-card details p {
  margin-bottom: 0;
}

.warning-strip {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 13px;
  padding: 11px;
  border-radius: 12px;
  color: #715932;
  background: #fbefd8;
  font-size: 0.72rem;
  line-height: 1.5;
}

.warning-strip span {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--gold);
  font-weight: 900;
}

.install-card ol {
  margin: 15px 0 0;
  padding-left: 24px;
  color: var(--ink-soft);
  font-size: 0.77rem;
  line-height: 1.8;
}

.bottom-nav {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 860px);
  min-height: calc(72px + var(--safe-bottom));
  display: grid;
  grid-template-columns: 1fr 1fr 76px 1fr 1fr;
  align-items: start;
  padding: 8px clamp(12px, 4vw, 26px) var(--safe-bottom);
  border-top: 1px solid rgba(23, 63, 53, 0.1);
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 -12px 40px rgba(23, 63, 53, 0.08);
  backdrop-filter: blur(22px) saturate(1.2);
}

.nav-item,
.nav-spacer {
  border: 0;
  background: transparent;
}

.nav-item {
  min-height: 56px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  color: #87918e;
}

.nav-item > span {
  font-size: 1.24rem;
  line-height: 1;
}

.nav-item small {
  font-size: 0.63rem;
  font-weight: 800;
}

.nav-item.is-active {
  color: var(--forest);
}

.nav-spacer {
  width: 60px;
  height: 60px;
  align-self: start;
  justify-self: center;
  display: grid;
  place-items: center;
  margin-top: -24px;
  border: 5px solid var(--paper);
  border-radius: 21px;
  color: #fff;
  background: var(--forest);
  box-shadow: 0 12px 25px rgba(23, 63, 53, 0.24);
}

.nav-spacer span {
  font-size: 1.75rem;
  line-height: 1;
}

.app-dialog {
  width: min(calc(100% - 30px), 420px);
  padding: 0;
  border: 0;
  border-radius: 26px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 26px 80px rgba(13, 37, 30, 0.3);
}

.app-dialog::backdrop {
  background: rgba(12, 31, 26, 0.54);
  backdrop-filter: blur(5px);
}

.app-dialog form {
  padding: 26px;
  text-align: center;
}

.app-dialog h2 {
  margin: 12px 0 8px;
  font-size: 1.28rem;
}

.app-dialog p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.55;
}

.dialog-symbol {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 17px;
  font-size: 1.35rem;
  font-weight: 900;
}

.dialog-symbol.warning {
  color: #80591f;
  background: var(--gold-soft);
}

.dialog-symbol.danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.duplicate-preview {
  margin-top: 15px;
  padding: 13px;
  border-radius: 13px;
  background: #f1f3ef;
  color: var(--ink);
  font-size: 0.77rem;
  line-height: 1.5;
  text-align: left;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 22px;
}

.toast {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: calc(92px + var(--safe-bottom));
  max-width: calc(100% - 36px);
  padding: 11px 16px;
  border-radius: 999px;
  color: #fff;
  background: rgba(19, 44, 37, 0.94);
  box-shadow: 0 12px 35px rgba(13, 37, 30, 0.25);
  font-size: 0.78rem;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 680px) {
  .hero {
    min-height: 285px;
  }

  .hero .primary-action {
    position: absolute;
    right: 38px;
    bottom: 38px;
  }

  .record-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .record-stack .record-card:first-child:last-child,
  .record-stack .record-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .full-list {
    grid-template-columns: 1fr;
  }

  .settings-stack {
    grid-template-columns: 1fr 1fr;
  }

  .ledger-form {
    grid-template-columns: 1fr 1fr;
  }

  .amount-field,
  .category-fieldset,
  .form-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 390px) {
  .local-badge {
    padding: 7px 9px;
    font-size: 0.66rem;
  }

  .brand small {
    display: none;
  }

  .hero {
    min-height: 226px;
    border-radius: 29px;
  }

  .category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  .category-option {
    padding-inline: 0;
    font-size: 0.65rem;
  }

  .category-option .category-symbol {
    width: 35px;
    height: 35px;
  }

  .filter-row {
    grid-template-columns: 1fr 1fr;
  }

  .filter-reset {
    grid-column: 1 / -1;
  }

  .month-picker input {
    width: 126px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
