:root {
  color-scheme: light;
  --bg: #f5f2ec;
  --surface: #ffffff;
  --surface-raised: #fbfaf7;
  --surface-soft: #ece7df;
  --text: #071722;
  --text-muted: #6f7477;
  --text-subtle: #9a9a94;
  --accent: #3f6f5a;
  --accent-hover: #345d4b;
  --accent-soft: #dceee4;
  --border: #ddd8d0;
  --shadow: rgba(5, 20, 31, 0.08);
  --shadow-soft: rgba(5, 20, 31, 0.045);
  --success: #3f6f5a;
  --warning: #d3a13b;
  --danger: #b72b2b;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 18px;
  --radius-xl: 20px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Noto Sans KR", sans-serif;
}

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

button {
  cursor: pointer;
}

button:disabled,
a[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.65;
}

.app {
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 18px
    calc(32px + env(safe-area-inset-bottom));
}

.screen {
  position: relative;
  display: grid;
  gap: 16px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: grid;
  gap: 5px;
  padding-top: 4px;
}

.brand h1,
.screen-title h1 {
  margin: 0;
  color: var(--text);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.12;
}

.brand p,
.screen-title p,
.hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.55;
}

.screen-title {
  display: grid;
  gap: 6px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px;
  box-shadow: 0 8px 22px var(--shadow-soft);
}

.hero-card {
  border-color: rgba(63, 111, 90, 0.18);
  box-shadow: 0 14px 34px var(--shadow);
}

.section-card {
  border-color: rgba(221, 216, 208, 0.86);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 6px 16px var(--shadow-soft);
}

.subtle-card {
  border-color: rgba(221, 216, 208, 0.74);
  background: var(--surface-raised);
  box-shadow: none;
}

.soft-card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.grid {
  display: grid;
  gap: 12px;
}

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

.section-title {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 18px;
  font-weight: 750;
}

.grid > .section-title {
  margin-bottom: 0;
}

.caption {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.meta {
  color: var(--text-subtle);
  font-size: 12px;
  line-height: 1.4;
}

.primary-button,
.secondary-button,
.danger-button,
.back-button,
.phone-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  border-radius: 18px;
  text-align: center;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.primary-button {
  border: none;
  background: var(--accent);
  color: #fff;
}

.primary-button:active,
.secondary-button:active,
.danger-button:active,
.phone-button:active,
.action-card:active,
.back-button:active {
  transform: translateY(1px);
}

.primary-button:hover {
  background: var(--accent-hover);
}

.tool-icon {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.secondary-button,
.back-button {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
}

.danger-button {
  border: 1px solid rgba(183, 43, 43, 0.24);
  background: rgba(255, 255, 255, 0.78);
  color: var(--danger);
}

.phone-button {
  display: grid;
  grid-template-rows: auto minmax(34px, auto) auto;
  gap: 6px;
  min-height: 118px;
  padding: 12px 8px;
  border: 1px solid rgba(63, 111, 90, 0.28);
  border-radius: 16px;
  background: #eef8f1;
  color: #244c3d;
}

.phone-button svg {
  width: 23px;
  height: 23px;
  justify-self: center;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.phone-label {
  align-self: center;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.phone-action {
  color: var(--success);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.call-stack {
  display: grid;
  gap: 8px;
}

.call-stack .phone-button {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  grid-template-rows: 1fr;
  justify-content: stretch;
  gap: 10px;
  min-height: 62px;
  padding: 12px 14px;
  text-align: left;
}

.call-stack .phone-button svg {
  align-self: center;
  justify-self: center;
}

.call-stack .phone-label {
  align-self: center;
  font-size: 16px;
}

.call-stack .phone-action {
  align-self: center;
  padding: 5px 8px;
  border-radius: var(--radius-pill);
  background: rgba(63, 111, 90, 0.12);
  white-space: nowrap;
}

.back-button {
  width: auto;
  min-width: 76px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  font-size: 14px;
}

.settings-gear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  box-shadow: none;
  font-size: 20px;
  line-height: 1;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.settings-gear:active {
  transform: translateY(1px);
}

.icon-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.icon-outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.icon-outline-button.danger {
  border-color: rgba(183, 43, 43, 0.24);
  color: var(--danger);
}

.icon-outline-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.icon-outline-button:active {
  transform: translateY(1px);
}

.action-card {
  display: grid;
  width: 100%;
  min-height: 76px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  box-shadow: 0 8px 22px var(--shadow-soft);
}

.action-card-main {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.action-card-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.action-card-copy strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.22;
}

.action-card-copy span {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.45;
}

.action-card-main > .tool-icon {
  color: var(--success);
}

.action-card.accent {
  border-color: rgba(201, 58, 54, 0.32);
  background: var(--accent);
  color: #fff;
}

.action-card.accent span {
  color: rgba(255, 255, 255, 0.86);
}

.action-card.secondary-action {
  min-height: 66px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: none;
}

.action-card.secondary-action .action-card-copy strong {
  font-size: 17px;
}

.action-card.accident-text {
  border-color: rgba(201, 58, 54, 0.28);
  margin-top: 2px;
  background: #fffafa;
}

.action-card.accident-text .action-card-copy strong {
  color: var(--danger);
}

.action-card.accident-text .action-card-main > .tool-icon {
  color: var(--danger);
}

.routine-action-row {
  display: grid;
  gap: 8px;
}

.install-guidance {
  display: grid;
  grid-template-columns: 1fr 44px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(63, 111, 90, 0.22);
  border-radius: var(--radius-lg);
  background: #eef8f1;
  color: #244c3d;
}

.install-guidance strong {
  font-size: 15px;
  font-weight: 850;
}

.install-guidance p {
  margin: 4px 0 0;
  color: #4c665b;
  font-size: 13px;
  line-height: 1.45;
}

.home-parking-card {
  display: grid;
  gap: 12px;
  border-color: rgba(63, 111, 90, 0.2);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbf8 100%);
}

.home-parking-photo,
.photo-preview {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-soft);
  object-fit: cover;
}

.photo-open-button {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  border-radius: 18px;
  background: transparent;
  overflow: hidden;
}

.home-parking-photo {
  aspect-ratio: 16 / 9;
  max-height: 220px;
}

.photo-open-button.expanded {
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.photo-open-button.expanded .home-parking-photo {
  height: auto;
  max-height: none;
  aspect-ratio: auto;
  border: none;
  object-fit: contain;
}

.photo-preview {
  aspect-ratio: 4 / 3;
  max-height: 320px;
}

.parking-form {
  padding-bottom: 12px;
}

.photo-field {
  gap: 10px;
}

.primary-photo-field {
  order: -1;
}

.photo-trigger {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 74px;
  padding: 0;
  border: 1px dashed var(--border);
  border-radius: 18px;
  background: var(--surface-raised);
  color: var(--text-muted);
  overflow: hidden;
}

.primary-photo-trigger {
  min-height: 190px;
  border-color: rgba(63, 111, 90, 0.28);
  background: #f7fbf8;
  color: #244c3d;
}

.photo-trigger.has-photo {
  min-height: 220px;
  border-style: solid;
  background: var(--surface);
}

.photo-trigger .photo-preview {
  height: 100%;
  max-height: none;
  border: none;
  border-radius: 0;
}

.photo-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 132px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
}

.photo-empty svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.photo-empty .tool-icon {
  width: 25px;
  height: 25px;
}

.photo-empty strong {
  font-size: 14px;
  font-weight: 850;
}

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

.home-parking-head .action-card-main {
  grid-template-columns: 32px minmax(0, 1fr);
}

.home-parking-head .tool-icon {
  width: 24px;
  height: 24px;
  color: var(--success);
}

.home-parking-head .action-card-copy strong {
  font-size: 20px;
}

.home-parking-head .badge {
  align-self: start;
}

.home-parking-head h2 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
}

.compact-button {
  min-height: 48px;
  border-radius: 16px;
}

.floor-wheel {
  position: relative;
  display: flex;
  gap: 8px;
  min-height: 58px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(
    to right,
    rgba(251, 250, 247, 0.95),
    #fff 34%,
    #fff 66%,
    rgba(251, 250, 247, 0.95)
  );
  scroll-snap-type: x mandatory;
  scroll-padding: 0 12px;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.floor-option {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 68px;
  min-height: 48px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--text-muted);
  font-size: 18px;
  font-weight: 700;
  scroll-snap-align: center;
}

.floor-option.underground {
  background: rgba(7, 23, 34, 0.055);
  color: #4f565a;
}

.floor-option.selected {
  z-index: 3;
  border-color: rgba(63, 111, 90, 0.22);
  background: rgba(247, 251, 248, 0.98);
  box-shadow: 0 6px 16px rgba(56, 31, 26, 0.08);
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
}

.sticky-submit {
  position: sticky;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 4;
  padding-top: 2px;
}

.sticky-submit .primary-button {
  box-shadow: 0 12px 28px rgba(63, 111, 90, 0.18);
}

.saved-parking-card {
  position: relative;
}

.saved-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.saved-card-head .section-title {
  margin-bottom: 4px;
}

.icon-danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  border: 1px solid rgba(183, 43, 43, 0.24);
  border-radius: 14px;
  background: var(--surface);
  color: var(--danger);
}

.icon-danger-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.icon-danger-button:active {
  transform: translateY(1px);
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font-size: 16px;
}

.textarea {
  min-height: 96px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(63, 111, 90, 0.55);
  outline: 3px solid rgba(63, 111, 90, 0.12);
}

.unit-input-wrap {
  position: relative;
  display: grid;
}

.unit-input {
  padding-right: 72px;
}

.unit-suffix {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 750;
  line-height: 1;
  pointer-events: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.badge.neutral {
  background: var(--surface-soft);
}

.badge.success {
  background: rgba(63, 111, 90, 0.15);
  color: var(--success);
}

.badge.warning {
  background: rgba(211, 161, 59, 0.16);
  color: #8a641f;
}

.badge.danger {
  background: rgba(183, 43, 43, 0.12);
  color: var(--danger);
}

.summary {
  display: grid;
  gap: 8px;
}

.summary-row {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 10px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
}

.summary-row span:first-child {
  color: var(--text-muted);
  font-weight: 650;
}

.mileage-action {
  border-color: rgba(63, 111, 90, 0.22);
  background: #f7fbf8;
}

.mileage-action .action-card-copy strong {
  color: #244c3d;
}

.mileage-home-card {
  gap: 10px;
}

.mileage-home-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mileage-home-metrics span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 8px;
  border-radius: var(--radius-pill);
  background: rgba(63, 111, 90, 0.1);
  color: #244c3d;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.mileage-action .action-card-main > .tool-icon {
  color: var(--success);
}

.mileage-dashboard {
  display: grid;
  gap: 14px;
  border-color: rgba(63, 111, 90, 0.2);
}

.mileage-main-stat {
  display: grid;
  gap: 5px;
}

.mileage-main-stat span,
.mileage-stats-grid span {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.mileage-main-stat strong {
  color: #244c3d;
  font-size: 30px;
  font-weight: 850;
  line-height: 1.12;
}

.mileage-allowance {
  display: grid;
  gap: 7px;
}

.mileage-allowance-track {
  position: relative;
  height: 12px;
  overflow: hidden;
  border: 1px solid rgba(63, 111, 90, 0.16);
  border-radius: var(--radius-pill);
  background: linear-gradient(
    to right,
    rgba(63, 111, 90, 0.1) 0%,
    rgba(63, 111, 90, 0.1) 90%,
    rgba(211, 161, 59, 0.16) 90%,
    rgba(211, 161, 59, 0.16) 100%
  );
}

.mileage-allowance-fill {
  position: absolute;
  inset: 0 auto 0 0;
  min-width: 0;
  border-radius: inherit;
  transition: width 150ms ease;
}

.mileage-allowance-fill.safe {
  background: var(--success);
}

.mileage-allowance-fill.watch {
  background: var(--warning);
}

.mileage-allowance-fill.over {
  background: var(--danger);
}

.mileage-allowance-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 90%;
  width: 1px;
  background: rgba(5, 20, 31, 0.2);
}

.mileage-allowance-labels {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  color: var(--text-subtle);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}

.mileage-allowance-labels span:last-child {
  text-align: right;
}

.mileage-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mileage-stats-grid div {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid rgba(63, 111, 90, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
}

.mileage-stats-grid strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.25;
}

.mileage-projection-stat small {
  color: #8a641f;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.mileage-stats-grid strong.success {
  color: var(--success);
}

.mileage-stats-grid strong.warning {
  color: #8a641f;
}

.mileage-stats-grid strong.danger {
  color: var(--danger);
}

.mileage-preview {
  min-height: 42px;
  padding: 11px 12px;
  border: 1px solid rgba(63, 111, 90, 0.2);
  border-radius: 14px;
  background: #eef8f1;
  color: #244c3d;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.mileage-preview.danger {
  border-color: rgba(183, 43, 43, 0.2);
  background: #fff5f3;
  color: var(--danger);
}

.mileage-section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}

.mileage-section-head .section-title {
  margin-bottom: 0;
}

.section-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.compact-icon-button {
  width: 42px;
  min-width: 42px;
  height: 42px;
  color: #244c3d;
  font-size: 24px;
  font-weight: 650;
  line-height: 1;
}

.mileage-section-head .compact-button {
  width: auto;
  min-width: 96px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 14px;
  font-size: 14px;
}

.mileage-list {
  gap: 10px;
}

.mileage-entry .inline-actions {
  grid-template-columns: 1fr 1fr;
}

.copy-value {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-raised);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.storage-note {
  display: grid;
  gap: 8px;
}

.storage-note div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(211, 161, 59, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
}

.storage-note span {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.35;
}

.storage-note strong {
  color: var(--text);
  font-size: 14px;
}

.data-facts {
  display: grid;
  gap: 8px;
}

.data-facts div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(63, 111, 90, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
}

.data-facts strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.data-facts span {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}

.cloud-backup-card {
  border-color: rgba(63, 111, 90, 0.2);
  background: rgba(255, 255, 255, 0.86);
}

.cloud-backup-card .mileage-section-head {
  align-items: start;
}

.cloud-actions {
  gap: 8px;
}

.secondary-cloud-actions .secondary-button,
.secondary-cloud-actions .danger-button {
  min-height: 48px;
  border-radius: 16px;
  font-size: 14px;
}

.cloud-restore-card {
  border-color: rgba(63, 111, 90, 0.22);
}

.storage-note.compact div {
  border-color: rgba(63, 111, 90, 0.18);
}

.accident-hero {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(201, 58, 54, 0.18);
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: 0 10px 30px var(--shadow);
}

.accident-hero h2 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 850;
  line-height: 1.28;
}

.road-choice-hero {
  border-color: rgba(63, 111, 90, 0.2);
}

.road-choice-grid {
  display: grid;
  gap: 10px;
}

.road-choice-button {
  display: grid;
  gap: 8px;
  min-height: 104px;
  padding: 16px;
  border: 1px solid rgba(63, 111, 90, 0.24);
  border-radius: 18px;
  background: #f2faf4;
  color: var(--text);
  text-align: left;
  box-shadow: 0 8px 22px rgba(5, 20, 31, 0.06);
}

.road-choice-button.highway {
  border-color: rgba(183, 43, 43, 0.2);
  background: #fff5f3;
}

.road-choice-button span {
  color: var(--success);
  font-size: 26px;
  font-weight: 850;
  line-height: 1.12;
}

.road-choice-button.highway span {
  color: var(--danger);
}

.road-choice-button small {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.road-change-button {
  justify-self: start;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(63, 111, 90, 0.24);
  border-radius: var(--radius-pill);
  background: #f2faf4;
  color: var(--success);
  font-size: 13px;
  font-weight: 850;
}

.call-section {
  display: grid;
  gap: 12px;
}

.call-section .section-title {
  margin-bottom: 0;
}

.call-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.accident-detail {
  display: block;
}

.accident-detail summary {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.accident-detail summary::-webkit-details-marker {
  display: none;
}

.accident-detail summary::after {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--text);
  content: "+";
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.accident-detail[open] summary {
  margin-bottom: 14px;
}

.accident-detail[open] summary::after {
  content: "-";
}

.accident-detail summary span {
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
}

.accident-detail summary small {
  grid-column: 1 / 2;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.checklist-sections {
  display: grid;
  gap: 16px;
}

.checklist-section {
  display: grid;
  gap: 8px;
}

.checklist-section h3 {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.checklist {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.check-row {
  position: relative;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  min-height: 82px;
  padding: 13px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-raised);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  transition: background 140ms ease, border-color 140ms ease, opacity 140ms ease;
}

.check-row.next {
  border-color: rgba(63, 111, 90, 0.38);
  background: #f7fbf8;
  box-shadow: inset 3px 0 0 var(--success);
}

.check-row input {
  position: absolute;
  opacity: 0;
}

.check-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(63, 111, 90, 0.22);
  border-radius: 50%;
  background: #fff;
  accent-color: var(--accent);
  color: var(--success);
  font-size: 12px;
  font-weight: 850;
}

.check-text {
  display: grid;
  gap: 5px;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: keep-all;
}

.check-title-line {
  display: grid;
  gap: 5px;
}

.check-title-line strong {
  font-size: 15px;
  line-height: 1.35;
}

.check-type {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--success);
  font-size: 11px;
  font-weight: 850;
}

.check-type[data-type="대피"],
.check-type[data-type="신고"] {
  background: rgba(183, 43, 43, 0.11);
  color: var(--danger);
}

.check-text small {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.check-row.checked {
  border-color: rgba(63, 111, 90, 0.3);
  background: #eef8f1;
  opacity: 0.78;
}

.check-row.checked .check-index {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}

.priority-list {
  display: grid;
  gap: 10px;
  counter-reset: priority;
}

.priority-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: start;
  gap: 12px;
  min-height: 72px;
  padding: 13px 14px;
  border-radius: 18px;
  background: var(--surface-raised);
  font-size: 17px;
  font-weight: 760;
}

.priority-item strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 850;
  line-height: 1.25;
}

.priority-item span {
  grid-column: 2;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
}

.priority-item::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--success);
  counter-increment: priority;
  content: counter(priority);
  font-size: 14px;
  font-weight: 800;
}

.list {
  display: grid;
  gap: 9px;
}

.list-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(221, 216, 208, 0.9);
  border-radius: 18px;
  background: rgba(251, 250, 247, 0.78);
}

.list-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.list-item-title {
  font-size: 16px;
  font-weight: 760;
}

.inline-actions {
  display: flex;
  gap: 10px;
}

.inline-actions > * {
  flex: 1;
}

.app-version {
  color: var(--text-subtle);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.empty {
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: 18px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}

.rich-empty {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.rich-empty strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
}

.rich-empty span {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.45;
}

.rich-empty .secondary-button {
  margin-top: 2px;
}

.warning {
  border-color: rgba(211, 161, 59, 0.35);
  background: rgba(211, 161, 59, 0.11);
}

.clipboard-notice {
  border-color: rgba(211, 161, 59, 0.38);
  background: rgba(211, 161, 59, 0.14);
}

.danger-zone {
  border-color: rgba(183, 43, 43, 0.25);
  background: rgba(255, 255, 255, 0.76);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 10;
  width: min(calc(100% - 36px), 394px);
  padding: 13px 16px;
  border-radius: 18px;
  background: var(--text);
  color: #fff;
  box-shadow: 0 12px 34px rgba(5, 20, 31, 0.2);
  font-size: 15px;
  font-weight: 650;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

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

.hidden-file {
  display: none;
}

@media (max-width: 360px) {
  .app {
    padding-left: 14px;
    padding-right: 14px;
  }

  .two-grid,
  .inline-actions {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .brand h1,
  .screen-title h1 {
    font-size: 24px;
  }
}
