:root {
    --primary-color: #f26b1d;
    --primary-dark: #d9550f;
    --bg-color: #fff7eb;
    --text-color: #2f1b10;
    --muted-color: #8c776a;
    --card-bg: #ffffff;
    --border-radius: 14px;
    --max-width: 1100px;
    --tile-color: #f0782b;
    --tile-hover: #ff8d3b;
    --tile-shadow: 0 12px 24px rgba(240, 120, 43, 0.18);
    --safe-area-top: 0px;
}

@supports (padding-top: env(safe-area-inset-top)) {
    :root {
        --safe-area-top: env(safe-area-inset-top);
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
}

.page {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 16px 40px;
}

.header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.hero-banner {
    position: relative;
    border-radius: 0 0 24px 24px;
    margin: 0 -16px;
    padding: calc(24px + var(--safe-area-top)) 20px 20px;
    color: #fff;
    overflow: hidden;
    box-shadow: none;
}

.hero-banner__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.hero-banner__button {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    text-align: left;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.hero-banner__link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.85);
    outline-offset: 4px;
    border-radius: 18px;
}

.hero-banner__button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.85);
    outline-offset: 4px;
    border-radius: 18px;
}

.hero-banner__content h2 {
    margin: 0 0 6px;
    font-size: 1.4rem;
}

.hero-banner__content p {
    margin: 0;
    font-size: 0.86rem;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.4;
}

.hero-banner__tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.banner-dots {
    margin: 12px 0 0;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.banner-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease-in-out, background 0.2s ease-in-out;
}

.banner-dot.active {
    background: #fff;
    transform: scale(1.1);
}

.hero-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 4px;
    text-align: center;
    align-items: center;
}

.hero-header h1 {
    margin: 0;
    font-size: 1.4rem;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 12px 0 0;
}

.hero-actions__buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
}

.hero-actions__buttons .hero-square-btn {
    flex: 1 1 0;
}

.hero-actions__buttons .hero-square-btn--mini {
    flex: 0 0 auto;
}

.hero-square-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 18px;
    border: 1px solid rgba(242, 107, 29, 0.18);
    background: #fff;
    color: var(--primary-dark);
    padding: 10px 8px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(242, 107, 29, 0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    min-height: 84px;
    text-align: center;
}

.hero-square-btn--accent {
    background: var(--primary-dark);
    color: #fff;
    border-color: var(--primary-dark);
    box-shadow: 0 16px 26px rgba(217, 85, 15, 0.35);
}

.hero-square-btn--primary {
    background: #fffaf3;
    color: var(--primary-dark);
    border-color: rgba(242, 107, 29, 0.3);
}

.hero-square-btn--mini {
    width: 68px;
    height: 68px;
    padding: 8px;
    min-height: 0;
    box-shadow: 0 10px 18px rgba(242, 107, 29, 0.12);
}

.hero-square-btn__label--stacked {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 2px;
    width: 100%;
    font-weight: 700;
    align-content: center;
    justify-items: center;
}

.hero-square-btn__stack-cell {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-square-btn--active {
    background: rgba(242, 107, 29, 0.12);
    box-shadow: 0 14px 24px rgba(242, 107, 29, 0.18);
}

.hero-square-btn:hover,
.hero-square-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 16px 26px rgba(242, 107, 29, 0.2);
}

.hero-square-btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.hero-square-btn__label {
    font-size: 0.9rem;
    line-height: 1.2;
}

.hero-square-btn__label.hero-square-btn__label--stacked {
    font-size: 0.82rem;
    line-height: 1;
}

.hero-square-btn__subtitle {
    font-size: 0.68rem;
    color: var(--muted-color);
    line-height: 1.2;
    max-width: 100%;
    word-break: break-word;
}

.hero-search {
    --hero-search-height: 84px;
    display: flex;
    align-items: center;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(242, 107, 29, 0.18);
    box-shadow: 0 8px 18px rgba(242, 107, 29, 0.12);
    padding: 0 0 0 16px;
    min-height: 84px;
    min-height: var(--hero-search-height);
}

.hero-search:focus-within {
    border-color: rgba(242, 107, 29, 0.38);
    box-shadow: 0 16px 28px rgba(242, 107, 29, 0.18);
}

.hero-search__input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.95rem;
    background: transparent;
    padding: calc((var(--hero-search-height, 84px) - 1.4em) / 2) 12px calc((var(--hero-search-height, 84px) - 1.4em) / 2) 0;
    color: var(--text-color);
    height: auto;
    line-height: 1.4;
}

.hero-search__input::placeholder {
    color: rgba(47, 24, 10, 0.45);
}

.hero-search__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: auto;
    border: none;
    background: var(--primary-dark);
    color: #fff;
    padding: 0 18px;
    border-radius: 0 18px 18px 0;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease;
    align-self: stretch;
}

.hero-search__button:hover,
.hero-search__button:focus-visible {
    background: var(--primary-color);
}

.hero-search__button:active {
    transform: scale(0.98);
}

.hero-divider {
    margin-top: 12px;
    height: 1px;
    background: rgba(47, 24, 10, 0.12);
    border-radius: 1px;
}

.form-section {
    margin-top: 20px;
}

.form-toolbar {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 12px;
}

.form-columns {
    display: grid;
    gap: 16px;
}

@media (min-width: 900px) {
    .form-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.form-card {
    margin-bottom: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
    border: 1px solid rgba(242, 107, 29, 0.12);
}

.form-card--active {
    border-color: rgba(242, 107, 29, 0.5);
    box-shadow: 0 24px 42px rgba(242, 107, 29, 0.18);
    transform: translateY(-2px);
}

.form-card--unified {
    padding: 0;
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 48px rgba(242, 107, 29, 0.12);
}

.form-card__header {
    padding: 28px 24px 22px;
    background: linear-gradient(135deg, #ffe8d4, #ffd6b2);
    color: var(--primary-dark);
}

.form-card__header h2 {
    margin: 18px 0 8px;
    font-size: 1.28rem;
}

.form-card__intro {
    margin: 0;
    color: rgba(47, 27, 16, 0.8);
    line-height: 1.5;
    font-size: 0.92rem;
}

.form-card__modes {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-mode-btn {
    border: 1px solid rgba(242, 107, 29, 0.35);
    background: rgba(255, 255, 255, 0.6);
    color: var(--primary-dark);
    font-weight: 600;
    border-radius: 999px;
    padding: 6px 16px;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.form-mode-btn.active {
    background: var(--primary-dark);
    color: #fff;
    border-color: var(--primary-dark);
    box-shadow: 0 14px 26px rgba(217, 85, 15, 0.3);
}

.form-mode-btn:not(.active):hover,
.form-mode-btn:not(.active):focus-visible {
    background: rgba(255, 255, 255, 0.85);
    transform: translateY(-1px);
    outline: none;
}

.form-selected-merchant {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 24px;
    background: #fff7ec;
    border-bottom: 1px solid rgba(242, 107, 29, 0.12);
}

.form-selected__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-selected__label {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(47, 27, 16, 0.55);
}

.form-selected__name {
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--primary-dark);
}

.form-selected__location {
    font-size: 0.85rem;
    color: var(--muted-color);
}

.form-selected-merchant .btn-secondary {
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
}

.form-merchant-selector {
    padding: 20px 24px 24px;
    background: #fff9f2;
    border-bottom: 1px solid rgba(242, 107, 29, 0.12);
}

.form-merchant-selector__controls {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    align-items: end;
}

.form-merchant-selector__controls label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.form-merchant-selector__controls select,
.form-merchant-selector__controls input {
    border: 1px solid rgba(242, 107, 29, 0.25);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 0.9rem;
    background: #fff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-merchant-selector__controls select:focus,
.form-merchant-selector__controls input:focus {
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(242, 107, 29, 0.18);
    outline: none;
}

.form-merchant-selector__results {
    margin-top: 16px;
    display: grid;
    gap: 12px;
}

.merchant-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(242, 107, 29, 0.18);
    background: #fff;
    cursor: pointer;
    text-align: left;
    color: var(--primary-dark);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.merchant-option:hover,
.merchant-option:focus-visible {
    transform: translateY(-2px);
    border-color: var(--primary-dark);
    box-shadow: 0 18px 32px rgba(242, 107, 29, 0.18);
    outline: none;
}

.merchant-option__name {
    font-weight: 700;
    font-size: 0.98rem;
}

.merchant-option__location {
    font-size: 0.84rem;
    color: var(--muted-color);
}

.form-merchant-selector__empty {
    margin-top: 16px;
    padding: 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--muted-color);
    font-size: 0.9rem;
}

.form-card--unified form {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: #fff;
}

.form-card--unified form h3 {
    margin: 4px 0 8px;
    color: var(--primary-dark);
}

.form-hint {
    margin: -6px 0 12px;
    font-size: 0.85rem;
    color: rgba(47, 27, 16, 0.6);
}

.form-card--unified form input,
.form-card--unified form select,
.form-card--unified form textarea {
    border: 1px solid rgba(242, 107, 29, 0.25);
    background: #fffdfc;
}

.form-card--unified form input:focus,
.form-card--unified form select:focus,
.form-card--unified form textarea:focus {
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(242, 107, 29, 0.18);
    outline: none;
}

@media (max-width: 640px) {
    .form-card--unified form {
        padding: 20px 18px;
    }

    .form-selected-merchant,
    .form-merchant-selector {
        padding: 18px;
    }
}

.btn-ghost {
    background: none;
    border: none;
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 8px 0;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
    text-decoration: underline;
}

.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 12px 24px rgba(242, 107, 29, 0.08);
    padding: 14px 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.filter-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
}

.filter-summary__text {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.92rem;
}

.filter-summary .btn-link {
    white-space: nowrap;
}


.filter-bar {
    padding: 12px 14px;
    border: 1px solid rgba(47, 24, 10, 0.08);
    border-radius: 14px;
    box-shadow: 0 8px 16px rgba(47, 24, 10, 0.08);
    background: #fffdf9;
}

.filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 0;
    width: 100%;
}

.filters select,
.filters input {
    padding: 8px 10px;
    border: 1px solid #dde3f0;
    border-radius: 10px;
    font-size: 0.88rem;
    flex: 1 1 calc(33.33% - 6px);
    min-width: 92px;
    max-width: calc(33.33% - 6px);
    background: #fff;
    min-height: 34px;
}

.filters #filter-keyword {
    flex: 1 1 calc(33.33% - 6px);
    max-width: calc(33.33% - 6px);
}


.merchant-list {
    display: grid;
    gap: 14px;
}

.area-section {
    margin-bottom: 20px;
}


.floor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: 8px 10px;
    justify-items: stretch;
}

.area-section .floor-grid + .floor-grid {
    margin-top: 12px;
}

.floor-badge {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    background: linear-gradient(180deg, #fa8342, #f45b1a);
    color: #fff;
    border-radius: 12px;
    padding: 8px 6px;
    font-weight: 700;
    box-shadow: var(--tile-shadow);
    aspect-ratio: 1 / 1;
    width: 100%;
    cursor: default;
    user-select: none;
}

.floor-badge--default {
    background: linear-gradient(180deg, #fa8342, #f45b1a);
}

.floor-badge--xingguang {
    background: linear-gradient(180deg, #ff5a3c, #e63a2f);
}

.floor-badge--yichuan {
    background: linear-gradient(180deg, #ff8f7b, #f960a6);
}

.floor-badge--beiyuan {
    background: linear-gradient(180deg, #ffb347, #ff9233);
}

.floor-badge--zhonglan {
    background: linear-gradient(180deg, #ff9f68, #ff7340);
}

.floor-badge--xiaowai {
    background: linear-gradient(180deg, #ffb66c, #ff8450);
}

.floor-badge__area {
    font-size: 0.7rem;
    opacity: 0.9;
    letter-spacing: 0.05em;
}

.floor-badge__floor {
    font-size: 0.92rem;
}

.merchant-tile {
    border: none;
    background: var(--tile-color);
    color: #fff;
    border-radius: 12px;
    padding: 10px 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    gap: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    box-shadow: var(--tile-shadow);
    transition: transform 0.18s ease-in-out, background 0.18s ease-in-out;
    aspect-ratio: 1 / 1;
    outline: none;
    max-width: 128px;
    width: 100%;
    justify-self: center;
}

.merchant-tile:hover,
.merchant-tile:focus-visible {
    transform: translateY(-4px);
    background: var(--tile-hover);
    box-shadow: var(--tile-shadow), 0 0 0 2px rgba(255, 255, 255, 0.4);
}

.merchant-tile__name {
    display: block;
    word-break: break-word;
    line-height: 1.2;
    align-self: flex-start;
}

.merchant-tile__tips {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.72rem;
    line-height: 1.2;
    opacity: 0.85;
    margin-top: 6px;
    text-align: left;
    align-items: flex-start;
    width: 100%;
}

.merchant-tile__tip-line {
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.btn-link {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
}

.btn-link:hover,
.btn-link:focus {
    text-decoration: underline;
}

.qr-card {
    border: 1px solid #edf1fa;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
}

.qr-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid rgba(15, 107, 255, 0.08);
}

.qr-card .qr-label {
    margin-top: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

form .form-group {
    margin-bottom: 16px;
}

form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

form input,
form select,
form textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #dde3f0;
    font-size: 0.95rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

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

.file-input {
    border: 1px dashed rgba(242, 107, 29, 0.35);
    padding: 16px;
    border-radius: 10px;
    background: rgba(255, 244, 232, 0.6);
    transition: border-color 0.18s ease, background 0.18s ease;
    position: relative;
}

.file-input:hover,
.file-input:focus-within {
    border-color: var(--primary-dark);
    background: rgba(255, 240, 224, 0.85);
}

.file-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.file-preview {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(47, 27, 16, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.95);
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.file-preview--clickable {
    cursor: pointer;
}

.file-preview--clickable:hover {
    border-color: rgba(242, 107, 29, 0.45);
    box-shadow: 0 4px 12px rgba(242, 107, 29, 0.12);
}

.file-preview--clickable:focus {
    outline: none;
    border-color: rgba(242, 107, 29, 0.65);
    box-shadow: 0 0 0 3px rgba(242, 107, 29, 0.15);
}

.file-preview--empty {
    border-style: dashed;
    border-color: rgba(47, 27, 16, 0.18);
    background: rgba(255, 251, 246, 0.8);
}

.file-preview__thumb {
    width: 82px;
    height: 82px;
    border-radius: 8px;
    background: rgba(255, 248, 240, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.file-preview__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.file-preview__placeholder {
    font-size: 0.8rem;
    color: rgba(79, 58, 42, 0.6);
    text-align: center;
    padding: 0 6px;
}

.file-preview__meta {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.file-preview__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(47, 27, 16, 0.9);
    background: rgba(255, 224, 200, 0.7);
}

.file-preview__badge--existing {
    background: rgba(183, 227, 183, 0.75);
    color: #2d6a38;
}

.file-preview__badge--new {
    background: rgba(255, 205, 162, 0.85);
    color: #b45309;
}

.file-preview__badge--empty {
    background: rgba(233, 215, 201, 0.6);
    color: rgba(79, 58, 42, 0.7);
}

.toast-stack {
    position: fixed;
    bottom: 28px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 5000;
    pointer-events: none;
}

.toast {
    min-width: 260px;
    max-width: min(360px, calc(100vw - 40px));
    padding: 14px 18px;
    border-radius: 12px;
    background: rgba(47, 27, 16, 0.95);
    color: #fff;
    box-shadow: 0 12px 32px rgba(47, 27, 16, 0.28);
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    animation: toast-enter 0.26s ease;
}

.toast--success {
    background: rgba(17, 181, 124, 0.95);
    box-shadow: 0 8px 24px rgba(17, 181, 124, 0.3);
}

.toast--error {
    background: rgba(214, 74, 53, 0.95);
    box-shadow: 0 8px 24px rgba(214, 74, 53, 0.35);
}

.form-status {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(255, 247, 238, 0.9);
    color: rgba(79, 58, 42, 0.9);
    border: 1px solid rgba(242, 107, 29, 0.25);
}

.form-status + .form-actions {
    margin-top: 8px;
}

.form-status--success {
    background: rgba(210, 244, 229, 0.95);
    border-color: rgba(17, 181, 124, 0.5);
    color: #1e7a56;
}

.form-status--error {
    background: rgba(255, 226, 223, 0.95);
    border-color: rgba(214, 74, 53, 0.4);
    color: #a12d1f;
}

.form-status--info {
    background: rgba(236, 244, 255, 0.95);
    border-color: rgba(92, 143, 214, 0.4);
    color: #2b5fa6;
}

.toast__content {
    flex: 1;
    font-size: 0.92rem;
    line-height: 1.4;
}

.toast__close {
    border: none;
    background: none;
    color: inherit;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: background 0.2s ease, color 0.2s ease;
}

.toast__close:hover,
.toast__close:focus-visible {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    outline: none;
}

@keyframes toast-enter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .toast-stack {
        bottom: 16px;
        right: 16px;
        left: 16px;
        align-items: center;
    }

    .toast {
        width: 100%;
        max-width: unset;
    }
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
}

.btn-secondary {
    background: #fff;
    color: var(--primary-dark);
    border: 1px solid rgba(242, 107, 29, 0.4);
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    color: #fff;
    margin-bottom: 16px;
}

.alert-success {
    background: #11b57c;
}

.alert-error {
    background: #e55265;
}

.empty-state {
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--muted-color);
    padding: 24px 16px;
}

.token-box {
    background: var(--primary-color);
    color: #fff;
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    font-weight: 700;
    letter-spacing: 2px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(57, 29, 9, 0.55);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 16px;
    z-index: 1000;
    overflow-y: auto;
}

.modal {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(57, 29, 9, 0.18);
    width: min(520px, calc(100% - 32px));
    padding: 28px 24px 24px;
    position: relative;
    animation: modal-in 0.2s ease-out;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(242, 107, 29, 0.12);
    color: var(--primary-dark);
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
}

.modal-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.6rem;
}

.modal-subtitle {
    margin: 0;
    color: var(--text-color);
    font-size: 0.95rem;
}

.modal-meta {
    margin: 0;
    color: var(--muted-color);
    font-size: 0.85rem;
}

.modal-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    background: #ffe7d4;
    padding: 4px;
    border-radius: 12px;
}

.modal-tab {
    flex: 1;
    padding: 10px 12px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: #a35222;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease-in-out, color 0.2s ease-in-out;
}

.modal-tab.active {
    background: #fff;
    color: var(--primary-dark);
    box-shadow: inset 0 0 0 1px rgba(242, 107, 29, 0.18);
}

.modal-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-tip {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted-color);
    text-align: center;
}

.modal-qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.modal-qr-card {
    background: #fffaf3;
    border: 1px solid rgba(242, 107, 29, 0.18);
    border-radius: 14px;
    padding: 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-qr-card img {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(242, 107, 29, 0.15);
    object-fit: contain;
    aspect-ratio: 1 / 1;
}

.modal-empty {
    padding: 24px;
    border-radius: 14px;
    text-align: center;
    background: #fff0df;
    color: var(--muted-color);
    font-size: 0.95rem;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background: var(--primary-color);
    border: none;
    border-radius: 999px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

.btn-download:hover,
.btn-download:focus {
    background: var(--primary-dark);
    color: #fff;
}

.modal-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-info__section {
    background: #fffaf3;
    border: 1px solid rgba(242, 107, 29, 0.15);
    border-radius: 14px;
    padding: 14px 16px;
}

.modal-info__section h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: var(--primary-dark);
}

.modal-info__section p {
    margin: 4px 0;
    line-height: 1.5;
}

.modal-info__section ul {
    margin: 0;
    padding-left: 18px;
    line-height: 1.6;
}

.modal-info__section ul li {
    margin-bottom: 4px;
}

.modal-info__actions {
    text-align: center;
    margin-top: 4px;
}

.modal-info__actions .btn-secondary {
    width: 100%;
}

.modal-info__section a {
    color: var(--primary-dark);
}

.modal-info__section a:hover,
.modal-info__section a:focus {
    text-decoration: underline;
}

.selector-overlay {
    position: fixed;
    inset: 0;
    background: rgba(57, 29, 9, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    z-index: 1100;
}

.selector-panel {
    width: min(480px, calc(100% - 24px));
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 28px 54px rgba(57, 29, 9, 0.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: calc(100vh - 64px);
}

.selector-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 12px;
    border-bottom: 1px solid rgba(242, 107, 29, 0.12);
}

.selector-header h2 {
    margin: 0;
    font-size: 1.18rem;
    color: var(--primary-dark);
}

.selector-close {
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--muted-color);
    line-height: 1;
}

.selector-body {
    padding: 16px 20px 20px;
    display: grid;
    gap: 18px;
    flex: 1;
    overflow-y: auto;
}

.selector-group h3 {
    margin: 0 0 10px;
    font-size: 0.95rem;
    color: var(--primary-dark);
}

.selector-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.selector-options--wrap {
    justify-content: flex-start;
}

.selector-option {
    border: 1px solid rgba(242, 107, 29, 0.24);
    border-radius: 999px;
    background: #fffaf3;
    color: var(--primary-dark);
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.selector-option:hover,
.selector-option:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(242, 107, 29, 0.16);
}

.selector-option.active {
    background: var(--primary-dark);
    color: #fff;
    border-color: var(--primary-dark);
    box-shadow: 0 18px 32px rgba(217, 85, 15, 0.26);
}

.selector-empty {
    padding: 16px;
    border-radius: 12px;
    background: #fff6ec;
    color: var(--muted-color);
    font-size: 0.85rem;
}

.selector-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 12px 20px 20px;
    border-top: 1px solid rgba(242, 107, 29, 0.12);
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 14px 20px;
    }

    .hero-banner {
        padding: calc(32px + var(--safe-area-top)) 18px 20px;
    }

    .hero-banner__content {
        text-align: left;
    }

    .hero-actions {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    .hero-search {
        grid-column: span 2;
    }

    .floor-grid {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    }
}

@media (max-width: 480px) {
    .floor-grid {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    }

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

    .hero-search {
        grid-column: span 2;
        min-height: 64px;
        --hero-search-height: 64px;
        min-height: var(--hero-search-height);
    }

    .hero-search__input {
        line-height: 1.4;
    }

    .hero-square-btn {
        min-height: 64px;
        font-size: 0.85rem;
    }

    .filter-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
