@charset "UTF-8";
:root {
  font: 100%/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none; font-optical-sizing: auto; color: #1d1d1f; background: #f5f5f7;
  --ink: #1d1d1f; --muted: #6e6e73; --line: #dedee3; --blue: #0071e3; --blue-soft: #edf5ff; --sky: #eaf3f7;
}
* { box-sizing: border-box; }
html { height: 100%; }
body { margin: 0; height: var(--app-height, 100dvh); min-height: 0; display: flex; flex-direction: column; overflow: hidden; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
button, input, textarea { font: inherit; color: inherit; }
button, a, input, textarea, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { min-height: 44px; border: 0; cursor: pointer; transition: background-color 120ms, color 120ms, border-color 120ms; }
button:active:not(:disabled) { transform: scale(.97); transition: none; }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
button:focus:not(:focus-visible) { outline: none; }
[hidden] { display: none !important; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, p { margin: 0; }
h1, h2 { font-weight: 650; letter-spacing: -.035em; line-height: 1.25; }
h2:focus { outline: none; }
svg { display: block; }

/* Stable viewport shell; only constrained content areas may scroll. */
.site-header { flex: 0 0 64px; min-height: 64px; width: min(1280px, 100%); margin: auto; padding: 8px 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: 17px; font-weight: 600; letter-spacing: -.025em; }
.brand > svg { flex: 0 0 23px; width: 23px; height: 31px; fill: none; stroke: var(--ink); stroke-width: 1.6; }
.brand > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edition { display: none; }
.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.language-switch { min-height: 44px; min-width: 70px; padding: 9px 12px; border-radius: 12px; background: #eaeaec; color: #45454b; font-size: 12px; }
.workspace { position: relative; flex: 1 1 0; min-height: 0; width: min(1220px, calc(100% - 48px)); margin: 0 auto 20px; display: grid; grid-template-columns: .9fr 1.1fr; border-radius: 26px; background: #fff; overflow: hidden; box-shadow: 0 4px 28px #1d1d1f04; }
.preview-panel { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--sky); }
.preview-heading { position: relative; z-index: 2; flex: 0 0 auto; padding: 30px 30px 0; pointer-events: none; }
.preview-heading h1 { font-size: clamp(26px, 2.8vw, 38px); }
.preview-heading p { margin-top: 12px; font-size: 14px; line-height: 1.6; color: #566d7b; max-width: 320px; }
#viewport { position: relative; flex: 1 1 0; min-height: 0; width: 100%; z-index: 1; }
#viewport canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.preview-loading { position: absolute; top: 45%; left: 16px; right: 16px; z-index: 3; text-align: center; font-size: 14px; color: #526878; }
.preview-tools { position: relative; z-index: 2; flex: 0 0 auto; padding: 12px 22px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.preview-tools > span { max-width: 46%; color: #5b6e7a; font-size: 12px; }
.preview-tools > div { display: flex; flex-shrink: 0; padding: 3px; border-radius: 13px; background: #fff; }
.preview-tools button { min-width: 44px; padding: 9px 11px; border-radius: 10px; font-size: 12px; background: transparent; color: #52626c; }
.preview-tools button[aria-pressed="true"] { background: #edf0f2; color: var(--ink); font-weight: 600; }
.city-line { position: absolute; bottom: 0; width: 100%; height: 70px; opacity: .12; fill: none; stroke: #496575; stroke-width: 1.3; pointer-events: none; }
.creator-panel { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 20px 28px 18px; }
.creator-panel form, #form-fields { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; }
.steps { flex: 0 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-bottom: 15px; }
.steps button { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 2px; background: transparent; font-size: 12px; color: var(--muted); white-space: nowrap; }
.steps > button > span { flex: 0 0 23px; width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: #f0f0f3; font-size: 12px; font-variant-numeric: tabular-nums; }
.steps b { font: inherit; }
.steps button[aria-current="step"] { color: var(--ink); font-weight: 600; }
.steps button[aria-current="step"] > span { color: #fff; background: var(--blue); }
.steps button.done > span { color: #166f45; background: #e9f4ed; }
.step-page { position: relative; flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; overflow: auto; scrollbar-width: thin; overscroll-behavior: contain; }
.section-intro { flex: 0 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; margin-bottom: 18px; }
.section-intro h2 { grid-column: 1; font-size: clamp(23px, 2.2vw, 30px); }
.section-intro p { grid-column: 1 / -1; margin-top: 7px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.text-button { padding: 8px 0; background: transparent; color: var(--blue); font-size: 14px; line-height: 1.4; }
.intro-action { grid-column: 2; grid-row: 1; align-self: start; white-space: nowrap; font-size: 12px; }
.form-footer { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; min-height: 66px; padding-top: 16px; }
.primary, .secondary { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 11px 18px; border-radius: 14px; font-size: 14px; font-weight: 600; line-height: 1.4; }
.primary { flex: 1; color: #fff; background: var(--blue); }
.primary > span[aria-hidden="true"] { margin-left: auto; font-size: 19px; }
.secondary { color: var(--ink); background: #f0f0f3; white-space: nowrap; }
.draft-indicator { flex: 0 0 106px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.form-status { position: absolute; z-index: 20; left: 20px; right: 20px; bottom: 78px; padding: 11px 14px; border-radius: 12px; background: #fff4df; color: #795111; font-size: 13px; line-height: 1.5; box-shadow: 0 3px 20px #00000012; }
.form-status.error { background: #fff0ed; color: #9b3328; }
.form-status button { margin-top: 7px; padding: 9px 13px; border: 1px solid currentColor; border-radius: 9px; background: #fff; font-size: 13px; }
body[data-step="0"]:not([data-success="true"]) .preview-panel { display: none; }
body[data-step="0"]:not([data-success="true"]) .workspace { grid-template-columns: 1fr; }
body[data-step="0"]:not([data-success="true"]) .creator-panel { width: 100%; max-width: 980px; justify-self: center; }

/* Map labels follow the SVG letterbox; land itself is the interaction target. */
.origin-picker { position: relative; display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; gap: 7px; }
.map-toolbar { flex: 0 0 auto; display: flex; align-items: center; min-height: 44px; gap: 10px; }
.origin-picker[data-mode="world"] .map-toolbar { display: none; }
.map-back { min-width: 44px; padding: 8px 11px; border-radius: 12px; background: #f5f5f7; color: var(--blue); font-size: 12px; white-space: nowrap; }
.map-breadcrumb { color: var(--muted); font-size: 12px; line-height: 1.4; }
.map-breadcrumb:focus { outline: none; }
.map-stage { position: relative; flex: 1 1 0; min-height: 120px; width: 100%; overflow: hidden; border-radius: 18px; background: #f2f6f8; aspect-ratio: auto !important; isolation: isolate; }
.map-stage > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.origin-picker:not([data-mode="world"]) .map-stage > svg { touch-action: pan-y; cursor: grab; }
.origin-picker:not([data-mode="world"]) .map-stage > svg:active { cursor: grabbing; }
.map-region { fill: #ccdce7; stroke: #fff; stroke-width: .8; cursor: pointer; }
.map-region path { vector-effect: non-scaling-stroke; transition: fill 120ms; }
.map-region:active, .map-region.is-active { fill: #a8cdef; }
.map-region.is-selected, .map-region[aria-pressed="true"] { fill: #4e9de7; }
.map-region:focus-visible { outline: none; stroke: #0071e3; stroke-width: 2.5; }
.map-context { stroke: #c3cdd4; stroke-width: 1; pointer-events: none; }
.map-labels { pointer-events: none; }
.map-label { fill: #405365; font-family: inherit; font-weight: 500; paint-order: stroke; stroke: #f2f6f8; stroke-width: 1.5; stroke-linejoin: round; pointer-events: none; }
.map-pin { stroke: #fff; stroke-width: 1.3; }
.map-continent-region { cursor: pointer; touch-action: manipulation; }
.map-continent-region:focus-visible { outline: none; }
.map-continent-region:focus-visible .map-region { fill: #b3d5f0; stroke: #0071e3; stroke-width: 1.5; }
.map-continent-region:active .map-region { fill: #a8cdef; }
.map-continent-labels { position: absolute; left: 50%; top: 50%; width: 100%; aspect-ratio: 2; transform: translate(-50%, -50%); pointer-events: none; }
.map-continent-name { position: absolute; transform: translate(-50%, -50%); width: max-content; max-width: 24%; padding: 0; color: #3d5667; font-size: 12px; line-height: 1.25; font-weight: 500; letter-spacing: .025em; text-align: center; white-space: pre-line; text-shadow: 0 1px 2px #f2f6f8; pointer-events: none; user-select: none; }
.map-continent-name[data-continent="south-america"] { transform: translate(-70%, -50%); }
.map-china-name { color: #285979; font-weight: 600; }
.origin-picker[data-mode="world"] .map-region[data-code="CHN"] { fill: #b8d6e9; }
.origin-picker[data-mode="world"] .map-region[data-code="CHN"]:active { fill: #a8cdef; }
.map-controls { position: absolute; left: 8px; bottom: 8px; display: flex; padding: 2px; border-radius: 12px; background: #fff; box-shadow: 0 2px 9px #1d1d1f08; }
.map-zoom { min-width: 44px; padding: 8px; border-radius: 10px; background: #fff; color: #405365; font-size: 20px; line-height: 1; }
.map-caption { flex: 0 0 auto; color: var(--muted); font-size: 12px; line-height: 1.4; text-align: center; }
.map-choices { display: flex; flex: 0 0 auto; flex-wrap: nowrap; gap: 5px; overflow-x: auto; scrollbar-width: thin; }
.map-choice { flex: 0 0 auto; min-width: 44px; padding: 9px 11px; border: 1px solid transparent; border-radius: 10px; background: #f5f5f7; text-align: left; font-size: 12px; white-space: nowrap; }
.map-choice[aria-pressed="true"], .map-choice.is-selected { color: #0062bf; border-color: #79b6ee; background: var(--blue-soft); }
.map-selection { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border-radius: 13px; background: var(--blue-soft); font-size: 14px; color: #375977; }
.map-selection-icon { display: grid; place-items: center; flex: 0 0 25px; width: 25px; height: 25px; border-radius: 50%; background: #dcecff; color: #0062c3; font-size: 14px; font-weight: 600; }
.map-selection span:last-child { min-width: 0; overflow-wrap: anywhere; }
.map-search { flex: 0 0 auto; min-height: 44px; }
.map-search > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 9px 0; color: var(--blue); list-style: none; cursor: pointer; font-size: 12px; }
.map-search > summary::-webkit-details-marker { display: none; }
.map-search > summary::after { content: "+"; font-size: 20px; font-weight: 300; color: var(--muted); }
.map-search[open] > summary::after { content: "−"; }
.map-search[open] { position: absolute; left: 0; right: 0; bottom: 0; z-index: 8; max-height: 100%; padding: 4px 14px 12px; overflow: auto; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: 0 8px 30px #1d1d1f20; }
.map-search input { margin-bottom: 8px; }
.map-search-results { display: flex; flex-wrap: wrap; gap: 5px; max-height: 200px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.map-search-results .map-choice { flex-grow: 1; }
.map-search-hint { margin-top: 6px; color: var(--muted); font-size: 12px; }
.map-loading, .map-unavailable { margin: auto; padding: 20px 12px; color: var(--muted); font-size: 14px; text-align: center; }

/* Separate style and color workspaces keep every outfit choice within reach. */
.outfit-mode { flex: 0 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; margin-bottom: 10px; border-radius: 14px; background: #f0f0f3; }
.outfit-mode button { padding: 9px 12px; border-radius: 11px; color: var(--muted); background: transparent; font-size: 14px; }
.outfit-mode button[aria-pressed="true"], .outfit-mode button[aria-selected="true"], .outfit-mode button.is-active { color: var(--ink); background: #fff; font-weight: 600; box-shadow: 0 1px 4px #0000000a; }
.outfit-style, .outfit-colors { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; gap: 8px; }
.outfit-tabs { display: flex; flex: 0 0 auto; gap: 3px; min-height: 44px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.outfit-tabs::-webkit-scrollbar { display: none; }
.outfit-tabs button { flex: 0 0 auto; padding: 9px 13px; border-radius: 12px; background: transparent; color: var(--muted); font-size: 14px; }
.outfit-tabs button[aria-selected="true"] { color: #fff; background: var(--ink); }
.item-grid { display: grid; flex: 1 1 0; min-height: 156px; max-height: 320px; grid-template-rows: repeat(2, minmax(0, 1fr)); grid-auto-flow: column; grid-auto-columns: calc((100% - 16px) / 3); gap: 8px; padding-bottom: 4px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-inline: contain; scroll-snap-type: x proximity; scrollbar-width: thin; }
.item-button { min-width: 0; min-height: 44px; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 9px 7px; border: 2px solid transparent; border-radius: 14px; background: #f5f5f7; scroll-snap-align: start; }
.item-button img { flex: 1 1 0; min-height: 0; width: 100%; height: 60px; max-height: 100px; object-fit: contain; mix-blend-mode: multiply; pointer-events: none; }
.item-button > span:not(.none-icon) { flex: 0 0 auto; min-height: 1.4em; max-width: 100%; font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; }
.item-button[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-soft); }
.item-button[aria-pressed="true"]::after { content: "✓"; position: absolute; top: 4px; right: 4px; width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: #fff; font-size: 12px; font-weight: 600; }
.none-icon { display: grid; flex: 1 1 0; min-height: 0; place-items: center; font-size: 30px; font-weight: 300; line-height: 1; color: #92929c; }
.color-regions { flex: 0 0 auto; display: flex; gap: 3px; padding: 3px; border-radius: 13px; background: #f0f0f3; }
.color-region { flex: 1 1 0; min-width: 44px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 5px; border-radius: 10px; background: transparent; color: var(--muted); font-size: 12px; }
.color-region[aria-pressed="true"] { background: #fff; color: var(--ink); font-weight: 600; }
.color-dot { flex: 0 0 12px; width: 12px; height: 12px; border: 1px solid #00000014; border-radius: 50%; }
.palette { flex: 0 0 auto; display: grid; grid-template-columns: repeat(8, minmax(44px, 1fr)); grid-template-rows: repeat(2, 44px); gap: 4px; max-width: 100%; overflow-x: auto; overflow-y: hidden; overscroll-behavior-inline: contain; scrollbar-width: thin; }
.swatch { position: relative; min-width: 44px; height: 44px; border: 2px solid transparent; border-radius: 12px; background: transparent; }
.swatch::before { content: ""; position: absolute; left: 50%; top: 50%; width: 29px; height: 29px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--swatch); box-shadow: inset 0 0 0 1px #00000014; }
.swatch[aria-pressed="true"] { border-color: var(--blue); }
.swatch[aria-pressed="true"]::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--check, #1d1d1f); font-size: 17px; font-weight: 700; }
.checkbox-row { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; font-size: 12px; line-height: 1.4; cursor: pointer; }
.checkbox-row input { width: 20px; height: 20px; margin: 0; accent-color: var(--blue); }
.quiet-note { flex: 0 0 auto; margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.5; }

/* The keyboard reduces the field area, never the navigation footer. */
.profile-fields { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; overflow: auto; scrollbar-width: thin; overscroll-behavior: contain; }
.field-label { flex: 0 0 auto; display: block; margin-bottom: 7px; font-size: 14px; font-weight: 600; }
.label-row { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.label-row .text-button { font-size: 12px; }
input[type="text"], input[type="search"], textarea { width: 100%; min-height: 44px; padding: 10px 13px; border: 1px solid #d2d2d7; border-radius: 12px; background: #fff; font-size: 16px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #86868b; }
input[type="text"], input[type="search"] { flex: 0 0 auto; }
textarea { flex: 1 0 88px; min-height: 88px; max-height: 180px; resize: none; }
.count { flex: 0 0 auto; margin: 4px 0 13px; color: var(--muted); font-size: 12px; line-height: 1.4; text-align: right; }
.count.over { color: #ba3527; }
.transport-grid { flex: 1 1 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); min-height: 180px; max-height: 340px; gap: 9px; }
.transport-grid .item-button { min-height: 80px; }
.transport-grid img { height: 75px; max-height: 130px; }
.travel-summary { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 14px; margin-top: 14px; padding: 13px 16px; border-radius: 14px; background: var(--blue-soft); font-size: 14px; color: #375977; }
.travel-summary strong { display: block; font-size: 16px; font-weight: 600; }
.travel-summary p, .travel-summary small { font-size: 12px; line-height: 1.5; }
.boot { margin: auto; padding: 24px 10px; text-align: center; }
.boot h2 { margin: 18px 0 10px; font-size: 27px; }
.boot p { font-size: 14px; color: var(--muted); }
.boot button { margin: 18px auto 0; }
.spinner { display: inline-block; width: 28px; height: 28px; border: 2px solid #e4e4e8; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.success { margin: auto 0; padding: 10px 0; max-height: 100%; overflow: auto; scrollbar-width: thin; }
.success-mark { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 18px; border-radius: 50%; background: #e7f5eb; }
.success-mark svg { width: 32px; height: 32px; stroke: #20834d; stroke-width: 3; fill: none; }
.success .eyebrow { font-size: 12px; letter-spacing: .09em; color: var(--muted); }
.success h2 { margin: 12px 0; font-size: 30px; }
#success-title:focus { outline: none; }
body[data-success="true"] .preview-tools { display: none; }
.success > p { color: var(--muted); font-size: 14px; line-height: 1.6; }
#success-name { display: inline-block; max-width: calc(100% - 1em); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.ticket { margin: 20px 0; padding: 18px; border-radius: 16px; background: #f5f5f7; }
.ticket > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.ticket strong { display: block; font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.ticket-route { display: flex; align-items: center; gap: 8px; margin: 12px 0; }
.ticket-route i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.ticket-route span { flex: 1; border-top: 1px dashed #b1b7c0; }
.ticket-route b { font-size: 14px; font-weight: 500; }
.ticket small { display: block; font: 12px/1.4 ui-monospace, monospace; overflow-wrap: anywhere; color: var(--muted); }
.success-footnote { margin-bottom: 18px; }
.success .primary { width: 100%; }
.preview-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.preview-fallback > svg { width: 85%; height: 90%; }
.preview-fallback > img { position: absolute; top: 2%; left: 39%; width: 22%; height: 30%; object-fit: contain; mix-blend-mode: multiply; }
.preview-fallback small { position: absolute; bottom: 0; font-size: 12px; color: #526c7c; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.noscript { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 30px; background: #fff; }
@media (hover: hover) {
  .primary:hover { background: #0077ed; }
  .secondary:hover, .map-back:hover, .map-zoom:hover { background: #e9e9ee; }
  .map-region:hover { fill: #a8cdef; }
  .map-region[aria-pressed="true"]:hover { fill: #3d8dda; }
  .map-choice:hover { background: #e9f2fc; }
  .map-continent-region:hover .map-region { fill: #b3d5f0; }
  .item-button:hover { border-color: #b4c6d7; }
  .item-button[aria-pressed="true"]:hover { border-color: var(--blue); }
}

/* Portrait phones: preview and editing share a predictable vertical budget. */
@media (max-width: 760px) {
  .site-header { flex-basis: 56px; min-height: 56px; padding: 3px 16px; gap: 10px; }
  .brand { font-size: 14px; gap: 7px; }
  .brand > svg { flex-basis: 19px; width: 19px; height: 27px; }
  .language-switch { min-width: 62px; padding: 9px 10px; }
  .workspace { display: flex; flex-direction: column; width: calc(100% - 24px); margin: 0 12px 12px; border-radius: 21px; }
  .preview-panel { flex: 0 0 clamp(148px, calc(40% - 57px), 300px); }
  body[data-step="3"] .preview-panel { flex-basis: clamp(148px, calc(30% - 22px), 235px); }
  body[data-step="2"]:not([data-success="true"]) .preview-panel { display: none; }
  .preview-heading { display: none; }
  .preview-tools { position: absolute; right: 8px; bottom: 8px; padding: 0; }
  .preview-tools > span { display: none; }
  .preview-tools > div { padding: 2px; border-radius: 12px; background: #ffffffeb; }
  .preview-tools button { min-width: 44px; padding: 9px 10px; }
  body[data-step="1"] .preview-tools, body[data-step="3"] .preview-tools { left: auto; right: 7px; bottom: 6px; }
  body[data-step="1"] .preview-tools > div, body[data-step="3"] .preview-tools > div { flex-direction: column; }
  .city-line { height: 38px; }
  .preview-fallback small { display: none; }
  .creator-panel { flex: 1 1 0; width: 100%; padding: 12px 14px 0; }
  .steps { margin-bottom: 10px; }
  .steps button { gap: 4px; font-size: 12px; }
  .steps > button > span { flex-basis: 20px; width: 20px; height: 20px; }
  .section-intro { column-gap: 8px; margin-bottom: 12px; }
  .section-intro h2 { font-size: 23px; }
  .section-intro p { margin-top: 5px; font-size: 14px; }
  [data-page="1"] .section-intro p { display: none; }
  [data-page="1"] .section-intro h2 { font-size: 21px; align-self: center; }
  .intro-action { font-size: 12px; }
  .form-footer { min-height: 64px; padding: 8px 0; gap: 8px; background: #ffffffeb; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
  .primary, .secondary { min-height: 48px; padding: 10px 14px; }
  .draft-indicator { display: none; }
  .form-status { left: 14px; right: 14px; bottom: 70px; }
  .origin-picker { gap: 5px; }
  .map-back { padding: 9px; }
  .map-stage { min-height: 120px; border-radius: 16px; }
  .map-choices .map-choice { padding: 9px 8px; }
  .map-selection { padding: 8px 10px; }
  .outfit-mode { margin-bottom: 6px; padding: 2px; }
  .outfit-style, .outfit-colors { gap: 6px; }
  .outfit-tabs button { padding: 9px 12px; }
  .item-grid { min-height: 80px; max-height: 180px; grid-template-rows: minmax(0, 1fr); grid-auto-columns: calc((100% - 14px) / 3.15); gap: 6px; }
  .item-button { padding: 7px 5px; gap: 4px; border-radius: 12px; }
  .item-button > span:not(.none-icon) { min-height: 2.6em; display: flex; align-items: center; justify-content: center; text-align: center; }
  .item-button img { max-height: 95px; }
  .color-regions { gap: 2px; padding: 2px; }
  .color-region { gap: 4px; padding: 7px 4px; }
  .color-dot { flex-basis: 10px; width: 10px; height: 10px; }
  .palette { gap: 3px; }
  .quiet-note { margin-top: 3px; }
  .outfit-style > .quiet-note { display: none; }
  [data-page="2"] .section-intro { padding-right: 96px; min-height: 44px; }
  .label-row { min-height: 0; }
  .label-row .text-button { position: absolute; right: 0; top: 0; max-width: 96px; }
  .profile-fields { padding-top: 2px; }
  textarea { flex: 1 0 96px; min-height: 96px; max-height: 180px; }
  .count { margin: 3px 0 11px; }
  .transport-grid { flex: 1 1 0; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); min-height: 96px; max-height: 160px; gap: 6px; }
  .transport-grid .item-button { min-height: 80px; padding: 7px 4px; }
  .transport-grid img { height: 65px; max-height: 85px; }
  .travel-summary { margin-top: 10px; padding: 10px 12px; gap: 3px 10px; }
  .travel-summary strong { font-size: 14px; }
  body[data-success="true"] .preview-panel { flex-basis: clamp(160px, calc(38% - 10px), 260px); }
  .success { padding: 2px 0 14px; }
  .success-mark { width: 40px; height: 40px; margin-bottom: 12px; }
  .success-mark svg { width: 27px; height: 27px; }
  .success > .eyebrow { display: none; }
  .success h2 { margin: 0 0 10px; font-size: 24px; }
  .ticket { margin: 14px 0 10px; padding: 14px; }
  .ticket > span { display: none; }
  .ticket strong { font-size: 16px; }
  .ticket-route { margin: 8px 0; }
  .success-footnote { margin-bottom: 12px; }
}
@media (max-width: 760px) and (max-height: 700px) and (orientation: portrait) {
  .site-header { flex-basis: 48px; min-height: 48px; padding-top: 0; padding-bottom: 0; }
  .workspace { margin-bottom: 8px; }
  .creator-panel { padding-top: 8px; }
  .steps { margin-bottom: 4px; }
  .section-intro { margin-bottom: 7px; }
  .section-intro h2 { font-size: 22px; }
  .section-intro p { display: none; }
  [data-page="1"] .section-intro { display: contents; }
  [data-page="1"] .section-intro h2 { display: none; }
  [data-page="1"] .intro-action { position: fixed; top: calc(env(safe-area-inset-top) + 57px); left: calc(env(safe-area-inset-left) + 21px); z-index: 5; padding: 9px 12px; border-radius: 11px; background: #ffffffed; }
  .form-footer { min-height: 60px; padding-top: 8px; padding-bottom: 8px; }
  .primary, .secondary { min-height: 44px; }
  .outfit-mode { padding: 0; margin-bottom: 4px; }
  .outfit-style, .outfit-colors { gap: 4px; }
  .item-grid { min-height: 76px; max-height: 130px; }
  .color-regions { padding: 0; }
  .map-caption { display: none; }
  .origin-picker { gap: 4px; }
  textarea { flex-basis: 80px; min-height: 80px; max-height: 150px; }
  .count { margin-bottom: 7px; }
  body[data-step="3"] .preview-panel { flex-basis: 148px; }
  .transport-grid { min-height: 88px; max-height: 120px; }
  .travel-summary { margin-top: 7px; padding: 8px 11px; }
  body[data-success="true"] .preview-panel { flex-basis: clamp(160px, calc(38% - 10px), 235px); }
}

/* Landscape uses side-by-side space instead of collapsing the avatar or map. */
@media (max-height: 500px) and (orientation: landscape) {
  .site-header { flex-basis: 44px; min-height: 44px; padding: 0 18px; }
  .workspace { display: grid; grid-template-columns: minmax(0, .56fr) minmax(0, 1fr); width: calc(100% - 24px); margin: 0 12px 10px; border-radius: 18px; }
  .preview-panel { display: flex; min-height: 130px; }
  .preview-heading { display: none; }
  .preview-tools { position: absolute; bottom: 7px; left: 7px; right: 7px; padding: 0; justify-content: center; }
  .preview-tools > span { display: none; }
  .preview-tools button { padding-left: 9px; padding-right: 9px; }
  body[data-step="1"] .preview-tools, body[data-step="3"] .preview-tools { left: auto; right: 7px; bottom: 7px; }
  body[data-step="1"] .preview-tools > div, body[data-step="3"] .preview-tools > div { flex-direction: column; padding: 2px; }
  .creator-panel { padding: 3px 14px 0; }
  .steps { margin-bottom: 2px; }
  .section-intro { margin-bottom: 5px; }
  .section-intro h2 { font-size: 21px; }
  .section-intro p { display: none; }
  [data-page="1"] .section-intro { display: contents; }
  [data-page="1"] .section-intro h2 { display: none; }
  [data-page="1"] .intro-action { position: fixed; top: calc(env(safe-area-inset-top) + 57px); left: calc(env(safe-area-inset-left) + 21px); z-index: 5; padding: 8px 12px; border-radius: 11px; background: #ffffffed; }
  .form-footer { min-height: 56px; padding: 6px 0; }
  .primary, .secondary { min-height: 44px; padding: 9px 14px; }
  .draft-indicator { display: none; }
  .outfit-mode { padding: 0; margin-bottom: 4px; }
  .outfit-style, .outfit-colors { gap: 4px; }
  .item-grid { min-height: 70px; max-height: 120px; grid-template-rows: minmax(0, 1fr); grid-auto-columns: calc((100% - 14px) / 3.15); gap: 6px; }
  .item-button { padding: 5px; gap: 3px; }
  .item-button img { max-height: 66px; }
  .outfit-style > .quiet-note { display: none; }
  .color-regions { padding: 0; }
  .palette { gap: 2px; }
  .quiet-note { margin-top: 2px; }
  body[data-step="0"]:not([data-success="true"]) .workspace, body[data-step="2"]:not([data-success="true"]) .workspace { grid-template-columns: 1fr; }
  body[data-step="2"]:not([data-success="true"]) .preview-panel { display: none; }
  body[data-step="0"] .section-intro { display: none; }
  body[data-step="0"] .creator-panel { max-width: none; }
  .origin-picker { display: grid; grid-template-columns: minmax(0, 1fr) 210px; grid-template-rows: repeat(4, minmax(44px, auto)); align-content: stretch; gap: 4px 12px; }
  .map-stage { grid-column: 1; grid-row: 1 / 5; min-height: 140px; height: 100%; }
  .map-toolbar { grid-column: 2; grid-row: 1; }
  .map-toolbar { gap: 7px; }
  .map-breadcrumb { line-height: 1.2; }
  .map-back { padding: 7px; }
  .map-selection { grid-column: 2; grid-row: 2; padding: 7px 9px; font-size: 12px; }
  .map-choices { grid-column: 2; grid-row: 3; }
  .map-search { grid-column: 2; grid-row: 4; }
  .map-search[open] { left: auto; width: min(350px, 100%); }
  .map-caption { display: none; }
  .origin-picker[data-mode="world"] { grid-template-rows: auto 1fr; }
  .origin-picker[data-mode="world"] .map-stage { grid-row: 1 / 3; }
  .origin-picker[data-mode="world"] .map-selection { grid-row: 1; }
  .origin-picker[data-mode="world"] .map-search { grid-row: 2; align-self: start; }
  .profile-fields { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto minmax(80px, 1fr) auto; column-gap: 18px; align-items: start; }
  .profile-fields .label-row { grid-column: 1; grid-row: 1; }
  #display-name { grid-column: 1; grid-row: 2; }
  #name-count { grid-column: 1; grid-row: 3; }
  .profile-fields label[for="introduction"] { grid-column: 2; grid-row: 1; }
  #introduction { grid-column: 2; grid-row: 2; height: 100%; min-height: 80px; max-height: 160px; }
  #intro-count { grid-column: 2; grid-row: 3; }
  .profile-fields .count { margin: 3px 0; }
  .profile-fields > .quiet-note { grid-column: 1 / -1; margin-top: 4px; }
  .transport-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); min-height: 80px; max-height: 130px; }
  .transport-grid .item-button { min-height: 72px; }
  .travel-summary { margin-top: 6px; padding: 7px 11px; font-size: 12px; }
  .success { padding: 8px 0; }
}
@media (max-width: 760px), (max-height: 500px) {
  .success { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-content: center; gap: 8px 12px; padding: 8px 0 12px; }
  .success-mark { grid-column: 1; grid-row: 1; align-self: center; width: 40px; height: 40px; margin: 0; }
  .success-mark svg { width: 27px; height: 27px; }
  .success > .eyebrow { display: none; }
  .success h2 { grid-column: 2; grid-row: 1; font-size: 24px; line-height: 1.2; margin: 0; }
  .success > p { grid-column: 1 / -1; font-size: 14px; line-height: 1.4; }
  .success .ticket { grid-column: 1 / -1; margin: 0; padding: 10px 12px; }
  .success .ticket > span { display: none; }
  .success .ticket strong { font-size: 14px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .success .ticket-route { margin: 4px 0; }
  .success .ticket-route b { font-size: 12px; }
  .success .ticket small { font-size: 12px; line-height: 1.4; }
  .success .success-footnote { margin: 0; font-size: 12px; line-height: 1.4; }
  .success .primary { grid-column: 1 / -1; min-height: 44px; margin-top: 3px; }
}
@media (max-width: 760px) and (max-height: 700px), (max-height: 500px) and (orientation: landscape) {
  .success .success-footnote { display: none; }
}
body[data-keyboard="true"] .site-header, body[data-keyboard="true"] .preview-panel, body[data-keyboard="true"] .steps { display: none; }
body[data-keyboard="true"] .workspace { display: flex; flex-direction: column; margin-top: 8px; }
body[data-keyboard="true"] .creator-panel { flex: 1 1 0; min-height: 0; }
body[data-keyboard="true"] [data-page="2"] .section-intro { display: none; }
body[data-keyboard="true"] .profile-fields { display: flex; flex-direction: column; overflow: auto; }
body[data-keyboard="true"] .label-row .text-button { display: none; }
body[data-keyboard="true"] .profile-fields textarea { flex: 0 0 80px; min-height: 80px; }
body[data-keyboard="true"] .profile-fields > .quiet-note { display: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  button:active:not(:disabled) { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .form-footer, .preview-tools > div { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --muted: #4a4a4f; --line: #a8a8ad; }
  .item-button, .map-choice { border-color: #a8a8ad; }
  .map-region { fill: #aebec9; stroke-width: 1.5; }
  .form-footer { background: #fff; }
}
