:root {
    --paper: #EEF0EA;
    --paper-raised: #F8F9F4;
    --ink: #232620;
    --ink-soft: #5B6058;
    --line: #D3D0C0;
    --accent: #C1502E;
    --accent-soft: #F3DCC6;
    --accent-ink: #7A3018;
    --good: #3F7A5D;
    --bad: #B0392E;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    display: flex;
    min-height: 100vh;
    align-items: flex-start;
    justify-content: center;
    padding: calc(env(safe-area-inset-top, 0px) + 64px) 20px 24px;
    -webkit-tap-highlight-color: transparent;
}

.brand-mark {
    display: block;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    margin: 0 auto 20px;
}

.card {
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 32px 28px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 1px 0 rgba(35, 38, 32, 0.06);
}

.card h1 {
    text-align: center;
}

.card p.lede {
    text-align: center;
}

h1 {
    font-size: 1.6rem;
    margin: 0 0 8px;
}

p.lede {
    color: var(--ink-soft);
    margin: 0 0 24px;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
}

input[type="email"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 1rem;
    background: white;
    color: var(--ink);
}

input[type="email"]:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

button {
    margin-top: 16px;
    width: 100%;
    padding: 11px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

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

.message {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 0.92rem;
}

.message.success {
    background: #E4F0E9;
    color: var(--good);
}

.message.error {
    background: #F6E4E1;
    color: var(--bad);
}

.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.install-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.install-step {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.94rem;
}

.install-step-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent-ink);
    display: flex;
    align-items: center;
    justify-content: center;
}

.skip-link {
    display: block;
    text-align: center;
    margin-top: 18px;
    color: var(--ink-soft);
    font-size: 0.85rem;
    text-decoration: none;
}

a {
    color: var(--accent-ink);
}

.container-wide {
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 32px 40px;
    max-width: 960px;
    width: 100%;
    box-shadow: 0 1px 0 rgba(35, 38, 32, 0.06);
}

body.wide {
    align-items: flex-start;
    padding-top: 48px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.topbar .who {
    color: var(--ink-soft);
    font-size: 0.9rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 0.92rem;
}

th, td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
}

th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
}

.pill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 600;
}

.pill.waitlisted { background: var(--accent-soft); color: var(--accent-ink); }
.pill.approved { background: #E4F0E9; color: var(--good); }
.pill.rejected { background: #F6E4E1; color: var(--bad); }

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    width: auto;
    margin: 0 4px 0 0;
}

.btn-approve { background: var(--good); color: white; }
.btn-reject { background: var(--bad); color: white; }

.token-box {
    background: #FFF9E6;
    border: 1px solid #E8D68A;
    border-radius: 6px;
    padding: 12px 14px;
    margin: 10px 0;
    font-size: 0.85rem;
    word-break: break-all;
}

h2 {
    font-size: 1.3rem;
    margin: 28px 0 4px;
}

/* ---------- app shell (mobile) ---------- */

html {
    -webkit-text-size-adjust: 100%;
    overscroll-behavior-y: none;
}

body.app {
    display: block;
    min-height: 100vh;
    padding: 0;
    background: var(--paper);
    -webkit-tap-highlight-color: transparent;
}

* {
    -webkit-tap-highlight-color: transparent;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--paper);
    padding: calc(env(safe-area-inset-top, 0px) + 14px) 18px 14px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-header h1 {
    font-size: 1.25rem;
    margin: 0;
    flex: 1;
}

.header-brand-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex-shrink: 0;
}

.app-header .back {
    font-size: 1.4rem;
    line-height: 1;
    color: var(--ink);
    text-decoration: none;
    padding: 4px;
    margin: -4px;
}

.app-main {
    /* --tabbar-h is the tab bar's real measured height (set in
       app/view.php's render_tab_bar()) and already includes its own
       safe-area-inset-bottom padding — adding env(safe-area-inset-bottom)
       again here would double-count it. The 62px/84px fallbacks (for the
       brief instant before that inline script runs) approximate the old
       hardcoded values, which is what let content render behind the real
       bar in the first place on any device where the real bar came out
       taller than that guess. */
    padding: 16px 16px calc(var(--tabbar-h, 62px) + 20px);
    max-width: 640px;
    margin: 0 auto;
}

.tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: flex;
    background: var(--paper-raised);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 9px 0 8px;
    text-decoration: none;
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 600;
}

.tab-icon {
    width: 24px;
    height: 24px;
}

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

/* ---------- location bar ---------- */

.location-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 11px 14px;
    margin-bottom: 16px;
    font-size: 0.88rem;
}

.location-bar select {
    border: none;
    background: transparent;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink);
    flex: 1;
}

.link-btn {
    background: none;
    border: none;
    color: var(--accent-ink);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0;
    width: auto;
    margin: 0;
    cursor: pointer;
}

/* ---------- venue cards ---------- */

.venue-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    text-decoration: none;
    color: var(--ink);
}

.venue-card:active {
    background: var(--accent-soft);
}

.venue-card-photo {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--accent-soft);
}

.venue-card-photo-placeholder {
    border: 1px solid var(--line);
}

.venue-card-body {
    min-width: 0;
    flex: 1;
}

.venue-card .name {
    font-weight: 700;
    font-size: 1.02rem;
    margin-bottom: 2px;
}

.venue-card .meta {
    font-size: 0.82rem;
    color: var(--ink-soft);
    margin-bottom: 10px;
}

.card-rating {
    color: var(--ink);
    font-weight: 700;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border-radius: 99px;
    font-size: 0.76rem;
    font-weight: 700;
    background: var(--accent-soft);
    color: var(--accent-ink);
}

.badge .dim {
    font-weight: 500;
    opacity: 0.85;
}

.empty-state {
    text-align: center;
    color: var(--ink-soft);
    padding: 60px 20px;
    font-size: 0.92rem;
}

/* ---------- venue detail / calculator ---------- */

.venue-title {
    font-size: 1.4rem;
    margin: 4px 0 2px;
}

.venue-address {
    color: var(--ink-soft);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.venue-map-box {
    position: relative;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    margin-bottom: 20px;
    background: var(--paper-raised);
}

.venue-map-box #venueMap {
    position: absolute;
    inset: 0;
}

.venue-map-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.venue-map-fallback p {
    max-width: 240px;
    text-align: center;
    color: var(--ink-soft);
    font-size: 0.82rem;
    line-height: 1.5;
}

.section-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-soft);
    font-weight: 700;
    margin: 22px 0 10px;
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 8px;
}

.toggle-row[hidden] {
    display: none;
}

.section-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.section-label-row .section-label {
    margin-bottom: 0; /* the row's own margin (from .section-label's top/bottom) carries the spacing */
}

.add-platform-bubble {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: white;
    font-size: 1.1rem;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-platform-bubble[hidden] {
    display: none;
}

.add-platform-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.add-platform-menu[hidden] {
    display: none;
}

.add-platform-option {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    background: var(--paper-raised);
    border: 1px dashed var(--line);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
}

.add-platform-option img {
    flex-shrink: 0;
    border-radius: 6px;
}

.add-platform-option.added {
    border-style: solid;
    border-color: var(--good);
    color: var(--good);
    cursor: default;
}

.doordash-amount-form {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--paper-raised);
    border: 1px dashed var(--line);
    border-radius: 10px;
    padding: 8px 14px;
}

.doordash-amount-form[hidden] {
    display: none;
}

.doordash-amount-form span {
    color: var(--ink-soft);
    font-weight: 600;
}

.doordash-amount-form input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 7px 9px;
    font-size: 0.9rem;
    font-weight: 600;
}

.toggle-row.disabled {
    opacity: 0.5;
}

.toggle-info {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.platform-logo {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    object-fit: contain;
    background: white;
    border: 1px solid var(--line);
    padding: 3px;
}

.deal-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-soft);
    vertical-align: middle;
    margin-left: 4px;
    padding: 2px;
}

.deal-link-icon:hover {
    color: var(--accent-ink);
}

.offer-picker {
    margin-top: 8px;
}

.offer-picker select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    font-size: 0.85rem;
    color: var(--ink);
}

.custom-percent-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.custom-percent-row[hidden] {
    display: none;
}

.custom-percent-row input {
    width: 70px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

.custom-percent-row span {
    font-size: 0.76rem;
    color: var(--ink-soft);
}

.toggle-row .label {
    font-weight: 600;
    font-size: 0.94rem;
}

.platform-rating {
    font-weight: 500;
    font-size: 0.82rem;
    color: var(--ink-soft);
    margin-left: 4px;
}

.toggle-row .sub {
    font-size: 0.78rem;
    color: var(--ink-soft);
    font-weight: 400;
    margin-top: 1px;
}

/* iOS-style switch */
.switch {
    position: relative;
    width: 46px;
    height: 27px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    position: absolute;
    z-index: 2;
    cursor: pointer;
}

.switch .track {
    position: absolute;
    inset: 0;
    background: var(--line);
    border-radius: 99px;
    transition: background 0.15s;
}

.switch .thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
    transition: transform 0.15s;
}

.switch input:checked ~ .track {
    background: var(--good);
}

.switch input:checked ~ .thumb {
    transform: translateX(19px);
}

.switch input:disabled ~ .track {
    opacity: 0.5;
}

.bill-input-row {
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 8px;
}

.bill-input-row label {
    margin-bottom: 8px;
}

.bill-input-row .dollar-input {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
}

.bill-input-row .dollar-input span {
    color: var(--ink-soft);
    font-weight: 600;
}

.bill-input-row input {
    border: none;
    padding: 10px 6px;
    font-size: 1.1rem;
    font-weight: 700;
    width: 100%;
    background: transparent;
}

.bill-input-row input:focus {
    outline: none;
}

.time-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    font-size: 0.95rem;
    margin-top: 4px;
}

.ledger {
    margin-top: 18px;
}

.ledger-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 9px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 0.92rem;
}

.ledger-row .l-label {
    color: var(--ink-soft);
}

.ledger-row .l-value {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.ledger-row.skip .l-label,
.ledger-row.skip .l-value {
    color: var(--ink-soft);
    text-decoration: line-through;
    font-weight: 400;
}

.hero-result {
    background: var(--accent);
    color: white;
    border-radius: 14px;
    padding: 22px 20px;
    margin-top: 16px;
    text-align: center;
}

.hero-result .big {
    font-size: 2.1rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.hero-result .small {
    font-size: 0.85rem;
    opacity: 0.92;
    margin-top: 4px;
}

.deep-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 18px;
}

/* ---------- map + bottom sheet ---------- */

.map-wrap {
    position: fixed;
    top: var(--header-h, 60px);
    bottom: var(--tabbar-h, 62px);
    left: 0;
    right: 0;
    overflow: hidden;
    background: var(--paper-raised);
}

#map {
    position: absolute;
    inset: 0;
}

.map-fallback {
    position: absolute;
    inset: 0;
    padding: 32px;
    background: var(--paper-raised);
}

.map-fallback p {
    max-width: 280px;
    margin: 40vh auto 0;
    text-align: center;
    color: var(--ink-soft);
    font-size: 0.9rem;
    line-height: 1.5;
}

.map-search-bar {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 14px;
    box-shadow: 0 2px 10px rgba(35, 38, 32, 0.12);
    color: var(--ink-soft);
}

.map-search-bar input {
    border: none;
    background: transparent;
    font-size: 0.88rem;
    color: var(--ink);
    flex: 1;
    min-width: 0;
}

.map-search-bar input::-webkit-search-cancel-button {
    display: none;
}

.search-clear-btn {
    border: none;
    background: none;
    padding: 2px;
    margin: -2px;
    color: var(--ink-soft);
    cursor: pointer;
}

.search-clear-btn:not([hidden]) {
    display: flex;
}

/* Everything below the search bar shifts down by its height + gap (~58px). */

.map-topbar {
    position: absolute;
    top: 72px;
    left: 14px;
    right: 14px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 14px;
    box-shadow: 0 2px 10px rgba(35, 38, 32, 0.12);
    font-size: 0.88rem;
}

.map-topbar select {
    border: none;
    background: transparent;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink);
    flex: 1;
}

.filter-row {
    position: absolute;
    top: 126px;
    left: 14px;
    right: 14px;
    z-index: 4;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--paper-raised);
    border: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 11px;
    border-radius: 99px;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(35, 38, 32, 0.1);
    user-select: none;
}

.filter-chip input {
    margin: 0;
    accent-color: var(--accent);
    width: 14px;
    height: 14px;
}

.filter-chip.checked {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent-ink);
}

.search-area-btn {
    position: absolute;
    top: 174px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    z-index: 4;
    background: var(--ink);
    color: white;
    border: none;
    border-radius: 99px;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 3px 12px rgba(0,0,0,0.25);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s, transform 0.18s;
}

.search-area-btn.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(4px);
}

.search-area-btn:disabled {
    opacity: 0.7;
    cursor: default;
}

.marker-pin {
    width: 34px;
    height: 34px;
    border-radius: 50% 50% 50% 0;
    background: var(--accent);
    border: 2px solid white;
    transform: rotate(-45deg);
    box-shadow: 0 1px 4px rgba(0,0,0,0.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-pin .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    transform: rotate(45deg);
}

.marker-pin.highlighted {
    background: var(--good);
}

.sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 86%;
    background: var(--paper);
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    box-shadow: 0 -2px 16px rgba(35, 38, 32, 0.16);
    z-index: 5;
    display: flex;
    flex-direction: column;
    touch-action: none;
}

.sheet-handle {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0 8px;
    cursor: grab;
}

.sheet-handle .bar {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--line);
}

.sheet-count {
    flex-shrink: 0;
    padding: 0 18px 10px;
    font-size: 0.8rem;
    color: var(--ink-soft);
    font-weight: 600;
}

.sheet-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* .sheet sets touch-action:none so dragging the handle never triggers a
       page scroll; without overriding it here that also blocks the list's
       own native scrolling (a child's effective touch-action is the
       intersection with its ancestors'). map.js's pointer handling below
       still intercepts the specific gestures (collapsed, or pulling down
       from the very top) that should move the sheet instead of the list. */
    touch-action: pan-y;
    padding: 0 16px calc(env(safe-area-inset-bottom, 0px) + 20px);
}

.venue-card.highlighted {
    border-color: var(--good);
    box-shadow: 0 0 0 2px var(--good);
}

.match-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 16px;
    background: var(--paper-raised);
}

.match-meta {
    font-size: 0.8rem;
    color: var(--ink-soft);
    margin-bottom: 12px;
}

.match-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 14px;
}

@media (max-width: 640px) {
    .match-grid { grid-template-columns: 1fr; }
}

.match-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-soft);
    font-weight: 700;
    margin-bottom: 4px;
}

.match-name {
    font-weight: 700;
    font-size: 1rem;
}

.match-address {
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin: 2px 0 6px;
}

.match-deal {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-ink);
    margin-bottom: 4px;
}

.match-link {
    font-size: 0.8rem;
}

.match-actions {
    display: flex;
    gap: 8px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.deep-link-btn {
    display: block;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--paper-raised);
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
}

/* ---------- how it works ---------- */

.hiw-prep {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 8px;
}

.hiw-prep-item {
    display: flex;
    gap: 12px;
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px 16px;
}

.hiw-prep-num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.hiw-prep-title {
    font-weight: 700;
    font-size: 0.94rem;
    margin-bottom: 3px;
}

.hiw-prep-text {
    font-size: 0.85rem;
    color: var(--ink-soft);
    line-height: 1.4;
}

.hiw-wizard {
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px 16px;
}

.hiw-step-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 12px;
}

.hiw-shot {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--line);
    margin-bottom: 12px;
}

.hiw-step-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--ink);
}

.hiw-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 18px;
}

.hiw-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--line);
    cursor: pointer;
}

.hiw-dot.active {
    background: var(--accent);
}

.hiw-actions {
    display: flex;
    align-items: center;
    margin-top: 16px;
}

.hiw-actions a.btn-small:not([hidden]) {
    display: inline-block;
    text-decoration: none;
}
