:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --line: #d9e1eb;
  --text: #1f2937;
  --muted: #607084;
  --accent: #0a84ff;
  --accent-2: #0f8f7b;
  --danger: #b45309;
  --shadow: 0 14px 40px rgba(31, 41, 55, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Noto Sans TC", "Noto Sans", Arial, sans-serif;
}

body {
  overflow-y: auto;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 16px 24px 24px;
  overflow-x: hidden;
}

.language-screen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(31, 41, 55, 0.06);
}

.language-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  flex: 1 1 360px;
  min-width: min(100%, 320px);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: #e7f0f8;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.language-screen h1 {
  font-size: 18px;
  line-height: 1.2;
  white-space: normal;
}

.intro-text:empty {
  display: none !important;
}

.language-copy {
  display: grid;
  gap: 3px;
  min-width: 220px;
}

.intro-text,
.lead,
.summary-panel p,
.helper-text {
  color: var(--muted);
  line-height: 1.65;
}

.language-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  flex: 1 1 520px;
  align-items: stretch;
  min-width: min(100%, 360px);
}

.language-btn {
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 16px;
  text-align: left;
  cursor: pointer;
}

.language-btn:hover,
.language-btn:focus-visible {
  outline: 3px solid rgba(10, 132, 255, 0.18);
  border-color: var(--accent);
}

.language-btn.active {
  border-color: var(--accent);
  background: #e7f0f8;
  color: var(--accent);
}

.language-btn span {
  display: block;
  margin-bottom: 2px;
  font-size: 15px;
  font-weight: 600;
}

.language-btn small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.questionnaire-toggle {
  min-width: 104px;
  min-height: 44px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}

.questionnaire-toggle:hover,
.questionnaire-toggle:focus-visible {
  outline: 3px solid rgba(10, 132, 255, 0.18);
  background: #12598f;
}

.hidden {
  display: none;
}

.questionnaire {
  position: relative;
  padding-right: 132px;
  padding-bottom: 28px;
}

.form-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.form-header > div:first-child {
  min-width: 0;
}

.back-btn {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent);
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 700;
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.form-header h1 {
  font-size: clamp(25px, 5vw, 40px);
  line-height: 1.16;
}

.consultant-intro-banner {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1808 / 438;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(31, 41, 55, 0.06);
}

.consultant-intro-banner img {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  max-width: none;
}

.questionnaire[data-language="en"] .consultant-intro-banner img {
  transform: translateY(-51.3%);
}

.questionnaire-workbar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
  margin: 0 0 16px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(31, 41, 55, 0.04);
}

.workbar-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.floating-actions {
  position: fixed;
  top: 50%;
  right: max(12px, calc((100vw - 1080px) / 2 + 12px));
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 108px;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  border: 1px solid rgba(217, 225, 235, 0.86);
  border-radius: 8px 0 0 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 34px rgba(31, 41, 55, 0.14);
  backdrop-filter: blur(14px) saturate(1.12);
  transform: translateY(-50%);
}

.floating-actions .primary-btn {
  width: 100%;
  min-height: 40px;
  padding: 8px 9px;
  font-size: 12px;
  line-height: 1.18;
  white-space: normal;
}

.form-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.form-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0 13px;
  cursor: pointer;
  font-weight: 600;
}

.form-tab::after {
  position: absolute;
  right: 8px;
  bottom: -1px;
  left: 8px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: transparent;
  content: "";
}

.form-tab:hover,
.form-tab:focus-visible {
  outline: none;
  color: var(--accent);
}

.form-tab.is-active {
  color: var(--accent);
}

.form-tab.is-active::after {
  background: var(--accent);
}

.form-tab b {
  display: inline-grid;
  min-width: 22px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
  line-height: 1;
}

.case-identity-card {
  display: grid;
  min-width: 0;
  justify-items: end;
  gap: 1px;
  padding: 6px 0;
}

.case-identity-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.case-identity-card strong {
  max-width: 360px;
  overflow: hidden;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-panel[hidden] {
  display: none !important;
}

.form-body {
  display: grid;
  gap: 16px;
  padding: 16px 0;
}

.question-block,
.info-block,
.summary-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(31, 41, 55, 0.06);
}

.question-block,
.info-block {
  padding: 24px;
}

.question-heading {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 16px;
}

.number-pill {
  flex: 0 0 auto;
  min-width: 30px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e7f0f8;
  color: var(--accent);
  font-weight: 600;
}

.question-heading h2 {
  font-size: 19px;
  line-height: 1.35;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.grouped-options {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.option-group-heading {
  grid-column: 1 / -1;
  margin-top: 4px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.option-group-heading:first-child {
  margin-top: 0;
}

.options-grid .other-input {
  grid-column: 1 / -1;
}

.option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  cursor: pointer;
}

.option-badge {
  display: inline-flex;
  margin-left: 8px;
  border-radius: 999px;
  background: #d8ecfb;
  color: var(--accent);
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.option input {
  width: 18px;
  height: 16px;
  accent-color: var(--accent);
}

/* 租期卡上嘅「常見標準」：收細做低調小標籤，唔好凍成一舊 */
.option-duration .option-badge {
  margin-left: 0;
  margin-top: 3px;
  background: transparent;
  color: #5a8fc7;
  padding: 0;
  font-size: 10px;
  font-weight: 600;
}

/* 描述卡（初期費用取向 / 決策風格）：選項自帶說明，唔再分裂 */
.option-cards { display: grid; gap: 10px; }
.oc-card { display: flex; gap: 11px; align-items: flex-start; border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 14px; cursor: pointer; background: #fff; transition: border-color .15s, background .15s, box-shadow .15s; }
.oc-card input { margin-top: 3px; flex: 0 0 auto; accent-color: var(--accent); }
.oc-body strong { display: block; font-size: 15px; color: var(--text); margin-bottom: 3px; }
.oc-body p { margin: 0; font-size: 12.5px; line-height: 1.55; color: #64748b; }
.oc-card:hover { border-color: #ffb26b; }
.oc-card.checked { border-color: #ff7e2a; background: #fff6ee; box-shadow: inset 0 0 0 1.5px #ff7e2a; }
.oc-card.checked .oc-body strong { color: #a34812; }

.duration-selector {
  display: grid;
  gap: 8px;
}

.options-grid-duration {
  position: relative;
  grid-template-columns: repeat(8, minmax(78px, 1fr));
  gap: 8px;
  padding: 4px;
}

.options-grid-duration::before {
  content: none;
}

.option-duration {
  position: relative;
  min-height: 78px;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  border-color: #d8e3ee;
  border-radius: 8px;
  background: #fbfdff;
  text-align: center;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(31, 41, 55, 0.04);
}

.option-duration:hover,
.option-duration:focus-within {
  border-color: #9fc5e8;
  background: #f5faff;
}

.option-duration span {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.option-duration::before {
  content: none;
}

.option-duration input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.option-duration:has(input:checked) {
  background: #e7f0f8;
  color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.option-duration:has(input:checked)::before {
  box-shadow: 0 0 0 2px #fbfdff, 0 0 0 4px var(--accent);
}

.duration-timeline {
  display: grid;
  gap: 8px;
  border: 1px solid #dde6ef;
  border-radius: 8px;
  background: #f7fafc;
  padding: 16px;
}

.duration-timeline h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}

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

.duration-note {
  display: grid;
  gap: 5px;
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
}

.duration-note strong {
  font-size: 13px;
  line-height: 1.25;
}

.duration-note p {
  color: #607084;
  font-size: 12px;
  line-height: 1.55;
}

.duration-note-warning {
  border-color: #f0962a;
  background: #ffe9cf;
}

.duration-note-warning strong {
  color: #9a3412;
}

.duration-note-standard {
  border-color: #4a93e0;
  background: #dceeff;
}

.duration-note-standard strong {
  color: #0a6ed1;
}

.duration-note-stable {
  border-color: #4fb37e;
  background: #d8f3e3;
}

.duration-note-stable strong {
  color: #1f8f4e;
}

.option-combo {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(241, 246, 252, 0.55);
}

.option-combo .option {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 8px 16px;
}

.option-combo .option:hover,
.option-combo .option:focus-within {
  background: rgba(255, 255, 255, 0.65);
}

.question-notice strong {
  font-weight: 700;
}

.question-explainer {
  display: grid;
  gap: 8px;
  border: 1px solid #cfe0ef;
  border-left: 4px solid var(--accent-2);
  border-radius: 8px;
  background: #f8fbff;
  padding: 8px 16px;
  font-size: 13px;
  line-height: 1.55;
}

.question-explainer strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.question-explainer p {
  margin: 0;
  color: var(--muted);
}

.question-explainer ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.conditional {
  display: none;
  margin-top: 10px;
  padding: 13px 15px;
  border: 1px solid #e6eaf0;
  border-left: 3px solid #7fa8d6;
  border-radius: 0 10px 10px 0;
  background: #f6f9fd;
}

.conditional.visible {
  display: grid;
  gap: 14px;
}

.conditional .field-label {
  color: #41506b;
  font-size: 13.5px;
}
.conditional .field-label::before {
  content: "↳ ";
  color: #7fa8d6;
}

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

.conditional [hidden] {
  display: none !important;
}

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

.field-wide {
  grid-column: 1 / -1;
}

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

.number-input-row {
  display: grid;
  grid-template-columns: minmax(0, 180px) auto;
  align-items: center;
  justify-content: start;
  gap: 8px;
}

.number-input-row input {
  min-height: 44px;
}

.number-input-row span {
  color: var(--muted);
  font-weight: 600;
}

.inline-notice {
  border: 1px solid #f7d69a;
  border-left: 4px solid var(--danger);
  border-radius: 8px;
  background: #fff7ed;
  color: #7c2d12;
  padding: 8px 16px;
  line-height: 1.6;
}

.inline-notice p,
.question-notice p {
  margin: 0;
}

.question-notice {
  display: grid;
  gap: 8px;
  border: 1px solid #f2b9b2;
  border-left: 4px solid #d7665d;
  border-radius: 8px;
  background: #fff8f6;
  color: #8f3f3a;
  padding: 8px 16px;
  line-height: 1.65;
}

.question-notice .notice-link {
  min-height: 36px;
  background: #d7665d;
  color: #ffffff !important;
}

.question-notice .notice-link:hover,
.question-notice .notice-link:focus-visible {
  background: #c45b53;
}

.option-with-notice {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  border-color: #f2b9b2;
  background: #fff8f6;
  color: #8f3f3a;
  font-weight: 700;
}

.option-with-notice > input {
  margin-top: 4px;
  accent-color: #d7665d;
}

.option-inside-notice {
  grid-column: 1 / -1;
  margin-top: 0;
  border: 0;
  border-top: 1px solid #f2b9b2;
  border-left: 0;
  border-radius: 0;
  background: transparent;
  padding: 8px 0 0;
  color: #8f3f3a;
  font-weight: 700;
}

.compact-options {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

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

textarea,
input[type="text"],
input[type="date"],
input[type="number"],
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  padding: 8px 16px;
  resize: vertical;
}

textarea:focus,
input[type="text"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
select:focus {
  outline: 3px solid rgba(10, 132, 255, 0.18);
  border-color: var(--accent);
}

.location-selector {
  display: grid;
  gap: 8px;
}

.location-columns {
  display: grid;
  grid-template-columns: minmax(160px, 0.75fr) minmax(220px, 1fr) minmax(260px, 1.45fr);
  gap: 8px;
}

.location-column {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.location-column h3 {
  font-size: 16px;
  line-height: 1.35;
}

.location-search {
  min-height: 40px;
  padding: 8px;
}

.location-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 8px;
  max-height: 328px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.location-column:first-child .location-list {
  grid-template-columns: 1fr;
}

.location-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 40px;
  padding: 7px 8px;
  border: 1px solid #cfd9e6;
  border-radius: 7px;
  background: var(--surface-2);
  cursor: pointer;
}

.location-option input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
}

.location-option span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.location-option-number {
  flex: 0 0 auto;
  display: inline-grid;
  min-width: 25px;
  height: 23px;
  place-items: center;
  border-radius: 6px;
  background: #ffffff;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.location-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 16px;
}

.move-in-advisor {
  display: grid;
  gap: 8px;
}

.move-in-advice {
  display: grid;
  gap: 8px;
  border: 1px solid #cfe0ef;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #f7fbff;
  padding: 16px;
}

.move-in-advice.is-urgent {
  border-color: #f59e0b;
  border-left-color: #dc2626;
  background: #fffbeb;
}

.move-in-advice h3 {
  font-size: 15px;
  line-height: 1.35;
}

.move-in-advice dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.move-in-advice dl div {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  padding: 9px;
}

.move-in-advice dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.move-in-advice dd {
  margin: 0;
  color: var(--accent);
  font-size: 16px;
  font-weight: 700;
}

.move-in-advice p {
  color: var(--muted);
  line-height: 1.55;
}

.move-in-advice-status {
  color: var(--text) !important;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 700;
}

.move-in-advice.is-urgent .move-in-advice-status {
  color: #991b1b !important;
}

.move-in-advice-status-icon {
  display: inline-grid;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: #dc2626;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.move-in-advice-reason {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #d9e1eb;
}

.move-in-advice-reason h4 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.move-in-advice-reason ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.move-in-advice-reason li {
  display: grid;
  grid-template-columns: minmax(76px, auto) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  line-height: 1.55;
}

.move-in-advice-reason li strong {
  color: var(--accent);
  font-size: 12px;
  white-space: nowrap;
}

.move-in-advice-reason li span {
  min-width: 0;
  color: var(--muted);
}

.move-in-lease-tip {
  display: grid;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px dashed #cfe0ef;
}

.move-in-lease-tip strong {
  color: var(--text);
  font-size: 13px;
}

.move-in-lease-tip span {
  color: var(--accent);
  font-weight: 600;
  line-height: 1.45;
}

.info-block {
  display: grid;
  gap: 8px;
  line-height: 1.7;
}

.info-block h2 {
  font-size: 19px;
}

.info-block a {
  color: var(--accent);
  font-weight: 700;
  word-break: break-word;
}

.application-flow-info {
  gap: 16px;
}

.application-flow-panel {
  display: grid;
  gap: 8px;
}

.application-flow-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #c7ddf2;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8fe 100%);
  padding: 16px;
}

.application-flow-hero-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.application-flow-hero-title strong {
  display: block;
  color: #0f3f7c;
  font-size: 18px;
  line-height: 1.25;
}

.application-flow-hero-title p {
  color: var(--muted);
  line-height: 1.55;
}

.application-flow-house {
  position: relative;
  display: block;
  width: 52px;
  height: 46px;
}

.application-flow-house::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 31px;
  border: 2px solid #0a84ff;
  border-radius: 5px;
  background: #e7f0f8;
}

.application-flow-house::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 4px;
  width: 28px;
  height: 28px;
  border-top: 5px solid var(--warning);
  border-left: 5px solid var(--warning);
  transform: rotate(45deg);
}

.application-flow-estimate {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #0f8f7b;
  color: #ffffff;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.application-flow-steps {
  display: grid;
  gap: 8px;
}

.application-flow-step {
  position: relative;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 1px solid #d5e3f1;
  border-radius: 8px;
  background: #ffffff;
  padding: 8px 16px;
}

.application-flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 30px;
  bottom: -10px;
  width: 3px;
  height: 8px;
  background: #0a84ff;
}

.application-flow-step-badge {
  display: grid;
  width: 38px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

.application-flow-step-badge small {
  display: block;
  margin-bottom: -3px;
  font-size: 9px;
  font-weight: 600;
}

.application-flow-step-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid #d5e3f1;
  border-radius: 10px;
  background: #f8fbff;
  color: var(--accent);
  font-size: 24px;
  font-weight: 700;
}

.application-flow-step h3 {
  margin: 0 0 3px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}

.application-flow-step p {
  color: var(--muted);
  line-height: 1.55;
}

.application-flow-step-blue {
  border-color: #c9dff1;
  background: #f8fbff;
}

.application-flow-step-teal {
  border-color: #bfe7df;
  background: #f6fffc;
}

.application-flow-step-orange {
  border-color: #ffd7a8;
  background: #fff9f1;
}

.application-flow-step-purple {
  border-color: #ddd0f0;
  background: #fbf8ff;
}

.application-flow-step-green {
  border-color: #cae7d0;
  background: #f7fff8;
}

.application-flow-step-teal .application-flow-step-badge,
.application-flow-step-teal .application-flow-step-icon {
  background: #0f8f7b;
  color: #ffffff;
}

.application-flow-step-orange .application-flow-step-badge,
.application-flow-step-orange .application-flow-step-icon {
  background: var(--warning);
  color: #ffffff;
}

.application-flow-step-purple .application-flow-step-badge,
.application-flow-step-purple .application-flow-step-icon {
  background: var(--accent);
  color: #ffffff;
}

.application-flow-step-green .application-flow-step-badge,
.application-flow-step-green .application-flow-step-icon {
  background: #2f8f46;
  color: #ffffff;
}

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

.application-flow-supplement-card {
  display: grid;
  gap: 5px;
  border: 1px solid #d9e1eb;
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
}

.application-flow-supplement-card strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.application-flow-supplement-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.application-flow-supplement-time {
  border-color: #c9dff1;
  background: #f8fbff;
}

.application-flow-supplement-lease {
  border-color: #ffd7a8;
  background: #fff9f1;
}

.application-flow-supplement-timing {
  border-color: #cae7d0;
  background: #f7fff8;
}

.application-flow-link {
  display: inline-flex;
  width: fit-content;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff !important;
  padding: 9px 13px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
}

/* ===== 申請流程圖：連續時間軸重新設計（pf-） ===== */
.proc-flow-block { padding: 0 !important; background: transparent !important; border: none !important; box-shadow: none !important; gap: 0 !important; }
.proc-flow {
  --pf-orange:#ff7e2a; --pf-orange-deep:#d24f12; --pf-orange-soft:#fff3ec;
  --pf-ink:#1f1a16; --pf-ink2:#5c544d; --pf-ink3:#8a8178; --pf-line:#ece7e1; --pf-slate:#3f6f6a;
  background:#fff; border:1px solid var(--pf-line); border-radius:18px; overflow:hidden;
  box-shadow:0 10px 30px rgba(31,26,22,.06), 0 2px 6px rgba(31,26,22,.04);
}
.proc-flow * { box-sizing:border-box; }
.pf-hero { padding:26px 22px 22px; border-bottom:1px solid var(--pf-line); }
.pf-kicker { display:inline-flex; align-items:center; gap:7px; font-size:11.5px; font-weight:700; letter-spacing:.12em; color:var(--pf-orange-deep); text-transform:uppercase; margin-bottom:12px; }
.pf-kicker .pf-dot { width:7px; height:7px; border-radius:50%; background:var(--pf-orange); }
.proc-flow .pf-title { font-size:21px !important; font-weight:700; line-height:1.25; color:var(--pf-ink) !important; margin:0 0 10px !important; }
.pf-sub { font-size:13.5px; color:var(--pf-ink2); line-height:1.7; margin:0 0 16px; }
.pf-estimate { display:inline-flex; align-items:center; gap:8px; background:var(--pf-orange-soft); color:var(--pf-orange-deep); font-size:13.5px; font-weight:600; padding:8px 15px; border-radius:999px; border:1px solid #ffe0cd; }
.pf-estimate svg { width:15px; height:15px; flex:none; }
.pf-timeline { padding:26px 22px 6px; }
.pf-rail { position:relative; }
.pf-rail::before { content:""; position:absolute; left:17px; top:14px; bottom:28px; width:2px; background:linear-gradient(to bottom, var(--pf-orange) 0%, var(--pf-orange) 35%, var(--pf-orange-deep) 100%); border-radius:2px; }
.pf-step { position:relative; padding-left:52px; padding-bottom:26px; }
.pf-step:last-child { padding-bottom:4px; }
.pf-node { position:absolute; left:0; top:0; width:36px; height:36px; border-radius:50%; background:#fff; border:2px solid var(--pf-orange); color:var(--pf-orange-deep); display:flex; align-items:center; justify-content:center; font-size:15px; font-weight:700; z-index:2; }
.pf-step:nth-child(n+5) .pf-node { border-color:var(--pf-orange-deep); color:var(--pf-orange-deep); }
.pf-head { display:flex; align-items:center; gap:8px; margin-bottom:5px; min-height:36px; }
.pf-glyph { font-size:15px; line-height:1; color:var(--pf-orange); width:18px; text-align:center; flex:none; }
.proc-flow .pf-head h3 { font-size:16px !important; font-weight:700; color:var(--pf-ink) !important; line-height:1.3; margin:0 !important; }
.proc-flow .pf-step > p { font-size:13px !important; color:var(--pf-ink2) !important; line-height:1.7; margin:0 !important; }
.pf-notes { padding:6px 18px 22px; background:#fafafa; border-top:1px solid var(--pf-line); }
.pf-notes-title { font-size:11.5px; font-weight:700; letter-spacing:.1em; color:var(--pf-ink3); text-transform:uppercase; padding:18px 4px 12px; }
.pf-note { background:#fff; border:1px solid var(--pf-line); border-radius:14px; padding:13px 15px; margin-bottom:10px; display:flex; gap:12px; align-items:flex-start; }
.pf-note:last-child { margin-bottom:0; }
.pf-bar { width:4px; align-self:stretch; border-radius:4px; flex:none; background:var(--pf-slate); min-height:34px; }
.pf-note:first-of-type .pf-bar { background:var(--pf-orange); }
.pf-nt { font-size:14px; font-weight:700; color:var(--pf-ink); margin-bottom:3px; }
.pf-nb { font-size:12.5px; color:var(--pf-ink2); line-height:1.6; }
.pf-cta-wrap { padding:4px 18px 22px; background:#fafafa; }
.pf-cta { display:flex; align-items:center; justify-content:center; gap:9px; width:100%; background:var(--pf-orange); color:#fff !important; font-size:14.5px; font-weight:600; padding:14px 18px; border:none; border-radius:13px; text-decoration:none; box-shadow:0 4px 14px rgba(255,126,42,.3); }
.pf-cta svg { width:17px; height:17px; flex:none; }

.line-app-info {
  gap: 16px;
}

.line-app-panel {
  display: grid;
  gap: 8px;
}

.line-app-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #bde7c4;
  border-radius: 8px;
  background: #f4fff6;
  padding: 16px;
}

.line-app-title {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.line-app-title strong {
  display: block;
  color: #0f6f2b;
  font-size: 18px;
  line-height: 1.25;
}

.line-app-title p {
  color: var(--muted);
  line-height: 1.5;
}

.line-app-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 9px;
  font-weight: 700;
}

.line-app-mark-line {
  background: #06c755;
  color: #ffffff;
  font-size: 12px;
}

.line-app-mark-phone {
  position: relative;
  border: 2px solid #223047;
  background: #ffffff;
}

.line-app-mark-phone::before {
  content: "";
  width: 18px;
  height: 24px;
  border: 2px solid #223047;
  border-radius: 5px;
  background: linear-gradient(180deg, #f8fbff 0%, #e8f7f4 100%);
}

.line-app-check {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #16a34a;
  color: #ffffff;
  font-weight: 700;
}

.line-app-steps {
  display: grid;
  gap: 8px;
}

.line-app-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.36fr);
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
}

.line-app-step-line {
  border-color: #c8ead0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fff9 100%);
}

.line-app-step-app {
  border-color: #ffd8ac;
  background: linear-gradient(180deg, #ffffff 0%, #fff9f1 100%);
}

.line-app-step-copy {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-width: 0;
}

.line-app-step-number {
  display: grid;
  width: 30px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
}

.line-app-step-line .line-app-step-number {
  background: #16a34a;
}

.line-app-step-app .line-app-step-number {
  background: var(--warning);
}

.line-app-step h3 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
}

.line-app-step p {
  color: var(--muted);
  line-height: 1.55;
}

.line-app-mini-note {
  margin-top: 6px;
  border-left: 3px solid #16a34a;
  padding-left: 9px;
  color: #166534 !important;
  font-weight: 700;
}

.line-app-visual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.line-app-chatbar {
  display: grid;
  grid-template-columns: 24px 24px minmax(54px, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 1px solid #d9e1eb;
  border-radius: 999px;
  background: #ffffff;
  padding: 6px 8px;
  box-shadow: 0 8px 18px rgba(31, 41, 55, 0.06);
}

.line-app-chatbar span {
  display: grid;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #edf2f7;
  color: #607084;
  font-size: 13px;
  font-weight: 700;
}

.line-app-chatbar .line-app-link-icon {
  border: 2px solid #16a34a;
  background: #f0fdf4;
  color: #16a34a;
  font-size: 16px;
}

.line-app-chatbar i {
  display: block;
  min-width: 0;
  height: 9px;
  border-radius: 999px;
  background: #e6edf5;
}

.line-app-phone {
  display: grid;
  gap: 6px;
  width: 82px;
  min-height: 128px;
  border: 5px solid #172033;
  border-radius: 16px;
  background: #ffffff;
  padding: 8px;
  box-shadow: 0 10px 18px rgba(31, 41, 55, 0.13);
}

.line-app-phone b {
  color: #06c755;
  font-size: 11px;
  line-height: 1.2;
}

.line-app-phone span {
  display: block;
  height: 16px;
  border-radius: 999px;
  background: #e8eef5;
}

.line-app-phone span:nth-child(3) {
  width: 70%;
}

.line-app-phone span:nth-child(4) {
  width: 82%;
}

.line-app-phone-app b {
  color: var(--accent);
}

.line-app-phone-app span {
  height: 16px;
  border-radius: 5px;
  background: linear-gradient(90deg, #e7f0f8 0%, #f7fbff 100%);
}

.best-estate-icon {
  display: grid;
  gap: 8px;
  justify-items: center;
  min-width: 76px;
  border: 1px solid #d9e1eb;
  border-radius: 14px;
  background: #ffffff;
  padding: 11px 8px;
  box-shadow: 0 8px 18px rgba(31, 41, 55, 0.06);
}

.best-estate-icon span {
  position: relative;
  width: 44px;
  height: 32px;
}

.best-estate-icon span::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 0;
  height: 24px;
  border-radius: 4px;
  background: #e7f0f8;
  border: 2px solid #0a84ff;
}

.best-estate-icon span::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  width: 28px;
  height: 28px;
  border-left: 4px solid var(--warning);
  border-top: 4px solid var(--warning);
  transform: rotate(45deg);
}

.best-estate-icon b {
  color: var(--accent);
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

.line-app-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}

.line-app-download-btn {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 8px 16px;
  color: #ffffff !important;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
}

.line-app-download-ios {
  background: #111827;
}

.line-app-download-android {
  background: #15803d;
}

.link-button {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff !important;
  padding: 8px 16px;
  text-decoration: none;
}

.priority-grid {
  display: grid;
  gap: 8px;
}

.priority-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 8px;
}

.priority-rank {
  display: grid;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: #e8f7f4;
  color: var(--accent-2);
  font-weight: 600;
}

.condition-builder {
  display: grid;
  gap: 16px;
}

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

.search-filter-section {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid #e6e9ee;
  border-radius: 12px;
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 6px 16px rgba(31, 41, 55, 0.05);
}

.search-filter-section-wide {
  grid-column: 1 / -1;
}

.search-filter-section h3 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  align-self: start;
  width: fit-content;
  max-width: 100%;
  min-height: 32px;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: #fff3e8;
  box-shadow: none;
  padding: 5px 11px;
  color: #b45309;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
}

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

.search-filter-single {
  grid-template-columns: minmax(0, 180px) auto;
  justify-content: start;
}

.search-filter-range b,
.search-filter-single b {
  color: #a34812;
  font-size: 14px;
}

.search-filter-range input,
.search-filter-range select,
.search-filter-single input,
.search-filter-single select,
.search-filter-section > input {
  border-color: #f3d2ab;
  background: #fffdfb;
}

.search-filter-range input:focus,
.search-filter-range select:focus,
.search-filter-single input:focus,
.search-filter-single select:focus,
.search-filter-section > input:focus {
  outline-color: rgba(246, 159, 72, 0.22);
  border-color: var(--warning);
}

.search-filter-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 8px;
}

.search-filter-options-photo {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.search-filter-section-floor,
.search-filter-section-compass {
  background: #fffdf9;
}

.floor-guide {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid #f5d1ac;
  border-radius: 8px;
  background: #fff7ed;
}

.floor-building {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  width: 78px;
  min-height: 100px;
  align-content: end;
  padding: 11px 9px 9px;
  border: 2px solid #d67224;
  border-bottom-width: 6px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #ffe6c8 0%, #fff8ef 100%);
  box-shadow: inset 0 8px 0 rgba(255, 255, 255, 0.45);
}

.floor-building span {
  height: 15px;
  border: 1px solid #f0a35a;
  border-radius: 3px;
  background: #ffffff;
}

.floor-guide-labels {
  display: grid;
  gap: 8px;
}

.floor-guide-option {
  min-height: 32px;
  border-left: 4px solid var(--warning);
  border-radius: 6px;
  background: #ffffff;
  color: #8f3f10;
  padding: 8px;
  font-size: 13px;
  font-weight: 600;
}

.search-filter-options-floor {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.search-filter-option-floor {
  min-height: 52px;
  justify-content: flex-start;
  font-weight: 600;
}

.compass-guide {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid #f5d1ac;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff7ed 0%, #fffdfb 100%);
}

.compass-rose {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 0 auto;
  border: 2px solid var(--warning);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 49%, rgba(255, 135, 50, 0.35) 50%, transparent 51%),
    linear-gradient(0deg, transparent 49%, rgba(255, 135, 50, 0.35) 50%, transparent 51%),
    #ffffff;
  box-shadow: 0 8px 18px rgba(255, 126, 42, 0.16);
}

.compass-rose span {
  position: absolute;
  color: #a34812;
  font-size: 12px;
  font-weight: 700;
}

.compass-n {
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
}

.compass-e {
  top: 50%;
  right: 9px;
  transform: translateY(-50%);
}

.compass-s {
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
}

.compass-w {
  top: 50%;
  left: 9px;
  transform: translateY(-50%);
}

.compass-needle {
  top: 50%;
  left: 50%;
  width: 8px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--warning) 0 50%, #0a84ff 50% 100%);
  transform: translate(-50%, -50%) rotate(25deg);
  transform-origin: center;
}

.compass-sun {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 48px;
  min-height: 24px;
  border: 1px solid #ffd39f;
  border-radius: 999px;
  background: #fff8ed;
  color: #a34812;
  font-size: 11px !important;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(255, 126, 42, 0.14);
}

.compass-sun::before {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffb24a;
  box-shadow: 0 0 0 3px rgba(255, 178, 74, 0.2);
}

.compass-sunrise {
  top: 50%;
  right: -58px;
  transform: translateY(-50%);
}

.compass-sunset {
  top: 50%;
  left: -58px;
  transform: translateY(-50%);
}

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

.search-filter-options-compass {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.search-filter-option-compass {
  min-height: 62px;
  justify-content: flex-start;
}

.search-filter-option-compass[data-option="南"],
.search-filter-option-compass[data-option="南東"],
.search-filter-option-compass[data-option="南西"] {
  border-color: #ffb15f;
  background: #fff3e4;
}

.search-filter-option-compass b {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.search-filter-option-compass em {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 999px;
  background: var(--warning);
  color: #ffffff;
  padding: 2px 7px;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
}

.search-filter-option {
  min-height: 40px;
  border-color: #f5d1ac;
  background: #fffdfb;
  padding: 8px;
}

.search-filter-option-photo {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 8px;
  min-height: 196px;
  padding: 9px;
}

.option-photo {
  width: 100%;
  height: 140px;
  border: 1px solid #ffd0a6;
  border-radius: 7px;
  object-fit: contain;
  background: #fff7ed;
}

.search-filter-choice-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.search-filter-choice-line > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.search-filter-choice-line b {
  color: inherit;
  font-size: 13px;
  line-height: 1.25;
}

.search-filter-choice-line small {
  color: #7d5f4b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.search-filter-note {
  border-left: 3px solid var(--warning);
  border-radius: 7px;
  background: #fff3e8;
  color: #8f3f10;
  padding: 8px;
  font-size: 13px;
  line-height: 1.55;
}

/* 欄位型 section（面積／築年／徒歩）：強制直向堆疊，提示永遠在欄位下面、不重疊 */
.search-filter-section:has(.search-filter-range),
.search-filter-section:has(.search-filter-single) {
  display: block !important;
}
.search-filter-section:has(.search-filter-range) > h3,
.search-filter-section:has(.search-filter-single) > h3 {
  margin-bottom: 10px;
}
.search-filter-section:has(.search-filter-range) .search-filter-note,
.search-filter-section:has(.search-filter-single) .search-filter-note {
  display: block;
  width: 100%;
  margin-top: 10px;
}

/* === 語意顏色 === */
/* 租期對應「租期與費用時間點」時間軸：1年內=橙 / 2年=藍 / 2年以後=綠 */
.option-duration[data-option="一年"]::before,
.option-duration[data-option="1 year"]::before,
.option-duration[data-option="兩年"]::before,
.option-duration[data-option="2 years"]::before {
  background: #93a4b8 !important;
  box-shadow: 0 0 0 1px #cbd8e5 !important;
}
.option-duration[data-option="半年"]:has(input:checked),
.option-duration[data-option="一年"]:has(input:checked),
.option-duration[data-option="一年半"]:has(input:checked),
.option-duration[data-option="6 months"]:has(input:checked),
.option-duration[data-option="1 year"]:has(input:checked),
.option-duration[data-option="1.5 years"]:has(input:checked) {
  background: #fff3e3 !important;
  color: #b5651d !important;
  box-shadow: inset 0 0 0 2px #f0962a !important;
}
.option-duration[data-option="兩年"]:has(input:checked),
.option-duration[data-option="2 years"]:has(input:checked) {
  background: #eaf3ff !important;
  color: #0a6ed1 !important;
  box-shadow: inset 0 0 0 2px #0a84ff !important;
}
.option-duration[data-option="兩年半"]:has(input:checked),
.option-duration[data-option="三年"]:has(input:checked),
.option-duration[data-option="三年半"]:has(input:checked),
.option-duration[data-option="四年"]:has(input:checked),
.option-duration[data-option="2.5 years"]:has(input:checked),
.option-duration[data-option="3 years"]:has(input:checked),
.option-duration[data-option="3.5 years"]:has(input:checked),
.option-duration[data-option="4 years"]:has(input:checked) {
  background: #e9faf0 !important;
  color: #1f8f4e !important;
  box-shadow: inset 0 0 0 2px #34a853 !important;
}
/* 是 = 綠 / 不是 = 紅（body:has 前綴提高特異度蓋過 gtn-apple !important） */
body:has(.app-shell) .option[data-option="是"]:has(input:checked),
body:has(.app-shell) .option[data-option="Yes"]:has(input:checked) {
  border-color: #34a853 !important;
  background: #eafaf0 !important;
}
.option[data-option="是"] input,
.option[data-option="Yes"] input { accent-color: #34a853 !important; }
body:has(.app-shell) .option[data-option="不是"]:has(input:checked),
body:has(.app-shell) .option[data-option="No"]:has(input:checked) {
  border-color: #e5484d !important;
  background: #fdecec !important;
}
.option[data-option="不是"] input,
.option[data-option="No"] input { accent-color: #e5484d !important; }
/* COE：已持有有效簽證/在留卡 = 綠（已可放心狀態） */
body:has(.app-shell) .option[data-option*="已持有有效簽證"]:has(input:checked),
body:has(.app-shell) .option[data-option*="已取得 COE"]:has(input:checked),
body:has(.app-shell) .option[data-option*="valid visa"]:has(input:checked),
body:has(.app-shell) .option[data-option*="residence card"]:has(input:checked),
body:has(.app-shell) .option[data-option*="COE already issued"]:has(input:checked) {
  border-color: #34a853 !important;
  background: #eafaf0 !important;
}
.option[data-option*="已持有有效簽證"] input,
.option[data-option*="已取得 COE"] input,
.option[data-option*="valid visa"] input,
.option[data-option*="residence card"] input,
.option[data-option*="COE already issued"] input { accent-color: #34a853 !important; }

/* 摘要區：隱藏冗餘外層標題（保留「客人回答摘要」卡） */
/* 客人回答摘要面板：整個唔顯示（textarea 仍在 DOM·display:none 照樣提交去 Google Sheet） */
.summary-panel { display: none !important; }

/* === 沿線・駅 選擇器 === */
.line-selector { display: grid; gap: 12px; }
.ls-selected { display: flex; flex-wrap: wrap; gap: 8px; min-height: 20px; }
.ls-selected.is-empty { color: #94a3b8; font-size: 13px; align-items: center; }
.ls-chip { display: inline-flex; align-items: center; gap: 6px; background: #fff3e8; border: 1px solid #ffd0a6; border-radius: 999px; padding: 5px 6px 5px 12px; font-size: 13px; }
.ls-chip b { font-weight: 700; color: #a34812; }
.ls-chip i { font-style: normal; color: #8f6b50; opacity: .8; font-size: 11px; }
.ls-chip button { border: none; background: rgba(0,0,0,.08); color: #6b4a2f; width: 18px; height: 18px; border-radius: 50%; cursor: pointer; font-size: 13px; line-height: 1; }
.ls-regions, .ls-prefs { display: flex; flex-wrap: wrap; gap: 6px; }
.ls-prefs { padding-top: 8px; border-top: 1px dashed #ececec; }
.ls-region-btn, .ls-pref-btn { border: 1.5px solid #e2e8f0; background: #fff; border-radius: 999px; padding: 6px 13px; font-size: 13px; cursor: pointer; color: #334155; }
.ls-region-btn:hover, .ls-pref-btn:hover { border-color: #ffb26b; }
.ls-region-btn.active { background: #ff7e2a; border-color: #ff7e2a; color: #fff; font-weight: 600; }
.ls-pref-btn.active { background: #fff3e8; border-color: #ff9d4d; color: #a34812; font-weight: 600; }
.ls-pref-btn em { font-style: normal; background: #ff7e2a; color: #fff; border-radius: 999px; padding: 0 6px; font-size: 11px; margin-left: 3px; }
.ls-lines { display: grid; gap: 14px; }
.ls-group-title { font-size: 12.5px; font-weight: 700; color: #64748b; margin-bottom: 6px; }
.ls-search-row { margin-bottom: 2px; }
.ls-search { width: 100%; box-sizing: border-box; border: 1.5px solid #ffd0a6; border-radius: 9px; padding: 9px 12px; font-size: 14px; background: #fffdfb; outline: none; }
.ls-search:focus { border-color: #ff7e2a; }
.ls-line-meta { display: block; font-size: 11px; font-weight: 400; color: #94a3b8; margin-top: 1px; }
.ls-search-empty { font-size: 13px; color: #94a3b8; margin: 4px 2px; }
.ls-line-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.ls-line { display: flex; align-items: center; gap: 7px; border: 1px solid #e2e8f0; border-radius: 8px; padding: 7px 10px; font-size: 13px; cursor: pointer; background: #fff; }
.ls-line.checked { border-color: #ff7e2a; background: #fff6ee; font-weight: 600; }
.ls-line input { accent-color: #ff7e2a; flex: 0 0 auto; }
.ls-line-item { min-width: 0; }
.ls-line-item.expanded { grid-column: 1 / -1; border: 1px solid #ffd0a6; border-radius: 10px; padding: 8px; background: #fffaf4; }
.ls-line-item.expanded .ls-line { border-color: #ff7e2a; background: #fff6ee; font-weight: 600; }
.ls-stations { margin-top: 8px; padding-left: 2px; }
.ls-st-label { font-size: 11.5px; color: #94a3b8; display: block; margin-bottom: 5px; }
.ls-st-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ls-st-chip { border: 1px solid #e2e8f0; background: #fff; border-radius: 999px; padding: 4px 11px; font-size: 12px; cursor: pointer; color: #475569; }
.ls-st-chip:hover { border-color: #ffb26b; }
.ls-st-chip.on { background: #ff7e2a; border-color: #ff7e2a; color: #fff; font-weight: 600; }
@media (max-width: 560px) { .ls-line-grid { grid-template-columns: 1fr 1fr; } }

/* === 收合式篩選掣（所在地／路線共用） === */
.collapsible-filter { display: block; }
.cf-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; border: 1.5px solid #ff7e2a; background: #fff; color: #c85a17; border-radius: 10px; padding: 11px 16px; font-size: 14.5px; font-weight: 700; cursor: pointer; box-sizing: border-box; transition: background .15s, color .15s; }
.cf-toggle:hover { background: #fff3e8; }
.cf-toggle .cf-chevron { font-size: 12px; transition: transform .2s; opacity: .85; }
.collapsible-filter.is-open .cf-toggle { background: #ff7e2a; color: #fff; border-color: #ff7e2a; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.collapsible-filter.is-open .cf-chevron { transform: rotate(180deg); }
.cf-panel { display: none; }
.collapsible-filter.is-open .cf-panel { display: grid; gap: 12px; border: 1.5px solid #ff7e2a; border-top: none; border-radius: 0 0 10px 10px; padding: 14px; background: #fffdfb; }

/* === 所在地選擇（SUUMO 式 都道府県→市区町村） === */
.area-selector { display: grid; gap: 10px; }
.area-text-row input { width: 100%; box-sizing: border-box; border: 1px solid #f3d2ab; border-radius: 8px; padding: 9px 12px; font-size: 14px; background: #fffdfb; outline: none; }
.area-text-row input:focus { border-color: #ff7e2a; }
.as-selected { display: flex; flex-wrap: wrap; gap: 8px; min-height: 20px; }
.as-selected.is-empty { color: #94a3b8; font-size: 13px; align-items: center; }
.as-chip { display: inline-flex; align-items: center; gap: 6px; background: #fff3e8; border: 1px solid #ffd0a6; border-radius: 999px; padding: 5px 6px 5px 12px; font-size: 13px; }
.as-chip b { font-weight: 700; color: #a34812; }
.as-chip i { font-style: normal; color: #8f6b50; opacity: .85; font-size: 11.5px; }
.as-chip button { border: none; background: rgba(0,0,0,.08); color: #6b4a2f; width: 18px; height: 18px; border-radius: 50%; cursor: pointer; font-size: 13px; line-height: 1; }
.as-regions, .as-prefs { display: flex; flex-wrap: wrap; gap: 6px; }
.as-prefs { padding-top: 10px; border-top: 1px dashed #ececec; }
.as-region-btn, .as-pref-btn { border: 1.5px solid #e2e8f0; background: #fff; border-radius: 999px; padding: 6px 13px; font-size: 13px; cursor: pointer; color: #334155; }
.as-region-btn:hover, .as-pref-btn:hover { border-color: #ffb26b; }
.as-region-btn.active { background: #ff7e2a; border-color: #ff7e2a; color: #fff; font-weight: 600; }
.as-pref-btn.active { background: #fff3e8; border-color: #ff9d4d; color: #a34812; font-weight: 600; }
.as-pref-btn em { font-style: normal; background: #ff7e2a; color: #fff; border-radius: 999px; padding: 0 6px; font-size: 11px; margin-left: 3px; }
.as-filter-row { padding-top: 10px; border-top: 1px dashed #ececec; }
.as-filter { width: 100%; box-sizing: border-box; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 12px; font-size: 13.5px; background: #fff; outline: none; }
.as-filter:focus { border-color: #ff7e2a; }
.as-cities { display: grid; gap: 8px; max-height: 300px; overflow-y: auto; padding: 2px; }
.as-city-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.as-city-item { min-width: 0; }
.as-city-item.expanded { grid-column: 1 / -1; border: 1px solid #ffd0a6; border-radius: 10px; padding: 8px; background: #fffaf4; }
.as-city { display: flex; align-items: center; gap: 7px; border: 1px solid #e2e8f0; border-radius: 8px; padding: 7px 10px; font-size: 13px; cursor: pointer; background: #fff; }
.as-city-item .as-city { width: 100%; }
.as-city.checked { border-color: #ff7e2a; background: #fff6ee; font-weight: 600; color: #a34812; }
.as-city input { accent-color: #ff7e2a; flex: 0 0 auto; }
.as-whole { background: #fffaf4; border: 1.5px dashed #ffc089; font-weight: 600; }
.as-whole.checked { border-style: solid; }
.as-empty-note { font-size: 12.5px; color: #94a3b8; margin: 0; }
.as-towns { margin-top: 8px; padding-left: 2px; }
.as-town-label { font-size: 11.5px; color: #94a3b8; display: block; margin-bottom: 6px; }
.as-town-chips { display: flex; flex-wrap: wrap; gap: 5px; max-height: 180px; overflow-y: auto; }
.as-town-chip { border: 1px solid #e2e8f0; background: #fff; border-radius: 999px; padding: 4px 11px; font-size: 12px; cursor: pointer; color: #475569; }
.as-town-chip:hover { border-color: #ffb26b; }
.as-town-chip.on { background: #ff7e2a; border-color: #ff7e2a; color: #fff; font-weight: 600; }
.as-town-loading, .as-town-empty { font-size: 12px; color: #94a3b8; }
/* 預設展開嘅選擇器框（取代摺疊）+ 搜尋結果縣份標籤 */
.as-panel, .ls-panel { border: 1.5px solid #ffd0a6; border-radius: 12px; padding: 14px; background: #fffdfb; display: grid; gap: 12px; }
.as-city-meta { display: block; font-size: 11px; font-weight: 400; color: #94a3b8; margin-top: 1px; }

/* 通勤區間 從…到… 下拉（路線選擇器內） */
.ls-route { margin-top: 8px; padding-left: 2px; }
.ls-route-sels { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.ls-route-select { flex: 1; min-width: 0; border: 1px solid #e2e8f0; border-radius: 8px; padding: 7px 10px; font-size: 13px; background: #fff; color: #334155; outline: none; }
.ls-route-select:focus { border-color: #ff7e2a; }
.ls-route-arrow { color: #ff7e2a; font-weight: 700; flex: 0 0 auto; }

/* 是/否 兩卡（人在日本／人在海外） */
.yesno-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.yns-card { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 14px; cursor: pointer; background: #fff; transition: border-color .15s, background .15s, box-shadow .15s; }
.yns-card input { margin-top: 3px; flex: 0 0 auto; }
.yns-body strong { display: block; font-size: 15.5px; margin-bottom: 4px; }
.yns-body p { font-size: 12.5px; line-height: 1.55; color: #64748b; margin: 0; }
.yns-yes { border-color: #bfe3cc; background: #f5fbf7; }
.yns-yes .yns-body strong { color: #1e8e4a; }
.yns-yes input { accent-color: #1e8e4a; }
.yns-yes.checked { border-color: #1e8e4a; background: #e4f6ea; box-shadow: inset 0 0 0 1.5px #1e8e4a; }
.yns-no { border-color: #f2cfcf; background: #fdf5f5; }
.yns-no .yns-body strong { color: #d23b3b; }
.yns-no input { accent-color: #d23b3b; }
.yns-no.checked { border-color: #d23b3b; background: #fbe6e6; box-shadow: inset 0 0 0 1.5px #d23b3b; }
@media (max-width: 560px) { .yesno-split { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .as-city-grid { grid-template-columns: 1fr 1fr; } }

.search-filter-option input {
  flex: 0 0 auto;
  accent-color: var(--warning);
}

.search-filter-option span {
  line-height: 1.35;
}

.search-filter-option:hover,
.search-filter-option:focus-within {
  border-color: var(--warning);
  background: #fff7ed;
}

.search-filter-option:has(input:checked) {
  border-color: var(--warning);
  background: #fff0e2;
  color: #8f3f10;
}

.search-filter-intro-card {
  grid-column: 1 / -1;
  justify-self: end;
  display: grid;
  gap: 4px;
  width: min(360px, 100%);
  border: 1px solid #ffd7b0;
  border-radius: 18px;
  background: #fff8ef;
  padding: 16px;
  box-shadow: 0 10px 22px rgba(255, 126, 42, 0.08);
}

.search-filter-intro-card strong {
  color: #9a4312;
  font-size: 15px;
}

.search-filter-intro-card p {
  color: #795c46;
  line-height: 1.55;
}

.search-filter-section-layout-cards,
.search-filter-section-structure-cards,
.search-filter-section-floor-cards {
  gap: 16px;
  border-color: #f5d7bb;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #fffaf5 100%);
  padding: 24px;
  box-shadow: 0 14px 32px rgba(31, 41, 55, 0.06);
}

.search-filter-section-layout-cards h3,
.search-filter-section-structure-cards h3,
.search-filter-section-floor-cards h3 {
  border-radius: 999px;
  background: #fff0e2;
  box-shadow: none;
  color: #9a4312;
  text-shadow: none;
}

.visual-choice-wrap {
  display: grid;
  gap: 8px;
}

.visual-choice-grid {
  display: grid;
  gap: 16px;
  align-items: stretch;
}

.visual-choice-grid-layout-cards,
.visual-choice-grid-structure-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.visual-choice-grid-floor-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.visual-choice-grid-plan-cards {
  grid-template-columns: 1fr;
}

.visual-card-illustration[class*="plan"] {
  min-height: 150px;
}

.visual-card-illustration[class*="plan"] svg {
  width: 100%;
  height: 100%;
  min-height: 150px;
  display: block;
}

/* 相片縮圖網格（全部顯示·無滑動·撳放大） */
.plan-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.plan-photo { position: relative; border: none; padding: 0; margin: 0; background: #eef1f4; border-radius: 10px; overflow: hidden; cursor: zoom-in; aspect-ratio: 4 / 3; }
.plan-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.plan-photo::after { content: "🔍"; position: absolute; right: 5px; bottom: 5px; font-size: 11px; line-height: 1; background: rgba(0,0,0,.5); color: #fff; border-radius: 6px; padding: 2px 5px; opacity: 0; transition: opacity .15s; }
.plan-photo:hover::after, .plan-photo:focus-visible::after { opacity: 1; }
@media (max-width: 480px) { .plan-photos { grid-template-columns: repeat(2, 1fr); } }

.plan-carousel {
  position: relative;
  z-index: 4;
  width: 100%;
  height: 420px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #ffe0bf;
  background: #eef1f4;
}

.plan-carousel-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overflow-anchor: none;
  -webkit-overflow-scrolling: touch;
}

.plan-carousel-track::-webkit-scrollbar {
  display: none;
}

.plan-carousel-img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  scroll-snap-align: start;
  display: block;
}

.plan-carousel-zoom {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  z-index: 6;
}

.plan-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
}

.plan-lightbox-track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overflow-anchor: none;
  -webkit-overflow-scrolling: touch;
}

.plan-lightbox-track::-webkit-scrollbar {
  display: none;
}

.plan-lightbox-img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  scroll-snap-align: center;
}

.plan-lightbox-close {
  position: fixed;
  top: 12px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.plan-lightbox-counter {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: #ffffff;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.45);
  padding: 4px 12px;
  border-radius: 999px;
  z-index: 2;
}

.plan-lightbox-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.plan-lightbox-prev {
  left: 12px;
}

.plan-lightbox-next {
  right: 12px;
}

.intro-hook {
  font-size: 15px;
  line-height: 1.7;
  color: #2a3340;
  background: linear-gradient(135deg, rgba(255, 135, 50, 0.12), rgba(255, 198, 128, 0.1));
  border-left: 4px solid #ff7e2a;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 4px 0 16px;
}

.intro-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.intro-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  border: 1px solid #ffe0bf;
  border-radius: 14px;
  background: #fffdfa;
  padding: 14px;
}

.intro-card-ic {
  font-size: 24px;
  line-height: 1;
}

.intro-card b {
  font-size: 15px;
  color: #172033;
}

.intro-card small {
  font-size: 13px;
  color: #5b6470;
  line-height: 1.55;
}

.intro-more {
  border: 1px solid #e6ebf1;
  border-radius: 12px;
  background: #fbfcfd;
  padding: 2px 14px;
}

.intro-more summary {
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: #475569;
  padding: 11px 0;
  list-style: none;
}

.intro-more summary::-webkit-details-marker {
  display: none;
}

.intro-more summary::before {
  content: "＋ ";
  color: #ff7e2a;
  font-weight: 700;
}

.intro-more[open] summary::before {
  content: "－ ";
}

.intro-more p {
  font-size: 13px;
  color: #5b6470;
  line-height: 1.6;
  margin: 6px 0;
}

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

.condition-v3 .cb-label { font-weight: 700; font-size: 15px; margin: 0 0 4px; color: #172033; }
.condition-v3 .cb-hint { font-size: 13px; color: #94a3b8; margin-bottom: 14px; }
.condition-v3 .cb-group { margin-bottom: 16px; }
.condition-v3 .cb-group-title { font-size: 12.5px; color: #64748b; font-weight: 600; margin-bottom: 8px; }
.condition-v3 .cb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.condition-v3 .cb-chip { border: 1.5px solid #e2e8f0; background: #fff; border-radius: 999px; padding: 8px 16px; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: #1f2933; transition: all .15s; }
.condition-v3 .cb-chip:hover { border-color: #ffb26b; }
.condition-v3 .cb-chip.selected { background: #ff7e2a; border-color: #ff7e2a; color: #fff; }
.condition-v3 .cb-chip .cb-check { font-size: 12px; opacity: 0; }
.condition-v3 .cb-chip.selected .cb-check { opacity: 1; }
.condition-v3 .cb-custom-row { display: flex; gap: 8px; }
.condition-v3 .cb-custom-row input { flex: 1; border: 1.5px solid #e2e8f0; border-radius: 999px; padding: 8px 16px; font-size: 14px; outline: none; }
.condition-v3 .cb-custom-row input:focus { border-color: #ffb26b; }
.condition-v3 .cb-add-btn { border: 1.5px solid #ff7e2a; background: #fff; color: #ff7e2a; border-radius: 999px; padding: 8px 18px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all .15s; }
.condition-v3 .cb-add-btn:hover { background: #ff7e2a; color: #fff; }
.condition-v3 .cb-priority-box { margin-top: 24px; padding-top: 20px; border-top: 1px solid #eef2f6; }
.condition-v3 .cb-empty { color: #94a3b8; font-size: 14px; padding: 20px; text-align: center; background: #f8fafc; border-radius: 10px; border: 1px dashed #e2e8f0; }
.condition-v3 .cb-pitem { display: flex; align-items: center; gap: 10px; background: #fff; border: 1.5px solid #e8edf2; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; cursor: grab; }
.condition-v3 .cb-pitem.cb-dragging { opacity: .5; }
.condition-v3 .cb-handle { color: #cbd5e1; font-size: 16px; }
.condition-v3 .cb-rank { background: #fff3e8; color: #ff7e2a; font-weight: 700; width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.condition-v3 .cb-pname { flex: 1; font-size: 14.5px; font-weight: 500; color: #1f2933; }
.condition-v3 .cb-ctag { font-size: 11px; color: #ff7e2a; background: #fff3e8; padding: 2px 7px; border-radius: 6px; margin-left: 6px; font-weight: 600; }
.condition-v3 .cb-must-btn { border: 1.5px solid #e2e8f0; background: #fff; color: #94a3b8; border-radius: 8px; padding: 5px 12px; font-size: 12.5px; cursor: pointer; white-space: nowrap; transition: all .15s; }
.condition-v3 .cb-must-btn.on { background: #fff1f2; border-color: #fda4af; color: #e11d48; font-weight: 600; }
.condition-v3 .cb-remove { color: #cbd5e1; cursor: pointer; font-size: 18px; }
.condition-v3 .cb-remove:hover { color: #94a3b8; }

.plan-carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}

.plan-carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.45);
  transition: width 0.2s ease;
}

.plan-carousel-dot.is-active {
  width: 16px;
  border-radius: 3px;
  background: #ffffff;
}

.plan-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: #172033;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  z-index: 5;
}

.plan-carousel-prev {
  left: 8px;
}

.plan-carousel-next {
  right: 8px;
}

.visual-choice-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  min-width: 0;
  min-height: 264px;
  border: 1px solid #dfe6ee;
  border-radius: 22px;
  background: #ffffff;
  padding: 16px;
  color: #172033;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(31, 41, 55, 0.06);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.visual-choice-card:hover,
.visual-choice-card:focus-within {
  transform: translateY(-2px);
  border-color: #ffb26b;
  box-shadow: 0 16px 32px rgba(255, 126, 42, 0.12);
}

.visual-choice-card input {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0;
  cursor: pointer;
}

.visual-choice-card:has(input:checked) {
  border-color: var(--warning);
  background: #fff3e8;
  box-shadow: 0 18px 34px rgba(255, 126, 42, 0.16);
}

.visual-card-illustration {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 112px;
  overflow: hidden;
  border: 1px solid #ffe0bf;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 135, 50, 0.1) 0%, rgba(255, 255, 255, 0.85) 52%, rgba(255, 198, 128, 0.12) 100%),
    #fffdfb;
}

.visual-card-illustration i {
  display: block;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #f4c89f;
}

.visual-card-illustration[class*="layout"] {
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
  padding: 16px;
}

.visual-card-illustration[class*="layout"] i:nth-child(1) {
  grid-column: 1 / 4;
  grid-row: 1 / 3;
  background: #fff6ed;
}

.visual-card-illustration[class*="layout"] i:nth-child(2) {
  grid-column: 4;
  grid-row: 1 / 3;
  background: #eaf4ff;
}

.visual-card-illustration[class*="layout"] i:nth-child(3) {
  grid-column: 1 / 3;
  grid-row: 3;
}

.visual-card-illustration[class*="layout"] i:nth-child(4) {
  grid-column: 3 / 5;
  grid-row: 3;
  background: #fff1df;
}

.visual-card-illustration-layout-1r i:nth-child(n + 2),
.visual-card-illustration-layout-other i:nth-child(n + 2) {
  opacity: 0.28;
}

.visual-card-illustration-layout-1k i:nth-child(2),
.visual-card-illustration-layout-1dk i:nth-child(4),
.visual-card-illustration-layout-1ldk i:nth-child(1),
.visual-card-illustration-layout-2dk i:nth-child(3),
.visual-card-illustration-layout-2ldk i:nth-child(4),
.visual-card-illustration-layout-3dk i:nth-child(2) {
  background: #ffd7ad;
}

.visual-card-illustration[class*="structure"] {
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 8px;
  align-content: end;
  padding: 16px;
}

.visual-card-illustration[class*="structure"] i {
  min-height: 16px;
}

.visual-card-illustration-structure-wood i {
  background: #fff2df;
  box-shadow: inset 0 0 0 1px #e0a15e;
}

.visual-card-illustration-structure-steel i {
  background: #edf4fb;
  box-shadow: inset 0 0 0 1px #9eb6cb;
}

.visual-card-illustration-structure-rc i {
  background: #e7eef5;
  box-shadow: inset 0 0 0 1px #7892a9;
}

.visual-card-illustration-structure-other i {
  background: #f7f7f4;
}

.visual-card-illustration[class*="floor"] {
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 8px;
  align-content: end;
  padding: 13px;
}

.visual-card-illustration[class*="floor"] i {
  min-height: 17px;
  background: #f7fbff;
}

.visual-card-illustration-floor-top i:nth-child(-n + 4),
.visual-card-illustration-floor-upper i:nth-child(n + 5):nth-child(-n + 12),
.visual-card-illustration-floor-first i:nth-child(n + 13) {
  background: #ffd7ad;
  box-shadow: inset 0 0 0 1px #f29a4a;
}

.visual-choice-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding-bottom: 30px;
}

.visual-choice-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.visual-choice-title b {
  color: #122238;
  font-size: 18px;
  line-height: 1.25;
}

.visual-choice-title em {
  flex: 0 0 auto;
  max-width: 112px;
  border-radius: 999px;
  background: var(--warning);
  color: #ffffff;
  padding: 4px 8px;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.visual-choice-copy small {
  color: #5d7187;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.visual-choice-copy ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.visual-choice-copy li {
  display: flex;
  gap: 6px;
  color: #40546b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.visual-choice-copy li::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-top: 7px;
  border-radius: 999px;
  background: #ffb26b;
}

.visual-choice-rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  border-radius: 999px;
  background: #fff0e2;
  color: #8f3f10;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

.visual-choice-rating b {
  color: #f59e0b;
  letter-spacing: 0;
}

.visual-choice-dot {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 1;
  width: 22px;
  height: 24px;
  border: 2px solid #c5d1dd;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: inset 0 0 0 4px #ffffff;
}

.visual-choice-card:has(input:checked) .visual-choice-dot {
  border-color: var(--warning);
  background: var(--warning);
  box-shadow: inset 0 0 0 5px #ffffff;
}

/* R/K/D/L 字母解釋 legend */
.layout-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; padding: 9px 12px; background: #fff6ec; border: 1px solid #ffe0c2; border-radius: 10px; font-size: 12.5px; color: #6b5640; }
.layout-legend .ll-item { display: inline-flex; align-items: center; gap: 5px; }
.layout-legend .ll-item b { display: inline-grid; place-items: center; width: 19px; height: 19px; border-radius: 5px; background: #ff7e2a; color: #fff; font-size: 11.5px; }
.layout-legend .ll-eg { color: #97795c; }

/* 更多房型：chip 撳一下先展開格局圖 */
.layout-more { margin-top: 12px; padding-top: 12px; border-top: 1px dashed #e6e9ee; }
.layout-more-label { display: block; font-size: 12.5px; color: #64748b; margin-bottom: 10px; }
/* 全部房型細卡，直接顯示格局圖（不收埋） */
.layout-mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; align-items: stretch; }
.layout-mini { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 10px 14px; border: 1px solid #dfe6ee; border-radius: 14px; background: #fff; cursor: pointer; transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease; }
.layout-mini:hover, .layout-mini:focus-within { transform: translateY(-2px); border-color: #ffb26b; box-shadow: 0 10px 22px rgba(255, 126, 42, 0.12); }
.layout-mini input { position: absolute; inset: 0; z-index: 3; opacity: 0; cursor: pointer; }
.layout-mini:has(input:checked) { border-color: var(--warning); background: #fff3e8; box-shadow: 0 12px 26px rgba(255, 126, 42, 0.16); }
.layout-mini-plan { display: flex; justify-content: center; align-items: center; min-height: 100px; }
.layout-mini-plan svg { width: 76px; height: auto; display: block; }
.layout-mini-name { font-size: 14px; font-weight: 700; color: #1f2937; }
.layout-mini .visual-choice-dot { right: 9px; bottom: 9px; width: 18px; height: 18px; }
.layout-mini:has(input:checked) .visual-choice-dot { border-color: var(--warning); background: var(--warning); box-shadow: inset 0 0 0 4px #fff; }
.layout-mini.is-other .layout-mini-plan svg { width: 48px; opacity: 0.7; }
@media (max-width: 560px) { .layout-mini-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); } .layout-mini-plan svg { width: 66px; } }

.visual-section-tip {
  margin: 0;
  border: 1px solid #ffd7b0;
  border-radius: 16px;
  background: #fff8ef;
  color: #79513a;
  padding: 16px;
  line-height: 1.6;
}

.visual-section-tip strong {
  color: #9a4312;
  margin-right: 2px;
}

.search-filter-step-footer {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid #f5d7bb;
  border-radius: 22px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 14px 30px rgba(31, 41, 55, 0.06);
}

.search-filter-step-footer button {
  min-height: 44px;
  border: 1px solid #ffd0a6;
  border-radius: 999px;
  background: #fff8ef;
  color: #9a4312;
  padding: 0 16px;
  font-weight: 700;
  cursor: pointer;
}

.search-filter-step-footer button:last-child {
  border-color: var(--warning);
  background: var(--warning);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(255, 126, 42, 0.18);
}

.search-filter-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.search-filter-progress span {
  display: grid;
  justify-items: center;
  gap: 5px;
  color: #7a8a9b;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
}

.search-filter-progress b {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #edf2f7;
  color: #688097;
  font-size: 12px;
}

.search-filter-progress .is-active {
  color: #9a4312;
}

.search-filter-progress .is-active b {
  background: var(--warning);
  color: #ffffff;
}

.question-block[data-question-id="itandiSearchFilters"] {
  position: relative;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 8px 0 24px;
}

.question-block[data-question-id="itandiSearchFilters"] > .question-heading {
  align-items: center;
  margin-bottom: 8px;
}

.question-block[data-question-id="itandiSearchFilters"] .number-pill {
  width: 46px;
  height: 46px;
  border: 4px solid #fff1df;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffad4a 0%, var(--warning) 100%);
  box-shadow: 0 8px 20px rgba(255, 126, 42, 0.28);
  color: #ffffff;
  font-size: 19px;
}

.question-block[data-question-id="itandiSearchFilters"] .question-heading h2 {
  color: #102033;
  font-size: 28px;
  line-height: 1.15;
}

.question-block[data-question-id="itandiSearchFilters"] > .helper-text {
  max-width: 560px;
  margin-left: 58px;
  color: #69798a;
  font-weight: 700;
}

.visual-condition-builder {
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 16px;
}

.visual-condition-builder .search-filter-intro-card {
  position: static;
  justify-self: stretch;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  border: none;
  border-left: 3px solid #ffb26b;
  border-radius: 0 8px 8px 0;
  background: #fff6ec;
  padding: 9px 13px;
  box-shadow: none;
}

.visual-condition-builder .search-filter-intro-card::before {
  content: "💡";
  font-size: 15px;
  line-height: 1;
  flex: 0 0 auto;
}

.visual-condition-builder .search-filter-intro-card p {
  margin: 0;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.5;
  color: #7a5a3c;
}

.visual-condition-builder .search-filter-section-layout-cards,
.visual-condition-builder .search-filter-section-structure-cards,
.visual-condition-builder .search-filter-section-floor-cards {
  gap: 8px;
  border: 1px solid #e1e8f0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  padding: 16px;
  box-shadow: 0 16px 40px rgba(31, 41, 55, 0.07);
}

.visual-condition-builder .search-filter-section-layout-cards h3,
.visual-condition-builder .search-filter-section-structure-cards h3,
.visual-condition-builder .search-filter-section-floor-cards h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #102033;
  padding: 0;
  font-size: 18px;
  text-shadow: none;
}

.visual-condition-builder .search-filter-section-layout-cards h3::before,
.visual-condition-builder .search-filter-section-structure-cards h3::before,
.visual-condition-builder .search-filter-section-floor-cards h3::before {
  display: grid;
  width: 30px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: #fff0e2;
  color: var(--warning);
  font-size: 17px;
  font-weight: 700;
}

.visual-condition-builder .search-filter-section-layout-cards h3::before {
  content: "1";
}

.visual-condition-builder .search-filter-section-structure-cards h3::before {
  content: "2";
}

.visual-condition-builder .search-filter-section-floor-cards h3::before {
  content: "3";
}

.visual-condition-builder .search-filter-note {
  margin: 8px 0 0;
  border: 0;
  border-left: 3px solid #ffd0a6;
  border-radius: 0 6px 6px 0;
  background: #fff8f0;
  color: #8a6a4a;
  padding: 7px 11px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.55;
}

.questionnaire[data-language="en"] .visual-condition-builder .search-filter-note {
  margin: 8px 0 0;
}

.visual-condition-builder .visual-choice-grid {
  gap: 8px;
}

.visual-condition-builder .visual-choice-grid-layout-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.visual-condition-builder .visual-choice-grid-structure-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.visual-condition-builder .visual-choice-grid-floor-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.questionnaire[data-language="en"] .visual-condition-builder .visual-choice-grid-layout-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.questionnaire[data-language="en"] .visual-condition-builder .visual-choice-grid-structure-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.visual-condition-builder .visual-choice-card {
  grid-template-columns: 72px minmax(0, 1fr);
  grid-template-rows: 1fr;
  gap: 8px;
  min-height: 132px;
  border-color: #dfe7f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 8px 22px rgba(31, 41, 55, 0.05);
}

.visual-condition-builder .visual-choice-card:hover,
.visual-condition-builder .visual-choice-card:focus-within {
  transform: translateY(-1px);
  border-color: var(--warning);
  box-shadow: 0 12px 26px rgba(255, 126, 42, 0.11);
}

.visual-condition-builder .visual-choice-card:has(input:checked) {
  border-color: var(--warning);
  background: linear-gradient(135deg, #fffaf5 0%, #ffffff 68%);
  box-shadow: 0 14px 30px rgba(255, 126, 42, 0.14);
}

.visual-condition-builder .visual-card-illustration,
.visual-condition-builder .visual-card-illustration[class*="layout"],
.visual-condition-builder .visual-card-illustration[class*="structure"],
.visual-condition-builder .visual-card-illustration[class*="floor"] {
  display: block;
  width: 70px;
  height: 96px;
  min-height: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.visual-condition-builder .visual-choice-card-structure .visual-card-illustration,
.visual-condition-builder .visual-choice-card-floorLevel .visual-card-illustration {
  width: 74px;
  height: 86px;
  align-self: center;
}

.visual-condition-builder .visual-card-illustration svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 5px 8px rgba(31, 41, 55, 0.1));
}

.visual-condition-builder .visual-choice-copy {
  align-content: center;
  gap: 6px;
  padding: 0 24px 0 0;
}

.visual-condition-builder .visual-choice-title {
  align-items: center;
}

.visual-condition-builder .visual-choice-title b {
  font-size: 17px;
}

.visual-condition-builder .visual-choice-title em {
  max-width: 104px;
  background: var(--warning);
  font-size: 10px;
}

.visual-condition-builder .visual-choice-copy small {
  color: #46566a;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.visual-condition-builder .visual-choice-copy li {
  color: #25374c;
  font-size: 12px;
  line-height: 1.35;
}

.visual-condition-builder .visual-choice-copy li::before {
  width: 4px;
  height: 4px;
  margin-top: 7px;
  background: #102033;
}

.visual-condition-builder .visual-choice-rating {
  margin-top: 4px;
  background: transparent;
  padding: 0;
  color: #6a7583;
}

.visual-condition-builder .visual-choice-dot {
  right: 12px;
  bottom: 12px;
  width: 21px;
  height: 21px;
  border-color: #c8d3df;
}

.visual-condition-builder .visual-section-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: #fffaf2;
  color: #586678;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
}

.visual-condition-builder .visual-section-tip::before {
  content: "💡";
}

.visual-condition-builder .search-filter-section-structure-cards .visual-section-tip {
  background: #eef7ff;
}

.visual-condition-builder .search-filter-section-floor-cards .visual-section-tip {
  background: #eefaf2;
}

.visual-condition-builder .search-filter-section-floor-cards .visual-section-tip::before {
  content: "💚";
}

.visual-condition-builder .search-filter-step-footer {
  position: sticky;
  bottom: 12px;
  z-index: 8;
  border-color: #e4ebf2;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.budget-estimator {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid #dce8f5;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 16px 34px rgba(31, 41, 55, 0.08);
}

.budget-info-card,
.budget-understanding,
.budget-planner-card,
.budget-modern-result,
.budget-fee-timeline,
.budget-advisory-card {
  border: 1px solid #dce8f5;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(31, 41, 55, 0.05);
}

/* 初期費用取向（A/B/C）融入預算估算頂部 */
.budget-stance { margin-bottom: 16px; }
.budget-stance-h { margin: 0 0 3px; font-size: 15px; font-weight: 700; color: var(--text); }
.budget-stance-sub { margin: 0 0 11px; font-size: 13px; color: var(--muted); line-height: 1.5; }

.budget-info-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 24px;
}

.budget-info-card h3,
.budget-understanding h3,
.budget-planner-card h3,
.budget-modern-result h3,
.budget-fee-timeline h3,
.budget-advisory-card h3 {
  color: #10263f;
  font-size: 17px;
  line-height: 1.35;
}

.budget-info-card p,
.budget-mini-note p,
.budget-timeline-note p,
.budget-advisory-card p,
.budget-advisory-card li {
  color: var(--muted);
  line-height: 1.65;
}

.budget-detail-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  border-radius: 16px;
  background: transparent;
  color: #40546b;
  list-style: none;
}

.budget-detail-list li {
  display: grid;
  min-width: 0;
  min-height: 0;
  align-content: start;
  justify-items: start;
  gap: 4px;
  padding: 9px 11px;
  border: 1px solid #dbe7f3;
  border-radius: 10px;
  background: #f4f8fc;
}

.budget-detail-list span {
  min-width: 0;
  color: #40546b;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.budget-detail-list b {
  display: inline-flex;
  max-width: 100%;
  border-radius: 999px;
  background: #e7f0f8;
  color: var(--accent);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.budget-fee-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.budget-fee-amounts b {
  display: inline-flex;
  max-width: 100%;
  border-radius: 999px;
  background: #e7f0f8;
  color: var(--accent);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.budget-detail-list p,
.budget-detail-list small {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.budget-detail-list small {
  color: #0a84ff;
  font-weight: 700;
}

.budget-understanding {
  display: grid;
  gap: 8px;
  padding: 24px;
}

.budget-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.budget-choice-card {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 72px;
  padding: 16px;
  border: 1px solid #d5e3f1;
  border-radius: 18px;
  background: #fbfdff;
  color: #13263b;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.budget-choice-card:hover,
.budget-choice-card:focus-within {
  border-color: #9fc5e8;
  background: #f5faff;
}

.budget-choice-card input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.budget-choice-card:has(input:checked) {
  border-color: var(--accent);
  background: #eaf4ff;
  box-shadow: 0 10px 24px rgba(10, 132, 255, 0.13);
}

.budget-planner-card {
  display: grid;
  gap: 16px;
  padding: 24px;
}

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

.budget-tab {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.budget-tab input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.budget-tab span {
  display: grid;
  min-height: 52px;
  place-items: center;
  border: 1px solid #d5e3f1;
  border-radius: 16px;
  background: #fbfdff;
  color: #25394f;
  padding: 8px 16px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.budget-tab:has(input:checked) span {
  border-color: var(--accent);
  background: #eaf4ff;
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(10, 132, 255, 0.14);
}

.budget-input-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.56fr);
  gap: 8px;
  align-items: stretch;
}

.budget-modern-input {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #d5e3f1;
  border-radius: 18px;
  background: #ffffff;
}

.budget-modern-input[hidden] {
  display: none;
}

.budget-modern-input > span {
  color: #10263f;
  font-size: 13px;
  font-weight: 700;
}

.budget-modern-input div {
  display: flex;
  align-items: center;
  overflow: hidden;
  min-height: 58px;
  border: 1px solid #dbe7f3;
  border-radius: 16px;
  background: #f8fbff;
}

.budget-modern-input input {
  width: 100%;
  min-width: 0;
  min-height: 58px;
  border: 0;
  background: transparent;
  padding: 0 16px;
  color: #10263f;
  font-size: 26px;
  font-weight: 700;
  outline: none;
}

.budget-modern-input b {
  padding: 0 16px 0 8px;
  color: var(--accent);
  white-space: nowrap;
}

.budget-mini-note {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 16px;
  border: 1px solid #d9ebfb;
  border-radius: 18px;
  background: #eef7ff;
}

.budget-mini-note strong {
  color: var(--accent);
  font-size: 14px;
}

.budget-low-warning {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 16px;
  border: 1px solid #f2b8ad;
  border-radius: 16px;
  background: linear-gradient(90deg, #fff1ed 0%, #fff8f5 100%);
  box-shadow: 0 12px 26px rgba(185, 28, 28, 0.08);
}

.budget-low-warning[hidden] {
  display: none;
}

.budget-low-warning-icon {
  display: grid;
  width: 32px;
  height: 28px;
  place-items: center;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: #dc2626;
  color: #ffffff;
  padding-top: 7px;
  font-size: 17px;
  font-weight: 950;
  line-height: 1;
}

.budget-low-warning strong {
  display: block;
  margin-bottom: 4px;
  color: #b91c1c;
  font-size: 15px;
  font-weight: 950;
}

.budget-low-warning p {
  margin: 0;
  color: #4b1f1a;
  line-height: 1.65;
  font-weight: 700;
}

.budget-result {
  display: grid;
  gap: 16px;
  line-height: 1.5;
}

.budget-modern-result {
  padding: 24px;
}

.budget-modern-result h3 {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.budget-empty-state {
  margin: 0;
  padding: 16px;
  border: 1px dashed #c7d8e8;
  border-radius: 16px;
  background: #f8fbff;
  color: var(--muted);
}

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

.budget-result-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #d5e3f1;
  border-radius: 18px;
  background: #fbfdff;
  box-shadow: 0 10px 20px rgba(31, 41, 55, 0.04);
}

.budget-result-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.budget-result-card h4 {
  margin: 0;
  color: #10263f;
  font-size: 18px;
  line-height: 1.2;
}

.budget-result-card-head span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #dff0ff;
  color: var(--accent);
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
}

.budget-result-multiplier {
  margin: 0;
  color: #6b7b8d;
  font-size: 13px;
}

.budget-result-number {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: 16px;
  background: #eef7ff;
}

.budget-result-number small {
  color: #5b7188;
  font-size: 12px;
  font-weight: 600;
}

.budget-result-number strong {
  color: var(--accent);
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.1;
}

.budget-result-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.budget-result-card li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: #40546b;
  font-size: 13px;
  line-height: 1.5;
  border: 0;
  padding: 0;
}

.budget-result-card li::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-top: 8px;
  border-radius: 999px;
  background: #9fc5e8;
}

.budget-result-stars {
  margin: 0;
  color: #f59e0b;
  font-size: 15px;
  letter-spacing: 0;
}

.budget-fee-timeline {
  display: grid;
  gap: 16px;
  padding: 24px;
  background: #f8fbff;
}

.budget-timeline-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 8px 0;
}

.budget-timeline-row::before {
  content: "";
  position: absolute;
  top: 17px;
  right: 8%;
  left: 8%;
  height: 3px;
  border-radius: 999px;
  background: #d4e1ee;
}

.budget-timeline-node {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #52677e;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.budget-timeline-node i {
  width: 20px;
  height: 20px;
  border: 4px solid #f8fbff;
  border-radius: 999px;
  background: #9fb2c5;
  box-shadow: 0 0 0 1px #cad8e6;
}

.budget-timeline-node-1 i {
  background: #f59e0b;
  box-shadow: 0 0 0 1px #f6c077;
}

.budget-timeline-node-2 i {
  background: var(--accent);
  box-shadow: 0 0 0 1px #9fc5e8;
}

.budget-timeline-node-3 i,
.budget-timeline-node-4 i {
  background: #16a34a;
  box-shadow: 0 0 0 1px #8bd6a6;
}

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

.budget-timeline-note {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 16px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #dce8f5;
}

.budget-timeline-note strong {
  font-size: 14px;
}

.budget-timeline-note-warning {
  border-color: #f7c77f;
  background: #fff8ed;
}

.budget-timeline-note-warning strong {
  color: #b45309;
}

.budget-timeline-note-renewal {
  border-color: #b7d6f3;
  background: #f1f8ff;
}

.budget-timeline-note-renewal strong {
  color: var(--accent);
}

.budget-timeline-note-stable {
  border-color: #acd9bc;
  background: #f1fbf5;
}

.budget-timeline-note-stable strong {
  color: #15803d;
}

.budget-advisory-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 8px;
}

.budget-advisory-card {
  display: grid;
  gap: 8px;
  padding: 24px;
}

.budget-advisory-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.budget-advisory-card-highlight {
  border-color: #b7d6f3;
  background: #eef7ff;
}

.budget-calculation-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid #dce8f5;
  border-radius: 18px;
  background: #ffffff;
}

.budget-filter-row {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 8px;
}

.budget-filter-field {
  display: grid;
  gap: 5px;
  width: min(240px, 100%);
  min-width: 190px;
}

.budget-or {
  align-self: center;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 32px;
  margin-top: 20px;
  border-radius: 999px;
  background: #e7f0f8;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.budget-filter-field span {
  color: #111827;
  font-size: 13px;
  font-weight: 600;
}

.budget-filter-field select,
.budget-filter-field input {
  min-height: 32px;
  border-radius: 8px;
  background: #ffffff;
  padding: 5px 9px;
  font-size: 14px;
}

.budget-result-section {
  display: grid;
  gap: 8px;
  padding: 16px 0 0;
  border-top: 1px solid #dce3ec;
}

.budget-notice {
  display: grid;
  gap: 4px;
  border: 1px solid #d5dce6;
  border-radius: 16px;
  background: #ffffff;
  padding: 8px 16px;
}

.budget-notice strong {
  color: var(--danger);
}

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

.condition-section h3 {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.condition-chip-wrap {
  display: grid;
  gap: 8px;
}

.condition-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 8px;
}

.condition-other-input {
  width: 100%;
}

.condition-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 8px;
  cursor: pointer;
}

.condition-chip input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent-2);
}

.condition-tips {
  display: grid;
  gap: 8px;
  border: 1px solid #d7e7cf;
  border-left: 4px solid var(--accent-2);
  border-radius: 8px;
  background: #f6fbf4;
  padding: 8px 16px;
}

.condition-tips[hidden] {
  display: none;
}

.condition-tips strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.condition-tips ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.priority-select-grid {
  display: grid;
  gap: 8px;
}

.priority-select-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 8px;
}

.priority-select-row span {
  display: grid;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: #e8f7f4;
  color: var(--accent-2);
  font-weight: 600;
}

.priority-select-row select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  padding: 0 16px;
}

.priority-select-row select:focus {
  outline: 3px solid rgba(10, 132, 255, 0.18);
  border-color: var(--accent);
}

.summary-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
  padding: 24px;
}

.summary-panel textarea {
  min-height: 220px;
  background: #fbfdff;
}

.summary-version-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.summary-version-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid #dbe7f3;
  border-radius: 12px;
  background: #f7fbff;
  padding: 14px;
}

.summary-version-card:first-child {
  border-color: rgba(30, 111, 177, 0.34);
  background: #f3f9ff;
}

.summary-version-card-internal {
  background: #f4f8fc;
}

.summary-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.summary-version-card h3 {
  margin: 0;
  color: #10263f;
  font-size: 16px;
  line-height: 1.35;
}

.summary-version-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.summary-version-card textarea {
  min-height: 220px;
  background: #fbfdff;
}

.summary-copy-btn {
  justify-self: start;
}

.summary-card-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  border-color: #b9d7ef;
  background: #fff;
  color: var(--accent);
  line-height: 1.15;
  white-space: nowrap;
}

.summary-card-copy-btn::before {
  content: "";
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border: 2px solid;
  border-radius: 3px;
  box-shadow: #fff -4px -4px 0 -1px, currentColor -4px -4px 0 1px;
}

.summary-version-card .summary-card-copy-btn {
  box-shadow: rgba(10, 132, 255, 0.18) 0 8px 18px;
  border-color: var(--accent) !important;
  background: var(--accent) !important;
  color: #fff !important;
  opacity: 1 !important;
}

.summary-version-card .summary-card-copy-btn:hover,
.summary-version-card .summary-card-copy-btn:focus-visible {
  box-shadow: rgba(10, 132, 255, 0.24) 0 10px 22px;
  background: #12598f !important;
  color: #fff !important;
}

.summary-version-card .summary-card-copy-btn::before {
  border-color: currentColor;
  box-shadow: -4px -4px 0 -1px var(--accent), -4px -4px 0 1px currentColor;
}

.summary-version-card .summary-card-copy-btn:hover::before,
.summary-version-card .summary-card-copy-btn:focus-visible::before {
  box-shadow: #12598f -4px -4px 0 -1px, currentColor -4px -4px 0 1px;
}

@media (max-width: 680px) {
  .summary-card-header {
    grid-template-columns: 1fr;
  }

  .summary-card-copy-btn {
    justify-self: start;
    width: 100%;
    justify-content: center;
  }
}

.archive-panel {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #dbe6f1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(31, 41, 55, 0.06);
}

.case-records-panel {
  margin-top: 0;
}

.archive-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.archive-panel h2 {
  color: #102033;
  font-size: 18px;
}

.archive-panel p {
  color: var(--muted);
  line-height: 1.6;
}

.archive-search-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 8px;
}

.archive-search-row input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 0 16px;
}

.archive-list {
  display: grid;
  gap: 8px;
}

.archive-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.1fr);
  gap: 8px;
}

.archive-record {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 4px 16px;
  align-items: center;
  width: 100%;
  border: 1px solid #dbe6f1;
  border-radius: 8px;
  background: #fbfdff;
  padding: 8px 16px;
  text-align: left;
  cursor: pointer;
}

.archive-record:hover,
.archive-record:focus-visible,
.archive-record.is-active {
  border-color: var(--accent);
  background: #eef7ff;
}

.archive-record strong {
  color: #102033;
}

.archive-record span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.archive-record small {
  grid-column: 1 / -1;
  color: #6b7b8d;
  font-size: 12px;
}

.archive-record em {
  grid-column: 1 / -1;
  color: var(--accent);
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}

.archive-empty {
  border: 1px dashed #cad8e6;
  border-radius: 12px;
  background: #fbfdff;
  padding: 16px;
}

.archive-panel textarea {
  min-height: 220px;
  background: #fbfdff;
  font-family: inherit;
}

.archive-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.save-record-btn {
  background: #0f766e;
}

.summary-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.submit-status {
  min-height: 24px;
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.5;
}

.submit-status.success {
  color: var(--accent-2);
}

.submit-status.error {
  color: var(--danger);
}

.primary-btn,
.secondary-btn {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 600;
}

.primary-btn {
  background: var(--accent);
  color: #ffffff;
}

.primary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.submit-btn {
  background: var(--accent-2);
}

.print-btn {
  background: #2563eb;
}

.customer-html-export-btn {
  background: #0f766e;
}

.floating-actions .primary-btn.customer-html-export-btn,
.summary-actions .customer-html-export-btn {
  border-color: #0f766e !important;
  background: #0f766e !important;
  color: #fff !important;
}

.secondary-btn {
  background: #fff7ed;
  border-color: #fed7aa;
  color: var(--danger);
}

/* Design system refinement: 8px spacing, calmer type, unified color, softer interactions. */
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --accent-soft: #e7f0f8;
  --accent-soft-2: #f5faff;
  --success-soft: #eefaf2;
  --warning: #d67224;
  --warning-soft: #fff7ed;
  --focus-ring: rgba(10, 132, 255, 0.18);
  --shadow-soft: 0 8px 24px rgba(31, 41, 55, 0.07);
  --shadow-hover: 0 12px 28px rgba(31, 41, 55, 0.1);
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-weight: 400;
  letter-spacing: 0;
}

strong,
.question-heading h2,
.form-header h1,
.summary-panel h2,
.info-block h2,
.archive-header h2,
.application-flow-hero-title strong,
.line-app-title strong {
  font-weight: 700;
}

.intro-text,
.lead,
.helper-text,
.summary-panel p,
.question-explainer p,
.question-explainer li,
.application-flow-step p,
.application-flow-supplement-card p,
.line-app-step p,
.line-app-note,
.line-app-download-copy,
.archive-hint,
.archive-record small {
  font-weight: 400;
}

.language-btn span,
.questionnaire-toggle,
.back-btn,
.eyebrow,
.primary-btn,
.secondary-btn,
.case-identity-card span,
.case-identity-card strong,
.number-pill,
.option-group-heading,
.option-badge,
.option-duration,
.duration-card strong,
.question-explainer strong,
.notice-title,
.application-flow-step h3,
.application-flow-supplement-card strong,
.application-flow-estimate,
.application-flow-link,
.line-app-step h3,
.line-app-step-number,
.line-app-download-btn,
.condition-chip,
.budget-choice-card strong,
.budget-tab span,
.budget-result-card strong {
  font-weight: 600;
}

.number-pill,
.application-flow-step-badge,
.line-app-step-number,
.budget-timeline-dot,
.duration-dot {
  font-weight: 700;
}

.app-shell {
  padding: var(--space-3) var(--space-4) var(--space-4);
}

.language-screen,
.form-body,
.application-flow-steps,
.line-app-steps,
.archive-search-row,
.archive-layout,
.summary-actions,
.condition-chip-grid,
.budget-choice-grid,
.budget-tabs {
  gap: var(--space-3);
}

.language-screen {
  margin-bottom: var(--space-3);
  padding: var(--space-3);
  box-shadow: var(--shadow-soft);
}

.language-main,
.question-heading,
.question-explainer,
.move-in-advice-grid,
.application-flow-supplement,
.line-app-downloads,
.visual-choice-copy,
.budget-estimator,
.budget-planner-grid,
.budget-result-card ul {
  gap: var(--space-2);
}

.form-header {
  padding: var(--space-3) 0;
}

.form-body {
  padding: var(--space-3) 0;
}

.question-block,
.info-block,
.summary-panel,
.archive-panel {
  box-shadow: var(--shadow-soft);
}

.question-block,
.info-block,
.application-flow-panel,
.line-app-panel {
  padding: var(--space-4);
}

.question-heading {
  margin-bottom: var(--space-3);
}

.options-grid {
  gap: var(--space-2);
}

.option,
.language-btn,
.questionnaire-toggle,
.primary-btn,
.secondary-btn,
.budget-choice-card,
.budget-tab span,
.condition-chip,
.archive-record,
.visual-choice-card,
.search-filter-option {
  transition:
    transform 0.2s var(--ease-standard),
    border-color 0.2s var(--ease-standard),
    background-color 0.2s var(--ease-standard),
    color 0.2s var(--ease-standard),
    box-shadow 0.2s var(--ease-standard);
}

.option:hover,
.option:focus-within,
.language-btn:hover,
.language-btn:focus-visible,
.primary-btn:hover,
.primary-btn:focus-visible,
.secondary-btn:hover,
.secondary-btn:focus-visible,
.budget-choice-card:hover,
.budget-choice-card:focus-within,
.condition-chip:hover,
.condition-chip:focus-within,
.archive-record:hover,
.search-filter-option:hover,
.search-filter-option:focus-within {
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.visual-choice-card {
  gap: var(--space-3);
  border-color: var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: var(--space-3);
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.2s var(--ease-standard),
    border-color 0.2s var(--ease-standard),
    background-color 0.2s var(--ease-standard),
    box-shadow 0.2s var(--ease-standard);
}

.visual-choice-card:hover,
.visual-choice-card:focus-within {
  transform: translateY(-2px);
  border-color: #9fc5e8;
  background: var(--accent-soft-2);
  box-shadow: var(--shadow-hover);
}

.visual-choice-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft-2);
  box-shadow: 0 12px 30px rgba(10, 132, 255, 0.14);
}

.visual-card-illustration {
  border-color: #d5e3f1;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(10, 132, 255, 0.08) 0%, rgba(255, 255, 255, 0.92) 54%, rgba(15, 143, 123, 0.08) 100%),
    #fbfdff;
}

.visual-card-illustration[class*="structure"],
.visual-card-illustration[class*="floor"] {
  gap: var(--space-2);
  padding: var(--space-3);
}

.visual-choice-card:has(input:checked) .visual-choice-dot {
  border-color: var(--accent);
  background: var(--accent);
}

.language-btn.active,
.option-duration:has(input:checked),
.budget-choice-card:has(input:checked),
.budget-tab:has(input:checked) span,
.search-filter-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft-2);
  color: var(--accent);
}

.primary-btn,
.questionnaire-toggle,
.submit-btn,
.application-flow-link {
  background: var(--accent);
}

.submit-btn,
.save-record-btn {
  background: var(--accent-2);
}

.print-btn {
  background: #2563eb;
}

.secondary-btn,
.budget-low-warning,
.question-notice,
.application-flow-step-orange,
.application-flow-supplement-lease {
  background: var(--warning-soft);
  border-color: #f5d1ac;
}

.application-flow-step-purple,
.application-flow-step-orange {
  border-color: #c9dff1;
  background: #f8fbff;
}

.application-flow-step-orange .application-flow-step-badge,
.application-flow-step-orange .application-flow-step-icon,
.application-flow-step-purple .application-flow-step-badge,
.application-flow-step-purple .application-flow-step-icon {
  background: var(--accent);
  color: #ffffff;
}

.line-app-step-app .line-app-step-number,
.line-app-download-android,
.line-app-download-ios {
  background: var(--accent);
}

.line-app-step-line .line-app-step-number {
  background: var(--accent-2);
}

.line-app-step-app {
  border-color: #c9dff1;
  background: #f8fbff;
}

.submit-status {
  margin: 0 0 var(--space-2);
  font-weight: 500;
}

.pdf-export-workbench {
  position: absolute;
  left: -10000px;
  top: 0;
  width: 794px;
  background: #ffffff;
  color: var(--text);
  pointer-events: none;
}

.pdf-export-workbench,
.pdf-export-workbench * {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --line: #d9e1eb;
  --text: #1f2937;
  --muted: #607084;
  --accent: #0a84ff;
  --accent-2: #0f8f7b;
  --danger: #b45309;
}

.pdf-export-workbench .questionnaire-workbar {
  background: #f5f7fb !important;
  border-bottom-color: #d9e1eb !important;
  backdrop-filter: none !important;
}

.pdf-export-workbench .pdf-export-form {
  width: 760px;
  margin: 0 auto;
  padding: 0 0 16px;
  background: #ffffff;
  color: #172033;
  font-size: 12px;
  line-height: 1.45;
}

.pdf-document-cover {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
  padding: 24px;
  border: 1px solid #d7dee9;
  border-left: 6px solid var(--accent);
  border-radius: 0;
  background: linear-gradient(90deg, #f7fbff 0%, #ffffff 78%);
}

.pdf-document-cover p {
  margin-bottom: 5px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.pdf-document-cover h1 {
  color: #111827;
  font-size: 25px;
  line-height: 1.2;
}

.pdf-document-cover span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.pdf-export-workbench .form-header {
  margin-bottom: 8px;
  padding: 0 0 16px;
  border-bottom: 1px solid #cfd8e3;
  background: #ffffff;
}

.pdf-export-workbench .form-header h1 {
  font-size: 20px;
}

.pdf-export-workbench .lead,
.pdf-export-workbench .helper-text {
  line-height: 1.45;
}

.pdf-export-workbench .form-body {
  display: grid;
  gap: 8px;
}

.pdf-export-workbench .question-block,
.pdf-export-workbench .info-block,
.pdf-export-workbench .summary-panel {
  border: 1px solid #d7dee9;
  border-left: 4px solid #b8c8da;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  break-inside: avoid;
  page-break-inside: avoid;
}

.pdf-export-workbench .question-block,
.pdf-export-workbench .info-block {
  padding: 8px 16px;
}

.pdf-export-workbench .question-heading {
  gap: 8px;
  margin-bottom: 7px;
}

.pdf-export-workbench .question-heading h2,
.pdf-export-workbench .info-block h2 {
  font-size: 14px;
  line-height: 1.28;
}

.pdf-export-workbench .number-pill {
  min-width: 22px;
  height: 24px;
  border-radius: 4px;
  font-size: 11px;
}

.pdf-export-workbench .options-grid,
.pdf-export-workbench .condition-chip-grid,
.pdf-export-workbench .search-filter-options {
  gap: 6px;
}

.pdf-export-workbench .option,
.pdf-export-workbench .condition-chip,
.pdf-export-workbench .location-option,
.pdf-export-workbench .search-filter-option {
  min-height: 28px;
  border-radius: 4px;
  background: #ffffff;
  padding: 4px 8px;
}

.pdf-export-workbench .option:not(.is-selected),
.pdf-export-workbench .condition-chip:not(.is-selected),
.pdf-export-workbench .location-option:not(.is-selected),
.pdf-export-workbench .search-filter-option:not(.is-selected) {
  color: #6b7280;
  background: #f8fafc;
}

.pdf-export-workbench .option.is-selected,
.pdf-export-workbench .condition-chip.is-selected,
.pdf-export-workbench .location-option.is-selected,
.pdf-export-workbench .search-filter-option.is-selected {
  border-color: var(--accent);
  background: #eaf3fb;
  color: #0f3f66;
  font-weight: 600;
}

.pdf-export-workbench .visual-condition-builder {
  gap: 8px;
}

.pdf-export-workbench .search-filter-section-layout-cards,
.pdf-export-workbench .search-filter-section-structure-cards,
.pdf-export-workbench .search-filter-section-floor-cards {
  gap: 8px;
  border: 1px solid #d7dee9;
  border-radius: 0;
  background: #ffffff;
  padding: 8px;
  box-shadow: none;
  break-inside: avoid;
  page-break-inside: avoid;
}

.pdf-export-workbench .visual-condition-builder .search-filter-note {
  margin: 0 0 2px;
  color: #607084;
  font-size: 10px;
  line-height: 1.35;
}

.pdf-export-workbench .visual-condition-builder .search-filter-section-layout-cards h3,
.pdf-export-workbench .visual-condition-builder .search-filter-section-structure-cards h3,
.pdf-export-workbench .visual-condition-builder .search-filter-section-floor-cards h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #172033;
  font-size: 13px;
  line-height: 1.25;
}

.pdf-export-workbench .visual-condition-builder .search-filter-section-layout-cards h3::before,
.pdf-export-workbench .visual-condition-builder .search-filter-section-structure-cards h3::before,
.pdf-export-workbench .visual-condition-builder .search-filter-section-floor-cards h3::before {
  width: 22px;
  height: 24px;
  border-radius: 4px;
  font-size: 11px;
}

.pdf-export-workbench .visual-choice-grid-layout-cards,
.pdf-export-workbench .visual-choice-grid-structure-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px;
}

.pdf-export-workbench .visual-choice-grid-floor-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px;
}

.pdf-export-workbench .visual-condition-builder .visual-choice-card {
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  min-height: 86px;
  border: 1px solid #d7dee9;
  border-radius: 0;
  background: #ffffff;
  padding: 8px;
  box-shadow: none;
  break-inside: avoid;
  page-break-inside: avoid;
}

.pdf-export-workbench .visual-condition-builder .visual-card-illustration,
.pdf-export-workbench .visual-condition-builder .visual-card-illustration[class*="layout"],
.pdf-export-workbench .visual-condition-builder .visual-card-illustration[class*="structure"],
.pdf-export-workbench .visual-condition-builder .visual-card-illustration[class*="floor"] {
  display: grid;
  width: 52px;
  height: 70px;
  place-items: center;
  overflow: visible;
  border: 0;
  background: transparent;
}

.pdf-export-workbench .visual-condition-builder .pdf-raster-illustration {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pdf-export-workbench .visual-condition-builder .visual-choice-copy {
  gap: 4px;
  align-content: start;
  padding: 0 16px 0 0;
}

.pdf-export-workbench .visual-condition-builder .visual-choice-title {
  gap: 5px;
}

.pdf-export-workbench .visual-condition-builder .visual-choice-title b {
  font-size: 12px;
  line-height: 1.25;
}

.pdf-export-workbench .visual-condition-builder .visual-choice-title em {
  max-width: 72px;
  padding: 2px 5px;
  font-size: 8px;
}

.pdf-export-workbench .visual-condition-builder .visual-choice-copy small,
.pdf-export-workbench .visual-condition-builder .visual-choice-copy li {
  font-size: 9px;
  line-height: 1.3;
}

.pdf-export-workbench .visual-condition-builder .visual-choice-copy ul {
  gap: 2px;
}

.pdf-export-workbench .visual-condition-builder .visual-choice-copy li::before {
  width: 3px;
  height: 3px;
  margin-top: 5px;
}

.pdf-export-workbench .visual-condition-builder .visual-choice-dot {
  right: 7px;
  bottom: 7px;
  width: 12px;
  height: 16px;
  border-width: 1px;
  box-shadow: inset 0 0 0 3px #ffffff;
}

.pdf-export-workbench .visual-section-tip {
  border-radius: 0;
  padding: 7px 9px;
  font-size: 10px;
  line-height: 1.35;
}

.pdf-export-workbench label.is-selected input[type="radio"],
.pdf-export-workbench label.is-selected input[type="checkbox"] {
  display: none;
}

.pdf-export-workbench label.is-selected::before {
  content: "✓";
  flex: 0 0 auto;
  border-radius: 3px;
  background: var(--accent);
  color: #ffffff;
  padding: 2px 5px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.pdf-export-workbench input,
.pdf-export-workbench textarea,
.pdf-export-workbench select {
  border-radius: 4px;
}

.pdf-export-workbench input[type="radio"],
.pdf-export-workbench input[type="checkbox"] {
  width: 13px;
  height: 16px;
}

.pdf-export-workbench textarea,
.pdf-export-workbench input[type="text"],
.pdf-export-workbench input[type="date"],
.pdf-export-workbench input[type="number"],
.pdf-export-workbench select {
  padding: 4px 8px;
}

.pdf-export-workbench .link-button {
  min-height: 0;
  border: 1px solid #c7d6e5;
  border-radius: 4px;
  background: #ffffff;
  color: var(--accent) !important;
  padding: 4px 8px;
}

.pdf-export-workbench .summary-panel {
  gap: 8px;
  margin-top: 8px;
  padding: 16px;
  border-left-color: var(--accent-2);
}

.pdf-summary-text {
  min-height: 180px;
  border: 1px solid #d7dee9;
  border-radius: 0;
  background: #fbfdff;
  padding: 8px 16px;
  color: #172033;
  font-family: "Segoe UI", "Noto Sans TC", "Noto Sans", Arial, sans-serif;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
}

@media (max-width: 680px) {
  .app-shell {
    padding: 16px;
  }

  .language-actions {
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .language-screen {
    align-items: stretch;
  }

  .language-main {
    grid-template-columns: 1fr;
  }

  .language-copy {
    min-width: 0;
  }

  .language-btn {
    flex: 1 1 0;
    min-width: 0;
  }

  .questionnaire-toggle {
    grid-column: 1 / -1;
  }

  .form-header {
    flex-direction: column;
  }

  .floor-guide,
  .compass-guide {
    grid-template-columns: 1fr;
  }

  .compass-options {
    grid-template-columns: 1fr;
  }

  .search-filter-options-floor,
  .search-filter-options-compass {
    grid-template-columns: 1fr;
  }

  .options-grid {
    grid-template-columns: 1fr;
  }

  .options-grid-duration {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    border: 0;
    background: transparent;
    padding: 0;
  }

  .options-grid-duration::before {
    display: none;
  }

  .option-duration {
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .duration-timeline {
    padding: 16px;
  }

  .duration-notes {
    grid-template-columns: 1fr;
  }

  .option-combo {
    grid-template-columns: 1fr;
  }

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

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

  .search-filter-range {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
  }

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

  .location-columns {
    grid-template-columns: 1fr;
  }

  .location-list {
    grid-template-columns: 1fr;
    max-height: 260px;
  }

  .move-in-advice dl {
    grid-template-columns: 1fr;
  }

  .move-in-advice-reason li {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .budget-result li {
    grid-template-columns: 1fr;
    gap: 2px;
  }

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

  .budget-filter-field {
    width: 100%;
  }

  .budget-or {
    width: 100%;
    height: 24px;
    margin-top: 0;
    border-radius: 6px;
  }
}

@media (max-width: 860px) {
  .questionnaire {
    padding-right: 92px;
  }

  .questionnaire-workbar {
    position: static;
    justify-content: stretch;
  }

  .workbar-side {
    align-items: stretch;
    justify-content: space-between;
  }

  .archive-layout,
  .archive-search-row {
    grid-template-columns: 1fr;
  }

  .case-identity-card {
    justify-items: start;
    padding-top: 0;
  }

  .question-block[data-question-id="itandiSearchFilters"] > .helper-text {
    margin-left: 0;
  }

  .visual-condition-builder {
    margin-top: 16px;
  }

  .visual-condition-builder .search-filter-intro-card {
    position: static;
    width: 100%;
  }

  .visual-condition-builder .search-filter-note {
    margin: 0;
  }

  .visual-choice-grid-layout-cards,
  .visual-choice-grid-structure-cards,
  .visual-choice-grid-floor-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .budget-info-card,
  .budget-input-layout,
  .budget-result-cards,
  .budget-timeline-notes,
  .budget-advisory-grid {
    grid-template-columns: 1fr;
  }

}

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

  .visual-condition-builder .visual-choice-grid-layout-cards,
  .visual-condition-builder .visual-choice-grid-structure-cards,
  .visual-condition-builder .visual-choice-grid-floor-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .visual-condition-builder .visual-choice-card {
    grid-template-columns: 72px minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .form-tabs {
    justify-content: space-between;
  }

  .form-tab {
    flex: 1 1 0;
    justify-content: center;
    padding-right: 6px;
    padding-left: 6px;
  }

  .floating-actions {
    right: 16px;
    bottom: 12px;
    left: 16px;
    top: auto;
    flex-direction: row;
    width: auto;
    padding: 8px;
    border-radius: 8px;
    transform: none;
  }

  .floating-actions .primary-btn {
    flex: 1 1 0;
    min-height: 42px;
    padding: 8px 6px;
    font-size: 12px;
  }

  .questionnaire {
    padding-right: 0;
    padding-bottom: 92px;
  }

  .question-block[data-question-id="itandiSearchFilters"] .question-heading h2 {
    font-size: 24px;
  }

  .visual-condition-builder .visual-choice-card {
    grid-template-columns: 86px minmax(0, 1fr);
    min-height: 144px;
  }

  .search-filter-intro-card {
    justify-self: stretch;
  }

  .search-filter-section-layout-cards,
  .search-filter-section-structure-cards,
  .search-filter-section-floor-cards {
    padding: 16px;
  }

  .search-filter-step-footer {
    grid-template-columns: 1fr;
  }

  .search-filter-progress {
    order: -1;
    grid-template-columns: repeat(5, minmax(46px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .archive-search-row,
  .archive-record {
    grid-template-columns: 1fr;
  }

  .visual-choice-grid-layout-cards,
  .visual-choice-grid-structure-cards,
  .visual-choice-grid-floor-cards,
  .visual-condition-builder .visual-choice-grid-layout-cards,
  .visual-condition-builder .visual-choice-grid-structure-cards,
  .visual-condition-builder .visual-choice-grid-floor-cards {
    grid-template-columns: 1fr;
  }

  .visual-choice-card {
    min-height: 0;
  }

  .budget-estimator {
    gap: 16px;
    padding: 16px;
    border-radius: 18px;
  }

  .budget-info-card,
  .budget-understanding,
  .budget-planner-card,
  .budget-modern-result,
  .budget-fee-timeline,
  .budget-advisory-card {
    border-radius: 16px;
    padding: 16px;
  }

  .budget-choice-grid,
  .budget-detail-list,
  .budget-tabs {
    grid-template-columns: 1fr;
  }

  .budget-modern-input input {
    font-size: 22px;
  }

  .budget-timeline-row {
    grid-template-columns: repeat(5, minmax(76px, 1fr));
    overflow-x: auto;
    padding-bottom: 14px;
  }

  .budget-timeline-row::before {
    right: 42px;
    left: 42px;
  }

  .budget-result-card li {
    display: flex;
    gap: 8px;
    padding: 0;
  }
}

@media (max-width: 680px) {
  .application-flow-hero,
  .application-flow-step {
    grid-template-columns: 1fr;
  }

  .application-flow-hero {
    align-items: flex-start;
  }

  .application-flow-step {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .application-flow-step-icon {
    display: none;
  }

  .application-flow-step:not(:last-child)::after {
    left: 29px;
  }

  .application-flow-supplement {
    grid-template-columns: 1fr;
  }

  .application-flow-link {
    width: 100%;
  }

  .line-app-hero,
  .line-app-step {
    grid-template-columns: 1fr;
  }

  .line-app-hero {
    align-items: flex-start;
  }

  .line-app-title {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .line-app-title .line-app-mark-phone {
    display: none;
  }

  .line-app-step {
    gap: 8px;
  }

  .line-app-visual {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .line-app-downloads,
  .line-app-download-btn {
    width: 100%;
  }
}
