/* 00-base.css */
:root {
    --bg: #e3e3e3;
    --border: #bababa;
    --text-main: #111;
    --text-muted: #777;
    --text-link: rgb(97, 144, 160);
    --accent: #ff9a2c;
    --base1: #d3cbbf;
    --base2: #b8b0a6;
    --base3: #8e8983;
    --card-vertical-factor: 1.9;
}

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

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 2.25rem 1.25rem 1.5rem 2.4rem;
    background:
        radial-gradient(ellipse at center,
            rgba(40, 40, 40, 0.15) 0%,
            rgba(70, 70, 70, 0.15) 30%,
            rgba(110, 105, 100, 0.15) 65%,
            rgba(150, 145, 140, 0.15) 100%),
        linear-gradient(to bottom,
            rgba(180, 175, 168, 0.35) 0%,
            rgba(120, 115, 110, 0.15) 60%,
            rgba(60, 55, 50, 0.10) 100%);
    background-blend-mode: soft-light, normal;
}

main {
    width: min(100vw, 768px);
    border-radius: 0.75rem;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    min-height: min(95vh, 960px);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.15);
}

main:has(.product-grid),
main:has(.cart-panel),
main:has(#checkout-container) {
    box-shadow: none;
}

.hero {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 0.5rem;
    overflow: hidden;
}

.hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-link,
.product-video-link {
    align-self: flex-end;
    margin-right: 0.25rem;
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text-link);
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
}

.video-link::after,
.product-video-link::after {
    content: ">";
    font-size: 1rem;
    line-height: 1;
}

.hidden {
    display: none !important;
}

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

.is-disabled,
button[disabled],
.buy[disabled],
.checkout-button[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

@media (max-width: 480px) {
    body {
        padding: 1.25rem 0.85rem 1.25rem 1.65rem;
        overflow-y: auto;
        height: 100svh;
        min-height: 100svh;
    }

    main {
        padding: 0.75rem;
        gap: 0.75rem;
        min-height: 0;
        width: 100vw;
        max-width: 100vw;
        border-radius: 0;
        box-shadow: none;
    }
}

/* 10-header.css */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-inline: 0.25rem;
}

.header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

header h1 {
    margin: 0;
    font-size: clamp(1.5rem, 6vw, 2.75rem);
    letter-spacing: 0.12em;
    color: var(--text-muted);
    text-align: left;
    white-space: nowrap;
    padding: 0.5rem 0 0.25rem;
}

.shop-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.1rem 0;
    text-decoration: none;
    text-decoration-thickness: 1px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--text-main);
    background: transparent;
    border: none;
    box-shadow: none;
}

.shop-link--pill {
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    text-transform: uppercase;
    font-size: 0.7rem;
    background: rgba(243, 243, 243, 0.9);
    box-shadow: inset 0 0 0 1px #fff;
}

.cart-icon {
    position: relative;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(243, 243, 243, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 2;
}

.cart-icon svg {
    width: 1.2rem;
    height: 1.2rem;
    fill: var(--text-main);
}

.cart-count-badge {
    position: absolute;
    top: -0.3rem;
    right: -0.4rem;
    min-width: 1.2rem;
    height: 1.2rem;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.1rem 0.35rem;
    line-height: 1;
}

/* 20-product-grid.css */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.product-card {
    width: 100%;
    border-radius: 0.75rem;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.product-card h2 {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 2px;
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

@media (hover: hover) {
    .product-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 14px 50px rgba(0, 0, 0, 0.2);
        border-color: #d8d8d8;
    }
}

.product-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* 30-carousel.css */
.pl-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.pl-carousel__track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease-out;
    will-change: transform;
}

.pl-carousel__slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
}

.pl-carousel__slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pl-carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0;
    user-select: none;
    opacity: 0;
}

.pl-carousel:hover .pl-carousel__arrow {
    opacity: 1;
}

.pl-carousel__arrow--prev {
    left: 0.5rem;
}

.pl-carousel__arrow--next {
    right: 0.5rem;
}

.pl-carousel__nav {
    position: absolute;
    left: 50%;
    bottom: 0.75rem;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: max-content;
}

.pl-carousel__dots {
    display: flex;
    gap: 0.4rem;
}

.pl-carousel__dots button {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 0;
}

.pl-carousel__dots button.is-active {
    background: rgba(255, 255, 255, 0.95);
}

.pl-carousel__dots button.is-order-dot {
    background: rgba(255, 155, 44, 0.7);
}

.pl-carousel__dots button.is-order-dot.is-active {
    background: rgba(255, 190, 100, 1);
}

.pl-carousel__order-label {
    position: absolute;
    right: calc(100% + 0.55rem);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    line-height: 1;
    white-space: nowrap;
}

/* 40-attributes.css */
section.attributes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-left: 1px solid var(--border);
    border-top: 1px solid var(--border);
}

.attribute {
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    text-align: left;
    gap: 0.4rem;
}

.attribute--cargo-size {
    grid-column: 1 / -1;
    gap: 0.75rem;
    /* background: linear-gradient(135deg, #fafbfe 0%, #f3f5f8 100%); */
}

.cargo-size {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.cargo-size__panel {
    width: 100%;
}

.cargo-size__image {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 1;
    background: transparent;
    overflow: hidden;
}

.cargo-size__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.cargo-size__note {
    margin: -0.25rem 0 0;
    font-size: 0.75rem;
    letter-spacing: 0.01em;
    color: var(--text-muted);
}


.cargo-size__field {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    font-size: 0.78rem;
    color: var(--text-main);
}

.cargo-size__field--width {
    left: 52%;
    top: 85%;
    transform: translate(-50%, -50%);
}

.cargo-size__field--height {
    left: 10%;
    top: 41%;
    transform: translate(-50%, -50%);
}

.cargo-size__field--thickness {
    left: 94%;
    top: 53%;
    transform: translate(-50%, -50%);
}

.cargo-size__field-label {
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    display:none;
}

.cargo-size__field-hint {
    display: none;
    font-size: 0.62rem;
    letter-spacing: 0.03em;
    color: #9a2f2f;
    background: rgba(255, 255, 255, 0.78);
    border-radius: 0.35rem;
    padding: 0.08rem 0.28rem;
    white-space: nowrap;
}

.cargo-size__field.is-out-of-range .cargo-size__field-hint {
    display: inline-block;
}

.cargo-size__input {
    width: 4.4rem;
    border: none;
    background: rgba(255, 255, 255, 0.65);
    padding: 0.18rem 0.35rem;
    border-radius: 0.4rem;
    font: inherit;
    text-align: center;
}

.cargo-size__input:focus {
    outline: 2px solid rgba(0, 0, 0, 0.15);
    outline-offset: 2px;
}

.cargo-size__input::-webkit-outer-spin-button,
.cargo-size__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cargo-size__input[type="number"] {
    -moz-appearance: textfield;
}


.attribute__label {
    margin: 0;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-muted);
}

.attribute__primary-text {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-main);
}

.attribute__secondary-text {
    margin-top: 0.15rem;
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    text-transform: lowercase;
    color: var(--text-muted);
}

.attribute__value {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.attribute__value--choices {
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
}

.attribute__value--select {
    gap: 0.35rem;
}

.attribute__select {
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--border);
    background: #f8f8f8;
    font: inherit;
}

.attribute__value--glyph {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem 1rem;
    justify-content: flex-start;
    width: 100%;
    flex-wrap: wrap;
}

.attribute__value--choices > *,
.attribute__value--glyph > * {
    flex: 0 0 auto;
}

.chip {
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.7rem;
    color: var(--text-muted);
    background-color: #bfbfbf12;
    cursor: pointer;
}

.chip--selected {
    background: var(--accent);
    color: #111;
    border-color: #cfcfcf;
    box-shadow: inset 0 0 0 2px #cfcfcf;
}

.attribute--info-list {
    justify-content: flex-start;
}

.attribute__info-list {
    margin: 0;
    padding-left: 1.05rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.83rem;
    letter-spacing: 0.02em;
    color: var(--text-main);
}

.attribute--conditional.hidden {
    display: flex !important;
    visibility: hidden;
    pointer-events: none;
}

.toggle {
    position: relative;
    width: 3rem;
    height: 1.6rem;
    border-radius: 999px;
    background: #626263;
    border: 1px solid #cfd5de;
    display: inline-flex;
    align-items: center;
    padding: 0 0.15rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}

.toggle.is-on {
    background: #ffb05a;
    border-color: #ffb05a;
}

.toggle--secondary.is-on {
    background: #98b9ff;
    border-color: #98b9ff;
}

.toggle__knob {
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transform: translateX(0);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.toggle.is-on .toggle__knob {
    transform: translateX(1.2rem);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.glyph-thumb {
    position: relative;
    width: 3.8rem;
    height: 3.8rem;
    border-radius: 0.25rem;
    border: 1px solid var(--border);
    background-color: #f7f7f7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    cursor: pointer;
    flex-shrink: 0;
}

.glyph-thumb .glyph-icon-canvas {
    width: auto;
    height: 100%;
    max-width: 100%;
    display: block;
}

.glyph-thumb__edit {
    position: absolute;
    top: 0.2rem;
    left: 0.2rem;
    z-index: 2;
    font-size: 0.56rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.68);
    color: #fff;
    border-radius: 0.2rem;
    padding: 0.12rem 0.26rem;
    pointer-events: none;
}

.glyph-thumb.is-disabled {
    opacity: 0.2;
    cursor: not-allowed;
    pointer-events: none;
}

.glyph-length {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.glyph-length__label {
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.inquiry {
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.inquiry__title {
    margin: 0;
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.inquiry__form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.inquiry__field {
    display: flex;
}

.inquiry__input {
    width: 100%;
    border: 1px solid var(--border);
    background: #f8f8f8;
    padding: 0.35rem 0.45rem;
    font: inherit;
}

.inquiry__note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

/* 45-comment.css */
section.product-comment {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.45);
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
    line-height: 1.4;
    letter-spacing: 0.04em;
}

.product-comment__list {
    margin: 0;
    padding-left: 1.1rem;
}

.product-comment__item {
    margin: 0.15rem 0;
}

/* 50-keycaps.css */
section.keycaps {
    border: 1px solid var(--border);
    padding: 0.75rem 1rem 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.keycaps__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.keycaps__label {
    margin: 0;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-muted);
}

.keycaps__note {
    margin: 0;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.keycaps__rows {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.keycaps__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.45rem 0.2rem;
    border-top: 1px solid var(--border);
}

.keycaps__row:first-child {
    border-top: none;
}

.keycaps__row.is-zero {
    opacity: 0.5;
}

.keycaps__name {
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-main);
}

.keycaps__meta {
    font-size: 0.65rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.stepper {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.15rem 0.45rem;
    background: rgba(255, 255, 255, 0.35);
}

.stepper__btn {
    border: none;
    background: transparent;
    color: var(--text-main);
    font-size: 0.7rem;
    cursor: pointer;
    padding: 0.2rem 0.35rem;
}

.stepper__btn:disabled {
    cursor: not-allowed;
    opacity: 0.35;
}

.stepper__input {
    width: 2.1rem;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
    outline: none;
}

/* 60-cta.css */
section.cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    text-align: center;
    padding: 0.6rem 0.25rem 1.25rem 0.25rem;
}

.cta__price {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.price-row {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    justify-content: center;
}

.price {
    font-size: 1.5rem;
    letter-spacing: 0.12em;
}

.price-note {
    font-size: 1rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.buy,
.checkout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 2rem;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
}

.summary-link {
    text-decoration: none;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-main);
}

@media (max-width: 480px) {
    .buy {
        width: 100%;
    }
}

/* 70-branding.css */
.page-footer {
    position: fixed;
    bottom: 8px;
    left: 3px;
    transform: translateY(100%) rotate(-90deg);
    transform-origin: top left;
    font-size: 0.75rem;
}

.porch-logic-mark {
    position: fixed;
    top: 8.75rem;
    left: -1.75rem;
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #de148a;
    opacity: 0.9;
    transform: translateY(100%) rotate(-90deg);
    transform-origin: top left;
    text-shadow:
        0 0 4px rgba(0, 0, 0, 0.18),
        0 0 10px rgba(0, 0, 0, 0.12);
    pointer-events: none;
    z-index: 20;
}

@media (max-width: 480px) {
    .porch-logic-mark {
        font-size: 0.78rem;
        letter-spacing: 0.16em;
        top: 8.75rem;
        left: -0.6rem;
    }
}

/* 80-modal.css */
.glyph-modal {
    position: fixed;
    inset: 0;
    background: rgba(5, 7, 10, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    padding: clamp(0.5rem, 2vh, 1.2rem);
    z-index: 20;
}

.glyph-modal.visible {
    display: flex;
}

.glyph-modal-inner {
    width: min(960px, 96vw);
    max-height: calc(100dvh - 1rem);
    overflow: hidden;
    background: #0b0d11;
    color: #f4f6fb;
    border: 1px solid #1f242c;
    border-radius: 14px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
    padding: 1.25rem 1.35rem 1.5rem;
    display: flex;
    flex-direction: column;
}

.glyph-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.glyph-modal-subtitle {
    color: #b7c0cc;
    margin: 0.35rem 0 0.5rem;
    font-size: 0.95rem;
}

.glyph-modal-editor {
    margin-top: 0.35rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
    width: 100%;
}

.glyph-modal--pixel .glyph-modal-header,
.glyph-modal--pixel .glyph-modal-subtitle {
    display: none;
}

.glyph-modal--pixel .glyph-modal-editor {
    margin-top: 0;
}

.glyph-modal-close {
    margin-top: 0.5rem;
    align-self: center;
    padding: 0.5rem 0.9rem;
    cursor: pointer;
    border-radius: 999px;
    border: 1px solid #313945;
    background: #0f141b;
    color: #f4f6fb;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font: inherit;
}

.glyph-modal-close:hover {
    background: #1b222c;
    border-color: var(--accent, #ff9a2c);
    transform: translateY(-1px);
}

dialog#cart-popup {
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

dialog#cart-popup::backdrop {
    background: rgba(0, 0, 0, 0.35);
}

dialog#cart-popup article {
    padding: 1rem 1.2rem 1.2rem;
}

dialog#cart-popup header h2 {
    margin: 0 0 0.4rem;
    font-size: 1.1rem;
}

dialog#cart-popup footer {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

dialog#cart-popup button,
dialog#cart-popup a {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    text-align: center;
    text-decoration: none;
    background: #f7f7f7;
    color: var(--text-main);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

dialog#cart-popup a {
    background: var(--accent);
    color: #111;
    border-color: #cfcfcf;
    box-shadow: inset 0 0 0 2px #cfcfcf;
}

/* 85-glyph-editor.css */
.glyph-editor-layout {
    width: min(640px, 100%);
    min-height: 0;
    flex: 1 1 auto;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    justify-items: center;
    align-items: end;
    gap: 0.55rem;
}

.glyph-canvas-wrap {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glyph-canvas-wrap canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto !important;
    height: auto !important;
}

.glyph-mode-wrapper {
    width: 100%;
    text-align: center;
    margin-top: 0.25rem;
    display: flex;
    gap: 0.55rem;
    justify-content: center;
    flex-wrap: wrap;
    flex: 0 0 auto;
}

.glyph-mode-btn,
.glyph-sound-toggle {
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    border-radius: 999px;
    border: 1px solid #313945;
    background: #0f141b;
    color: #f4f6fb;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font: inherit;
}

.glyph-mode-btn.active {
    background: #1b222c;
    border-color: var(--accent, #ff9a2c);
    transform: translateY(-1px);
}

.glyph-pixel-controls {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem 0.65rem;
    justify-items: stretch;
    align-items: center;
    flex: 0 0 auto;
    margin: 0 auto;
}

.glyph-pixel-tools {
    display: flex;
    gap: 0.6rem;
    grid-column: 1 / -1;
    justify-content: center;
}

.glyph-pixel-tools.is-image .glyph-mode-btn:not(.glyph-mode-btn--pointer) {
    display: none;
}

.glyph-mode-btn--pointer {
    display: none;
}

.glyph-pixel-tools.is-image .glyph-mode-btn--pointer {
    display: inline-flex;
}

.glyph-mode-btn[disabled] {
    opacity: 0.85;
    cursor: default;
    pointer-events: none;
}

.glyph-file {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid #2b3240;
    border-radius: 999px;
    color: #d6dbe6;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    background: #151a22;
    cursor: pointer;
    width: 100%;
    min-height: 2.25rem;
    grid-column: 1 / -1;
    justify-self: center;
}

.glyph-file input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.glyph-file,
.glyph-file * {
    cursor: pointer;
}

.glyph-range {
    width: 100%;
    display: grid;
    gap: 0.35rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #b7c0cc;
}

.glyph-range input[type="range"] {
    width: 100%;
}

.glyph-toggle-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #b7c0cc;
    min-height: 2.25rem;
    width: 100%;
}

.glyph-toggle-input {
    accent-color: var(--accent, #ff9a2c);
}

.glyph-pixel-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: nowrap;
    justify-content: center;
    grid-column: 1 / -1;
    justify-self: center;
}

.glyph-pixel-actions .glyph-mode-btn {
    min-width: 7.5rem;
}

.is-hidden {
    display: none !important;
}

.glyph-icon {
    display: block;
    width: 32px;
    height: 16px;
    position: relative;
}

.glyph-icon--brush,
.glyph-icon--cursor,
.glyph-icon--eraser {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.glyph-icon-flat::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border-bottom: 2px solid currentColor;
    border-radius: 999px;
}

.glyph-icon-mound::before {
    content: "";
    position: absolute;
    left: 4px;
    right: 4px;
    bottom: 0;
    height: 100%;
    border: 2px solid currentColor;
    border-bottom: none;
    border-radius: 999px 999px 0 0;
}

.glyph-icon-label {
    font-size: 0.8rem;
    color: #c6ced9;
}

.glyph-sound-toggle[aria-pressed="false"] {
    opacity: 0.6;
}

.glyph-sound-toggle .glyph-sound-dot {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    background: var(--accent, #ff9a2c);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.glyph-sound-toggle[aria-pressed="false"] .glyph-sound-dot {
    background: #5a6473;
    box-shadow: none;
}

/* 90-cart.css */
.shipping-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.7rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.55rem;
    background: #f5efe3;
    color: #5b3a00;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
    text-align: center;
}

.cart-shell,
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 0;
}

.cart-panels {
    --cart-columns: 1.6rem minmax(0, 1.8fr) minmax(0, 1.9fr) minmax(0, 3.5rem) minmax(0, 0.7fr) minmax(0, 1fr);
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
    gap: 0.75rem;
    min-height: 0;
}

.cart-panel {
    border: 1px solid var(--border);
    border-radius: 0.65rem;
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.cart-header-row {
    display: grid;
    grid-template-columns: var(--cart-columns);
    column-gap: 0.8rem;
    margin-bottom: 0.35rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-muted);
}

.col-label--remove {
    text-align: center;
}

.col-label--item {
    padding-left: 0;
}

.col-label--qty,
.col-label--total {
    text-align: right;
}

.col-label--glyph {
    text-align: center;
}

.cart-items-body {
    flex: 1;
    overflow: auto;
    padding-right: 0.25rem;
}

#cart-items-container {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.cart-row {
    display: grid;
    grid-template-columns: var(--cart-columns);
    column-gap: 0.8rem;
    padding: 0.55rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.cart-cell {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.85rem;
}

.cart-cell--remove {
    align-items: center;
    justify-content: center;
}

.cart-cell--qty,
.cart-cell--total {
    align-items: flex-end;
    text-align: right;
}

.cart-cell--glyph {
    align-items: center;
    justify-content: center;
}

.glyph-thumb-canvas {
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 0.4rem;
    background: #f6f3ea;
}

.cart-item-name {
    font-size: 0.9rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.cart-item-sub {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.cart-option-stack {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: flex-start;
}

.cart-remove {
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 999px;
    border: none;
    background: #93939352;
    color: #d64b4b;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cart-remove:hover {
    background: #a0707089;
}

.cart-note {
    margin: 0;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.cart-summary {
    gap: 0.6rem;
}

.summary-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-muted);
    margin: 0;
}

.summary-lines {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
}

.summary-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.summary-line--muted {
    color: var(--text-muted);
}

.summary-line--total {
    font-weight: 600;
}

.summary-note {
    margin: 0;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .cart-panels {
        grid-template-columns: 1fr;
    }
}

/* 95-checkout.css */
#checkout-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: fit-content;
    max-width: 100%;
    align-self: center;
}

.checkout-panel {
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: transparent;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.12);
    padding: 0.85rem;
}

.checkout-panel#checkout-panel {
    padding: 0;
    width: auto;
    align-self: center;
}

#checkout {
    display: inline-block;
    width: auto;
}

#checkout iframe {
    display: block;
    width: auto;
    max-width: 100%;
}

.subscribe-field {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    padding: 0.65rem 0.85rem;
}

.subscribe-field.checkout-panel {
    width: min(420px, 100%);
    margin: 0.35rem auto 0.5rem;
    padding: 1.6rem 0.7rem;
    text-align: center;
}

.subscribe-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    clip: rect(0 0 0 0);
}

.subscribe-toggle {
    position: relative;
    width: 2.6rem;
    height: 1.4rem;
    border-radius: 999px;
    background: #e0e0e0;
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    padding: 0.1rem;
    transition: background 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.subscribe-toggle__knob {
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transform: translateX(0);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.subscribe-field:has(.subscribe-checkbox:checked) .subscribe-toggle {
    background: #ffb05a;
    border-color: #ffb05a;
}

.subscribe-field:has(.subscribe-checkbox:checked) .subscribe-toggle__knob {
    transform: translateX(1.2rem);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.subscribe-label {
    letter-spacing: 0.02em;
    max-width: 15rem;
    padding-top: 1rem;
    padding-bottom: 0.5rem;
}

.subscribe-subtitle {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.01em;
    max-width: 18rem;
}

@media (max-width: 600px) {
    .subscribe-field {
        text-align: center;
    }
}
.policy-footer {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    width: 100%;
    justify-content: center;
}

.policy-footer__link {
    border: none;
    background: none;
    padding: 0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-muted);
    text-decoration: underline;
    cursor: pointer;
}

.policy-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 30;
}

.policy-modal.visible {
    display: flex;
}

.policy-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.policy-modal__dialog {
    position: relative;
    width: min(760px, 92vw);
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    padding: 1rem 1.25rem 1.25rem;
    z-index: 1;
}

.policy-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.policy-modal__title {
    margin: 0;
    font-size: 1.1rem;
}

.policy-modal__close {
    border: 1px solid var(--border);
    background: #f7f7f7;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
}

.policy-content.hidden {
    display: none;
}
