.inspection-sheet,
.policy-page,
.tool-panel,
.calculator-card,
.mini-window {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.inspection-sheet {
  padding: 22px;
}

.sheet-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--ink);
}

.sheet-label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.sheet-heading h2 {
  margin-bottom: 0;
  font-size: 1.5rem;
}

.stamp {
  align-self: flex-start;
  padding: 6px 9px;
  color: var(--green);
  border: 1px solid var(--green);
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 800;
  transform: rotate(-2deg);
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 6px;
  font-weight: 850;
}

.primary-link {
  color: #fff;
  background: var(--green);
  border: 1px solid var(--green);
}

.secondary-link {
  color: var(--blue);
  background: var(--blue-soft);
  border: 1px solid #cfe0f5;
}

.mini-window {
  overflow: hidden;
}

.tool-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 90;
  width: min(340px, 88vw);
  display: grid;
  grid-template-rows: auto auto 1fr;
  color: var(--ink);
  background: var(--surface);
  border-right: 1px solid var(--line-strong);
  box-shadow: var(--shadow), 18px 0 40px rgba(17, 24, 39, 0.12);
  transform: translateX(-105%);
  transition: transform 180ms ease;
}

.drawer-open .tool-drawer {
  transform: translateX(0);
}

.tool-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--green);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  font-weight: 900;
}

.tool-drawer-close {
  width: 36px;
  height: 36px;
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid #c6e7dc;
  border-radius: 6px;
  font-size: 1.2rem;
  line-height: 1;
}

.tool-search-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 6px;
  align-items: center;
  padding: 12px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.tool-search-row span {
  font-weight: 900;
}

.tool-search-row input {
  min-height: 34px;
  padding: 7px 9px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

.tool-drawer-list {
  overflow-y: auto;
  padding-bottom: 22px;
}

.tool-group h2 {
  margin: 0;
  padding: 8px 12px;
  color: var(--green);
  background: var(--green-soft);
  border-top: 1px solid #c6e7dc;
  border-bottom: 1px solid #c6e7dc;
  font-size: 0.86rem;
}

.tool-group a {
  display: block;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
  font-weight: 750;
}

.tool-group a:hover {
  color: var(--green);
  background: var(--surface-soft);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  background: rgba(15, 23, 42, 0.42);
  border: 0;
}

.drawer-open .drawer-backdrop {
  display: block;
}

body.drawer-open .tool-drawer {
  transform: translateX(0);
}

.affiliate-ad-band {
  padding: 20px 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.affiliate-ad-band .container {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.affiliate-ad-note {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.affiliate-ad {
  display: block;
  max-width: 100%;
  line-height: 0;
  border: 0;
}

.affiliate-ad img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
}

.mobile-affiliate-ad {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: none;
  justify-items: center;
  padding: 0 4px env(safe-area-inset-bottom, 0);
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 -6px 18px rgba(17, 24, 39, 0.12);
}

.mobile-affiliate-label {
  width: 100%;
  max-width: 100%;
  margin-bottom: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: clamp(0.45rem, 1.85vw, 0.53rem);
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .desktop-affiliate-ad {
    display: none;
  }

  .mobile-affiliate-ad {
    display: grid;
  }
}

.mini-window-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #f0f5fa;
  border-bottom: 1px solid var(--line);
}

.mini-window-bar span {
  width: 12px;
  height: 12px;
  background: var(--green);
  border-radius: 999px;
  box-shadow: 18px 0 0 var(--amber), 36px 0 0 var(--blue);
}

.mini-window-bar strong {
  margin-left: 40px;
  font-size: 0.92rem;
}

.mini-command-list {
  display: grid;
  gap: 0;
}

.mini-command-list a {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 4px 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.mini-command-list a:last-child {
  border-bottom: 0;
}

.mini-command-list span {
  grid-row: span 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 6px;
  font-weight: 900;
}

.mini-command-list strong {
  line-height: 1.2;
}

.mini-command-list em {
  color: var(--muted);
  font-size: 0.9rem;
  font-style: normal;
}

.calculator-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 10px;
}

.calculator-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 154px;
  padding: 14px 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.calculator-card:hover {
  border-color: rgba(31, 122, 101, 0.34);
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.08);
  transform: translateY(-1px);
}

.calculator-card h3 {
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.38;
}

.calculator-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.58;
}

.tool-badge {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 9px;
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid #c6e7dc;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.tool-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(280px, 1.05fr);
  gap: 18px;
  min-width: 0;
  padding: 20px;
}

.scientific-workbench {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(280px, 1fr);
  gap: 20px;
  align-items: start;
}

.calculator-body {
  padding: 18px;
  background:
    linear-gradient(145deg, #f5f6f8, #b9c0cb 58%, #7d8798);
  border: 1px solid #798394;
  border-radius: 18px;
  box-shadow: 0 18px 36px rgba(17, 24, 39, 0.18);
}

.calculator-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: #111827;
  font-weight: 900;
}

.calculator-brand {
  letter-spacing: 0.06em;
}

.calculator-model {
  color: #2f3a4c;
  font-size: 0.86rem;
  font-style: italic;
}

.calculator-screen {
  padding: 12px;
  background: #dfece8;
  border: 8px solid #24304e;
  border-radius: 10px;
  box-shadow: inset 0 0 0 2px #59647c;
}

.screen-status {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #293244;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.pretty-expression {
  display: flex;
  align-items: center;
  min-height: 76px;
  margin: 8px 0;
  padding: 8px;
  overflow-x: auto;
  color: #111827;
  background: #f8fff9;
  border: 2px solid #111827;
  font-family: "Times New Roman", Cambria, Georgia, serif;
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  line-height: 1.2;
  white-space: nowrap;
}

.math-fraction {
  display: inline-grid;
  min-width: 96px;
  margin: 0 auto;
  text-align: center;
  line-height: 1.15;
}

.math-numerator {
  padding: 0 10px 4px;
  border-bottom: 1.5px solid #111827;
}

.math-denominator {
  padding-top: 4px;
}

.screen-input {
  min-height: 34px;
  padding: 6px 8px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.95rem;
}

.screen-result {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: #111827;
  font-family: Consolas, "Courier New", monospace;
}

.screen-result span {
  color: #3f4a5f;
  font-size: 0.78rem;
  font-weight: 900;
}

.screen-result strong {
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1;
}

#scientific-detail {
  margin: 8px 0 0;
  color: #3f4a5f;
  font-size: 0.86rem;
}

.angle-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
  padding: 0;
  border: 0;
}

.angle-toggle legend {
  grid-column: 1 / -1;
  color: #2f3a4c;
  font-size: 0.78rem;
  font-weight: 900;
}

.angle-toggle label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  color: #fff;
  background: #3f4963;
  border: 1px solid #21283a;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 900;
}

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

.key {
  min-height: 42px;
  padding: 7px 5px;
  color: #fff;
  background: #2f3654;
  border: 1px solid #171d31;
  border-radius: 10px 10px 12px 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 3px 0 #161c2f;
  font-size: 0.92rem;
  font-weight: 900;
}

.key.function {
  background: #4d5874;
}

.key.soft {
  color: #172033;
  background: #d8dde6;
  border-color: #9aa4b8;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 3px 0 #9aa4b8;
}

.key.number {
  background: #252d49;
  font-size: 1.12rem;
}

.key.operator {
  background: #384467;
  font-size: 1.1rem;
}

.key.danger {
  background: #f5f1ea;
  color: #283247;
  border-color: #c9c0b5;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), 0 3px 0 #b7aea5;
}

.key.execute {
  background: #4f57a8;
  border-color: #2f3678;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 3px 0 #272e6b;
}

.scientific-side {
  align-self: stretch;
}

.stacked-form {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(280px, 1.05fr);
  gap: 18px;
  padding: 18px 0;
}

.input-panel,
.result-panel,
.check-report,
.chart-panel,
.seller-copy {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.input-panel,
.result-panel {
  padding: 16px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.field label,
fieldset legend {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

select,
input[type="number"],
input[type="text"],
input[type="date"],
input[type="time"],
input[type="search"],
input[type="file"],
textarea {
  width: 100%;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

select,
input[type="number"],
input[type="text"],
input[type="date"],
input[type="time"],
input[type="search"],
input[type="file"] {
  min-height: 42px;
  padding: 9px 10px;
}

textarea {
  min-height: 144px;
  padding: 12px;
  resize: vertical;
}

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

.input-suffix {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  overflow: hidden;
}

.input-suffix input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 0;
}

.input-suffix span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: max-content;
  padding: 0 10px;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.segmented-field,
.check-field {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}

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

.segmented-field legend,
.check-field legend {
  grid-column: 1 / -1;
  margin-bottom: 6px;
}

.segmented-field label,
.check-field label,
.todo-list label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.segmented-field label {
  justify-content: center;
  min-height: 40px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.86rem;
}

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

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

.check-field label,
.todo-list label {
  color: var(--muted);
}

.primary-button,
.quick-models button,
.subtle-button,
.keypad button {
  border-radius: 6px;
  font-weight: 800;
}

.primary-button {
  width: 100%;
  min-height: 46px;
  color: #fff;
  background: var(--green);
  border: 1px solid var(--green);
}

.primary-button:hover {
  background: #0d6a57;
}

.button-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.45fr) minmax(180px, 1fr);
  gap: 10px;
}

.quick-models button,
.subtle-button,
.keypad button {
  min-height: 42px;
  padding: 8px 11px;
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid #c6e7dc;
}

.keypad {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.keypad button {
  min-height: 38px;
}

.formula-help,
.history-box,
.fine-print {
  margin-top: 14px;
}

.formula-help {
  padding: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.formula-help h3,
.history-box h3 {
  margin-bottom: 8px;
}

.formula-help p,
.fine-print {
  color: var(--muted);
  font-size: 0.92rem;
}

.field-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.history-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.35rem;
  color: var(--muted);
}

.history-list:empty::before {
  content: "아직 계산 기록이 없습니다.";
  display: block;
  margin-left: -1.35rem;
  color: var(--muted);
}

.report-summary {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.report-kicker,
.metric-grid span,
.section-heading-row span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

#estimated-price {
  display: block;
  margin: 6px 0 4px;
  overflow-wrap: anywhere;
  color: var(--blue);
  font-size: clamp(1.8rem, 4vw, 2.65rem);
  line-height: 1.1;
}

.result-number {
  display: block;
  margin: 6px 0 4px;
  overflow-wrap: anywhere;
  color: var(--blue);
  font-size: clamp(1.75rem, 4vw, 2.45rem);
  line-height: 1.1;
}

#estimated-range {
  color: var(--muted);
}

.decision-box {
  margin: 14px 0;
  padding: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.decision-box p {
  margin: 8px 0 0;
}

.decision-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
}

.decision-badge.good {
  color: var(--green);
  background: var(--green-soft);
}

.decision-badge.warn {
  color: var(--amber);
  background: var(--amber-soft);
}

.decision-badge.neutral {
  color: var(--blue);
  background: var(--blue-soft);
}

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

.metric-grid div {
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.metric-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 1.2rem;
}

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

.australia-pay-panel {
  align-items: start;
}

.australia-pay-panel .field-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.australia-pay-panel .field {
  min-width: 0;
}

.australia-pay-panel .field > label {
  display: flex;
  min-height: 2.1em;
  align-items: flex-end;
  line-height: 1.25;
}

.australia-pay-panel .input-suffix,
.australia-pay-panel select,
.australia-pay-panel input[type="number"],
.australia-pay-panel input[type="text"],
.australia-pay-panel input[type="date"] {
  min-height: 42px;
}

.australia-pay-panel .button-row {
  grid-template-columns: 1fr;
  margin-top: 16px;
}

.australia-pay-panel .primary-button {
  min-height: 52px;
  font-size: 1rem;
}

.australia-pay-panel .notice-box {
  line-height: 1.65;
}

.au-context-grid article {
  min-height: 174px;
}


.exchange-rate-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.exchange-rate-control .subtle-button {
  min-height: 42px;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .exchange-rate-control {
    grid-template-columns: 1fr;
  }
}

.extraction-hint {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.45;
}

.extraction-hint.warn {
  color: var(--amber);
}

.auto-extracted {
  border-color: rgba(31, 122, 101, 0.42);
  background: #fbfffd;
}

.needs-review {
  border-color: rgba(184, 116, 33, 0.5);
}

.privacy-note {
  margin-bottom: 14px;
}

.privacy-note p {
  margin: 6px 0 0;
}

.ocr-status-box {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 12px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

#au-ocr-status[data-tone="good"] {
  color: var(--green);
  font-weight: 800;
}

#au-ocr-status[data-tone="warn"] {
  color: var(--amber);
  font-weight: 800;
}

#au-ocr-progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  accent-color: var(--green);
}

.raw-text-box {
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.raw-text-box summary {
  color: var(--blue);
  cursor: pointer;
  font-weight: 850;
}

.raw-text-box textarea {
  min-height: 180px;
  margin: 12px 0 10px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.86rem;
}

.extraction-debug-box pre {
  max-height: 260px;
  margin: 12px 0 0;
  padding: 12px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.78rem;
  line-height: 1.55;
}

.australia-pay-metrics {
  margin-top: 14px;
}

.australia-pay-metrics em {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.9rem;
  font-style: normal;
  font-weight: 800;
}

.loan-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.support-breakdown,
.value-comment,
.life-loss-box {
  margin-top: 16px;
}

.support-breakdown,
.value-comment,
.life-loss-box {
  padding: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.value-comment {
  display: grid;
  gap: 5px;
}

.value-comment strong,
.life-loss-box h3 {
  margin-bottom: 0;
  color: var(--green);
}

.value-comment span {
  color: var(--muted);
}

.life-loss-box .metric-grid {
  margin-top: 10px;
}

.compact-row {
  align-items: flex-start;
  margin-bottom: 8px;
}

.compact-row h3 {
  margin-bottom: 0;
}

.compact-row span {
  color: var(--muted);
  font-size: 0.82rem;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.mini-table th,
.mini-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.mini-table th:first-child,
.mini-table td:first-child {
  text-align: left;
}

.mini-table thead th {
  color: var(--muted);
  background: var(--surface-soft);
  font-weight: 900;
}

.mini-table tbody tr:last-child td {
  border-bottom: 0;
}

.space-route {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 14px 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.space-route-line {
  height: 14px;
  overflow: hidden;
  background: var(--green-soft);
  border: 1px solid #c6e7dc;
  border-radius: 999px;
}

.space-route-line i {
  display: block;
  width: 1%;
  height: 100%;
  background: linear-gradient(90deg, var(--green), #4fa88d);
  border-radius: inherit;
  transition: width 180ms ease;
}

.space-visual .metric-grid strong {
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.market-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.market-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--blue);
  background: var(--blue-soft);
  border: 1px solid #cfe0f5;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 850;
}

.report-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
}

.check-report,
.chart-panel,
.seller-copy {
  min-width: 0;
  padding: 16px;
}

.check-report dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px 12px;
  margin: 0;
}

.check-report dt {
  color: var(--muted);
  font-weight: 800;
}

.check-report dd {
  margin: 0;
}

.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-heading-row h3 {
  margin-bottom: 0;
}

.price-chart {
  min-height: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(180deg, #ffffff, #f7fafc);
}

.bmi-visual,
.loan-visual {
  display: grid;
  gap: 18px;
  padding: 22px;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff, #f7fbf9);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.bmi-score-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.bmi-score-card span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.bmi-score-card strong {
  color: var(--green);
  font-size: clamp(2.6rem, 8vw, 4rem);
  line-height: 1;
}

.bmi-category {
  color: var(--ink);
  font-weight: 900;
}

.bmi-category.low {
  color: var(--blue);
}

.bmi-category.watch {
  color: var(--amber);
}

.bmi-category.high,
.bmi-category.danger {
  color: var(--danger);
}

.bmi-category.normal {
  color: var(--green);
}

.bmi-track {
  position: relative;
  display: grid;
  grid-template-columns: 4.5fr 4.5fr 2fr 5fr 5fr;
  height: 16px;
  overflow: visible;
  border-radius: 999px;
}

.bmi-track span {
  min-width: 0;
}

.bmi-track .low {
  background: #4386f4;
  border-radius: 999px 0 0 999px;
}

.bmi-track .normal {
  background: #35c486;
}

.bmi-track .watch {
  background: #f9c846;
}

.bmi-track .high {
  background: #f97339;
}

.bmi-track .danger {
  background: #d93649;
  border-radius: 0 999px 999px 0;
}

.bmi-marker {
  position: absolute;
  top: -8px;
  width: 3px;
  height: 32px;
  background: #f8fafc;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.25);
  transform: translateX(-50%);
}

.bmi-track-labels {
  display: grid;
  grid-template-columns: 4.5fr 4.5fr 2fr 5fr 5fr;
  gap: 6px;
  color: #b8c7dd;
  font-size: 0.78rem;
}

.bmi-track-labels span {
  min-width: 0;
}

.bmi-track-labels span:nth-child(2),
.bmi-track-labels span:nth-child(3),
.bmi-track-labels span:nth-child(4) {
  text-align: center;
}

.bmi-track-labels span:last-child {
  text-align: right;
}

.bmi-gauge-wrap {
  display: grid;
  gap: 8px;
}

.bmi-gauge-chart,
.loan-ratio-chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.bmi-segment.low {
  fill: #5f8fd8;
}

.bmi-segment.normal {
  fill: var(--green);
}

.bmi-segment.watch {
  fill: #e9b949;
}

.bmi-segment.high {
  fill: #df8a35;
}

.bmi-segment.danger {
  fill: var(--danger);
}

.bmi-marker-line {
  stroke: var(--green);
  stroke-width: 3;
  stroke-linecap: round;
  filter: drop-shadow(0 1px 2px rgba(17, 24, 39, 0.2));
}

.bmi-marker-dot {
  fill: #ffffff;
  stroke: var(--green);
  stroke-width: 3;
}

.bmi-marker-text,
.bmi-gauge-label,
.loan-chart-label,
.loan-chart-caption {
  fill: var(--muted);
  font-weight: 850;
}

.bmi-marker-text {
  fill: var(--green);
  font-size: 14px;
  text-anchor: middle;
}

.bmi-gauge-label {
  font-size: 12px;
}

.bmi-gauge-label.middle {
  text-anchor: middle;
}

.bmi-gauge-label.end {
  text-anchor: end;
}

.bmi-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.bmi-mini-grid div,
.loan-summary-tile {
  padding: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.bmi-mini-grid span,
.loan-summary-tile span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.bmi-mini-grid strong,
.loan-summary-tile strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 1.1rem;
}

.loan-ratio-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 2px;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 800;
}

.loan-ratio-labels span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.loan-ratio-labels span::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
}

.loan-ratio-labels span:last-child::before {
  background: var(--amber);
}

.loan-ratio-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.loan-ratio-heading strong {
  color: var(--ink);
}

.loan-ratio-heading span,
.loan-ratio-note {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.loan-ratio-note {
  margin: 0;
}

.loan-chart-bg {
  fill: var(--green-soft);
}

.loan-chart-principal {
  fill: var(--green);
}

.loan-chart-interest {
  fill: #d9822b;
}

.loan-chart-divider {
  stroke: #ffffff;
  stroke-width: 2.5;
  stroke-linecap: round;
}

.loan-chart-pin {
  fill: #ffffff;
  stroke: var(--green);
  stroke-width: 3;
}

.loan-chart-label {
  font-size: 14px;
}

.loan-chart-label.right {
  text-anchor: end;
}

.loan-chart-caption {
  fill: var(--muted);
  font-size: 12px;
}

.loan-balance-bar {
  display: grid;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #233148;
}

.loan-balance-bar.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  color: #b8c7dd;
  background: #1c293a;
  font-size: 0.82rem;
  font-weight: 800;
}

.loan-balance-bar span:first-child {
  background: #6d6bf6;
}

.loan-balance-bar span:last-child {
  background: #f43f72;
}

.schedule-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 320px;
  max-height: 320px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.schedule-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.schedule-table th,
.schedule-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.schedule-table th:first-child,
.schedule-table td:first-child {
  text-align: center;
}

.schedule-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.86rem;
}

.chart-axis {
  stroke: #b8c4d2;
  stroke-width: 1;
}

.chart-grid {
  stroke: #e2e8f0;
  stroke-width: 1;
}

.chart-line-observed {
  fill: none;
  stroke: var(--blue);
  stroke-width: 3;
}

.chart-line-projected {
  fill: none;
  stroke: var(--amber);
  stroke-width: 3;
  stroke-dasharray: 6 5;
}

.chart-band {
  fill: rgba(37, 99, 169, 0.1);
}

.chart-dot {
  fill: var(--blue);
}

.chart-label {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.seller-copy {
  margin-top: 18px;
}

.step-list,
.plain-list,
.tip-list,
.policy-page ul {
  padding-left: 1.2rem;
}

.step-list {
  display: grid;
  gap: 12px;
}

.step-list li strong,
.step-list li span,
.tip-list li strong,
.tip-list li span {
  display: block;
}

.step-list li span,
.tip-list li span {
  color: var(--muted);
}

.tip-list {
  display: grid;
  gap: 12px;
}

.todo-list {
  display: grid;
  gap: 10px;
}

details {
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

summary {
  cursor: pointer;
  font-weight: 850;
}

details p {
  margin: 10px 0 0;
  color: var(--muted);
}

.policy-page {
  padding: 30px;
}

.policy-page h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.policy-page h2 {
  margin-top: 30px;
  font-size: 1.25rem;
}

.policy-page p,
.policy-page li {
  color: var(--muted);
}

.notice-box {
  margin-top: 24px;
  padding: 14px;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid #f0cf8c;
  border-radius: var(--radius);
  font-weight: 800;
}

.calculation-guide {
  font-size: 0.95rem;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
  margin-top: 20px;
}

.guide-grid article {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.guide-grid h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.guide-grid p,
.guide-grid li,
.guide-updated {
  color: var(--muted);
}

.guide-grid ul {
  margin: 0;
  padding-left: 1.15rem;
}

.guide-updated {
  margin: 18px 0 0;
  font-size: 0.86rem;
  font-weight: 800;
}

.whv-tool-panel,
.whv-upload-panel {
  align-items: start;
}

.whv-tool-panel .field-row,
.whv-upload-panel .field-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.whv-tool-panel .field,
.whv-upload-panel .field,
.whv-payslip-card .field {
  min-width: 0;
}

.whv-tool-panel select,
.whv-tool-panel input[type="number"],
.whv-tool-panel input[type="text"],
.whv-upload-panel input[type="file"],
.whv-payslip-card select,
.whv-payslip-card input[type="number"],
.whv-payslip-card input[type="text"],
.whv-payslip-card input[type="date"] {
  min-height: 42px;
}

.whv-result-grid {
  margin: 14px 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.whv-result-grid strong,
.whv-card-grid strong {
  overflow-wrap: anywhere;
}

.whv-progress {
  width: 100%;
  height: 12px;
  margin: 8px 0 14px;
  overflow: hidden;
  accent-color: var(--green);
}

.whv-payslip-list {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.whv-payslip-card {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(24, 39, 75, 0.06);
}

.whv-payslip-card h3 {
  margin-bottom: 12px;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
}

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

.whv-card-grid .field,
.whv-card-grid > div:not(.field) {
  padding: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.whv-card-grid .field label,
.whv-card-grid span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.whv-card-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.whv-card-checks label,
.whv-tool-panel .check-field label,
.whv-upload-panel .check-field label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.45;
}

.whv-card-checks input,
.whv-tool-panel .check-field input,
.whv-upload-panel .check-field input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin-top: 2px;
}

.whv-payslip-card .notice-box {
  margin-top: 12px;
}

#whv-ocr-status[data-tone="good"] {
  color: var(--green);
  font-weight: 800;
}

#whv-ocr-status[data-tone="warn"] {
  color: var(--amber);
  font-weight: 800;
}

#whv-ocr-progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  accent-color: var(--green);
}

@media (max-width: 920px) {
  .whv-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .tool-grid,
  .tool-panel,
  .scientific-workbench,
  .report-grid,
  .field-row {
    grid-template-columns: 1fr;
  }

  .australia-pay-panel .field-row,
  .whv-tool-panel .field-row,
  .whv-upload-panel .field-row {
    grid-template-columns: 1fr;
  }

  .australia-pay-panel .field > label,
  .whv-tool-panel .field > label,
  .whv-upload-panel .field > label {
    min-height: auto;
  }

  .segmented-field {
    grid-template-columns: 1fr;
  }

  .compact-segmented,
  .savings-metrics,
  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inspection-sheet {
    padding: 16px;
  }
}

@media (max-width: 720px) {
  .calculator-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .sheet-heading,
  .section-heading-row,
  .metric-grid,
  .button-row {
    align-items: flex-start;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .check-report dl {
    grid-template-columns: 1fr;
  }

  .keypad {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .tool-panel {
    padding: 14px;
  }

  .scientific-workbench {
    gap: 12px;
  }

  .calculator-body {
    padding: 8px;
    border-radius: 12px;
  }

  .calculator-top {
    margin-bottom: 8px;
    font-size: 0.82rem;
  }

  .calculator-screen {
    padding: 7px;
    border-width: 4px;
    border-radius: 7px;
  }

  .screen-status {
    font-size: 0.64rem;
  }

  .pretty-expression {
    min-height: 38px;
    margin: 6px 0;
    padding: 5px;
    font-size: 0.96rem;
  }

  .math-fraction {
    min-width: 74px;
  }

  .screen-input {
    min-height: 28px;
    padding: 4px 6px;
    font-size: 0.74rem;
  }

  .screen-result {
    margin-top: 6px;
  }

  .screen-result strong {
    font-size: 1.35rem;
  }

  #scientific-detail {
    margin-top: 6px;
    font-size: 0.72rem;
  }

  .angle-toggle {
    gap: 5px;
    margin: 8px 0;
  }

  .angle-toggle label {
    min-height: 28px;
    font-size: 0.72rem;
  }

  .key {
    min-height: 30px;
    padding: 3px 2px;
    border-radius: 7px 7px 9px 9px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 2px 0 #161c2f;
    font-size: 0.64rem;
  }

  .key.number,
  .key.operator {
    font-size: 0.78rem;
  }

  .key.soft,
  .key.function,
  .key.danger,
  .key.execute {
    font-size: 0.62rem;
  }

  .guide-grid,
  .whv-result-grid,
  .whv-card-grid,
  .whv-card-checks {
    grid-template-columns: 1fr;
  }

  .bmi-visual,
  .loan-visual {
    padding: 16px;
  }

  .bmi-track-labels {
    gap: 4px;
    font-size: 0.62rem;
  }

  .bmi-marker-text,
  .loan-chart-label {
    font-size: 12px;
  }

  .bmi-gauge-label,
  .loan-chart-caption {
    font-size: 10px;
  }

  .loan-ratio-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .bmi-mini-grid {
    grid-template-columns: 1fr;
  }

  .schedule-wrap {
    height: 300px;
    max-height: 300px;
  }

  .schedule-table,
  .schedule-table thead,
  .schedule-table tbody,
  .schedule-table tr,
  .schedule-table th,
  .schedule-table td {
    display: block;
  }

  .schedule-table thead {
    display: none;
  }

  .schedule-table tr {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
  }

  .schedule-table td {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 5px 0;
    border-bottom: 0;
    text-align: right;
    white-space: normal;
  }

  .schedule-table td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: var(--muted);
    font-weight: 800;
    text-align: left;
  }
}


/* WHV 88-day calculator mode and step layout */
.whv-howto {
  margin-top: 20px;
  padding: 18px 20px 18px 2rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.whv-howto li {
  margin-bottom: 10px;
}

.whv-step-layout {
  grid-template-columns: minmax(300px, 0.9fr) minmax(300px, 1.1fr);
  align-items: start;
}

.whv-step-panel h2,
.whv-result-panel h2,
.whv-mode-panel h3 {
  margin-bottom: 12px;
}

.whv-step-divider {
  height: 1px;
  margin: 18px 0;
  background: var(--line);
}

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

.whv-mode-card {
  display: grid;
  gap: 7px;
  align-content: start;
  min-height: 128px;
  padding: 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.whv-mode-card.active,
.whv-mode-card:focus-within {
  border-color: rgba(31, 122, 101, 0.55);
  box-shadow: 0 0 0 3px rgba(31, 122, 101, 0.1);
}

.whv-mode-card input {
  width: 18px;
  height: 18px;
}

.whv-mode-card strong {
  line-height: 1.35;
}

.whv-mode-card span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.whv-mode-panel {
  margin-top: 18px;
  align-items: start;
}

.whv-source-detail {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  color: var(--muted);
}

.whv-source-detail strong {
  color: var(--ink);
}

.whv-official-mini {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.whv-official-mini p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.whv-official-mini a {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  color: var(--blue);
  font-weight: 850;
  overflow-wrap: anywhere;
}

.whv-hours-fallback {
  display: grid;
  gap: 10px;
}

.whv-hours-fallback .field {
  max-width: 280px;
  margin-bottom: 0;
}

.postcode-result {
  margin-top: 12px;
  padding: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.postcode-result strong,
.postcode-result span {
  display: block;
}

.postcode-result p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.postcode-result.likelyEligible {
  border-color: rgba(31, 122, 101, 0.38);
  background: var(--green-soft);
}

.postcode-result.needsOfficialCheck,
.postcode-result.notMatched,
.postcode-result.unknown {
  border-color: #f0cf8c;
  background: var(--amber-soft);
}

.whv-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.whv-card-actions .subtle-button {
  width: auto;
}

.whv-payslip-card .field-help.warn {
  color: var(--amber);
  font-weight: 850;
}

.faq-wrap {
  max-width: 980px;
}

@media (max-width: 920px) {
  .whv-mode-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .whv-step-layout,
  .whv-mode-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .whv-howto {
    padding: 14px 14px 14px 1.35rem;
  }

  .whv-mode-card {
    min-height: 0;
  }

  .whv-card-actions .subtle-button {
    width: 100%;
  }
}

/* 2026-06-16 WHV compact flow + table UI refresh */
html {
  scroll-behavior: smooth;
}

#whv-input-step,
#whv-review-step,
#whv-result-step {
  scroll-margin-top: 84px;
}

.whv-hero-compact .lead {
  margin-bottom: 10px;
}

.whv-mini-notice {
  display: inline-flex;
  max-width: 760px;
  margin: 0;
  padding: 8px 11px;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid #f0cf8c;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.45;
}

.whv-top-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(320px, 1.28fr);
  gap: 16px;
  align-items: stretch;
}

.whv-top-grid .input-panel,
.whv-mode-panel,
.whv-result-dashboard {
  box-shadow: 0 10px 26px rgba(24, 39, 75, 0.04);
}

.whv-step-panel h2,
.whv-mode-panel h3,
.whv-result-main h2 {
  margin-bottom: 10px;
}

.whv-compact-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.whv-compact-fields .field,
.whv-record-table .field {
  margin-bottom: 0;
}

.whv-uk-compact {
  margin-top: 8px;
}

.whv-mode-card-wrap .whv-mode-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.whv-mode-card {
  position: relative;
  min-height: 104px;
  padding: 11px 12px 12px;
}

.whv-mode-card.active::after {
  content: "✓";
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #fff;
  background: var(--green);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 950;
}

.whv-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.whv-step-actions .primary-button,
.whv-step-actions .subtle-button {
  width: auto;
}

.whv-step-actions .field-help {
  margin: 0;
}

.whv-bottom-actions {
  justify-content: flex-end;
}

.compact-intro {
  max-width: 880px;
  margin-bottom: 14px;
}

.notice-compact,
.australia-pay-panel .notice-compact {
  font-size: 0.875rem;
  line-height: 1.55;
  padding: 12px 14px;
}

.notice-compact h2,
.notice-compact h3,
.notice-compact strong,
.australia-pay-panel .notice-compact h2,
.australia-pay-panel .notice-compact h3,
.australia-pay-panel .notice-compact strong {
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.notice-compact p,
.notice-compact li {
  color: var(--muted);
  font-weight: 650;
}

.input-with-unit {
  display: flex;
  align-items: stretch;
  min-height: 42px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  overflow: hidden;
}

.input-with-unit input {
  min-width: 0;
  border: 0;
  border-radius: 0;
}

.input-with-unit .unit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  padding: 0 10px;
  color: var(--muted);
  background: var(--surface-soft);
  border-left: 1px solid var(--line);
  font-size: 0.86rem;
  font-weight: 850;
}

.whv-side-note {
  align-self: start;
}

.whv-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(to right, #fff 85%, rgba(31, 122, 101, 0.06));
}

.whv-table-scroll::before {
  content: "표는 좌우로 스크롤할 수 있습니다.";
  display: none;
  padding: 8px 10px 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.whv-record-table,
.whv-result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.whv-record-table th,
.whv-record-table td,
.whv-result-table th,
.whv-result-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.whv-record-table th,
.whv-result-table th {
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: left;
  white-space: nowrap;
}

.whv-record-table td {
  min-width: 132px;
}

.whv-record-table td:first-child {
  min-width: 190px;
}

.whv-record-table input,
.whv-record-table select {
  min-height: 36px;
  padding: 7px 8px;
  font-size: 0.84rem;
}

.whv-record-table .field label {
  font-size: 0.72rem;
}

.whv-date-pair {
  display: grid;
  gap: 6px;
}

.whv-row-muted,
.whv-row-source,
.whv-row-warn {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.whv-row-warn {
  color: var(--amber);
}

.whv-row-status {
  display: grid;
  gap: 7px;
  min-width: 220px;
}

.whv-row-status .subtle-button {
  width: max-content;
  max-width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.82rem;
}

.whv-record-table .check-field,
.whv-record-table label:has(input[type="checkbox"]) {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-width: 170px;
  margin: 0;
  line-height: 1.35;
}

.whv-record-table input[type="checkbox"] {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  margin-top: 1px;
}

.whv-record-table .postcode-result {
  min-width: 220px;
  margin: 0;
  padding: 9px;
  font-size: 0.78rem;
}

.whv-record-table .postcode-result p {
  margin: 4px 0;
  font-size: 0.78rem;
}

.whv-result-dashboard {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(340px, 1.15fr);
  gap: 16px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.whv-result-main,
.whv-result-table-wrap {
  min-width: 0;
}

.whv-result-table-wrap {
  overflow-x: auto;
}

.whv-result-table td {
  font-weight: 850;
}

.whv-dedupe-compact {
  margin-top: 12px;
}

.whv-source-detail {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  font-size: 0.86rem;
}

.australia-pay-panel .notice-box {
  margin-top: 14px;
}

.australia-pay-panel .notice-compact p {
  margin-bottom: 6px;
}

@media (max-width: 920px) {
  .whv-top-grid,
  .whv-result-dashboard {
    grid-template-columns: 1fr;
  }

  .whv-mode-card-wrap .whv-mode-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .whv-mini-notice {
    display: block;
    border-radius: 10px;
    font-size: 0.82rem;
  }

  .whv-compact-fields {
    grid-template-columns: 1fr;
  }

  .whv-table-scroll::before {
    display: block;
  }

  .whv-record-table {
    min-width: 1180px;
  }

  .whv-result-table th,
  .whv-result-table td {
    padding: 8px;
  }

  .whv-source-detail {
    grid-template-columns: 1fr;
  }

  .whv-step-actions,
  .whv-bottom-actions {
    justify-content: stretch;
  }

  .whv-step-actions .primary-button,
  .whv-step-actions .subtle-button {
    width: 100%;
  }
}

/* WHV 88 days v2 refinement: compact mode add-ons, review table and result dashboard */
.whv-extra-mode-actions {
  margin: 12px 0 14px;
  padding: 10px 12px;
  background: #fff;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
}

.whv-extra-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.whv-extra-button-row .subtle-button[hidden] {
  display: none;
}

.whv-callout-mini,
.whv-upload-callout .whv-callout-mini,
.whv-upload-callout .whv-upload-callout {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 10px 11px;
  color: var(--ink);
  background: var(--green-soft);
  border: 1px solid rgba(31, 122, 101, 0.18);
  border-radius: 10px;
}

.whv-upload-callout strong,
.whv-callout-mini strong {
  color: var(--green-dark);
}

.whv-record-desktop {
  display: block;
}

.whv-record-mobile {
  display: none;
}

.whv-record-summary-table {
  min-width: 1040px;
  table-layout: auto;
}

.whv-record-summary-table th,
.whv-record-summary-table td {
  white-space: nowrap;
  vertical-align: middle;
}

.whv-record-summary-table td:nth-child(3),
.whv-record-summary-table td:nth-child(8) {
  white-space: normal;
  min-width: 160px;
}

.whv-record-summary-table .whv-record-detail-row td {
  white-space: normal;
  background: #fff;
}

.whv-file-name {
  display: block;
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.whv-nowrap {
  white-space: nowrap;
}

.whv-detail-jump {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 0.82rem;
  text-decoration: none;
}

.whv-record-details {
  padding: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.whv-record-details summary {
  cursor: pointer;
  color: var(--green-dark);
  font-weight: 950;
}

.whv-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.whv-detail-grid .field {
  margin: 0;
}

.whv-detail-grid input,
.whv-detail-grid select {
  width: 100%;
  min-height: 38px;
  padding: 8px 9px;
  font-size: 0.86rem;
}

.whv-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.whv-card-actions > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.whv-result-dashboard-v2 {
  grid-template-columns: minmax(280px, 0.85fr) minmax(420px, 1.15fr);
  align-items: stretch;
}

.whv-result-hero-card {
  padding: 18px;
  background: linear-gradient(135deg, #fff, var(--green-soft));
  border: 1px solid rgba(31, 122, 101, 0.18);
  border-radius: var(--radius);
}

.whv-result-side {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.whv-result-highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.whv-result-highlight-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.whv-result-highlight-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.whv-result-highlight-card strong:not(.decision-badge) {
  color: var(--green-dark);
  font-size: 1.45rem;
  line-height: 1;
}

.whv-result-highlight-card.emphasize {
  border-color: rgba(196, 126, 24, 0.34);
  background: var(--amber-soft);
}

.whv-small-official-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

@media (max-width: 920px) {
  .whv-result-dashboard-v2,
  .whv-result-highlight-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .whv-record-desktop {
    display: none;
  }

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

  .whv-record-mobile-card {
    display: grid;
    gap: 9px;
    padding: 12px;
  }

  .whv-mobile-card-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
  }

  .whv-mobile-card-head div {
    display: grid;
    gap: 3px;
    min-width: 0;
  }

  .whv-mobile-card-head strong:first-child {
    overflow-wrap: anywhere;
  }

  .whv-mobile-card-head span,
  .whv-mobile-metrics span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
  }

  .whv-mobile-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .whv-mobile-metrics strong {
    display: block;
    color: var(--ink);
    font-size: 0.88rem;
  }

  .whv-detail-grid {
    grid-template-columns: 1fr;
  }

  .whv-extra-button-row .subtle-button {
    width: 100%;
  }
}

/* WHV v2 refinement: compact guided flow, summary table + detail panels */
.whv-mode-addons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: #fff;
  font-size: 0.88rem;
}

.whv-mode-addons span {
  color: var(--muted);
  font-weight: 800;
  margin-right: 4px;
}

.whv-mode-addons .subtle-button {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 0.84rem;
}

.whv-mode-panel.is-secondary {
  border-style: dashed;
  background: rgba(246, 248, 245, 0.72);
}

.whv-callout-mini {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(31, 122, 101, 0.08);
  border: 1px solid rgba(31, 122, 101, 0.18);
}

.whv-callout-mini strong {
  margin: 0;
  color: var(--text);
  font-size: 0.92rem;
}

.whv-callout-mini span {
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.45;
  font-weight: 700;
}

.whv-record-review-wrap {
  background: #fff;
}

.whv-summary-table {
  table-layout: auto;
  min-width: 980px;
}

.whv-summary-table th,
.whv-summary-table td {
  white-space: nowrap;
}

.whv-summary-table td {
  min-width: auto;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.whv-summary-table td:first-child {
  min-width: 92px;
}

.whv-summary-table .whv-file-name {
  display: block;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.whv-summary-table label:has(input[type="checkbox"]) {
  min-width: auto;
  white-space: nowrap;
  align-items: center;
}

.whv-edit-hint {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.whv-record-detail > td {
  padding: 0 10px 12px;
  background: #fff;
  border-bottom: 1px solid var(--line-strong);
}

.whv-detail-accordion {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  overflow: hidden;
}

.whv-detail-accordion summary {
  cursor: pointer;
  padding: 10px 12px;
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 900;
  list-style-position: inside;
}

.whv-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  padding: 0 12px 12px;
}

.whv-detail-grid .field {
  min-width: 0;
}

.whv-detail-grid .field label,
.whv-detail-grid label.field {
  font-size: 0.76rem;
  font-weight: 850;
}

.whv-detail-grid input,
.whv-detail-grid select {
  min-height: 38px;
  padding: 8px 9px;
  font-size: 0.86rem;
}

.whv-detail-meta {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(220px, 0.8fr);
  gap: 10px;
  padding: 0 12px 12px;
}

.whv-detail-meta .postcode-result {
  margin: 0;
}

.whv-result-dashboard {
  grid-template-columns: minmax(280px, 0.85fr) minmax(360px, 1.15fr);
  align-items: start;
}

.whv-result-card-primary {
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(31, 122, 101, 0.08), #fff 72%);
  border: 1px solid rgba(31, 122, 101, 0.16);
}

.whv-result-side {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.whv-result-emphasis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.whv-emphasis-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.whv-emphasis-card.highlight {
  border-color: rgba(190, 98, 42, 0.35);
  background: rgba(190, 98, 42, 0.08);
}

.whv-emphasis-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  margin-bottom: 4px;
}

.whv-emphasis-card strong:not(.decision-badge) {
  display: block;
  color: var(--accent-strong);
  font-size: 1.35rem;
  font-weight: 950;
}

@media (max-width: 920px) {
  .whv-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .whv-detail-meta,
  .whv-result-emphasis {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .whv-mode-addons {
    display: grid;
    grid-template-columns: 1fr;
  }

  .whv-mode-addons .subtle-button {
    width: 100%;
  }

  .whv-record-review-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .whv-record-review-wrap::before {
    display: none;
  }

  .whv-summary-table,
  .whv-summary-table thead,
  .whv-summary-table tbody,
  .whv-summary-table tr,
  .whv-summary-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .whv-summary-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 10px;
  }

  .whv-summary-table thead {
    display: none;
  }

  .whv-record-summary {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px 14px 0 0;
    background: #fff;
  }

  .whv-record-summary td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    max-width: none;
    padding: 6px 0;
    border: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .whv-record-summary td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 900;
  }

  .whv-summary-table .whv-file-name {
    max-width: 100%;
    white-space: normal;
  }

  .whv-record-detail {
    margin-top: -10px;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 14px 14px;
    background: #fff;
  }

  .whv-record-detail > td {
    padding: 0 0 12px;
    border: 0;
  }

  .whv-detail-accordion {
    border: 0;
    border-radius: 0 0 14px 14px;
  }

  .whv-detail-grid,
  .whv-detail-meta {
    grid-template-columns: 1fr;
  }

  .whv-result-card-primary {
    padding: 14px;
  }
}

/* WHV v3: isolated input panels, clearer review table, card-based result summary */
.whv-mode-panel[hidden],
.whv-close-mode[hidden],
.whv-extra-button-row .subtle-button[hidden] {
  display: none !important;
}

.whv-panel-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.whv-panel-title-row h3 {
  margin: 0;
}

.whv-panel-title-row .whv-close-mode {
  width: auto;
  min-height: 32px;
  padding: 6px 10px;
  font-size: 0.8rem;
  white-space: nowrap;
}

.whv-upload-hint {
  display: inline-flex;
  margin-top: 6px;
  padding: 6px 9px;
  color: var(--green-dark);
  background: rgba(31, 122, 101, 0.08);
  border: 1px solid rgba(31, 122, 101, 0.16);
  border-radius: 999px;
  font-weight: 900;
}

.whv-summary-table {
  min-width: 1120px;
  table-layout: auto;
}

.whv-summary-table th,
.whv-summary-table td {
  vertical-align: middle;
}

.whv-summary-table td {
  padding: 10px 11px;
  white-space: nowrap;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
}

.whv-summary-table .whv-wrap-cell,
.whv-summary-table td:nth-child(3),
.whv-summary-table td:nth-child(7) {
  min-width: 150px;
  max-width: 230px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.whv-period-cell {
  min-width: 206px;
  white-space: nowrap !important;
  font-variant-numeric: tabular-nums;
}

.whv-cell-center {
  text-align: center;
}

.whv-days-value {
  display: block;
  color: var(--green-dark);
  font-size: 1rem;
  line-height: 1.1;
}

.whv-include-cell label:has(input[type="checkbox"]),
.whv-summary-table label:has(input[type="checkbox"]) {
  justify-content: center;
  min-width: 0;
  gap: 6px;
}

.whv-postcode-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 170px;
  min-height: 30px;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1.25;
  white-space: normal;
  text-align: center;
}

.whv-postcode-chip.likelyEligible {
  color: var(--green-dark);
  background: var(--green-soft);
  border-color: rgba(31, 122, 101, 0.22);
}

.whv-postcode-chip.notMatched {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: rgba(196, 126, 24, 0.25);
}

.whv-postcode-chip.needsOfficialCheck,
.whv-postcode-chip.unknown {
  color: var(--muted);
  background: #fff;
}

.whv-action-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 188px;
}

.whv-action-cell .subtle-button,
.whv-row-status .subtle-button {
  width: auto;
  min-height: 30px;
  padding: 5px 8px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.subtle-button.danger-light {
  color: #9a3412;
  border-color: rgba(154, 52, 18, 0.22);
  background: #fff7ed;
}

.whv-detail-accordion summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.whv-detail-grid {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 9px;
}

.whv-detail-grid .field label,
.whv-detail-grid label.field {
  line-height: 1.25;
}

.whv-detail-meta {
  grid-template-columns: minmax(260px, 1fr) minmax(240px, 0.75fr);
}

.whv-result-dashboard-v2 {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(390px, 1.22fr);
  gap: 16px;
  padding: 18px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.whv-result-hero-card,
.whv-result-highlight-card,
.whv-result-mini-card {
  box-shadow: 0 10px 24px rgba(24, 39, 75, 0.04);
}

.whv-result-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.whv-result-mini-card {
  display: grid;
  gap: 5px;
  min-height: 82px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.whv-result-mini-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.whv-result-mini-card strong {
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 950;
  line-height: 1.15;
}

.whv-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.whv-guide-grid .info-block {
  margin: 0;
  background: #fff;
}

@media (max-width: 1020px) {
  .whv-result-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .whv-result-dashboard-v2,
  .whv-guide-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .whv-summary-table {
    min-width: 0;
  }

  .whv-record-summary td {
    align-items: center;
  }

  .whv-period-cell {
    min-width: 0;
    white-space: normal !important;
  }

  .whv-action-cell {
    min-width: 0;
  }

  .whv-action-cell .decision-badge {
    flex: 1 0 100%;
    width: max-content;
    max-width: 100%;
  }

  .whv-postcode-chip {
    max-width: 100%;
    justify-content: flex-start;
    text-align: left;
  }

  .whv-detail-grid,
  .whv-detail-meta,
  .whv-result-card-grid {
    grid-template-columns: 1fr;
  }

  .whv-panel-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .whv-panel-title-row .whv-close-mode {
    width: 100%;
  }
}

/* WHV v4: final compact review table and overflow fixes */
#whv-subclass {
  min-width: 220px;
  padding-right: 42px;
}

.whv-mode-card-wrap .whv-step-actions {
  justify-content: center;
}

.whv-mode-card-wrap .whv-step-actions .primary-button {
  display: flex;
  width: 100%;
  max-width: 520px;
  justify-content: center;
  margin-inline: auto;
}

.whv-mini-notice,
.whv-small-official-note,
.notice-box.notice-compact,
.postcode-result,
.whv-result-official-note {
  border-radius: 12px;
}

.whv-upload-hint {
  border-radius: 10px;
  padding: 7px 10px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.whv-record-review-wrap {
  overflow-x: visible !important;
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.whv-record-review-wrap::before {
  content: none !important;
  display: none !important;
}

.whv-summary-table {
  width: 100%;
  min-width: 0 !important;
  table-layout: auto;
  border-collapse: collapse;
}

.whv-summary-table th,
.whv-summary-table td {
  vertical-align: middle;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.whv-summary-table th {
  padding: 9px 8px;
  font-size: 0.75rem;
}

.whv-summary-table td {
  padding: 9px 8px;
  max-width: none;
  overflow-wrap: anywhere;
}

.whv-summary-table th:nth-child(1),
.whv-summary-table td:nth-child(1) {
  width: 64px;
  text-align: center;
}

.whv-summary-table th:nth-child(2),
.whv-summary-table td:nth-child(2) {
  width: 18%;
  min-width: 118px;
}

.whv-summary-table th:nth-child(4),
.whv-summary-table td:nth-child(4) {
  width: 172px;
  min-width: 162px;
}

.whv-summary-table th:nth-child(5),
.whv-summary-table td:nth-child(5),
.whv-summary-table th:nth-child(6),
.whv-summary-table td:nth-child(6) {
  width: 74px;
  text-align: center;
}

.whv-period-cell {
  min-width: 162px;
  white-space: nowrap !important;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.whv-summary-table .whv-file-name {
  display: block;
  max-width: none !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.25;
}

.whv-wrap-cell {
  min-width: 0;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.whv-days-value {
  display: inline-block;
  color: var(--green-dark);
  font-size: 1rem;
  line-height: 1.1;
  white-space: nowrap;
}

.whv-row-muted:empty {
  display: none;
}

.whv-action-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 250px;
}

.whv-action-cell .subtle-button,
.whv-action-cell .decision-badge,
.whv-action-cell .whv-postcode-chip {
  flex: 0 0 auto;
}

.whv-detail-button,
.whv-delete-button,
.whv-action-cell .subtle-button {
  display: inline-flex;
  width: auto !important;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 8px;
  font-size: 0.76rem;
  white-space: nowrap;
}

.whv-postcode-chip {
  max-width: 100%;
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 10px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: keep-all;
  text-align: left;
}

.whv-detail-accordion summary {
  width: fit-content;
  padding: 9px 12px;
  white-space: nowrap;
}

.whv-detail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.whv-detail-grid .field,
.whv-detail-meta,
.postcode-result,
.postcode-result p,
.postcode-result span {
  min-width: 0;
}

.postcode-result {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.postcode-result p,
.postcode-result span,
.postcode-result strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: keep-all;
  line-height: 1.45;
}

@media (max-width: 900px) {
  #whv-subclass {
    width: 100%;
    min-width: 0;
  }

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

@media (max-width: 720px) {
  .whv-record-review-wrap {
    border: 0;
    background: transparent;
  }

  .whv-record-summary td {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .whv-period-cell {
    min-width: 0;
    white-space: normal !important;
  }

  .whv-action-cell {
    max-width: none;
  }

  .whv-postcode-chip {
    max-width: 100%;
  }

  .whv-detail-grid,
  .whv-detail-meta {
    grid-template-columns: 1fr;
  }

  .whv-mode-card-wrap .whv-step-actions .primary-button {
    max-width: none;
  }
}

@media (max-width: 1020px) {
  .whv-record-review-wrap {
    border: 0;
    background: transparent;
  }

  .whv-summary-table,
  .whv-summary-table thead,
  .whv-summary-table tbody,
  .whv-summary-table tr,
  .whv-summary-table td {
    display: block;
    width: 100%;
    min-width: 0 !important;
  }

  .whv-summary-table {
    border-collapse: separate;
    border-spacing: 0 10px;
  }

  .whv-summary-table thead {
    display: none;
  }

  .whv-record-summary {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px 14px 0 0;
    background: #fff;
  }

  .whv-record-summary td {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    max-width: none;
    padding: 6px 0;
    border: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .whv-record-summary td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 900;
  }

  .whv-record-detail {
    margin-top: -10px;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 14px 14px;
    background: #fff;
  }

  .whv-record-detail > td {
    padding: 0 0 12px;
    border: 0;
  }

  .whv-detail-accordion {
    border: 0;
    border-radius: 0 0 14px 14px;
  }
}

/* WHV v4 notice shapes */
.whv-mini-notice {
  display: block;
  width: fit-content;
  max-width: 760px;
  padding: 10px 13px;
  border-radius: 12px !important;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.whv-result-highlight-card.emphasize,
.notice-box,
.whv-upload-hint,
.postcode-result.notMatched,
.postcode-result.needsOfficialCheck,
.postcode-result.unknown {
  border-radius: 12px !important;
}

/* WHV v5: final select, detail action bar, and result guide button polish */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.whv-goal-card .field-row.whv-compact-fields {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 10px;
}

.whv-goal-card select,
#whv-target-visa,
#whv-subclass {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 42px 9px 11px;
  border-radius: 8px;
  font-size: 0.92rem;
  line-height: 1.25;
}

#whv-subclass {
  min-width: 0;
  padding-right: 44px;
}

.whv-mode-card-wrap .whv-step-actions .primary-button,
.whv-primary-button,
.whv-go-input-button,
#whv-go-input {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  line-height: 1.2;
  text-align: center;
}

.whv-summary-table th:last-child,
.whv-summary-table td:last-child {
  width: 26%;
  min-width: 250px;
}

.whv-detail-bar {
  display: grid;
  grid-template-columns: minmax(104px, 0.85fr) minmax(92px, 0.75fr) minmax(190px, 2fr);
  gap: 7px;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.whv-detail-bar .subtle-button,
.whv-detail-bar .whv-detail-button,
.whv-detail-bar .whv-delete-button {
  display: inline-flex;
  width: auto !important;
  min-width: 0;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 8px;
  font-size: 0.76rem;
  line-height: 1.15;
  white-space: nowrap;
}

.whv-detail-bar .whv-postcode-chip {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  justify-content: center;
  border-radius: 10px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: keep-all;
  text-align: center;
}

.whv-action-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 7px;
}

.whv-action-cell {
  display: block;
  max-width: none;
  min-width: 0;
}

.whv-record-detail[hidden] {
  display: none !important;
}

.whv-detail-accordion:not([open]) {
  display: none;
}

.whv-detail-accordion summary.visually-hidden {
  list-style: none;
}

.whv-latest-guide-btn {
  display: inline-flex;
  width: fit-content;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 9px 14px;
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  line-height: 1.2;
  text-decoration: none;
}

.whv-latest-guide-btn:hover {
  background: var(--green-dark);
  color: #fff;
}

#official-guides {
  scroll-margin-top: 86px;
}

@media (max-width: 1020px) {
  .whv-record-summary td[data-label="관리"] {
    display: block;
  }

  .whv-record-summary td[data-label="관리"]::before {
    display: block;
    margin-bottom: 6px;
  }

  .whv-detail-bar {
    grid-template-columns: minmax(104px, 0.85fr) minmax(92px, 0.75fr) minmax(180px, 2fr);
  }
}

@media (max-width: 720px) {
  .whv-goal-card .field-row.whv-compact-fields {
    grid-template-columns: 1fr;
  }

  .whv-goal-card select,
  #whv-target-visa,
  #whv-subclass {
    font-size: 0.9rem;
  }

  .whv-detail-bar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .whv-detail-bar .whv-postcode-chip {
    grid-column: 1 / -1;
  }
}


/* WHV v6: final spacing, unit alignment, link visibility and table polish */
.whv-goal-card .field-row.whv-compact-fields {
  grid-template-columns: minmax(150px, 1fr) minmax(196px, 1.28fr);
  gap: 10px;
}

.whv-goal-card select,
#whv-target-visa,
#whv-subclass {
  min-height: 42px;
  padding: 8px 44px 8px 10px;
  font-size: 0.88rem;
  line-height: 1.25;
  text-overflow: clip;
}

#whv-target-visa {
  min-width: 150px;
}

#whv-subclass {
  min-width: 196px;
}

.input-with-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(52px, auto);
  align-items: stretch;
  min-height: 42px;
}

.input-with-unit input {
  width: 100%;
  min-width: 0;
  height: 100%;
  line-height: 1.2;
}

.input-with-unit .unit {
  min-width: 52px;
  padding: 0 12px;
  white-space: nowrap;
  word-break: keep-all;
  line-height: 1;
}

.whv-hours-cell {
  min-width: 82px;
  white-space: nowrap !important;
  text-align: center;
  word-break: keep-all;
  overflow-wrap: normal;
}

.whv-summary-table th:nth-child(6),
.whv-summary-table td:nth-child(6) {
  width: 88px;
  min-width: 82px;
  white-space: nowrap !important;
  text-align: center;
}

.whv-action-status-row:empty {
  display: none;
}

.whv-detail-bar {
  grid-template-columns: minmax(104px, 0.9fr) minmax(92px, 0.78fr) minmax(210px, 2.35fr);
}

.whv-summary-table td[data-label="관리"] .decision-badge.good {
  display: none;
}

#whv-add-manual-record {
  margin-top: 14px;
}

#official-guides .plain-list a {
  color: var(--blue);
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 1100px) and (min-width: 921px) {
  .whv-goal-card .field-row.whv-compact-fields {
    grid-template-columns: 1fr;
  }

  #whv-target-visa,
  #whv-subclass {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .whv-goal-card .field-row.whv-compact-fields {
    grid-template-columns: 1fr;
  }

  .whv-goal-card select,
  #whv-target-visa,
  #whv-subclass {
    width: 100%;
    min-width: 0;
    font-size: 0.88rem;
  }

  .input-with-unit {
    grid-template-columns: minmax(0, 1fr) minmax(52px, auto);
  }

  .whv-hours-cell {
    min-width: 0;
    white-space: nowrap !important;
  }
}


/* WHV small display fixes */
.whv-goal-card .field-row.whv-compact-fields {
  grid-template-columns: minmax(168px, 1.06fr) minmax(196px, 1.22fr);
}

.whv-goal-card select,
#whv-target-visa,
#whv-subclass {
  padding-right: 30px;
  background-position: right 9px center;
  text-overflow: clip;
}

#whv-target-visa {
  min-width: 168px;
}

.whv-row-status > span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  line-height: 1.35;
}


/* Exchange rate calculator */
.exchange-rate-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.exchange-form-grid {
  display: grid;
  grid-template-columns: minmax(130px, 0.85fr) minmax(160px, 1fr) 52px minmax(160px, 1fr);
  gap: 12px;
  align-items: end;
}

.exchange-rate-panel .field label,
.exchange-rate-panel legend {
  display: block;
  margin-bottom: 7px;
  font-weight: 850;
}

.exchange-rate-panel input,
.exchange-rate-panel select {
  width: 100%;
}

.currency-swap-button {
  display: inline-flex;
  width: 52px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
}

.quick-pair-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.quick-pair-row button,
.rate-mode-card label {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-weight: 800;
}

.rate-mode-card {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.rate-mode-card legend {
  padding: 0 4px;
}

.manual-rate-panel,
.exchange-fee-options {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.exchange-fee-options summary {
  min-height: 36px;
  font-weight: 850;
  cursor: pointer;
}

.checkbox-line {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 12px;
  font-weight: 750;
}

.exchange-result-card > strong {
  display: block;
  margin: 6px 0 8px;
  color: var(--green);
  font-size: clamp(1.65rem, 4vw, 2.45rem);
  line-height: 1.15;
  word-break: keep-all;
}

.exchange-rate-metrics em {
  font-size: 0.96rem;
  word-break: break-word;
}

#exchange-status[data-tone="good"] {
  color: var(--green);
}

#exchange-status[data-tone="warn"] {
  color: var(--danger);
}

.exchange-related-link {
  margin-top: 16px;
}

.exchange-related-link a,
.exchange-result-card a {
  color: var(--blue);
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 900px) {
  .exchange-rate-panel,
  .exchange-form-grid {
    grid-template-columns: 1fr;
  }

  .currency-swap-button {
    justify-self: center;
    transform: rotate(90deg);
  }

  .rate-mode-card {
    flex-direction: column;
    align-items: stretch;
  }

  .rate-mode-card label {
    justify-content: flex-start;
    border-radius: var(--radius);
  }
}

/* Mobile UI final responsive pass: WHV, Australia Pay, Exchange Rate */
.calculator-card,
.tool-panel,
.input-panel,
.result-panel,
.notice-box,
.field,
.field-row,
.input-suffix,
.input-with-unit,
.metric-grid,
.exchange-form-grid,
.whv-top-grid,
.whv-mode-panel,
.whv-record-review-wrap,
.whv-summary-table,
.whv-result-dashboard {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.input-panel input,
.input-panel select,
.input-panel textarea,
.input-panel button,
.result-panel input,
.result-panel select,
.result-panel textarea,
.result-panel button {
  max-width: 100%;
  box-sizing: border-box;
}

.input-suffix,
.input-with-unit {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.input-suffix input,
.input-with-unit input {
  min-width: 0;
}

.input-suffix span,
.input-with-unit .unit {
  flex: 0 0 auto;
  white-space: nowrap;
  word-break: keep-all;
}

/* Australia Pay: core fields first, optional fields collapsible on mobile */
.au-optional-fields {
  margin: 10px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.au-optional-fields summary {
  display: flex;
  min-height: 38px;
  align-items: center;
  color: var(--green);
  font-weight: 900;
  cursor: pointer;
}

.au-optional-fields .field-row:last-child .field {
  margin-bottom: 0;
}

/* Exchange rate: keep the result close to the basic conversion form */
.exchange-rate-panel .button-row .primary-button,
.exchange-rate-panel .button-row .subtle-button,
.australia-pay-panel .button-row .primary-button,
.australia-pay-panel .button-row .subtle-button {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  text-align: center;
}

@media (max-width: 640px) {
  main,
  .calculator-page {
    padding-bottom: calc(128px + env(safe-area-inset-bottom));
  }

  .container {
    width: min(100% - 20px, 1180px);
  }

  .hero-band {
    padding: 26px 0 30px;
  }

  .content-band,
  .content-band.compact {
    padding: 28px 0;
  }

  .tool-panel,
  .input-panel,
  .result-panel {
    padding: 13px;
    border-radius: 10px;
  }

  .field {
    gap: 5px;
    margin-bottom: 11px;
  }

  .field label,
  fieldset legend {
    font-size: 0.82rem;
    line-height: 1.25;
  }

  select,
  input[type="number"],
  input[type="text"],
  input[type="date"],
  input[type="time"],
  input[type="search"],
  input[type="file"] {
    min-height: 42px;
    padding: 8px 10px;
    font-size: 16px;
    line-height: 1.25;
  }

  select {
    padding-right: 40px;
    background-position: right 11px center;
  }

  .field-row,
  .australia-pay-panel .field-row,
  .exchange-rate-panel .field-row,
  .whv-compact-fields,
  .whv-mode-panel,
  .tool-panel,
  .metric-grid {
    grid-template-columns: 1fr !important;
  }

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

  .primary-button,
  .subtle-button {
    min-height: 42px;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
  }

  .input-suffix,
  .input-with-unit {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(50px, auto);
    align-items: stretch;
    overflow: hidden;
  }

  .input-suffix input,
  .input-with-unit input {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }

  .input-suffix span,
  .input-with-unit .unit {
    min-width: 50px;
    padding: 0 10px;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    word-break: keep-all;
    line-height: 1;
  }

  /* WHV 88-day mobile */
  .whv-hero-compact .lead,
  .whv-mini-notice,
  .whv-legal-note {
    max-width: 100%;
  }

  .whv-top-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .whv-top-grid .input-panel {
    padding: 13px;
  }

  .whv-step-panel h2,
  .whv-mode-panel h3 {
    margin-bottom: 8px;
    font-size: 1.18rem;
  }

  .whv-goal-card .field-row.whv-compact-fields {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }

  .whv-goal-card select,
  #whv-target-visa,
  #whv-subclass {
    width: 100%;
    min-width: 0 !important;
    min-height: 42px;
    padding: 8px 42px 8px 10px;
    font-size: 16px;
    line-height: 1.25;
    text-overflow: clip;
  }

  .whv-uk-compact {
    margin-top: 6px;
  }

  .whv-mode-card-wrap .whv-mode-grid,
  .whv-mode-grid {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }

  .whv-mode-card {
    min-height: 0;
    gap: 4px;
    padding: 10px 12px;
  }

  .whv-mode-card strong {
    padding-right: 28px;
    font-size: 0.95rem;
    line-height: 1.25;
  }

  .whv-mode-card span {
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .whv-mode-card input {
    width: 16px;
    height: 16px;
  }

  .whv-step-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 10px;
  }

  .whv-step-actions .primary-button,
  #whv-go-input {
    width: 100%;
    max-width: none;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #whv-input-step .section-intro p,
  .compact-intro p {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .whv-mode-panel {
    gap: 12px;
    margin-top: 12px;
    padding: 12px;
  }

  .whv-panel-title-row {
    gap: 8px;
    align-items: center;
  }

  .whv-extra-mode-actions,
  .whv-side-note,
  .whv-callout-mini,
  .ocr-status-box {
    padding: 10px;
    font-size: 0.84rem;
  }

  .whv-extra-button-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .whv-record-review-wrap {
    overflow: visible;
  }

  .whv-summary-table,
  .whv-summary-table tbody,
  .whv-summary-table tr,
  .whv-summary-table td {
    display: block;
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
  }

  .whv-summary-table {
    border-spacing: 0 10px;
    table-layout: auto;
  }

  .whv-record-summary {
    padding: 11px 12px;
    border-radius: 14px 14px 0 0;
  }

  .whv-record-summary td {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 7px;
    align-items: start;
    padding: 5px 0;
    border: 0;
    white-space: normal !important;
  }

  .whv-record-summary td::before {
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.35;
    font-weight: 900;
  }

  .whv-record-summary td[data-label="파일명"] {
    display: block;
  }

  .whv-record-summary td[data-label="파일명"]::before {
    display: block;
    margin-bottom: 4px;
  }

  .whv-summary-table .whv-file-name,
  .whv-wrap-cell,
  .whv-period-cell {
    white-space: normal !important;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    word-break: keep-all;
  }

  .whv-period-cell {
    font-size: 0.9rem;
  }

  .whv-hours-cell,
  .whv-summary-table td:nth-child(6) {
    min-width: 0 !important;
    text-align: left;
    white-space: nowrap !important;
    word-break: keep-all;
  }

  .whv-days-value {
    font-size: 1.05rem;
  }

  .whv-detail-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 7px;
    width: 100%;
  }

  .whv-detail-bar .whv-postcode-chip {
    grid-column: 1 / -1;
    justify-content: center;
    text-align: center;
    overflow-wrap: anywhere;
    word-break: keep-all;
  }

  .whv-detail-bar .subtle-button,
  .whv-detail-bar .whv-detail-button,
  .whv-detail-bar .whv-delete-button {
    min-height: 34px;
    font-size: 0.78rem;
  }

  .whv-action-status-row {
    margin-top: 6px;
  }

  .whv-detail-grid,
  .whv-detail-meta {
    grid-template-columns: 1fr !important;
  }

  .whv-record-detail > td {
    padding: 0 10px 12px;
  }

  .postcode-result,
  .postcode-result p,
  .postcode-result span,
  .postcode-result strong {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: keep-all;
  }

  .whv-result-dashboard,
  .whv-result-card-grid,
  .whv-result-highlight-grid,
  .whv-result-metric-grid {
    grid-template-columns: 1fr !important;
  }

  .whv-bottom-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  /* Australia pay mobile */
  .australia-pay-panel {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
  }

  .australia-pay-panel .notice-compact {
    padding: 10px 11px;
    font-size: 0.82rem;
  }

  .australia-pay-panel .field-row {
    grid-template-columns: 1fr !important;
    gap: 9px;
  }

  .australia-pay-panel .field > label {
    min-height: auto;
    align-items: flex-start;
  }

  .australia-pay-panel input[type="date"],
  .australia-pay-panel input[type="number"],
  .australia-pay-panel input[type="text"],
  .australia-pay-panel select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    font-size: 16px;
  }

  .australia-pay-panel .input-suffix span {
    min-width: 50px;
    white-space: nowrap;
  }

  .australia-pay-panel .exchange-rate-control {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .australia-pay-panel .exchange-rate-control .subtle-button {
    width: 100%;
    min-height: 42px;
  }

  .au-optional-fields {
    margin-top: 8px;
    padding: 10px;
  }

  .au-optional-fields summary {
    min-height: 36px;
    font-size: 0.88rem;
  }

  .australia-pay-metrics {
    grid-template-columns: 1fr !important;
  }

  /* Exchange rate mobile */
  .exchange-rate-panel {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
  }

  .exchange-form-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .currency-swap-button {
    width: 46px;
    height: 38px;
    justify-self: center;
    transform: rotate(90deg);
  }

  .quick-pair-row {
    gap: 7px;
    margin: 10px 0;
  }

  .quick-pair-row button {
    flex: 1 1 calc(50% - 7px);
    min-height: 34px;
    padding: 6px 8px;
    border-radius: 10px;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .rate-mode-card {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 9px;
    margin-bottom: 10px;
  }

  .rate-mode-card legend {
    grid-column: 1 / -1;
    margin-bottom: 2px;
    font-size: 0.82rem;
  }

  .rate-mode-card label {
    min-height: 38px;
    justify-content: center;
    padding: 6px;
    border-radius: 10px;
    font-size: 0.76rem;
    line-height: 1.25;
    text-align: center;
  }

  .manual-rate-panel,
  .exchange-fee-options {
    margin: 10px 0;
    padding: 11px;
  }

  .exchange-fee-options summary {
    min-height: 34px;
  }

  .exchange-result-card {
    order: 2;
  }

  .exchange-result-card > strong {
    font-size: clamp(1.55rem, 9vw, 2.05rem);
    overflow-wrap: anywhere;
  }

  .exchange-rate-metrics {
    grid-template-columns: 1fr !important;
  }

  #exchange-refresh-rate {
    min-height: 40px;
  }
}

@media (max-width: 390px) {
  .container {
    width: min(100% - 16px, 1180px);
  }

  .tool-panel,
  .input-panel,
  .result-panel {
    padding: 11px;
  }

  .whv-record-summary td {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .quick-pair-row button {
    flex-basis: 100%;
  }

  .rate-mode-card {
    grid-template-columns: 1fr;
  }

  .rate-mode-card label {
    justify-content: flex-start;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .site-header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px 10px;
  }

  .brand {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  .site-nav {
    width: 100%;
    justify-content: center;
    gap: 6px;
  }

  .site-nav a,
  .site-nav button {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    max-width: 100%;
    min-height: 34px;
    padding: 6px 8px;
    border-radius: 10px;
    font-size: 0.84rem;
    line-height: 1.2;
    white-space: normal;
    text-align: center;
  }
}

/* 2026-06-16 mobile exchange + WHV final polish */
html,
body {
  max-width: 100%;
}

.container,
.hero-band,
.content-band,
.tool-panel,
.input-panel,
.result-panel,
.calculator-card,
.whv-top-grid,
.whv-step-panel,
.whv-goal-card,
.whv-mode-card-wrap,
.whv-mode-card,
.whv-mode-panel,
.whv-record-review-wrap,
.whv-summary-table,
.exchange-rate-panel,
.exchange-form-grid,
.exchange-fee-options,
.manual-rate-panel {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.whv-legal-note {
  margin-top: 0;
}

.whv-guide-caution {
  border-color: rgba(178, 106, 0, 0.2);
  background: var(--amber-soft) !important;
}

.calculator-card .tool-badge,
.calculator-card .badge {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 9px;
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid #c6e7dc;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.exchange-rate-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}

.exchange-rate-mode-grid legend {
  grid-column: 1 / -1;
  padding: 0 4px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 950;
}

.exchange-rate-mode-card {
  position: relative;
  display: grid !important;
  min-height: 94px;
  align-content: start;
  justify-content: stretch !important;
  gap: 5px !important;
  padding: 12px 34px 12px 12px !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  background: #fff !important;
  color: var(--ink) !important;
  text-align: left !important;
  box-shadow: 0 8px 18px rgba(24, 39, 75, 0.035);
  cursor: pointer;
}

.exchange-rate-mode-card input[type="radio"] {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  opacity: 0;
  pointer-events: none;
}

.exchange-rate-mode-card strong {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 950;
  line-height: 1.25;
}

.exchange-rate-mode-card > span:not(.mode-check) {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.35;
}

.exchange-rate-mode-card .mode-check {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 950;
}

.exchange-rate-mode-card.active,
.exchange-rate-mode-card:has(input[type="radio"]:checked) {
  border-color: rgba(31, 122, 101, 0.45) !important;
  background: linear-gradient(180deg, #fff, var(--green-soft)) !important;
}

.exchange-rate-mode-card.active .mode-check,
.exchange-rate-mode-card:has(input[type="radio"]:checked) .mode-check {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.exchange-result-card > strong,
#exchange-result {
  color: var(--ink) !important;
  font-weight: 850 !important;
  letter-spacing: -0.02em;
}

.exchange-rate-metrics div {
  min-width: 0;
}

.exchange-rate-metrics em {
  color: var(--ink);
  font-weight: 850;
  overflow-wrap: anywhere;
}

#exchange-result-detail,
#exchange-fee-summary,
#exchange-rate-attribution {
  color: var(--muted);
  font-size: 0.86rem;
}

.fee-checkbox-label,
.checkbox-line.fee-checkbox-label {
  display: inline-flex;
  width: auto;
  max-width: 100%;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  line-height: 1.45;
}

.fee-checkbox-label input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px !important;
  height: 18px;
  margin: 0.18em 0 0;
}

.fee-checkbox-label span {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

@media (max-width: 640px) {
  body {
    overflow-x: clip;
  }

  main,
  .calculator-page {
    padding-bottom: calc(140px + env(safe-area-inset-bottom));
  }

  .site-header {
    overflow-x: visible;
  }

  .container {
    width: 100%;
    max-width: 100%;
    padding-inline: 12px;
    margin-inline: auto;
  }

  .hero-band,
  .content-band,
  .content-band.compact {
    overflow: clip;
  }

  .hero-band .container,
  .content-band .container {
    min-width: 0;
  }

  .whv-top-grid,
  .whv-mode-grid,
  .whv-goal-card .field-row.whv-compact-fields,
  .whv-mode-card-wrap .whv-mode-grid,
  .whv-guide-grid,
  .exchange-rate-panel,
  .exchange-form-grid,
  .australia-pay-panel,
  .field-row {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
    max-width: 100%;
  }

  .whv-top-grid {
    gap: 10px;
  }

  .whv-step-panel,
  .whv-goal-card,
  .whv-mode-card-wrap,
  .whv-mode-card,
  .whv-mode-panel,
  .tool-panel,
  .input-panel,
  .result-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .whv-step-panel,
  .whv-mode-panel,
  .tool-panel,
  .input-panel,
  .result-panel {
    padding: 12px;
  }

  .whv-goal-card select,
  #whv-target-visa,
  #whv-subclass,
  .whv-step-card select,
  .whv-step-card input,
  .whv-step-card button,
  .whv-mode-panel input,
  .whv-mode-panel select,
  .whv-mode-panel button {
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
    font-size: 16px;
    padding-right: 42px;
  }

  .whv-mode-card {
    min-height: 0;
    padding: 9px 11px;
    gap: 3px;
  }

  .whv-mode-card strong {
    font-size: 0.94rem;
    line-height: 1.23;
  }

  .whv-mode-card span {
    font-size: 0.79rem;
  }

  .whv-step-actions,
  .whv-step-actions .primary-button,
  #whv-go-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .whv-mini-notice {
    width: 100%;
    max-width: 100%;
    margin-top: 8px;
    font-size: 0.82rem;
  }

  .whv-record-review-wrap {
    overflow: visible !important;
    border: 0;
    background: transparent;
  }

  .whv-summary-table,
  .whv-summary-table tbody,
  .whv-summary-table tr,
  .whv-summary-table td {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }

  .whv-summary-table thead {
    display: none !important;
  }

  .whv-summary-table {
    border-collapse: separate;
    border-spacing: 0 10px;
  }

  .whv-record-summary {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px 14px 0 0;
    background: #fff;
  }

  .whv-record-summary td {
    display: grid !important;
    grid-template-columns: 80px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    padding: 4px 0 !important;
    border: 0 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  .whv-record-summary td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.35;
  }

  .whv-record-summary td[data-label="파일명"] {
    display: block !important;
  }

  .whv-record-summary td[data-label="파일명"]::before {
    display: block;
    margin-bottom: 4px;
  }

  .whv-record-summary td[data-label="관리"] {
    display: block !important;
  }

  .whv-record-summary td[data-label="관리"]::before {
    display: none !important;
  }

  .whv-summary-table .whv-file-name,
  .whv-wrap-cell,
  .whv-period-cell,
  .whv-row-muted {
    max-width: 100% !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere;
    word-break: keep-all;
  }

  .whv-summary-table .whv-file-name {
    line-height: 1.28;
  }

  .whv-period-cell {
    font-variant-numeric: tabular-nums;
  }

  .whv-hours-cell,
  .whv-summary-table td[data-label="시간"] {
    white-space: nowrap !important;
    word-break: keep-all;
    overflow-wrap: normal;
  }

  .whv-days-value,
  .whv-hours-cell {
    display: inline-block;
  }

  .whv-detail-bar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 7px;
  }

  .whv-detail-bar .whv-postcode-chip {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    justify-content: center;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: keep-all;
  }

  .whv-detail-bar .subtle-button,
  .whv-detail-bar .whv-detail-button,
  .whv-detail-bar .whv-delete-button {
    width: 100% !important;
    min-width: 0;
  }

  .whv-record-detail {
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 14px 14px;
    background: #fff;
  }

  .whv-record-detail > td {
    padding: 0 10px 12px !important;
  }

  .whv-detail-grid,
  .whv-detail-meta {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
  }

  .whv-detail-grid input,
  .whv-detail-grid select,
  .whv-detail-grid textarea,
  .whv-detail-grid .field {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .exchange-rate-mode-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
  }

  .exchange-rate-mode-card {
    min-height: 0;
    padding: 10px 34px 10px 11px !important;
  }

  .exchange-rate-mode-card strong {
    font-size: 0.93rem;
  }

  .exchange-rate-mode-card > span:not(.mode-check) {
    font-size: 0.78rem;
  }

  .quick-pair-row button {
    min-width: 0;
    white-space: normal;
  }

  .fee-checkbox-label,
  .checkbox-line.fee-checkbox-label {
    display: flex;
    width: 100%;
  }

  .exchange-result-card > strong,
  #exchange-result {
    font-size: clamp(1.65rem, 8vw, 2.15rem) !important;
    font-weight: 850 !important;
  }
}

@media (max-width: 390px) {
  .container {
    padding-inline: 10px;
  }

  .whv-record-summary td {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .whv-detail-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  .whv-detail-bar .whv-postcode-chip {
    grid-column: auto;
  }
}


/* WHV mobile review card cleanup 2026-06-17 */
@media (max-width: 640px) {
  .whv-record-review-wrap {
    width: 100%;
    max-width: 100%;
    overflow: visible !important;
  }

  .whv-summary-table,
  .whv-summary-table tbody,
  .whv-summary-table tr,
  .whv-summary-table td {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .whv-record-summary {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 16px !important;
    border: 1px solid var(--line) !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.055);
  }

  .whv-record-summary td {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  .whv-record-summary td::before {
    display: block !important;
    margin: 0 0 3px !important;
    color: var(--muted) !important;
    font-size: 0.78rem !important;
    font-weight: 900 !important;
    line-height: 1.25 !important;
  }

  .whv-record-summary td:nth-child(1) {
    order: 1;
    grid-column: 1 / -1;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
  }

  .whv-record-summary td:nth-child(1)::before,
  .whv-record-summary td:nth-child(2)::before,
  .whv-record-summary td:nth-child(8)::before {
    display: none !important;
  }

  .whv-record-summary td:nth-child(1) label {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    margin: 0;
    font-weight: 850;
  }

  .whv-record-summary td:nth-child(2) {
    order: 2;
    grid-column: 1 / -1;
    padding-bottom: 4px !important;
    border-bottom: 1px solid var(--line) !important;
  }

  .whv-summary-table .whv-file-name {
    display: block !important;
    max-width: 100% !important;
    color: var(--ink);
    font-size: 0.98rem;
    font-weight: 900;
    line-height: 1.32;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere;
    word-break: keep-all;
  }

  .whv-record-summary td:nth-child(2) .whv-row-muted {
    display: block !important;
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.35;
  }

  .whv-record-summary td:nth-child(3) {
    display: none !important;
  }

  .whv-record-summary td:nth-child(4) {
    order: 3;
    grid-column: 1 / -1;
  }

  .whv-record-summary td:nth-child(4)::before {
    content: "기간" !important;
  }

  .whv-record-summary td:nth-child(5) {
    order: 4;
  }

  .whv-record-summary td:nth-child(5)::before {
    content: "인정 일수" !important;
  }

  .whv-record-summary td:nth-child(6) {
    order: 5;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
  }

  .whv-record-summary td:nth-child(6)::before {
    content: "시간" !important;
  }

  .whv-record-summary td:nth-child(7) {
    order: 6;
    grid-column: 1 / -1;
    display: grid !important;
    grid-template-columns: minmax(0, 0.55fr) minmax(0, 1.45fr) !important;
    gap: 6px 10px;
    align-items: start;
  }

  .whv-record-summary td:nth-child(7)::before {
    content: "지역 / 업종" !important;
    grid-column: 1 / -1;
  }

  .whv-record-summary td:nth-child(7) strong {
    display: block;
    min-width: 0;
    font-weight: 900;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: keep-all;
  }

  .whv-record-summary td:nth-child(7) .whv-row-muted {
    display: block !important;
    min-width: 0;
    margin-top: 0;
    color: var(--ink);
    font-weight: 750;
    line-height: 1.35;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: keep-all;
  }

  .whv-record-summary td:nth-child(8) {
    order: 7;
    grid-column: 1 / -1;
    margin-top: 2px;
  }

  .whv-record-summary td:nth-child(4),
  .whv-record-summary td:nth-child(5),
  .whv-record-summary td:nth-child(6),
  .whv-record-summary td:nth-child(7) {
    padding: 10px !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px;
    background: var(--surface-soft) !important;
  }

  .whv-record-summary td:nth-child(4),
  .whv-period-cell {
    font-variant-numeric: tabular-nums;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
  }

  .whv-record-summary td:nth-child(4),
  .whv-record-summary td:nth-child(5),
  .whv-record-summary td:nth-child(6),
  .whv-record-summary td:nth-child(7) strong,
  .whv-days-value,
  .whv-hours-cell {
    color: var(--ink);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.32;
  }

  .whv-detail-bar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 9px !important;
    width: 100% !important;
  }

  .whv-detail-bar .subtle-button,
  .whv-detail-bar .whv-detail-button,
  .whv-detail-bar .whv-delete-button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 40px;
    padding: 8px 10px;
    white-space: nowrap;
  }

  .whv-detail-bar .whv-postcode-chip {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
    justify-content: center !important;
    margin-top: 2px;
    padding: 8px 10px;
    text-align: center;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: keep-all;
  }

  .whv-action-status-row {
    width: 100%;
    justify-content: center;
  }

  .whv-action-status-row .decision-badge {
    width: 100%;
    justify-content: center;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: keep-all;
  }
}

@media (max-width: 390px) {
  .whv-detail-bar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }

  .whv-record-summary td:nth-child(7) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}


/* WHV mobile review card grid width fix 2026-06-17 */
@media (max-width: 640px) {
  .whv-record-summary td:nth-child(5),
  .whv-record-summary td:nth-child(6) {
    width: auto !important;
    min-width: 0 !important;
  }

  .whv-record-summary td:nth-child(5) {
    grid-column: 1 / 2 !important;
  }

  .whv-record-summary td:nth-child(6) {
    grid-column: 2 / 3 !important;
  }
}

@media (max-width: 340px) {
  .whv-record-summary td:nth-child(5),
  .whv-record-summary td:nth-child(6) {
    grid-column: 1 / -1 !important;
  }
}


/* WHV desktop table overflow containment 2026-06-17 */
.whv-record-review-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
}

.whv-summary-table {
  width: 100%;
  max-width: 100%;
}

@media (min-width: 641px) {
  .whv-summary-table {
    table-layout: fixed;
  }

  .whv-summary-table th,
  .whv-summary-table td {
    min-width: 0 !important;
  }
}


/* WHV desktop action cell containment 2026-06-17 */
@media (min-width: 641px) {
  .whv-detail-bar {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 0.82fr) minmax(0, 1.8fr) !important;
    width: 100%;
    max-width: 100%;
  }

  .whv-detail-bar .subtle-button,
  .whv-detail-bar .whv-detail-button,
  .whv-detail-bar .whv-delete-button,
  .whv-detail-bar .whv-postcode-chip {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .whv-detail-bar .whv-postcode-chip {
    width: 100% !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: keep-all;
    text-align: center;
  }
}

/* Parking budget map */
.parking-hero .strong-note {
  display: inline-flex;
  margin-top: 0.5rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(20, 108, 95, 0.22);
  border-radius: 12px;
  background: rgba(20, 108, 95, 0.08);
  color: #0f594f;
  font-weight: 700;
}
.parking-app-shell {
  position: relative;
  margin-top: 1.5rem;
}
.parking-workspace {
  display: grid;
  grid-template-columns: minmax(340px, 0.85fr) minmax(420px, 1.15fr);
  gap: 1rem;
  align-items: start;
}
.parking-left-panel {
  display: grid;
  gap: 1rem;
  min-width: 0;
}
.parking-input-panel,
.parking-summary-panel,
.parking-map-card {
  min-width: 0;
}
.step-label {
  margin: 0.35rem 0 0.75rem;
  color: #146c5f;
  font-size: 0.9rem;
  font-weight: 800;
}
.parking-inline-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
}
.parking-date-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.quick-duration-row,
.parking-filter-row,
.parking-place-results {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
}
.quick-duration-row button,
.parking-filter-row label,
.parking-place-chip {
  min-height: 42px;
  border: 1px solid #c9d8e5;
  border-radius: 999px;
  background: #fff;
  color: #17324d;
  font-weight: 700;
}
.quick-duration-row button,
.parking-place-chip {
  padding: 0.55rem 0.8rem;
  cursor: pointer;
}
.quick-duration-row button.active,
.parking-place-chip.active {
  border-color: #146c5f;
  background: #e7f5f1;
  color: #0f594f;
}
.parking-filter-row label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
}
.parking-place-chip {
  display: grid;
  gap: 0.15rem;
  text-align: left;
  border-radius: 12px;
}
.parking-place-chip span {
  color: #607085;
  font-size: 0.82rem;
  font-weight: 500;
}
.parking-summary-bar {
  display: grid;
  gap: 0.25rem;
}
.parking-summary-bar strong {
  font-size: 1.05rem;
}
.parking-summary-bar span,
.parking-card-metrics,
.parking-card-detail,
.parking-map-fallback span {
  color: #5c6f82;
}
.parking-map-column {
  position: sticky;
  top: 1rem;
  min-width: 0;
}
.parking-map-card {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  border: 1px solid #d6e0ea;
  border-radius: 18px;
  background: #eef5f7;
}
.parking-map {
  position: absolute;
  inset: 0;
  min-height: 420px;
  background: linear-gradient(135deg, #e7f5f1 0%, #eef4ff 55%, #f7fafc 100%);
}
.parking-map::before,
.parking-map::after {
  content: "";
  position: absolute;
  inset: 18% -10%;
  border-top: 18px solid rgba(255,255,255,0.75);
  transform: rotate(-18deg);
}
.parking-map::after {
  inset: 50% -12%;
  border-top-width: 14px;
  transform: rotate(22deg);
}
.parking-map-fallback {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  display: grid;
  width: min(84%, 360px);
  gap: 0.35rem;
  padding: 1rem;
  border: 1px solid rgba(20, 108, 95, 0.2);
  border-radius: 14px;
  background: rgba(255,255,255,0.88);
  text-align: center;
  transform: translate(-50%, -50%);
}
.parking-map-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.parking-map-label,
.parking-destination-marker {
  position: absolute;
  z-index: 3;
  min-width: 64px;
  min-height: 34px;
  padding: 0.35rem 0.55rem;
  border: 1px solid #146c5f;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 35, 55, 0.18);
  color: #0f594f;
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  white-space: nowrap;
}
.parking-map-label.is-best {
  background: #146c5f;
  color: #fff;
}
.parking-destination-marker {
  border-color: #334155;
  background: #172033;
  color: #fff;
}
.parking-result-list,
.parking-mobile-results {
  display: grid;
  gap: 0.75rem;
}
.parking-result-card {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid #d6e0ea;
  border-radius: 16px;
  background: #fff;
}
.parking-result-head {
  display: grid;
  gap: 0.25rem;
}
.parking-result-head strong {
  color: #102033;
  font-size: 1.05rem;
}
.parking-result-head em {
  color: #607085;
  font-style: normal;
  font-size: 0.88rem;
}
.rank-badge {
  width: fit-content;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: #e7f5f1;
  color: #0f594f;
  font-size: 0.8rem;
  font-weight: 800;
}
.parking-price-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
}
.parking-price-row strong {
  color: #146c5f;
  font-size: 1.65rem;
  line-height: 1.1;
}
.parking-price-row span {
  color: #607085;
  font-size: 0.9rem;
}
.parking-card-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  font-size: 0.9rem;
}
.parking-card-metrics span {
  min-width: 0;
  padding: 0.5rem;
  border-radius: 10px;
  background: #f5f8fb;
  overflow-wrap: anywhere;
  word-break: keep-all;
}
.parking-card-actions {
  display: flex;
  justify-content: flex-end;
}
.parking-card-detail {
  display: none;
  gap: 0.45rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.92rem;
}
.parking-result-card.expanded .parking-card-detail {
  display: grid;
}
.parking-bottom-sheet {
  display: none;
}
.parking-guide .guide-grid article {
  min-width: 0;
}
.warning-card {
  border-left: 4px solid #146c5f;
}
@media (max-width: 860px) {
  .parking-workspace {
    grid-template-columns: 1fr;
  }
  .parking-map-column {
    position: relative;
    top: auto;
  }
  .parking-map-card {
    min-height: 420px;
  }
  .parking-result-list {
    display: none;
  }
  .parking-bottom-sheet {
    position: sticky;
    bottom: 0;
    z-index: 10;
    display: block;
    max-height: min(42vh, 360px);
    margin-top: -1rem;
    padding: 0.6rem 0.75rem 1rem;
    border: 1px solid #d6e0ea;
    border-radius: 18px 18px 0 0;
    background: rgba(255,255,255,0.97);
    box-shadow: 0 -12px 32px rgba(15, 35, 55, 0.16);
    overflow-y: auto;
  }
  .parking-sheet-handle {
    width: 42px;
    height: 4px;
    margin: 0 auto 0.75rem;
    border-radius: 999px;
    background: #c6d3df;
  }
}
@media (max-width: 640px) {
  .parking-app-shell,
  .parking-workspace,
  .parking-left-panel,
  .parking-map-column,
  .parking-input-panel,
  .parking-summary-panel,
  .parking-map-card,
  .parking-result-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .parking-inline-search,
  .parking-date-grid {
    grid-template-columns: 1fr;
  }
  .parking-inline-search .primary-button,
  .parking-inline-search .subtle-button,
  .wide-button {
    width: 100%;
  }
  .quick-duration-row,
  .parking-filter-row,
  .parking-place-results {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.15rem;
  }
  .quick-duration-row button,
  .parking-filter-row label,
  .parking-place-chip {
    flex: 0 0 auto;
  }
  .parking-map-card {
    min-height: 360px;
    border-radius: 14px;
  }
  .parking-card-metrics {
    grid-template-columns: 1fr;
  }
  .parking-price-row strong {
    font-size: 1.35rem;
  }
  .parking-bottom-sheet {
    max-height: min(40vh, 330px);
    margin-left: -0.25rem;
    margin-right: -0.25rem;
  }
  .parking-map-label,
  .parking-destination-marker {
    min-width: 54px;
    font-size: 0.74rem;
  }
}

/* Parking budget map MVP finishing pass 2026-06-17 */
.parking-app-shell,
.parking-app-shell * {
  box-sizing: border-box;
}

.parking-workspace {
  grid-template-columns: minmax(360px, 420px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.parking-left-panel,
.parking-map-column,
.parking-input-panel,
.parking-summary-panel,
.parking-map-card,
.parking-result-card,
.parking-bottom-sheet {
  min-width: 0;
  max-width: 100%;
}

.parking-input-panel input,
.parking-input-panel select,
.parking-input-panel button,
.parking-bottom-sheet button {
  max-width: 100%;
  min-width: 0;
}

.parking-inline-search > * {
  min-width: 0;
}

.parking-map-card {
  min-height: 640px;
  isolation: isolate;
}

.parking-map {
  overflow: hidden;
}

.parking-map.is-fallback {
  background:
    radial-gradient(circle at 18% 22%, rgba(20, 108, 95, 0.12), transparent 26%),
    radial-gradient(circle at 78% 70%, rgba(49, 130, 206, 0.12), transparent 28%),
    linear-gradient(135deg, #e8f5f0 0%, #eef4ff 48%, #f8fafc 100%);
}

.parking-map.is-fallback::before {
  border-top-color: rgba(255, 255, 255, 0.86);
  box-shadow: 0 62px 0 rgba(255, 255, 255, 0.64), 0 128px 0 rgba(255, 255, 255, 0.48);
}

.parking-map.is-fallback::after {
  border-top-color: rgba(255, 255, 255, 0.78);
  box-shadow: 0 -74px 0 rgba(255, 255, 255, 0.44), 0 86px 0 rgba(255, 255, 255, 0.52);
}

.parking-map-fallback {
  z-index: 2;
  max-width: calc(100% - 32px);
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.parking-map:not(.is-fallback) .parking-map-fallback {
  display: none;
}

.parking-map-label,
.parking-destination-marker {
  max-width: min(168px, 46vw);
  line-height: 1.15;
  white-space: nowrap;
}

.parking-reason {
  margin: -0.2rem 0 0;
  color: #334155;
  font-size: 0.92rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.parking-card-actions .subtle-button {
  min-height: 36px;
  padding: 0.45rem 0.72rem;
}

.parking-card-detail p {
  margin: 0;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.parking-result-card.risk-high {
  border-color: rgba(192, 86, 33, 0.26);
}

.parking-result-card.risk-low {
  border-color: rgba(20, 108, 95, 0.24);
}

.parking-guide .guide-grid {
  align-items: stretch;
}

.parking-guide .guide-grid article {
  display: grid;
  align-content: start;
  gap: 0.45rem;
  border-radius: 16px;
}

.parking-guide .guide-grid article h3,
.parking-guide .guide-grid article p {
  margin: 0;
}

.parking-guide .guide-grid article:last-child {
  border: 1px solid rgba(178, 106, 0, 0.22);
  background: #fff8e7;
}

.parking-place-chip strong,
.parking-place-chip span,
.parking-card-metrics span,
.parking-result-head strong,
.parking-result-head em {
  overflow-wrap: anywhere;
  word-break: keep-all;
}

@media (max-width: 1024px) {
  .parking-workspace {
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
    gap: 18px;
  }

  .parking-map-card {
    min-height: 560px;
  }
}

@media (max-width: 860px) {
  .parking-workspace {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
  }

  .parking-map-column {
    position: relative;
    top: auto;
  }

  .parking-result-list {
    display: none;
  }

  .parking-bottom-sheet {
    position: relative;
    bottom: auto;
    z-index: 1;
    display: block;
    max-height: none;
    margin: 1rem 0 0;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(15, 35, 55, 0.12);
    overflow: visible;
  }
}

@media (max-width: 640px) {
  main,
  .calculator-page,
  .parking-hero {
    padding-bottom: calc(140px + env(safe-area-inset-bottom));
  }

  .parking-hero .container,
  .parking-app-shell,
  .parking-workspace,
  .parking-left-panel,
  .parking-map-column,
  .parking-input-panel,
  .parking-summary-panel,
  .parking-map-card,
  .parking-result-card,
  .parking-bottom-sheet {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .parking-app-shell {
    margin-top: 1rem;
  }

  .parking-input-panel,
  .parking-summary-panel,
  .parking-result-card {
    padding: 1rem;
    border-radius: 16px;
  }

  .parking-date-grid,
  .parking-inline-search {
    grid-template-columns: 1fr !important;
    gap: 0.65rem;
  }

  .quick-duration-row,
  .parking-filter-row,
  .parking-place-results {
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 0.45rem;
    margin: 0.65rem 0 0.85rem;
    padding-bottom: 0;
  }

  .quick-duration-row button,
  .parking-filter-row label,
  .parking-place-chip {
    flex: 1 1 calc(50% - 0.45rem);
    min-width: 0;
    min-height: 38px;
    white-space: normal;
  }

  .parking-place-chip {
    width: 100%;
  }

  .parking-filter-row label {
    justify-content: flex-start;
    font-size: 0.9rem;
  }

  .parking-map-card {
    min-height: 360px;
    border-radius: 16px;
  }

  .parking-map {
    min-height: 320px;
  }

  .parking-map-fallback {
    width: min(92%, 340px);
    padding: 0.85rem;
    font-size: 0.9rem;
  }

  .parking-map-label,
  .parking-destination-marker {
    min-width: 48px;
    max-width: 132px;
    min-height: 30px;
    padding: 0.3rem 0.48rem;
    font-size: 0.72rem;
  }

  .parking-card-metrics {
    grid-template-columns: 1fr;
  }

  .parking-price-row strong {
    font-size: 1.42rem;
  }

  .parking-result-head strong {
    font-size: 1rem;
  }

  .parking-bottom-sheet {
    padding: 0.8rem;
  }

  .parking-card-actions {
    justify-content: stretch;
  }

  .parking-card-actions .subtle-button,
  .parking-inline-search .primary-button,
  .parking-inline-search .subtle-button,
  .wide-button {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 390px) {
  .quick-duration-row button,
  .parking-filter-row label {
    flex-basis: 100%;
  }

  .parking-map-card {
    min-height: 330px;
  }
}

/* Parking MVP layout fix: prevent generic .tool-panel two-column form from overlapping map */
.parking-input-panel,
.parking-summary-panel {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 1rem;
  width: 100%;
}

.parking-map-card {
  display: block !important;
}

/* Parking budget map final MVP polish 2026-06-17 */
.parking-map-legend {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: min(90%, 420px);
  padding: 8px 10px;
  border: 1px solid rgba(15, 35, 55, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(15, 35, 55, 0.12);
}

.parking-map:not(.is-fallback) .parking-map-legend {
  display: none;
}

.parking-card-actions {
  align-items: center;
  gap: 0.5rem;
  justify-content: space-between;
}

.parking-card-link-note {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.parking-result-card.is-highlighted {
  border-color: #146c5f;
  box-shadow: 0 0 0 3px rgba(20, 108, 95, 0.13), 0 14px 32px rgba(15, 35, 55, 0.13);
}

.parking-input-panel .step-label {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(20, 108, 95, 0.08);
  line-height: 1.3;
}

.parking-input-panel.tool-panel {
  display: grid !important;
  grid-template-columns: 1fr !important;
}

.parking-summary-panel.tool-panel {
  display: grid !important;
  grid-template-columns: 1fr !important;
}

.parking-map-label:focus-visible,
.parking-place-chip:focus-visible,
.quick-duration-row button:focus-visible {
  outline: 3px solid rgba(20, 108, 95, 0.28);
  outline-offset: 3px;
}

@media (min-width: 861px) {
  .parking-result-list {
    max-height: none;
  }
}

@media (max-width: 640px) {
  .parking-map-legend {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
    font-size: 0.72rem;
  }

  .parking-card-actions {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .parking-card-link-note {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: keep-all;
  }

  .parking-result-card {
    scroll-margin-top: 16px;
  }
}

/* Parking 2차 MVP refinements */
.parking-filter-note {
  margin-top: -4px;
  color: #5f6f68;
}
.parking-result-card .parking-card-metrics span:nth-child(2) {
  font-weight: 700;
  color: #146c5f;
}
.parking-result-card:not(.risk-high) .parking-card-metrics span:nth-child(2) {
  background: rgba(20, 108, 95, 0.08);
  border-radius: 999px;
  padding: 4px 8px;
}
@media (max-width: 640px) {
  .parking-filter-note {
    margin-top: 0;
    font-size: 0.82rem;
  }
  .parking-card-metrics span {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: keep-all;
  }
}

/* Parking recommendation mode UX step */
.parking-sort-field select {
  min-height: 44px;
}
.parking-preference-panel {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid rgba(20, 108, 95, 0.16);
  border-radius: 16px;
  background: #f7fbfa;
}
.parking-preference-head {
  display: grid;
  gap: 0.2rem;
}
.parking-preference-head strong {
  color: #102033;
  font-size: 0.98rem;
}
.parking-preference-head span {
  color: #607085;
  font-size: 0.84rem;
  line-height: 1.45;
}
.parking-preference-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}
.parking-preference-card {
  display: grid;
  gap: 0.2rem;
  width: 100%;
  min-width: 0;
  padding: 0.7rem 0.75rem;
  border: 1px solid #d6e0ea;
  border-radius: 14px;
  background: #fff;
  color: #17324d;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.parking-preference-card strong {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
  line-height: 1.25;
}
.parking-preference-card span {
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: keep-all;
}
.parking-preference-card.active {
  border-color: #146c5f;
  background: #e7f5f1;
  box-shadow: 0 0 0 3px rgba(20, 108, 95, 0.1);
}
.parking-preference-card.active strong::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #146c5f;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
}
.parking-score-reason {
  margin: -0.35rem 0 0;
  color: #475569;
  font-size: 0.86rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: keep-all;
}
.parking-map-label {
  display: inline-grid;
  gap: 1px;
  align-items: center;
  justify-items: center;
}
.parking-map-label small {
  color: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  opacity: 0.86;
  line-height: 1.05;
}
@media (min-width: 861px) {
  .parking-preference-card:last-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 640px) {
  .parking-preference-panel {
    padding: 0.75rem;
    border-radius: 14px;
  }
  .parking-preference-grid {
    grid-template-columns: 1fr;
  }
  .parking-preference-card {
    padding: 0.68rem 0.72rem;
  }
  .parking-sort-field {
    display: none;
  }
}

/* Parking MVP marker selection and recommendation card UX */
.parking-map-label.is-selected {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.18), 0 14px 26px rgba(15, 35, 55, 0.2);
  transform: translate(-50%, -50%) scale(1.04);
}
.parking-result-card.is-pinned {
  border-color: #0f766e;
  background: linear-gradient(180deg, #f0fdfa 0%, #ffffff 60%);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14), 0 18px 34px rgba(15, 35, 55, 0.12);
}
.parking-pin-badge {
  display: none;
  width: fit-content;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: #0f766e;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1.2;
}
.parking-result-card.is-pinned .parking-pin-badge {
  display: inline-flex;
}
.parking-action-buttons {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.parking-unpin-button {
  display: none;
}
.parking-result-card.is-pinned .parking-unpin-button {
  display: inline-flex;
}
@media (max-width: 640px) {
  .parking-action-buttons {
    justify-content: flex-start;
  }
  .parking-card-actions {
    grid-template-columns: 1fr;
  }
}

/* Parking calculation map: four-panel dashboard and strict radius MVP fix */
.parking-dashboard {
  display: grid;
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  grid-template-rows: minmax(360px, 58vh) minmax(260px, auto);
  gap: 18px;
  align-items: stretch;
}

.parking-control-column {
  grid-row: 1 / span 2;
  min-width: 0;
}

.parking-map-panel,
.parking-results-panel {
  min-width: 0;
  max-width: 100%;
}

.parking-map-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  position: relative !important;
  top: auto !important;
}

.parking-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.parking-panel-head span {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 0.28rem 0.58rem;
  border-radius: 999px;
  background: rgba(20, 108, 95, 0.08);
  color: #146c5f;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.3;
}

.parking-panel-head strong {
  min-width: 0;
  color: #102033;
  font-size: 0.96rem;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.parking-dashboard .parking-map-card {
  min-height: 0;
  height: 100%;
}

.parking-results-panel {
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 0.85rem;
  overflow: hidden;
}

.parking-dashboard .parking-result-list {
  display: grid !important;
  max-height: min(52vh, 520px);
  overflow-y: auto;
  padding-right: 4px;
  scroll-padding: 12px;
}

.parking-card-head,
.parking-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  min-width: 0;
}

.parking-card-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.parking-card-tags span,
.parking-card-tags button {
  min-width: 0;
}

.parking-pinned-badge,
.parking-card-tags .parking-pinned-badge {
  display: inline-flex;
  width: fit-content;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: #0f766e;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1.2;
}

.parking-result-card.is-pinned {
  border-color: #0f766e;
  background: linear-gradient(180deg, #f0fdfa 0%, #ffffff 60%);
}

@media (max-width: 1024px) {
  .parking-dashboard {
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
    grid-template-rows: minmax(340px, 52vh) minmax(260px, auto);
  }
}

@media (max-width: 860px) {
  .parking-dashboard {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    width: 100%;
    max-width: 100%;
  }

  .parking-control-column,
  .parking-map-panel,
  .parking-results-panel {
    grid-row: auto;
    width: 100%;
    max-width: 100%;
  }

  .parking-map-panel {
    display: grid;
  }

  .parking-dashboard .parking-map-card {
    min-height: 380px;
    height: auto;
  }

  .parking-dashboard .parking-result-list {
    display: grid !important;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .parking-results-panel {
    overflow: visible;
  }
}

@media (max-width: 640px) {
  .parking-dashboard {
    gap: 14px;
  }

  .parking-panel-head {
    display: grid;
    justify-items: start;
  }

  .parking-dashboard .parking-map-card {
    min-height: 340px;
  }

  .parking-preference-grid {
    grid-template-columns: 1fr;
  }

  .parking-result-card details {
    max-width: 100%;
  }

  .parking-result-card details[open] .parking-card-detail {
    max-height: 46vh;
    overflow-y: auto;
    padding-right: 4px;
  }
}

@media (max-width: 390px) {
  .parking-dashboard .parking-map-card {
    min-height: 320px;
  }
}

.parking-legal-note {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem;
  border: 1px solid rgba(178, 106, 0, 0.2);
  border-radius: 14px;
  background: #fff8e7;
  color: #5f4b21;
  font-size: 0.82rem;
  line-height: 1.55;
}
.parking-legal-note p {
  margin: 0;
}

/* Parking calculation map dashboard layout pass: top controls + bottom results/map */
.parking-app-shell .parking-dashboard {
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: auto minmax(0, auto) !important;
  gap: 18px !important;
  align-items: stretch !important;
  width: 100%;
  max-width: 100%;
}

.parking-dashboard__controls,
.parking-dashboard__main,
.parking-dashboard__results,
.parking-dashboard__map {
  min-width: 0;
  max-width: 100%;
}

.parking-dashboard__controls .parking-control-column {
  display: block;
  width: 100%;
}

.parking-dashboard__controls .parking-input-panel {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
  align-items: start;
  width: 100%;
}

.parking-control-card {
  display: grid;
  gap: 0.85rem;
  align-content: start;
  min-width: 0;
  height: 100%;
  padding: 1rem;
  border: 1px solid rgba(139, 162, 184, 0.28);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  box-shadow: 0 10px 28px rgba(16, 32, 51, 0.06);
}

.parking-control-card .step-label {
  margin-top: 0;
  margin-bottom: 0.1rem;
}

.parking-control-card .field,
.parking-control-card .field-row,
.parking-control-card .quick-duration-row,
.parking-control-card .parking-filter-row,
.parking-control-card .parking-place-results,
.parking-control-card .parking-preference-panel,
.parking-control-card .parking-filter-note {
  margin-top: 0;
  margin-bottom: 0;
}

.parking-dashboard__controls .parking-date-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.parking-control-card--options .parking-date-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.parking-control-card--options .parking-sort-field {
  grid-column: 1 / -1;
}

.parking-control-card--options .parking-preference-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.parking-control-card--options .parking-preference-card span {
  font-size: 0.78rem;
}

.parking-control-card--options .wide-button {
  margin-top: 0.2rem;
}

.parking-control-legal {
  grid-column: 1 / -1;
}

.parking-dashboard__main {
  display: grid;
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  height: clamp(500px, 58vh, 680px);
  min-height: 0;
}

.parking-dashboard__results,
.parking-dashboard__map {
  height: 100%;
  min-height: 0;
}

.parking-dashboard__map {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  position: relative !important;
  top: auto !important;
}

.parking-dashboard__map .parking-map-card {
  height: 100% !important;
  min-height: 0 !important;
}

.parking-dashboard__results {
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) !important;
  gap: 0.75rem !important;
  overflow: hidden !important;
  min-height: 0;
}

.parking-dashboard__results .parking-result-list {
  display: grid !important;
  gap: 0.9rem;
  min-height: 0;
  max-height: none !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  padding-right: 6px;
  scroll-padding: 12px;
}

.parking-dashboard__results .parking-summary-bar {
  margin: 0;
}

.parking-result-sort-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-width: 0;
}

.parking-result-sort-tabs button {
  min-height: 38px;
  padding: 0.48rem 0.72rem;
  border: 1px solid rgba(20, 108, 95, 0.24);
  border-radius: 999px;
  background: #fff;
  color: #146c5f;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.parking-result-sort-tabs button.active,
.parking-result-sort-tabs button[aria-pressed="true"] {
  border-color: #146c5f;
  background: #146c5f;
  color: #fff;
}

@media (max-width: 1180px) {
  .parking-dashboard__controls .parking-input-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .parking-control-card--options,
  .parking-control-legal {
    grid-column: 1 / -1;
  }

  .parking-control-card--options .parking-preference-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .parking-dashboard__controls .parking-input-panel {
    grid-template-columns: 1fr !important;
  }

  .parking-control-card,
  .parking-control-card--options,
  .parking-control-legal {
    grid-column: auto;
  }

  .parking-control-card--options .parking-preference-grid {
    grid-template-columns: 1fr;
  }

  .parking-dashboard__main {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }

  .parking-dashboard__map {
    order: 1;
    min-height: 360px;
  }

  .parking-dashboard__results {
    order: 2;
    height: auto;
    min-height: 0;
    overflow: visible !important;
  }

  .parking-dashboard__map .parking-map-card {
    min-height: 360px !important;
    height: 360px !important;
  }

  .parking-dashboard__results .parking-result-list {
    max-height: none !important;
    overflow: visible !important;
    padding-right: 0;
  }
}

@media (max-width: 640px) {
  .parking-dashboard__controls .parking-input-panel {
    gap: 14px !important;
  }

  .parking-control-card {
    padding: 0.9rem;
    border-radius: 16px;
  }

  .parking-dashboard__controls .parking-date-grid,
  .parking-control-card--options .parking-date-grid {
    grid-template-columns: 1fr;
  }

  .parking-result-sort-tabs button,
  .quick-duration-row button,
  .parking-filter-row label {
    min-height: 44px;
  }

  .parking-dashboard__map .parking-map-card {
    min-height: 330px !important;
    height: 330px !important;
  }
}

@media (max-width: 390px) {
  .parking-dashboard__map .parking-map-card {
    min-height: 310px !important;
    height: 310px !important;
  }
}

/* Compact the new top control band: sorting is also available in the result panel. */
.parking-dashboard__controls .parking-preference-panel {
  display: none !important;
}

@media (min-width: 861px) {
  .parking-control-card--destination .parking-place-results {
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
  }

  .parking-control-card--options .parking-filter-row {
    max-height: 132px;
    overflow-y: auto;
    padding-right: 4px;
  }
}

.parking-dashboard__controls .parking-control-card {
  height: auto !important;
}

@media (min-width: 861px) {
  .parking-control-card--options .parking-date-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  .parking-control-card--options .parking-sort-field {
    grid-column: auto !important;
  }
  .parking-control-card--options .parking-filter-note {
    display: none;
  }
}

/* Parking calculation map polish pass: guidance placement, taller result panel, map re-search UX */
.parking-compact-note {
  grid-column: 1 / -1;
  margin: 0.2rem 0 0;
  color: #536476;
  font-size: 0.86rem;
  font-weight: 800;
}

.parking-dashboard__main {
  height: clamp(620px, calc(100vh - 180px), 780px) !important;
  min-height: 620px !important;
}

.parking-dashboard__map {
  grid-template-rows: auto minmax(0, 1fr) auto !important;
}

.parking-dashboard__results {
  min-height: 620px !important;
}

.parking-dashboard__results .parking-result-list {
  min-height: 0 !important;
  overflow-y: auto !important;
}

.parking-dashboard__results .status-message {
  margin: 0;
  padding: 0.62rem 0.75rem;
  border-radius: 12px;
  background: #f5faf8;
  color: #146c5f;
  font-weight: 850;
}

.parking-data-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-height: 0;
}

.parking-data-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.28rem 0.55rem;
  border: 1px solid rgba(20, 108, 95, 0.18);
  border-radius: 999px;
  background: #f7fbfa;
  color: #365e57;
  font-size: 0.76rem;
  font-weight: 850;
}

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

.parking-map-research-button {
  position: absolute;
  left: 50%;
  top: 14px;
  z-index: 6;
  transform: translateX(-50%);
  min-height: 42px;
  padding: 0.58rem 0.95rem;
  border: 1px solid rgba(20, 108, 95, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #146c5f;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
  font-weight: 900;
  cursor: pointer;
}

.parking-map-research-button:hover {
  background: #146c5f;
  color: #fff;
}

.parking-map-research-button[hidden] {
  display: none !important;
}

.parking-map-legal {
  margin-top: 0;
  background: #fffdf5;
  font-size: 0.78rem;
}

.parking-card-head {
  align-items: start;
  gap: 0.7rem;
}

.parking-card-head > div {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.parking-card-head strong {
  font-size: 1rem;
  line-height: 1.25;
}

.parking-card-head span {
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 850;
}

.parking-result-card {
  gap: 0.68rem !important;
  padding: 0.92rem !important;
}

.parking-price-row strong {
  font-size: 1.55rem !important;
}

.parking-score-reason {
  display: none !important;
}

.parking-card-metrics {
  gap: 0.38rem !important;
}

.parking-card-metrics span {
  padding: 0.42rem 0.48rem !important;
  font-size: 0.78rem;
}

.parking-pinned-badge {
  margin: 0;
  color: #146c5f;
  font-size: 0.82rem;
  font-weight: 900;
}

.parking-guide .section-lead {
  max-width: 760px;
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.parking-guide .guide-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}

.parking-guide .guide-grid article {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: none;
}

.parking-guide .guide-grid article:last-child {
  border: 1px solid var(--line);
  background: #fff;
}

.faq-section details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 0.9rem 1rem;
}

.faq-section details + details {
  margin-top: 0.75rem;
}

.faq-section summary {
  cursor: pointer;
  font-weight: 900;
  line-height: 1.45;
}

.faq-section details p {
  color: var(--muted);
  line-height: 1.65;
}

@media (max-width: 1180px) {
  .parking-dashboard__main {
    height: clamp(600px, 64vh, 760px) !important;
    min-height: 600px !important;
  }
  .parking-dashboard__results {
    min-height: 600px !important;
  }
}

@media (max-width: 860px) {
  .parking-dashboard__main {
    height: auto !important;
    min-height: 0 !important;
  }
  .parking-dashboard__results {
    min-height: 0 !important;
  }
  .parking-dashboard__results .parking-result-list {
    overflow: visible !important;
  }
  .parking-map-legal {
    font-size: 0.76rem;
  }
  .parking-guide .guide-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .parking-map-research-button {
    width: calc(100% - 32px);
    white-space: normal;
  }
  .parking-data-badges span {
    font-size: 0.72rem;
  }
}

/* Parking map final UI polish: clearer cards, compact sort chips, working detail panels */
.parking-dashboard__main {
  height: clamp(680px, calc(100vh - 140px), 860px) !important;
  min-height: 680px !important;
}

.parking-dashboard__results {
  min-height: 680px !important;
}

.parking-dashboard__results .parking-result-list {
  gap: 1rem !important;
  padding-right: 8px;
}

.parking-result-sort-tabs {
  gap: 0.38rem !important;
  align-items: center;
}

.parking-result-sort-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  min-height: 32px !important;
  height: 32px;
  padding: 0.32rem 0.68rem !important;
  border-radius: 999px;
  line-height: 1;
  white-space: nowrap;
  flex: 0 0 auto;
  font-size: 0.78rem !important;
  letter-spacing: -0.01em;
}

.parking-result-card {
  gap: 0.82rem !important;
  padding: 1.05rem !important;
  border-radius: 18px !important;
  border-color: rgba(132, 154, 176, 0.35) !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.parking-result-card.is-best {
  border-color: rgba(20, 108, 95, 0.42) !important;
  box-shadow: 0 14px 34px rgba(20, 108, 95, 0.12);
}

.parking-card-head strong {
  font-size: 1.08rem !important;
}

.parking-price-row {
  padding: 0.7rem 0.78rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #f2fbf8 0%, #ffffff 100%);
}

.parking-price-row strong {
  font-size: 1.85rem !important;
}

.parking-reason {
  margin: 0;
  color: #425466;
  line-height: 1.5;
  font-size: 0.9rem;
}

.parking-card-metrics {
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.42rem !important;
}

.parking-card-metrics .parking-metric-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  width: fit-content;
  padding: 0.42rem 0.58rem !important;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.78rem !important;
  font-weight: 850;
  line-height: 1.25;
  white-space: normal;
}

.metric-distance {
  background: #eef6ff !important;
  border-color: #cfe4ff !important;
  color: #1e4f7a !important;
}

.metric-availability {
  background: #eefaf2 !important;
  border-color: #c9efd8 !important;
  color: #17633a !important;
}

.metric-risk-low {
  background: #effaf5 !important;
  border-color: #c7ecd8 !important;
  color: #16633d !important;
}

.metric-risk-medium {
  background: #fff7dc !important;
  border-color: #f5e3a0 !important;
  color: #735300 !important;
}

.metric-risk-high {
  background: #fff1f0 !important;
  border-color: #ffd2cc !important;
  color: #9a251e !important;
}

.metric-confidence-high {
  background: #ecfdf5 !important;
  border-color: #c7f1df !important;
  color: #146c5f !important;
}

.metric-confidence-medium {
  background: #f5f3ff !important;
  border-color: #ddd6fe !important;
  color: #5b4e9f !important;
}

.metric-confidence-low {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #475569 !important;
}

.parking-detail-toggle {
  justify-self: start;
  min-height: 36px;
  padding: 0.48rem 0.76rem;
  border: 1px solid rgba(20, 108, 95, 0.26);
  border-radius: 999px;
  background: #fff;
  color: #146c5f;
  cursor: pointer;
  font-weight: 900;
  font-size: 0.84rem;
}

.parking-detail-toggle:hover,
.parking-detail-toggle[aria-expanded="true"] {
  background: #146c5f;
  color: #fff;
}

.parking-card-detail[hidden] {
  display: none !important;
}

.parking-card-detail {
  display: grid !important;
  gap: 0.48rem !important;
  padding: 0.82rem !important;
  border: 1px solid #e0e9f1;
  border-radius: 14px;
  background: #f8fbfd;
  font-size: 0.88rem !important;
}

.parking-card-detail p {
  margin: 0;
  line-height: 1.55;
}

@media (max-width: 1180px) {
  .parking-dashboard__main {
    height: clamp(640px, 70vh, 820px) !important;
    min-height: 640px !important;
  }
  .parking-dashboard__results {
    min-height: 640px !important;
  }
}

@media (max-width: 860px) {
  .parking-dashboard__main,
  .parking-dashboard__results {
    height: auto !important;
    min-height: 0 !important;
  }
  .parking-result-sort-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scrollbar-width: thin;
  }
  .parking-result-sort-tabs button {
    min-height: 38px !important;
    height: 38px;
  }
  .parking-result-card {
    padding: 0.95rem !important;
  }
  .parking-price-row strong {
    font-size: 1.62rem !important;
  }
}

/* Parking budget map UI fix 2026-06-17: taller map, separated sort/results, stronger guide sections */
@media (min-width: 861px) {
  .parking-dashboard__main {
    height: clamp(820px, 86vh, 1040px) !important;
    min-height: 820px !important;
    align-items: stretch !important;
  }
  .parking-dashboard__results,
  .parking-dashboard__map {
    min-height: 820px !important;
  }
  .parking-dashboard__map .parking-map-card {
    height: clamp(720px, 78vh, 940px) !important;
    min-height: 720px !important;
  }
  .parking-dashboard__results {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }
  .parking-dashboard__results .parking-summary-bar,
  .parking-dashboard__results .status-message,
  .parking-dashboard__results .parking-data-badges,
  .parking-result-sort-tabs {
    flex: 0 0 auto !important;
  }
  .parking-result-sort-tabs {
    position: relative !important;
    z-index: 5 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    margin: 0.65rem 0 0.95rem !important;
    padding: 0.45rem 0 0.6rem !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    background: #fff !important;
  }
  .parking-dashboard__results .parking-result-list {
    position: relative !important;
    z-index: 1 !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    margin-top: 0 !important;
    padding: 0.1rem 0.55rem 0.65rem 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scroll-padding-top: 0.75rem;
  }
  .parking-dashboard__results .parking-result-card {
    position: relative !important;
    z-index: 1 !important;
    margin: 0 !important;
  }
  .parking-map-legal {
    margin-top: 1rem !important;
  }
}
.parking-content-guide {
  padding-top: 0.25rem;
}
.parking-content-guide .section-lead {
  max-width: 820px;
  margin: 0.35rem 0 1.15rem;
  color: #4b6176;
  line-height: 1.7;
}
.parking-content-guide .parking-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.parking-content-guide .parking-guide-grid article {
  min-width: 0;
  padding: 1.15rem;
  border: 1px solid #dbe6ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.045);
}
.parking-content-guide .parking-guide-grid h3 {
  margin: 0 0 0.45rem;
  color: #102033;
  font-size: 1.02rem;
  line-height: 1.35;
}
.parking-content-guide .parking-guide-grid p {
  margin: 0;
  color: #4b6176;
  line-height: 1.68;
}
.parking-faq-section details {
  border: 1px solid #dbe6ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}
.parking-faq-section details + details {
  margin-top: 0.75rem;
}
.parking-faq-section summary {
  min-height: 48px;
  padding: 0.85rem 1rem;
  color: #102033;
  font-weight: 800;
  cursor: pointer;
}
.parking-faq-section details p {
  margin: 0;
  padding: 0 1rem 1rem;
  color: #4b6176;
  line-height: 1.7;
}
@media (max-width: 860px) {
  .parking-dashboard__map .parking-map-card {
    height: 430px !important;
    min-height: 430px !important;
  }
  .parking-result-sort-tabs {
    position: relative !important;
    z-index: 5 !important;
    margin: 0.6rem 0 0.85rem !important;
    padding-bottom: 0.45rem !important;
    background: #fff !important;
  }
  .parking-dashboard__results .parking-result-list {
    margin-top: 0 !important;
    padding-top: 0.2rem !important;
  }
  .parking-content-guide .parking-guide-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 430px) {
  .parking-dashboard__map .parking-map-card {
    height: 390px !important;
    min-height: 390px !important;
  }
  .parking-content-guide .parking-guide-grid article {
    padding: 1rem;
  }
}

/* Parking budget map interaction/mobile refinement 2026-06-17 */
.parking-map-label {
  display: inline-flex !important;
  grid-auto-flow: column;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  min-width: max-content !important;
  padding-inline: 6px 9px !important;
  white-space: nowrap !important;
}
.parking-map-label .parking-marker-rank {
  flex: 0 0 auto;
  width: 20px;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #0f766e;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.22);
}
.parking-map-label.is-best .parking-marker-rank,
.parking-map-label.is-selected .parking-marker-rank {
  background: rgba(255,255,255,0.96);
  color: #0f766e;
}
.parking-result-card {
  cursor: pointer;
}
.parking-options-toggle {
  display: none;
}
.parking-options-body {
  min-width: 0;
}
.parking-map-popup {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 12;
  width: min(330px, calc(100% - 32px));
  padding: 0.95rem;
  border: 1px solid rgba(20, 108, 95, 0.28);
  border-radius: 18px;
  background: rgba(255,255,255,0.97);
  box-shadow: 0 18px 42px rgba(15, 35, 55, 0.22);
  color: #102033;
}
.parking-map-popup__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border: 1px solid #d8e5ee;
  border-radius: 999px;
  background: #fff;
  color: #30465c;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.parking-map-popup__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
  padding-right: 2.1rem;
}
.parking-map-popup__head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 28px;
  border-radius: 999px;
  background: #e8f7f3;
  color: #0f766e;
  font-weight: 900;
}
.parking-map-popup__head strong {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: keep-all;
  font-size: 1rem;
}
.parking-map-popup__meta,
.parking-map-popup__detail {
  margin: 0.45rem 0 0;
  color: #4b6176;
  font-size: 0.88rem;
  line-height: 1.5;
}
.parking-map-popup__price {
  margin: 0.7rem 0 0.45rem;
  color: #0f766e;
  font-size: 1.65rem;
  font-weight: 900;
}
.parking-map-popup .subtle-button {
  margin-top: 0.75rem;
}
@media (max-width: 860px) {
  .parking-dashboard__controls {
    gap: 0.75rem !important;
  }
  .parking-control-card {
    padding: 0.78rem !important;
    border-radius: 14px !important;
    gap: 0.58rem !important;
  }
  .parking-control-card .step-label {
    margin-bottom: 0 !important;
    font-size: 0.82rem !important;
  }
  .parking-control-card--destination .fine-print,
  .parking-control-card--schedule .fine-print {
    font-size: 0.76rem !important;
    line-height: 1.42 !important;
  }
  .parking-control-card--destination .parking-place-results {
    max-height: 150px !important;
  }
  .parking-control-card--schedule .quick-duration-row {
    gap: 0.36rem !important;
    margin-top: 0.2rem !important;
  }
  .parking-control-card--schedule .quick-duration-row button {
    min-height: 34px !important;
    padding: 0.35rem 0.55rem !important;
    font-size: 0.78rem !important;
  }
  .parking-control-card--options {
    padding: 0.7rem !important;
    gap: 0.5rem !important;
  }
  .parking-control-card--options > .step-label {
    display: none !important;
  }
  .parking-options-toggle {
    width: 100%;
    min-height: 44px;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.72rem 0.8rem;
    border: 1px solid #cfe0eb;
    border-radius: 13px;
    background: #f8fbfd;
    color: #102033;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
  }
  .parking-options-toggle strong {
    color: #0f766e;
    font-size: 0.86rem;
  }
  .parking-control-card--options.is-collapsed .parking-options-body {
    display: none !important;
  }
  .parking-control-card--options.is-open .parking-options-body {
    display: grid !important;
    gap: 0.65rem;
  }
  .parking-control-card--options .parking-filter-row {
    max-height: none !important;
  }
  .parking-dashboard__map {
    min-height: 600px !important;
  }
  .parking-dashboard__map .parking-map-card {
    height: min(68svh, 640px) !important;
    min-height: 540px !important;
  }
  .parking-map-label {
    max-width: min(150px, 46vw) !important;
    min-height: 32px !important;
    font-size: 0.75rem !important;
  }
  .parking-map-label .parking-marker-rank {
    width: 19px;
    min-width: 19px;
    height: 19px;
    font-size: 0.68rem;
  }
  .parking-map-popup {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    padding: 0.86rem;
    border-radius: 16px;
  }
  .parking-map-popup__price {
    font-size: 1.45rem;
  }
}
@media (max-width: 430px) {
  .parking-dashboard__map {
    min-height: 590px !important;
  }
  .parking-dashboard__map .parking-map-card {
    height: min(69svh, 610px) !important;
    min-height: 540px !important;
  }
}
@media (max-width: 380px) {
  .parking-dashboard__map {
    min-height: 545px !important;
  }
  .parking-dashboard__map .parking-map-card {
    height: min(68svh, 560px) !important;
    min-height: 500px !important;
  }
}

/* Parking budget map guide/FAQ consistency fix 2026-06-17 */
.parking-content-guide {
  display: grid;
  gap: 1rem;
}
.parking-content-guide .eyebrow,
.parking-content-guide h2,
.parking-content-guide .section-lead {
  margin-left: 0;
  margin-right: 0;
}
.parking-content-guide .parking-guide-grid {
  align-items: stretch;
}
.parking-content-guide .parking-guide-grid article,
.parking-faq-section details {
  border-radius: 16px;
  border: 1px solid #dbe6ef;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.045);
}
.parking-content-guide .parking-guide-grid article {
  padding: 1.2rem;
}
.parking-faq-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1rem;
  align-items: start;
}
.parking-faq-section .eyebrow,
.parking-faq-section h2 {
  grid-column: 1 / -1;
  margin-bottom: 0;
}
.parking-faq-section details + details {
  margin-top: 0 !important;
}
.parking-faq-section details {
  min-width: 0;
  height: 100%;
}
.parking-faq-section summary {
  min-height: 50px;
  display: flex;
  align-items: center;
  line-height: 1.45;
}
@media (max-width: 760px) {
  .parking-faq-section {
    grid-template-columns: 1fr;
  }
  .parking-content-guide .parking-guide-grid article,
  .parking-faq-section details {
    border-radius: 14px;
  }
}

/* Parking destination candidate popup and selected-state fix: scoped change only. */
.parking-place-popup[hidden] {
  display: none !important;
}

.parking-place-popup {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.42);
}

.parking-place-popup__panel {
  width: min(520px, 100%);
  max-height: min(620px, 82vh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.parking-place-popup__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.parking-place-popup__head strong {
  color: #102033;
  font-size: 1rem;
  font-weight: 900;
}

.parking-place-popup__close {
  width: 34px;
  height: 34px;
  border: 1px solid #d6e0ea;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
}

.parking-place-popup__list {
  display: grid;
  gap: 0.65rem;
  padding: 0.9rem 1rem 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.parking-place-popup__item {
  display: grid;
  gap: 0.25rem;
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid #d6e0ea;
  border-radius: 14px;
  background: #fff;
  color: #17324d;
  cursor: pointer;
  text-align: left;
}

.parking-place-popup__item:hover,
.parking-place-popup__item:focus-visible {
  border-color: #146c5f;
  background: #f0fdfa;
  outline: none;
}

.parking-place-popup__item strong {
  font-size: 0.95rem;
  font-weight: 900;
}

.parking-place-popup__item span,
.parking-place-popup__empty {
  color: #607085;
  font-size: 0.86rem;
  line-height: 1.45;
}

.parking-place-popup__empty {
  margin: 0;
  padding: 1rem 0.25rem;
  text-align: center;
}

@media (max-width: 640px) {
  .parking-place-popup {
    align-items: start;
    padding: max(0.75rem, env(safe-area-inset-top)) 0.75rem 0.75rem;
  }

  .parking-place-popup__panel {
    max-height: min(560px, 76vh);
    border-radius: 16px;
  }
}

.parking-map-label.is-best:not(.is-selected) {
  border-color: #146c5f !important;
  background: #fff !important;
  color: #0f594f !important;
  box-shadow: 0 8px 18px rgba(15, 35, 55, 0.18) !important;
  transform: translate(-50%, -50%) !important;
}

.parking-map-label.is-best:not(.is-selected) .parking-marker-rank {
  background: #0f766e !important;
  color: #fff !important;
}

.parking-result-card.is-best:not(.is-pinned) {
  border-color: rgba(132, 154, 176, 0.35) !important;
  background: #fff !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07) !important;
}

/* Parking map scope fix: desktop legal notice spacing and selected badge contrast */
@media (min-width: 1024px) {
  .parking-dashboard__main {
    height: auto !important;
    min-height: 820px !important;
    overflow: visible !important;
  }

  .parking-dashboard__map {
    display: grid !important;
    grid-template-rows: minmax(620px, 1fr) auto !important;
    gap: 1rem !important;
    overflow: visible !important;
  }

  .parking-dashboard__map .parking-map-card {
    height: 100% !important;
    min-height: 620px !important;
  }

  .parking-map-legal {
    position: relative;
    z-index: 1;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
}

.parking-pinned-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.62rem;
  border: 1px solid #10b981;
  border-radius: 999px;
  background: #ecfdf5;
  color: #065f46 !important;
  font-weight: 900;
  line-height: 1.25;
}
