:root {
    --page: #fff7ed;
    --surface: #ffffff;
    --surface-soft: #fff0df;
    --text: #202127;
    --muted: #5b5d66;
    --primary: #2f3037;
    --primary-dark: #17181d;
    --primary-soft: #f1f1f3;
    --accent: #f15f1b;
    --accent-dark: #c9470f;
    --accent-soft: #fff0e6;
    --warning: #a8321f;
    --warning-soft: #fff0ec;
    --border: #dfd2bf;
    --focus: #f15f1b;
    --shadow: 0 14px 36px rgba(47, 48, 55, 0.12);
    --radius: 22px;
    --field-height: 60px;
}

body.dark-mode {
    --page: #0f1115;
    --surface: #171a21;
    --surface-soft: #20242d;
    --text: #f5f5f6;
    --muted: #b7bac4;
    --primary: #f15f1b;
    --primary-dark: #ffb184;
    --primary-soft: #2b1b14;
    --accent: #f15f1b;
    --accent-dark: #ffb184;
    --accent-soft: #2b1b14;
    --warning: #ff8f7d;
    --warning-soft: #2b1714;
    --border: #343a46;
    --focus: #ff9b5f;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.48);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
    font-size: 18px;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 8% 0%, rgba(241, 95, 27, 0.16), transparent 30rem),
        radial-gradient(circle at 92% 6%, rgba(47, 48, 55, 0.10), transparent 28rem),
        var(--page);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.55;
}

body.dark-mode {
    background:
        radial-gradient(circle at 10% 0%, rgba(241, 95, 27, 0.10), transparent 28rem),
        radial-gradient(circle at 92% 8%, rgba(255, 255, 255, 0.05), transparent 26rem),
        var(--page);
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background: #12151b;
    color: var(--text);
    border-color: var(--border);
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

:focus-visible {
    outline: 4px solid var(--focus);
    outline-offset: 3px;
}

.top-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(47, 48, 55, 0.14);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 28px rgba(47, 48, 55, 0.08);
}

body.dark-mode .top-header {
    border-bottom-color: rgba(241, 95, 27, 0.24);
    background: rgba(15, 17, 21, 0.94);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
}

.header-inner,
.hero,
.cost-section,
.loyalty-section,
.order-section,
.footer {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    color: var(--text);
    font-weight: 900;
}

.brand-logo {
    display: block;
    width: clamp(150px, 18vw, 220px);
    height: auto;
    border-radius: 16px;
}

body.dark-mode .button-primary,
body.dark-mode .button-success {
    color: #000000;
}

.header-actions,
.hero-buttons,
.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.contrast-toggle,
.quick-order,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 14px 22px;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
}

.contrast-toggle,
.button-secondary {
    border: 2px solid var(--primary);
    background: var(--surface);
    color: var(--primary-dark);
}

.quick-order {
    border: 2px solid var(--accent);
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(241, 95, 27, 0.22);
}

.contrast-toggle[aria-pressed="true"] {
    background: var(--accent);
    color: #000000;
}

.button {
    border: 0;
    text-align: center;
}

.button-primary,
.button-success {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(47, 48, 55, 0.20);
}

.button-primary:hover,
.button-success:hover,
.quick-order:hover {
    transform: translateY(-1px);
}

.button-secondary {
    border: 2px solid var(--primary);
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.full-width {
    width: 100%;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
    gap: 28px;
    align-items: stretch;
    padding: 44px 0 28px;
}

.hero-content,
.important-box,
.panel,
.cost-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.hero-content {
    position: relative;
    overflow: hidden;
    padding: clamp(24px, 5vw, 42px);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 240, 230, 0.92)),
        radial-gradient(circle at 90% 12%, rgba(241, 95, 27, 0.18), transparent 16rem);
}

.hero-content::after {
    content: "";
    position: absolute;
    right: -70px;
    bottom: -90px;
    width: 230px;
    height: 230px;
    border-radius: 999px;
    background: rgba(47, 48, 55, 0.08);
    pointer-events: none;
}

body.dark-mode .hero-content {
    background:
        linear-gradient(135deg, rgba(23, 26, 33, 0.98), rgba(32, 36, 45, 0.94)),
        radial-gradient(circle at 90% 12%, rgba(241, 95, 27, 0.16), transparent 16rem);
}

body.dark-mode .hero-content::after {
    background: rgba(255, 255, 255, 0.05);
}

.service-label,
.section-title span {
    display: inline-block;
    margin: 0 0 14px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-weight: 900;
}

body.dark-mode .service-label,
body.dark-mode .section-title span,
body.dark-mode .badge {
    border: 2px solid var(--border);
}

h1,
h2,
h3,
h4,
p {
    margin-top: 0;
}

h1 {
    max-width: 780px;
    margin-bottom: 18px;
    color: var(--primary-dark);
    font-size: clamp(2.7rem, 7vw, 5rem);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero-text {
    max-width: 700px;
    margin-bottom: 28px;
    color: var(--muted);
    font-size: clamp(1.25rem, 2.4vw, 1.55rem);
    line-height: 1.5;
}

.important-box {
    padding: 26px;
    border-color: rgba(241, 95, 27, 0.32);
    background: linear-gradient(180deg, var(--accent-soft), #ffffff);
}

.important-box h2 {
    margin-bottom: 16px;
    font-size: 1.7rem;
}

.important-box ul {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.important-box li {
    padding-left: 34px;
    position: relative;
    font-size: 1.08rem;
}

.important-box li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-dark);
    font-weight: 900;
}

.cost-section,
.loyalty-section,
.order-section {
    padding: 28px 0;
}

.order-status-section {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 45;
    width: min(500px, calc(100vw - 36px));
    max-height: min(82vh, 760px);
    margin: 0;
    padding: 16px;
    overflow-y: auto;
    border: 3px solid var(--primary);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.25);
    scroll-margin: 0;
}

.order-status-section:focus {
    outline: 4px solid var(--focus);
    outline-offset: 4px;
}

.status-panel-toggle {
    display: none;
}

.status-panel-body {
    display: block;
}

.order-status-section .section-title {
    position: sticky;
    top: -16px;
    z-index: 1;
    margin: -16px -16px 14px;
    padding: 16px;
    border-bottom: 2px solid var(--border);
    border-radius: 20px 20px 0 0;
    background: rgba(255, 255, 255, 0.98);
}

.order-status-section .section-title span {
    margin-bottom: 8px;
    background: var(--primary);
    color: #ffffff;
}

.order-status-section .section-title h2 {
    margin-bottom: 6px;
    font-size: clamp(1.55rem, 4vw, 2.1rem);
}

.order-status-section .section-title p {
    font-size: 1rem;
    font-weight: 800;
}

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

.post-submit-deposit-reminder {
    display: flex;
    gap: 16px;
    margin-bottom: 18px;
    padding: clamp(18px, 3vw, 24px);
    border: 3px solid #f59e0b;
    border-radius: var(--radius);
    background: #fffbeb;
    box-shadow: var(--shadow);
}

.deposit-reminder-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: #fef3c7;
    font-size: 2rem;
}

.deposit-reminder-content {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.deposit-reminder-content h3 {
    margin: 0;
    color: #92400e;
    font-size: clamp(1.45rem, 3vw, 1.9rem);
}

.deposit-reminder-content p {
    margin: 0;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 800;
}

.deposit-reminder-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.deposit-reminder-details {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 2px solid #fde68a;
    border-radius: 14px;
    background: var(--surface);
}

.deposit-reminder-details span {
    overflow-wrap: anywhere;
    font-weight: 800;
}

.deposit-reminder-warning {
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff7ed;
}

.order-status-card {
    display: grid;
    gap: 14px;
    padding: clamp(18px, 3vw, 24px);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.order-status-card.cancelled {
    border-color: var(--warning);
    background: var(--warning-soft);
}

.order-status-top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.order-status-top h3 {
    margin-bottom: 6px;
    font-size: 1.25rem;
}

.order-status-top p,
.order-status-card p {
    margin-bottom: 0;
    color: var(--muted);
    font-weight: 700;
}

.order-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #fff4d8;
    color: #7a4a00;
    font-weight: 900;
    white-space: nowrap;
}

.order-status-badge.accepted,
.order-status-badge.delivered {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.order-status-badge.shopping {
    background: #e6f0ff;
    color: #174ea6;
}

.order-status-badge.rejected,
.order-status-badge.cancelled {
    background: var(--warning-soft);
    color: var(--warning);
}

.order-status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cancel-order-button {
    min-height: 48px;
    padding: 10px 16px;
    border: 2px solid var(--warning);
    border-radius: 12px;
    background: var(--warning-soft);
    color: var(--warning);
    cursor: pointer;
    font-weight: 900;
}

.remove-status-button {
    min-height: 48px;
    padding: 10px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-weight: 900;
}

.loyalty-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
    gap: 22px;
    align-items: stretch;
}

.loyalty-card {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: clamp(22px, 4vw, 30px);
}

.loyalty-card h3 {
    margin-bottom: 10px;
    font-size: 1.55rem;
}

.loyalty-card p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 1.12rem;
    font-weight: 700;
}

.loyalty-form {
    box-shadow: var(--shadow);
}

.loyalty-result {
    margin-top: 18px;
    padding: 18px;
    border: 3px solid var(--primary);
    border-radius: 16px;
    background: var(--primary-soft);
    color: var(--text);
}

.loyalty-result h4 {
    margin-bottom: 8px;
    font-size: 1.35rem;
}

.loyalty-result p {
    margin-bottom: 8px;
    font-size: 1.08rem;
    font-weight: 700;
}

.loyalty-progress {
    overflow: hidden;
    height: 28px;
    margin: 14px 0;
    border: 2px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
}

.loyalty-progress span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--primary);
}

body.dark-mode .loyalty-progress span {
    background: var(--accent);
}

.market-notice {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    width: min(1120px, calc(100% - 32px));
    margin: 28px auto;
    padding: clamp(20px, 4vw, 30px);
    border: 3px solid var(--accent);
    border-radius: var(--radius);
    background: var(--surface-soft);
    box-shadow: var(--shadow);
}

.notice-icon {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: #000000;
    font-size: 1.7rem;
}

.market-notice h2 {
    margin-bottom: 10px;
    font-size: clamp(1.6rem, 3vw, 2.15rem);
}

.market-notice p {
    margin-bottom: 10px;
    color: var(--text);
    font-size: 1.14rem;
    font-weight: 700;
}

.market-notice p:last-child {
    margin-bottom: 0;
}

.section-title {
    margin-bottom: 18px;
}

.section-title h2 {
    margin-bottom: 8px;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.1;
}

.section-title p {
    color: var(--muted);
    font-size: 1.1rem;
}

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

.cost-card {
    padding: 24px;
}

.card-number,
.step-badge {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    margin-bottom: 14px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 900;
}

body.dark-mode .card-number,
body.dark-mode .step-badge {
    color: #000000;
}

.cost-card h3,
.panel-title h3 {
    margin-bottom: 8px;
    font-size: 1.45rem;
    line-height: 1.2;
}

.cost-card p,
.panel-title p,
.fee-note,
.item-details {
    color: var(--muted);
}

.order-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 420px);
    gap: 22px;
    align-items: start;
}

.forms-column {
    display: grid;
    gap: 22px;
}

.panel {
    padding: clamp(20px, 4vw, 30px);
}

.panel-title {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: start;
    margin-bottom: 22px;
}

.step-badge {
    margin-bottom: 0;
}

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

.field {
    display: grid;
    gap: 9px;
    margin-bottom: 18px;
}

.field-grid .field {
    margin-bottom: 0;
}

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

.field span,
.field-label,
.choice-group legend {
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 800;
}

.field-help {
    color: var(--muted);
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.45;
}

.address-check-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: stretch;
}

.address-check-row .button {
    min-height: var(--field-height);
    border: 2px solid var(--primary);
    white-space: nowrap;
}

.address-check-result {
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 14px;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 1.02rem;
    font-weight: 800;
}

.address-check-result.success {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.address-check-result.error {
    border-color: var(--warning);
    background: var(--warning-soft);
    color: var(--warning);
}

.deposit-check-result {
    padding: 16px;
    border: 2px solid var(--accent);
    border-radius: 14px;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 1.04rem;
    font-weight: 750;
    line-height: 1.55;
}

.deposit-check-result.returning {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.deposit-check-result h4 {
    margin: 0 0 8px;
    font-size: 1.24rem;
}

.deposit-check-result p {
    margin: 0 0 8px;
}

.deposit-check-result a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin: 5px 0;
    padding: 8px 12px;
    border-radius: 12px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 900;
}

body.dark-mode .deposit-check-result a {
    color: #000000;
}

.payment-line {
    display: block;
    overflow-wrap: anywhere;
}

input,
select,
textarea {
    width: 100%;
    min-height: var(--field-height);
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 14px;
    background: #ffffff;
    color: var(--text);
    font-size: 1.1rem;
}

textarea {
    min-height: 112px;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: #707070;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #dddddd;
}

.choice-group {
    display: grid;
    gap: 14px;
    margin: 22px 0 18px;
    padding: 0;
    border: 0;
}

.entry-mode-choice {
    display: grid;
    gap: 14px;
    margin: 0 0 18px;
    padding: 0;
    border: 0;
}

.entry-mode-choice legend {
    margin-bottom: 10px;
    color: var(--text);
    font-size: 1.18rem;
    font-weight: 900;
}

.entry-mode-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: start;
    padding: 18px;
    border: 3px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    cursor: pointer;
}

.entry-mode-card:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.entry-mode-card input {
    width: 30px;
    height: 30px;
    min-height: auto;
    margin-top: 3px;
}

.entry-mode-card strong,
.entry-mode-card small {
    display: block;
}

.entry-mode-card strong {
    font-size: 1.18rem;
}

.entry-mode-card small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 1rem;
    font-weight: 800;
}

.entry-mode-panel {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 2px solid var(--border);
    border-radius: 18px;
    background: var(--surface-soft);
}

.entry-mode-panel h4 {
    margin: 0;
    font-size: 1.32rem;
}

.entry-mode-panel[hidden] {
    display: none;
}

.product-rows {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.product-row {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 3px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
}

.product-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.product-row-head strong {
    font-size: 1.25rem;
}

.remove-product-row {
    min-height: 44px;
    padding: 8px 12px;
    border: 2px solid var(--warning);
    border-radius: 12px;
    background: var(--warning-soft);
    color: var(--warning);
    cursor: pointer;
    font-weight: 900;
}

.product-fields {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(120px, 0.7fr);
    gap: 14px;
}

.product-note-field {
    margin: 0;
}

.product-photo-area {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 2px dashed var(--border);
    border-radius: 16px;
    background: var(--surface-soft);
}

.product-photo-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    padding: 14px;
    border-radius: 14px;
    background: var(--primary);
    color: #ffffff;
    cursor: pointer;
    font-size: 1.08rem;
    font-weight: 900;
    text-align: center;
}

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

.product-photo-choice-option {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    padding: 12px;
    border-radius: 14px;
    background: var(--primary);
    color: #ffffff;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 900;
    text-align: center;
}

.product-photo-choice-option.secondary {
    border: 2px solid var(--primary);
    background: var(--surface);
    color: var(--primary-dark);
}

body.dark-mode .product-photo-choice-option {
    color: #000000;
}

body.dark-mode .product-photo-choice-option.secondary {
    color: var(--primary-dark);
}

body.dark-mode .product-photo-button {
    color: #000000;
}

.product-photo-area p {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}

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

.product-photo-thumb {
    position: relative;
    overflow: hidden;
    border: 2px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.product-photo-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.remove-product-photo {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 34px;
    height: 34px;
    border: 2px solid var(--warning);
    border-radius: 999px;
    background: var(--warning-soft);
    color: var(--warning);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 900;
}

.add-product-button {
    margin-bottom: 18px;
}

.choice-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: start;
    padding: 18px;
    border: 2px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    cursor: pointer;
}

.choice-card input {
    width: 28px;
    height: 28px;
    min-height: auto;
    margin: 4px 0 0;
}

.choice-card strong,
.choice-card small {
    display: block;
}

.choice-card strong {
    font-size: 1.12rem;
}

.choice-card small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 1rem;
}

.inline-warning {
    margin: 0 0 18px;
    padding: 16px;
    border: 2px solid var(--warning);
    border-radius: 14px;
    background: var(--warning-soft);
    color: var(--warning);
    font-weight: 800;
}

.photo-panel {
    background: #fffdf5;
}

body.dark-mode .photo-panel {
    background: var(--surface);
}

.photo-help {
    margin-bottom: 18px;
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: 14px;
    background: var(--surface-soft);
    color: var(--text);
    font-weight: 700;
}

.photo-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.photo-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 78px;
    padding: 18px;
    border-radius: 16px;
    background: var(--primary);
    color: #ffffff;
    cursor: pointer;
    font-size: 1.18rem;
    font-weight: 900;
    text-align: center;
}

body.dark-mode .photo-button {
    color: #000000;
}

.photo-button.secondary {
    border: 2px solid var(--primary);
    background: var(--surface);
    color: var(--primary-dark);
}

.photo-preview {
    display: grid;
    gap: 14px;
    min-height: 112px;
    padding: 16px;
    border: 2px dashed var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.photo-preview p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

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

.photo-card {
    display: grid;
    gap: 10px;
    padding: 10px;
    border: 2px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.photo-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.photo-card-name {
    overflow-wrap: anywhere;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.remove-photo {
    min-height: 46px;
    border: 2px solid var(--warning);
    border-radius: 12px;
    background: var(--warning-soft);
    color: var(--warning);
    cursor: pointer;
    font-weight: 900;
}

.summary-panel {
    position: sticky;
    top: 102px;
}

.empty-state {
    display: grid;
    place-items: center;
    min-height: 180px;
    padding: 18px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    color: var(--muted);
    text-align: center;
}

.empty-state span {
    font-size: 2.5rem;
}

.empty-state p {
    margin-bottom: 0;
    font-size: 1.1rem;
}

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

.photo-summary {
    margin-top: 14px;
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: 16px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 900;
}

.cart-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.cart-item h4 {
    margin-bottom: 10px;
    font-size: 1.17rem;
}

.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 0.92rem;
    font-weight: 800;
}

.badge.cheapest {
    background: #ffe7a3;
    color: #3f2a00;
}

body.dark-mode .badge.cheapest {
    background: var(--accent);
    color: #000000;
}

.item-details {
    margin-bottom: 0;
}

.remove-item {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 2px solid var(--warning);
    border-radius: 14px;
    background: var(--warning-soft);
    color: var(--warning);
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: 900;
}

.fee-box {
    display: grid;
    gap: 12px;
    margin: 20px 0;
    padding: 18px;
    border: 2px solid var(--border);
    border-radius: 16px;
    background: var(--surface-soft);
}

.fee-box h4 {
    margin-bottom: 2px;
    font-size: 1.28rem;
}

.fee-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 2px 0;
}

.fee-row strong {
    text-align: right;
}

.fee-row.total {
    margin-top: 8px;
    padding-top: 14px;
    border-top: 2px solid var(--border);
    font-size: 1.15rem;
    font-weight: 900;
}

.fee-note {
    margin-bottom: 0;
    font-weight: 700;
}

.footer {
    padding: 28px 0 40px;
    color: var(--muted);
    text-align: center;
}

.footer p {
    margin-bottom: 0;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.65);
}

.modal-card {
    position: relative;
    width: min(780px, 100%);
    max-height: 92vh;
    overflow: auto;
    padding: clamp(22px, 4vw, 34px);
    border: 3px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
}

.modal-card h2 {
    margin-right: 52px;
    margin-bottom: 8px;
    font-size: 2rem;
}

.modal-card p {
    color: var(--muted);
    font-size: 1.08rem;
}

.modal-help {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-left: 6px solid var(--primary);
    border-radius: 12px;
    background: #f0fdf4;
    color: var(--text);
    font-weight: 800;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 52px;
    height: 52px;
    border: 2px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-size: 1.8rem;
    font-weight: 900;
}

.customer-order-summary {
    display: grid;
    gap: 16px;
    margin-top: 14px;
}

.summary-review-card {
    padding: 18px;
    border: 2px solid var(--border);
    border-radius: 18px;
    background: var(--page);
}

.summary-review-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-size: 1.35rem;
}

.summary-data-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.summary-data-list div {
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.summary-data-list dt {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.98rem;
    font-weight: 900;
}

.summary-data-list dd {
    margin: 0;
    color: var(--text);
    font-size: 1.22rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.summary-item-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.summary-item-card {
    display: flex;
    gap: 14px;
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.summary-item-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: var(--primary);
    color: white;
    font-size: 1.2rem;
    font-weight: 900;
}

.summary-item-content {
    min-width: 0;
}

.summary-item-content strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.25rem;
    overflow-wrap: anywhere;
}

.summary-item-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.summary-item-badges span {
    padding: 7px 10px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-size: 0.98rem;
    font-weight: 900;
}

.summary-item-note,
.summary-empty-note,
.summary-photo-note p {
    margin: 10px 0 0;
    color: var(--muted);
    font-weight: 800;
}

.summary-photo-note {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    padding: 14px;
    border: 2px solid #bfdbfe;
    border-radius: 16px;
    background: #eff6ff;
}

.summary-photo-note > span {
    font-size: 1.8rem;
}

.summary-photo-note strong {
    display: block;
    color: var(--text);
    font-size: 1.12rem;
}

.modal-photo-list {
    margin-top: 16px;
}

.modal-photo-list h3 {
    margin-bottom: 12px;
    font-size: 1.25rem;
}

.modal-photo-grid img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 2px solid var(--border);
    border-radius: 14px;
}

.toast {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 60;
    max-width: min(440px, calc(100vw - 36px));
    padding: 16px 18px;
    border-radius: 14px;
    background: var(--text);
    color: var(--surface);
    font-size: 1.08rem;
    font-weight: 800;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

@media (max-width: 900px) {
    .hero,
    .market-notice,
    .order-grid,
    .loyalty-grid,
    .cost-cards,
    .photo-actions {
        grid-template-columns: 1fr;
    }

    .summary-panel {
        position: static;
    }
}

@media (max-width: 680px) {
    html {
        font-size: 17px;
    }

    .header-inner,
    .header-actions,
    .order-status-top,
    .order-status-actions,
    .post-submit-deposit-reminder,
    .hero-buttons,
    .modal-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .header-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        width: min(1120px, calc(100% - 20px));
        padding: 6px 0;
    }

    .header-actions {
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 6px;
    }

    .brand {
        flex: 0 0 auto;
        gap: 0;
        font-size: 0;
    }

    .brand-logo {
        width: 118px;
        border-radius: 12px;
    }

    .header-actions .contrast-toggle,
    .header-actions .quick-order {
        min-height: 38px;
        padding: 7px 10px;
        border-radius: 11px;
        font-size: 0.88rem;
        line-height: 1;
        white-space: nowrap;
    }

    .order-status-section {
        right: 10px;
        bottom: 10px;
        width: calc(100vw - 20px);
        max-height: none;
        padding: 0;
        overflow: visible;
        border: 0;
        border-radius: 20px;
        background: transparent;
        box-shadow: none;
    }

    .order-status-section:focus {
        outline: 0;
    }

    .status-panel-toggle {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 72px;
        gap: 12px;
        padding: 12px 14px;
        border: 3px solid var(--primary);
        border-radius: 20px;
        background: var(--surface);
        color: var(--text);
        box-shadow: 0 14px 40px rgba(15, 23, 42, 0.24);
        cursor: pointer;
        text-align: left;
    }

    .status-panel-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        border-radius: 14px;
        background: var(--primary-soft);
        font-size: 1.55rem;
    }

    .status-panel-text {
        display: grid;
        gap: 2px;
        flex: 1;
        min-width: 0;
    }

    .status-panel-text strong {
        font-size: 1.12rem;
        font-weight: 900;
    }

    .status-panel-text small {
        color: var(--muted);
        font-size: 0.92rem;
        font-weight: 900;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .status-panel-count {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 36px;
        width: 36px;
        height: 36px;
        border-radius: 999px;
        background: var(--primary);
        color: #ffffff;
        font-size: 1rem;
        font-weight: 900;
    }

    .order-status-section.has-deposit-alert .status-panel-toggle {
        border-color: #f59e0b;
        background: #fffbeb;
    }

    .order-status-section.has-deposit-alert .status-panel-icon,
    .order-status-section.has-deposit-alert .status-panel-count {
        background: #f59e0b;
        color: #ffffff;
    }

    .order-status-section.has-deposit-alert .status-panel-text strong,
    .order-status-section.has-deposit-alert .status-panel-text small {
        color: #92400e;
    }

    .order-status-section.has-cancelled-alert .status-panel-toggle {
        border-color: var(--warning);
        background: var(--warning-soft);
    }

    .status-panel-body {
        display: none;
    }

    .order-status-section.is-open {
        max-height: min(76vh, 640px);
        overflow: hidden;
        border: 3px solid var(--primary);
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 24px 70px rgba(15, 23, 42, 0.25);
    }

    .order-status-section.is-open .status-panel-toggle {
        min-height: 64px;
        border: 0;
        border-bottom: 2px solid var(--border);
        border-radius: 17px 17px 0 0;
        background: var(--surface);
        box-shadow: none;
    }

    .order-status-section.is-open .status-panel-body {
        display: block;
        max-height: min(62vh, 560px);
        overflow-y: auto;
        padding: 12px;
    }

    .order-status-section .section-title {
        top: -12px;
        margin: -12px -12px 12px;
        padding: 14px;
    }

    .toast {
        left: 10px;
        right: 10px;
        bottom: 92px;
        max-width: none;
    }

    .brand {
        justify-content: center;
    }

    .field-grid,
    .address-check-row,
    .product-fields,
    .photo-grid,
    .modal-photo-grid,
    .panel-title {
        grid-template-columns: 1fr;
    }

    .product-row {
        padding: 14px;
    }

    .product-row-head {
        align-items: stretch;
        flex-direction: column;
    }

    .product-photo-thumbs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-photo-choice-menu {
        grid-template-columns: 1fr;
    }

    .field-wide {
        grid-column: auto;
    }

    .step-badge {
        margin-bottom: 4px;
    }

    .contrast-toggle,
    .quick-order,
    .button {
        width: 100%;
    }
}
