@font-face {
    font-family: "ILE Engraving Noto";
    src: url("../fonts/noto-sans/NotoSans-Regular.ttf") format("truetype");
    font-display: swap;
    font-style: normal;
    font-weight: 400;
}

:root {
    --ile-eng-black: #0d0d0d;
    --ile-eng-white: #fff;
    --ile-eng-muted: #656565;
    --ile-eng-line: #d9d9d6;
    --ile-eng-surface: #f4f4f2;
}
@font-face { font-family: "ILE Engraving Serif"; src: url("../fonts/noto-serif/NotoSerif.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "ILE Engraving Script"; src: url("../fonts/marck-script/MarckScript-Regular.ttf") format("truetype"); font-display: swap; }

.ile-engraving-product-control {
    width: 100%;
    margin: 0 0 5px !important;
}

body.single-product form.cart .ile-engraving-product-control .ile-engraving-open {
    display: flex !important;
    float: none !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-width: 100% !important;
    min-height: 68px;
    margin: 0 !important;
    padding: 14px 24px !important;
    border: 1px solid var(--ile-eng-black) !important;
    border-radius: 0 !important;
    background: var(--ile-eng-white) !important;
    color: var(--ile-eng-black) !important;
    font: inherit;
    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: 1.25;
    text-align: center;
    text-transform: none !important;
    transition: background-color .25s ease, color .25s ease;
}

body.single-product form.cart .ile-engraving-product-control .ile-engraving-open::after {
    content: "";
    margin-left: 12px;
}

body.single-product form.cart .ile-engraving-product-control .ile-engraving-open:hover,
body.single-product form.cart .ile-engraving-product-control .ile-engraving-open:focus {
    border-color: var(--ile-eng-black) !important;
    background: var(--ile-eng-white) !important;
    color: var(--ile-eng-black) !important;
    opacity: 1 !important;
}

body.single-product form.cart .ile-engraving-product-control .ile-engraving-open.has-engraving {
    background: var(--ile-eng-black) !important;
    color: var(--ile-eng-white) !important;
}

body.single-product form.cart .ile-engraving-product-control .ile-engraving-open.has-engraving:hover,
body.single-product form.cart .ile-engraving-product-control .ile-engraving-open.has-engraving:focus {
    background: var(--ile-eng-black) !important;
    color: var(--ile-eng-white) !important;
}

body.single-product form.cart .ile-engraving-product-control .ile-engraving-open:focus-visible {
    outline: 2px solid var(--ile-eng-black);
    outline-offset: 3px;
}

body.single-product form.cart .ile-engraving-product-control .ile-engraving-open.is-awaiting-size {
    background: var(--ile-eng-white) !important;
    color: var(--ile-eng-black) !important;
}

.ile-engraving-modal[hidden],
[data-ile-builder-workspace][hidden],
[data-ile-result][hidden],
.ile-engraving-choice-panel[hidden] {
    display: none !important;
}

body.ile-engraving-modal-open {
    overflow: hidden;
}

.ile-engraving-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: var(--ile-eng-white);
}

.ile-engraving-modal__backdrop {
    display: none;
}

.ile-engraving-modal__dialog {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: var(--ile-eng-white);
    color: var(--ile-eng-black);
}

.ile-engraving-modal__dialog > h2 {
    position: absolute;
    z-index: 4;
    top: 32px;
    left: calc(56% + 32px);
    width: calc(44% - 100px);
    margin: 0;
    transform: none;
    color: var(--ile-eng-black);
    font-size: clamp(22px, 2vw, 30px);
    font-weight: 400;
    letter-spacing: .08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.ile-engraving-modal__close {
    position: fixed;
    z-index: 8;
    top: 28px;
    right: 32px;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ile-eng-muted);
    font-size: 42px;
    font-weight: 200;
    line-height: 1;
    cursor: pointer;
    transition: color .2s ease, transform .2s ease;
}

.ile-engraving-modal__close:hover,
.ile-engraving-modal__close:focus-visible {
    color: var(--ile-eng-black);
    transform: rotate(4deg);
}

.ile-engraving-modal [data-ile-engraving-modal-root] {
    height: 100%;
}

.ile-engraving-workspace {
    display: grid;
    grid-template-columns: minmax(0, 56fr) minmax(0, 44fr);
}

.ile-engraving-modal .ile-engraving-workspace {
    height: 100%;
    background: var(--ile-eng-white);
}

.ile-engraving-preview {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 260px;
    overflow: hidden;
    background: var(--ile-eng-surface);
}

.ile-engraving-modal .ile-engraving-preview {
    align-self: stretch;
    justify-self: center;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    min-height: 0;
    max-width: 100%;
    max-height: 100vh;
    max-height: 100dvh;
}

.ile-engraving-preview__scene {
    position: absolute;
    inset: 0;
    overflow: visible;
}

.ile-engraving-preview__scene > img,
.ile-engraving-preview__scene > video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ile-engraving-preview__scene > video {
    background: var(--ile-eng-black);
    pointer-events: none;
}

.ile-engraving-preview.is-video-loading .ile-engraving-preview__scene > video,
.ile-engraving-preview.is-video-ready .ile-engraving-preview__scene > img {
    opacity: 0;
}

.ile-engraving-modal .ile-engraving-preview__scene > img,
.ile-engraving-modal .ile-engraving-preview__scene > video {
    position: absolute;
    inset: 0;
}

.ile-engraving-modal .ile-engraving-preview.is-square-media,
.ile-engraving-modal .ile-engraving-preview.is-square-media .ile-engraving-preview__scene > video {
    background: #000;
}

.ile-engraving-modal .ile-engraving-preview.is-square-media .ile-engraving-preview__scene > img,
.ile-engraving-modal .ile-engraving-preview.is-square-media .ile-engraving-preview__scene > video {
    object-fit: contain;
}

@media (min-width: 701px) and (min-height: 501px) {
    .ile-engraving-modal .ile-engraving-preview.is-square-media .ile-engraving-preview__scene > img,
    .ile-engraving-modal .ile-engraving-preview.is-square-media .ile-engraving-preview__scene > video {
        object-position: 50% 0%;
    }
}

.ile-engraving-modal .ile-engraving-preview.is-media-top .ile-engraving-preview__scene > img,
.ile-engraving-modal .ile-engraving-preview.is-media-top .ile-engraving-preview__scene > video {
    object-position: 50% 0%;
}

.ile-engraving-modal .ile-engraving-preview.is-media-center .ile-engraving-preview__scene > img,
.ile-engraving-modal .ile-engraving-preview.is-media-center .ile-engraving-preview__scene > video {
    object-position: 50% 50%;
}

.ile-engraving-preview__overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ile-engraving-preview.is-video-loading .ile-engraving-preview__overlay,
.ile-engraving-preview.is-video-seeking .ile-engraving-preview__overlay,
.ile-engraving-preview.is-video-playing .ile-engraving-preview__overlay {
    opacity: 0;
}

.ile-engraving-preview__overlay svg {
    position: absolute;
    overflow: visible;
    color: #f2f0e9;
    transform-origin: center;
}

.ile-engraving-preview__overlay svg path {
    stroke: #000;
    stroke-width: 0.04;
    stroke-linejoin: round;
    paint-order: stroke fill;
}

@media (max-width: 700px) {
    .ile-engraving-modal .ile-engraving-preview.is-link-product .ile-engraving-preview__overlay svg path {
        stroke-width: 0.8px;
        vector-effect: non-scaling-stroke;
    }
}

.ile-engraving-fields {
    min-width: 0;
}

.ile-engraving-modal .ile-engraving-fields {
    position: relative;
    height: 100vh;
    height: 100dvh;
    width: calc(100% - 64px);
    margin: 0 auto;
    padding: 96px 0 24px;
    overflow-y: auto;
    scrollbar-width: thin;
}

@media (min-width: 701px) and (min-height: 501px) {
    .ile-engraving-modal {
        --ile-eng-preview-column: min(56vw, 100vh);
        --ile-eng-preview-column: min(56vw, 100dvh);
        --ile-eng-editor-gutter: max(32px, calc((100vw - var(--ile-eng-preview-column) - 900px) / 2));
    }

    .ile-engraving-modal .ile-engraving-workspace {
        grid-template-columns: var(--ile-eng-preview-column) minmax(0, 1fr);
    }

    .ile-engraving-modal .ile-engraving-fields {
        width: calc(100% - var(--ile-eng-editor-gutter) - var(--ile-eng-editor-gutter));
    }

    .ile-engraving-modal__dialog > h2 {
        left: calc(var(--ile-eng-preview-column) + var(--ile-eng-editor-gutter));
        width: calc(100vw - var(--ile-eng-preview-column) - var(--ile-eng-editor-gutter) - 96px);
    }
}

.ile-engraving-fields.is-media-loading > :not(.ile-engraving-media-loading) {
    visibility: hidden;
}

.ile-engraving-media-loading {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--ile-eng-black);
    background: #e9e9e4;
    font-size: 14px;
    text-align: center;
}

.ile-engraving-modal .ile-engraving-media-loading {
    z-index: 7;
}

.ile-engraving-media-loading__pearls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ile-engraving-media-loading__pearls i {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 28%, #fff 0%, #fff 20%, #f2f0e4 38%, #c6c1ac 73%, #eeeadd 100%);
    box-shadow: -1px 2px 3px rgba(94, 100, 78, .125);
    animation: ile-engraving-pearl-breathe 2.6s ease-in-out infinite;
}

.ile-engraving-media-loading__pearls i:nth-child(2) { animation-delay: .3s; }
.ile-engraving-media-loading__pearls i:nth-child(3) { animation-delay: .6s; }

@keyframes ile-engraving-pearl-breathe {
    0%, 100% { opacity: .25; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-3px); }
}

.ile-engraving-slot-navigation {
    display: flex;
    align-items: center;
    gap: clamp(20px, 2.4vw, 38px);
    width: 100%;
    margin: 0 0 22px;
    padding: 0 0 12px;
    overflow-x: auto;
    border-bottom: 1px solid var(--ile-eng-line);
    scrollbar-width: none;
}

.ile-engraving-slot-navigation::-webkit-scrollbar {
    display: none;
}

.ile-engraving-slot-nav-item {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 6px;
}

.ile-engraving-slot-tab {
    position: relative;
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ile-eng-muted);
    font: inherit;
    font-size: clamp(14px, 1vw, 17px);
    font-weight: 400;
    letter-spacing: .08em;
    line-height: 1;
    text-transform: uppercase;
    cursor: pointer;
}

.ile-engraving-slot-tab::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 1px;
    background: transparent;
}

.ile-engraving-slot-tab.is-active {
    color: var(--ile-eng-black);
}

.ile-engraving-slot-tab.is-active::after {
    background: var(--ile-eng-black);
}

.ile-engraving-remove-slot {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ile-eng-muted);
    font: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.ile-engraving-remove-slot:hover,
.ile-engraving-remove-slot:focus-visible {
    color: var(--ile-eng-black);
}

.ile-engraving-area-navigation {
    display: flex;
    gap: 24px;
    margin: -7px 0 22px;
    border-bottom: 1px solid var(--ile-eng-line);
}

.ile-engraving-area-tab {
    padding: 0 0 10px;
    border: 0;
    border-bottom: 1px solid transparent;
    background: transparent;
    color: var(--ile-eng-muted);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.ile-engraving-area-tab.is-active {
    border-bottom-color: var(--ile-eng-black);
    color: var(--ile-eng-black);
}

.ile-engraving-add-slot {
    position: relative;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--ile-eng-line);
    border-radius: 0;
    background: var(--ile-eng-white);
    color: var(--ile-eng-black);
    cursor: pointer;
}

.ile-engraving-add-slot::before,
.ile-engraving-add-slot::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 1px;
    background: currentColor;
    transform: translate(-50%, -50%);
}

.ile-engraving-add-slot::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.ile-engraving-add-slot:hover {
    border-color: var(--ile-eng-black);
}

.ile-engraving-slot {
    position: relative;
    display: grid;
    gap: 18px;
    margin: 0 0 16px;
    padding: 0;
    border: 0;
}

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

.ile-engraving-slot label {
    display: grid;
    gap: 10px;
}

.ile-engraving-field-label {
    color: var(--ile-eng-black);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: .02em;
}

.ile-engraving-slot input[type="text"],
.ile-engraving-slot textarea {
    width: 100%;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid #9a9a96;
    border-radius: 0;
    outline: 0;
    background: var(--ile-eng-white);
    color: var(--ile-eng-black);
    font: inherit;
    font-size: 16px;
}

.ile-engraving-slot textarea { height: 44px; min-height: 44px; max-height: 112px; padding-top: 10px; padding-bottom: 10px; resize: none; overflow-y: auto; line-height: 1.35; }

.ile-engraving-slot input[type="text"]:focus,
.ile-engraving-slot textarea:focus {
    border-color: var(--ile-eng-black);
    box-shadow: 0 0 0 1px var(--ile-eng-black);
}

.ile-engraving-choice-selector {
    display: grid;
    gap: 18px;
    width: 100%;
}

.ile-engraving-choice-section h3 {
    margin: 0 0 14px;
    color: var(--ile-eng-black);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: .04em;
    line-height: 1.2;
    text-transform: uppercase;
}

.ile-engraving-choice-viewport {
    width: 100%;
    overflow: hidden;
}

.ile-engraving-choice-panel {
    display: flex;
    flex-wrap: nowrap;
    gap: 14px;
    width: 100%;
    min-height: 82px;
    padding: 1px 1px 6px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-behavior: smooth;
    scroll-snap-type: inline proximity;
    scrollbar-width: none;
}

.ile-engraving-choice-panel::-webkit-scrollbar {
    display: none;
}

.ile-engraving-choice {
    display: grid;
    flex: 0 0 142px;
    grid-template-rows: 46px auto;
    justify-items: center;
    gap: 4px;
    width: 142px;
    min-height: 74px;
    padding: 6px 10px;
    border: 1px solid var(--ile-eng-line);
    border-radius: 5px;
    background: var(--ile-eng-white);
    color: var(--ile-eng-muted);
    font: inherit;
    cursor: pointer;
    scroll-snap-align: start;
    transition: border-color .2s ease, color .2s ease;
}

.ile-engraving-choice > span,
.ile-engraving-choice > svg {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 8px;
    border: 0;
    background: var(--ile-eng-white);
    transition: color .2s ease, transform .2s ease;
}

.ile-engraving-choice > svg {
    overflow: visible;
}

.ile-engraving-choice:hover,
.ile-engraving-choice.is-selected {
    border-color: var(--ile-eng-black);
    color: var(--ile-eng-black);
}

.ile-engraving-choice:hover > span,
.ile-engraving-choice:hover > svg,
.ile-engraving-choice.is-selected > span,
.ile-engraving-choice.is-selected > svg {
    transform: translateY(-2px);
}

.ile-engraving-icon-choice {
    flex-basis: 76px;
    width: 76px;
    min-height: 80px;
    padding: 0;
    border: 0;
    border-radius: 0;
    grid-template-rows: 58px minmax(16px, auto);
    gap: 7px;
}

.ile-engraving-icon-choice > span,
.ile-engraving-icon-choice > svg {
    width: 58px;
    height: 58px;
    border: 1px solid var(--ile-eng-line);
    border-radius: 50%;
}

.ile-engraving-icon-choice:hover > span,
.ile-engraving-icon-choice:hover > svg,
.ile-engraving-icon-choice.is-selected > span,
.ile-engraving-icon-choice.is-selected > svg {
    border-color: var(--ile-eng-black);
    box-shadow: inset 0 0 0 1px var(--ile-eng-black);
    transform: none;
}

.ile-engraving-font-sample {
    font-family: "ILE Engraving Noto", sans-serif;
    font-size: 25px;
}

.ile-engraving-direction-sample {
    font-size: 20px;
    font-weight: 600;
    line-height: 1;
    white-space: pre-line;
}

.ile-engraving-direction-sample--along_up {
    transform: rotate(-90deg);
}

.ile-engraving-direction-choice:hover .ile-engraving-direction-sample--along_up,
.ile-engraving-direction-choice.is-selected .ile-engraving-direction-sample--along_up {
    transform: rotate(-90deg) translateY(-2px);
}

.ile-engraving-no-icon {
    font-size: 25px;
}

.ile-engraving-choice small {
    max-width: 138px;
    overflow: hidden;
    color: inherit;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ile-engraving-scroll-indicator {
    position: relative;
    width: 100%;
    height: 2px;
    margin-top: 5px;
    overflow: hidden;
    background: #e3e3e0;
}

.ile-engraving-scroll-indicator span {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    min-width: 42px;
    background: #a0a09c;
    transition: transform .08s linear, background-color .2s ease;
}

.ile-engraving-scroll-indicator.is-scrollable span {
    background: var(--ile-eng-black);
}

.ile-engraving-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 6px 0 12px;
    padding: 14px 0 12px;
    border-top: 1px solid var(--ile-eng-line);
    color: var(--ile-eng-black);
    font-size: 14px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.ile-engraving-price strong {
    font: inherit;
    white-space: nowrap;
}

.ile-engraving-submit {
    min-height: 54px;
    border-radius: 0 !important;
}

.ile-engraving-submit {
    width: 100%;
    margin: 4px 0 0 !important;
    background: var(--ile-eng-black) !important;
    color: var(--ile-eng-white) !important;
}

.ile-engraving-error {
    margin: 16px 0;
    color: #a52323;
}

.ile-engraving-field-error {
    display: block;
    margin-top: 8px;
    color: #a52323;
    font-size: 12px;
    line-height: 1.4;
}

.ile-engraving-field-error[hidden] { display: none; }

.ile-engraving-slot input[aria-invalid="true"],
.ile-engraving-slot textarea[aria-invalid="true"] {
    border-color: #a52323;
}

.ile-engraving-honeypot {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
}

.ile-engraving-builder__product {
    max-width: 520px;
    margin: 18px 0;
}

.ile-engraving-builder__product label {
    display: grid;
    gap: 6px;
}

.ile-engraving-builder__product select,
.ile-engraving-slot select {
    width: 100%;
    min-height: 48px;
}

.ile-engraving-builder__result {
    padding: 20px;
    border: 1px solid var(--ile-eng-line);
    background: var(--ile-eng-white);
}

.ile-engraving-builder__result strong {
    display: block;
    margin: 8px 0 14px;
    font-size: 24px;
}

.ile-engraving-edit-cart {
    display: block;
    margin-top: 8px;
}

.ile-engraving-checkout-notice {
    padding: 12px;
    background: #f6f7f7;
}

@media (max-width: 700px), (min-width: 701px) and (max-width: 932px) and (max-height: 500px) {
    body.single-product form.cart .ile-engraving-product-control .ile-engraving-open {
        min-height: 58px;
        padding-right: 18px !important;
        padding-left: 18px !important;
        font-size: 14px !important;
    }

    .ile-engraving-modal__dialog {
        display: flex;
        flex-direction: column;
        overflow-y: auto;
    }

    .ile-engraving-modal__dialog > h2 {
        position: static;
        order: 0;
        width: auto;
        margin: 24px 56px 18px 20px;
        transform: none;
        font-size: 22px;
    }

    .ile-engraving-modal__close {
        position: absolute;
        top: 12px;
        right: 10px;
    }

    .ile-engraving-modal [data-ile-engraving-modal-root] {
        order: 1;
        height: auto;
    }

    .ile-engraving-modal .ile-engraving-workspace,
    .ile-engraving-workspace {
        display: grid;
        grid-template-columns: 1fr;
        height: auto;
        background: var(--ile-eng-white);
    }

    .ile-engraving-modal .ile-engraving-preview {
        width: 100%;
        max-height: none;
    }

    .ile-engraving-modal .ile-engraving-fields {
        width: 100%;
        height: auto;
        padding: 24px 20px 42px;
        overflow: visible;
    }

    .ile-engraving-slot-navigation {
        gap: 22px;
        margin-bottom: 32px;
    }

    .ile-engraving-slot-tab {
        font-size: 16px;
    }

    .ile-engraving-choice {
        flex-basis: 132px;
        width: 132px;
    }

    .ile-engraving-icon-choice {
        flex-basis: 82px;
        width: 82px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ile-engraving-media-loading__pearls i {
        animation: none;
        opacity: .8;
    }
    .ile-engraving-modal__close,
    .ile-engraving-choice > span,
    .ile-engraving-choice > svg,
    .ile-engraving-open {
        transition: none !important;
    }
}

.ile-engraving-blocks-cart-edit { padding: 16px 0; }
.ile-engraving-blocks-cart-edit h2 { margin: 0 0 12px; font-size: 16px; line-height: 1.4; font-weight: 600; }
.ile-engraving-blocks-cart-edit ul { margin: 0; padding: 0; list-style: none; }
.ile-engraving-blocks-cart-edit__item { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.ile-engraving-blocks-cart-edit__product { overflow-wrap: anywhere; }
.ile-engraving-blocks-cart-edit__button { min-height: 44px; padding: 8px 12px; border: 1px solid currentColor; border-radius: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.ile-engraving-blocks-cart-edit__button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* Shared editor refinements; no changes to WooCommerce cart controls. */
.ile-engraving-workspace *, .ile-engraving-modal__dialog { box-sizing: border-box; }
.ile-engraving-workspace ::selection { background: #161616; color: #fff; }
.ile-engraving-workspace button { touch-action: manipulation; }
.ile-engraving-workspace button:focus-visible, .ile-engraving-choice-panel:focus-visible {
    outline: 2px solid var(--ile-eng-black); outline-offset: 3px;
}
.ile-engraving-preview__notice {
    position: absolute; left: 24px; right: 24px; bottom: 20px; margin: 0;
    color: #fff; font-size: 12px;
    line-height: 1.4; text-align: left; text-shadow: 0 1px 3px #000;
}
.ile-engraving-text-field { position: relative; }
.ile-engraving-counter { position: absolute; top: 0; right: 0; color: var(--ile-eng-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.ile-engraving-text-field .ile-engraving-field-label { padding-right: 58px; text-transform: uppercase; font-size: 13px; }
.ile-engraving-wrap-hint { color: var(--ile-eng-muted); font-size: 12px; line-height: 1.4; }
.ile-engraving-slot input::placeholder, .ile-engraving-slot textarea::placeholder { color: var(--ile-eng-muted); opacity: 1; }
.ile-engraving-slot input, .ile-engraving-slot textarea { caret-color: var(--ile-eng-black); }
.ile-engraving-slot-summary { display: block; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; line-height: 1.4; letter-spacing: 0; text-transform: none; color: var(--ile-eng-muted); }
.ile-engraving-slot-tab { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; min-height: 44px; padding: 4px 0 6px; }
.ile-engraving-slot-summary { min-height: 15.4px; }
.ile-engraving-choice-section { position: relative; min-width: 0; }
.ile-engraving-choice-section h3 { min-height: 24px; display: flex; align-items: center; margin-bottom: 8px; }
.ile-engraving-choice-section.is-scrollable h3 { padding-right: 88px; }
.ile-engraving-choice-arrows { position: absolute; top: -10px; right: 0; display: flex; }
.ile-engraving-choice-arrows[hidden] { display: none; }
.ile-engraving-choice-arrows button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: transparent; color: var(--ile-eng-black); padding: 0; cursor: pointer; }
.ile-engraving-choice-arrows button:disabled { opacity: .3; cursor: default; }
.ile-engraving-choice { border-radius: 2px; }
.ile-engraving-choice > span, .ile-engraving-choice > svg { box-sizing: border-box; }
.ile-engraving-choice:hover > span, .ile-engraving-choice:hover > svg,
.ile-engraving-choice.is-selected > span, .ile-engraving-choice.is-selected > svg { transform: none; }
.ile-engraving-scroll-indicator:not(.is-scrollable) { visibility: hidden; }
.ile-engraving-scroll-indicator span { background: var(--ile-eng-black); min-width: 0; }
.ile-engraving-submit { padding: 12px 16px; border: 1px solid var(--ile-eng-black); font: inherit; font-size: 14px; cursor: pointer; }
.ile-engraving-submit:disabled { opacity: .55; cursor: wait; }
.ile-engraving-keyboard-done { display: none; }
.ile-engraving-mobile-directions { display: none; }
.ile-engraving-price { text-transform: none; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.ile-engraving-price strong { font-weight: 500; }
@media (max-width: 700px), (min-width: 701px) and (max-width: 932px) and (max-height: 500px) {
    .ile-engraving-modal__dialog { height: var(--ile-eng-viewport-height, 100dvh); top: var(--ile-eng-viewport-top, 0px); overflow: hidden; }
    .ile-engraving-modal__dialog > h2 { box-sizing: border-box; flex: 0 0 44px; height: 44px; margin: 0; padding: 11px 108px 8px 16px; font-size: 17px; letter-spacing: .035em; background: #fff; position: relative; top: auto; left: auto; width: 100%; }
    .ile-engraving-modal__close { position: absolute; top: 0; right: 4px; width: 44px; height: 44px; font-size: 30px; }
    .ile-engraving-modal [data-ile-engraving-modal-root] { flex: 1 1 auto; min-height: 0; }
    .ile-engraving-modal .ile-engraving-workspace { height: 100%; min-height: 0; grid-template-columns: 1fr; grid-template-rows: minmax(200px, 38%) minmax(0, 1fr); }
    .ile-engraving-modal .ile-engraving-preview { height: 100%; min-height: 0; aspect-ratio: auto; }
    .ile-engraving-modal .ile-engraving-preview.is-mobile-fill .ile-engraving-preview__scene > img,
    .ile-engraving-modal .ile-engraving-preview.is-mobile-fill .ile-engraving-preview__scene > video { object-fit: cover; }
    .ile-engraving-preview__scene > img, .ile-engraving-preview__scene > video { object-position: 50% 58%; }
    .ile-engraving-preview__notice { left: 12px; right: 12px; bottom: 10px; font-size: 10px; }
    .ile-engraving-modal .ile-engraving-fields { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto auto; height: 100%; min-height: 0; width: 100%; margin: 0; padding: 8px 16px max(8px, env(safe-area-inset-bottom)); overflow: hidden; }
    .ile-engraving-modal .ile-engraving-fields.is-single-piece { grid-template-rows: minmax(0, 1fr) auto auto; }
    .ile-engraving-modal .ile-engraving-fields.is-linked-piece { grid-template-rows: auto minmax(0, 1fr) auto auto; }
    .ile-engraving-modal .ile-engraving-fields.is-dual-piece { grid-template-rows: auto auto minmax(0, 1fr) auto auto; }
    .ile-engraving-compact-navigation { display: contents; }
    .ile-engraving-slot-navigation { gap: 16px; margin: 0 0 6px; padding: 0; min-height: 44px; }
    .ile-engraving-slot-tab, .ile-engraving-area-tab { min-height: 44px; font-size: 13px; letter-spacing: .03em; }
    .ile-engraving-remove-slot { width: 44px; height: 44px; }
    .ile-engraving-add-slot { flex-basis: 44px; width: 44px; height: 44px; }
    .ile-engraving-area-navigation { margin: 0 0 6px; gap: 16px; }
    .ile-engraving-slot { min-height: 0; grid-template-rows: max-content minmax(0, 1fr); gap: 8px; margin: 0; }
    .ile-engraving-slot label { gap: 5px; }
    .ile-engraving-choice-selector { min-height: 0; overflow-y: auto; overscroll-behavior: contain; align-content: start; -webkit-overflow-scrolling: touch; gap: 12px; }
    .ile-engraving-price, .ile-engraving-submit { align-self: end; }
    .ile-engraving-slot input[type="text"] { min-height: 44px; padding: 0 12px; font-size: 16px; }
    .ile-engraving-slot textarea { height: 44px; min-height: 44px; max-height: 112px; padding: 10px 12px; font-size: 16px; }
    .ile-engraving-choice-section h3 { font-size: 12px; min-height: 20px; padding-right: 0; margin-bottom: 6px; }
    .ile-engraving-choice-section.is-scrollable h3 { padding-right: 88px; }
    .ile-engraving-choice-panel { gap: 8px; min-height: 0; padding: 3px 3px 5px; }
    .ile-engraving-font-choice { flex-basis: 106px; width: 106px; min-height: 62px; grid-template-rows: 30px auto; padding: 4px 8px; gap: 2px; }
    .ile-engraving-font-choice > span { width: 100%; height: 30px; padding: 0; font-size: 24px; }
    .ile-engraving-icon-choice { flex-basis: 76px; width: 76px; min-height: 68px; grid-template-rows: 44px minmax(16px, auto); gap: 6px; }
    .ile-engraving-icon-choice > span, .ile-engraving-icon-choice > svg { width: 44px; height: 44px; padding: 9px; }
    .ile-engraving-choice small { font-size: 11px; max-width: 100%; }
    .ile-engraving-scroll-indicator { height: 2px; margin-top: 2px; }
    .ile-engraving-price { padding: 6px 0 4px; margin: 0; font-size: 13px; gap: 8px; }
    .ile-engraving-submit { min-height: 48px; }
    .ile-engraving-modal.is-editing-text .ile-engraving-modal__dialog > h2 { padding-right: 120px; }
    .ile-engraving-modal.is-editing-text .ile-engraving-keyboard-done { display: block; position: absolute; z-index: 9; top: 0; right: 48px; width: 68px; min-height: 44px; margin: 0; padding: 0 4px; border: 0; background: #fff; color: var(--ile-eng-black); font: inherit; font-size: 14px; text-align: center; }
    .ile-engraving-modal.is-editing-text .ile-engraving-workspace { grid-template-rows: clamp(150px, calc(var(--ile-eng-viewport-height, 400px) - 200px), 200px) minmax(0, 1fr); }
    .ile-engraving-modal.is-editing-text .ile-engraving-mobile-directions { position: absolute; z-index: 3; top: 50%; left: 12px; display: flex; flex-direction: column; gap: 8px; transform: translateY(-50%); }
    .ile-engraving-mobile-direction { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #fff; border-radius: 4px; background: rgba(0, 0, 0, .72); color: #fff; cursor: pointer; }
    .ile-engraving-mobile-direction[aria-pressed="true"] { background: #fff; color: #111; box-shadow: inset 0 0 0 2px #111; }
    .ile-engraving-mobile-direction:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
    .ile-engraving-mobile-direction .ile-engraving-direction-sample { display: block; font-size: 15px; }
    .ile-engraving-modal.is-editing-text .ile-engraving-fields { display: flex; flex-direction: column; padding: 0 16px 6px; }
    .ile-engraving-modal.is-editing-text .ile-engraving-compact-navigation { display: flex; flex: 0 0 44px; align-items: center; gap: 12px; min-width: 0; border-bottom: 1px solid var(--ile-eng-line); }
    .ile-engraving-modal.is-editing-text .ile-engraving-compact-navigation:empty { display: none; }
    .ile-engraving-modal.is-editing-text .ile-engraving-slot-navigation, .ile-engraving-modal.is-editing-text .ile-engraving-area-navigation { display: flex; flex: 1 1 auto; min-width: 0; height: 44px; margin: 0; padding: 0; border: 0; }
    .ile-engraving-modal.is-editing-text .ile-engraving-area-navigation { flex: 0 1 auto; }
    .ile-engraving-modal.is-editing-text .ile-engraving-slot-summary { display: none; }
    .ile-engraving-modal.is-editing-text .ile-engraving-slot { flex: 0 0 96px; display: block; min-height: 0; margin: 0; }
    .ile-engraving-modal.is-editing-text .ile-engraving-text-field { position: relative; display: flex; flex-direction: column; gap: 4px; height: 96px; padding: 8px 0 4px; }
    .ile-engraving-modal.is-editing-text .ile-engraving-field-label { font-size: 13px; }
    .ile-engraving-modal.is-editing-text .ile-engraving-counter { position: absolute; right: 0; top: 8px; }
    .ile-engraving-modal.is-editing-text .ile-engraving-slot input[type="text"], .ile-engraving-modal.is-editing-text .ile-engraving-slot textarea { flex: 0 0 44px; width: 100%; height: 44px !important; min-height: 44px; max-height: 44px; padding: 10px 12px; font-size: 16px; line-height: 21px; overflow-y: auto; }
    .ile-engraving-modal.is-editing-text .ile-engraving-slot textarea.is-multiline { flex-basis: 54px; height: 54px !important; min-height: 54px; max-height: 54px; padding-top: 5px; padding-bottom: 5px; }
    .ile-engraving-modal.is-editing-text .ile-engraving-wrap-hint, .ile-engraving-modal.is-editing-text .ile-engraving-choice-selector, .ile-engraving-modal.is-editing-text .ile-engraving-price, .ile-engraving-modal.is-editing-text .ile-engraving-submit { display: none; }
}
@media (max-width: 700px) {
    .ile-engraving-modal.is-keyboard-closing .ile-engraving-workspace { grid-template-rows: var(--ile-eng-held-preview-height) minmax(0, 1fr); }
    .ile-engraving-modal.is-short-viewport:not(.is-editing-text) .ile-engraving-workspace { grid-template-rows: 150px minmax(0, 1fr); }
    .ile-engraving-modal.is-short-viewport:not(.is-editing-text) .ile-engraving-workspace.is-multi-piece { grid-template-rows: 100px minmax(0, 1fr); }
    .ile-engraving-modal.is-short-viewport:not(.is-editing-text) .ile-engraving-fields.is-linked-piece { grid-template-rows: auto minmax(0, 1fr) auto auto; }
    .ile-engraving-modal.is-short-viewport:not(.is-editing-text) .ile-engraving-fields.is-dual-piece { grid-template-rows: auto auto minmax(0, 1fr) auto auto; }
    .ile-engraving-modal.is-short-viewport:not(.is-editing-text) .ile-engraving-wrap-hint { display: none; }
    .ile-engraving-modal.is-short-viewport:not(.is-editing-text) .ile-engraving-fields { padding-top: 2px; padding-bottom: 2px; }
    .ile-engraving-modal.is-editing-text.is-compact-height .ile-engraving-text-field, .ile-engraving-modal.is-editing-text.is-compact-height .ile-engraving-slot { height: 82px; flex-basis: 82px; }
    .ile-engraving-modal.is-editing-text.is-compact-height .ile-engraving-text-field { padding-top: 2px; }
    .ile-engraving-modal.is-editing-text.is-compact-height .ile-engraving-counter { top: 2px; }
}
@media (min-width: 701px) and (max-width: 932px) and (max-height: 500px) {
    .ile-engraving-modal .ile-engraving-workspace, .ile-engraving-modal.is-editing-text .ile-engraving-workspace { grid-template-columns: minmax(0, 42fr) minmax(0, 58fr); grid-template-rows: minmax(0, 1fr); }
    .ile-engraving-modal.is-editing-text .ile-engraving-fields { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    .ile-engraving-modal .ile-engraving-preview, .ile-engraving-scroll-indicator span { transition: none; }
    .ile-engraving-choice-panel { scroll-behavior: auto; }
}

/* Approved compact glass size control, separate from the calibrated media frame. */
.ile-engraving-preview__notice { padding-right: 196px; }
.ile-engraving-size-control {
    position: absolute; z-index: 3; right: 24px; bottom: 20px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 184px; height: 44px; padding: 0 12px; box-sizing: border-box;
    border: 1px solid rgba(255,255,255,.16); border-radius: 24px;
    color: #f7f5f0; background: linear-gradient(145deg,rgba(255,255,255,.09),rgba(255,255,255,.025));
    backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
}
.ile-engraving-size-control > span { flex: none; line-height: 1; text-align: center; font-weight: 400; }
.ile-engraving-size-a--small { width: 12px; font-size: 13px; }
.ile-engraving-size-a--large { width: 20px; font-size: 22px; }
.ile-engraving-size-control input[type="range"] {
    writing-mode: horizontal-tb; direction: ltr; flex: 1; min-width: 0; width: 106px; height: 42px;
    padding: 0; margin: 0; border: 0; border-radius: 0; box-shadow: none;
    appearance: none; -webkit-appearance: none; background: transparent; touch-action: none; --progress: 0%;
}
.ile-engraving-size-control input[type="range"]:disabled { opacity: .46; cursor: default; }
.ile-engraving-size-control input[type="range"]:focus-visible { outline: 1px solid #fff; outline-offset: 2px; border-radius: 12px; }
.ile-engraving-size-control input::-webkit-slider-runnable-track {
    width: 100%; height: 2px; border-radius: 2px;
    background: linear-gradient(to right,#f7f5f0 0 var(--progress),rgba(247,245,240,.38) var(--progress) 100%);
}
.ile-engraving-size-control input::-webkit-slider-thumb {
    appearance: none; -webkit-appearance: none; width: 16px; height: 16px; margin: -7px 0 0;
    border: 1px solid rgba(255,255,255,.9); border-radius: 50%; background: rgba(247,245,240,.72);
    box-shadow: 0 2px 4px rgba(0,0,0,.3);
}
.ile-engraving-size-control input::-moz-range-track { width: 100%; height: 2px; background: rgba(247,245,240,.38); }
.ile-engraving-size-control input::-moz-range-progress { height: 2px; background: #f7f5f0; }
.ile-engraving-size-control input::-moz-range-thumb { width: 14px; height: 14px; border: 1px solid rgba(255,255,255,.9); border-radius: 50%; background: rgba(247,245,240,.72); }
.ile-engraving-icon-choice { flex-basis: 64px; width: 64px; min-height: 68px; grid-template-rows: 46px minmax(16px,auto); gap: 6px; }
.ile-engraving-icon-choice > span, .ile-engraving-icon-choice > svg { width: 46px; height: 46px; padding: 11px; }
@media (max-width: 700px), (min-width: 701px) and (max-width: 932px) and (max-height: 500px) {
    .ile-engraving-size-control { right: 12px; bottom: 10px; width: 156px; }
    .ile-engraving-preview__notice { padding-right: 168px; }
}
@media (max-width: 700px) {
    .ile-engraving-icon-choice { flex-basis: 64px; width: 64px; min-height: 62px; grid-template-rows: 40px minmax(16px,auto); }
    .ile-engraving-icon-choice > span, .ile-engraving-icon-choice > svg { width: 40px; height: 40px; padding: 8px; }
}
@media (max-width: 360px) {
    .ile-engraving-size-control { width: 124px; gap: 6px; padding: 0 9px; }
    .ile-engraving-preview__notice { padding-right: 136px; }
}
