body.order-notice-lock { overflow: hidden; }

.order-notice-layer,
.order-notice-layer * {
    box-sizing: border-box;
}

.order-notice-layer {
    position: fixed;
    z-index: 10010;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(20, 28, 35, .57);
    backdrop-filter: blur(5px);
    pointer-events: auto;
}

.order-notice-layer[hidden] { display: none; }

.order-notice-dialog {
    position: relative;
    width: min(760px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    overflow: auto;
    border: 1px solid #dce3e8;
    border-radius: 14px;
    background: #fff;
    color: var(--brand-dark, #1f2933);
    box-shadow: 0 24px 70px rgba(20, 31, 40, .22), 0 5px 18px rgba(20, 31, 40, .1);
    pointer-events: auto;
    animation: order-notice-enter 220ms ease-out both;
}

.order-notice-accent {
    height: 6px;
    background: var(--magenta, #ec008c);
}

.order-notice-close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #dce3e8;
    border-radius: 50%;
    background: #fff;
    color: #27343e;
    cursor: pointer;
}

.order-notice-close:hover {
    border-color: var(--magenta, #ec008c);
    color: var(--magenta, #ec008c);
}

.order-notice-close:focus-visible,
.order-notice-reopen:focus-visible,
.order-notice-dialog a:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--magenta, #ec008c), transparent 35%);
    outline-offset: 3px;
}

.order-notice-close svg {
    width: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.order-notice-content { padding: 30px 42px 34px; }

.order-notice-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 236px;
    gap: 20px;
    align-items: center;
}

.order-notice-hero-copy { min-width: 0; }

.order-repair-mascot {
    position: relative;
    width: 236px;
    aspect-ratio: 852 / 640;
    margin: 0;
    overflow: hidden;
}

.order-repair-scene { display: block; width: 100%; height: 100%; overflow: visible; }

.order-repair-work,
.order-repair-screw { animation: order-repair-withdraw 5s ease-in-out infinite; }

.order-repair-hand {
    transform-origin: 287px 474px;
    animation: order-repair-grip 5s ease-in-out infinite;
}

.order-repair-screwdriver {
    transform-origin: 354px 450px;
    animation: order-repair-turn 5s ease-in-out infinite;
}

.order-repair-shaft,
.order-repair-tip,
.order-repair-handle-line { fill: none; stroke: #172841; stroke-linecap: round; stroke-linejoin: round; }
.order-repair-shaft { stroke-width: 8; }
.order-repair-tip { stroke-width: 5; }
.order-repair-handle { fill: var(--magenta, #ec008c); stroke: #172841; stroke-width: 5; }
.order-repair-handle-line { stroke-width: 3.5; opacity: .6; }

.order-repair-screw-stem { fill: none; stroke: #aeb8c1; stroke-width: 7; stroke-linecap: round; }
.order-repair-screw-head {
    transform-origin: 507px 450px;
    animation: order-repair-unscrew 5s ease-in-out infinite;
}
.order-repair-screw-head circle { fill: #e8edf1; stroke: #172841; stroke-width: 3; }
.order-repair-screw-head path { fill: none; stroke: #172841; stroke-width: 3; stroke-linecap: round; }

.order-repair-motion {
    fill: none;
    stroke: var(--magenta, #ec008c);
    stroke-width: 5;
    stroke-linecap: round;
    opacity: 0;
    animation: order-repair-motion-marks 5s ease-in-out infinite;
}

body.order-notice-motion-paused .order-repair-scene * { animation-play-state: paused; }

.order-notice-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 54px 11px 0;
    color: var(--magenta, #ec008c);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.order-notice-status span,
.order-notice-reopen > span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--magenta, #ec008c);
    box-shadow: 0 0 0 5px rgba(236, 0, 140, .1);
}

.order-notice-dialog h2 {
    max-width: 430px;
    margin: 0;
    font-family: var(--font-main, "Tilda Sans", Arial, sans-serif);
    font-size: clamp(34px, 4vw, 48px);
    font-weight: 420;
    line-height: 1.04;
    letter-spacing: -.025em;
}

.order-notice-lead {
    max-width: 440px;
    margin: 18px 0 0;
    color: #536571;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.45;
}

.order-notice-manual,
.order-template-section {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #dce3e8;
}

.order-notice-manual > p,
.order-template-section > p {
    margin: 0 0 10px;
    color: #303e48;
    font-size: 14px;
    font-weight: 700;
}

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

.order-contact-grid a,
.order-template-grid a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 65px;
    padding: 10px 12px;
    border: 1px solid #dce3e8;
    border-radius: 8px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.order-contact-grid a:hover,
.order-template-grid a:hover {
    border-color: var(--magenta, #ec008c);
    box-shadow: 0 8px 20px rgba(46, 58, 68, .08);
    transform: translateY(-2px);
}

.order-contact-icon {
    display: grid;
    flex: 0 0 36px;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fef1f8;
    color: var(--magenta, #ec008c);
    font-size: 17px;
    font-weight: 700;
}

.order-contact-grid a > span:last-child,
.order-template-grid a > span { min-width: 0; }

.order-contact-grid small,
.order-template-grid small {
    display: block;
    margin-bottom: 1px;
    color: #71808b;
    font-size: 11px;
    font-weight: 600;
}

.order-contact-grid strong,
.order-template-grid strong {
    display: block;
    overflow-wrap: anywhere;
    color: #202d36;
    font-size: 14px;
    font-weight: 700;
}

.order-template-grid a {
    justify-content: space-between;
    background: #fafbfc;
}

.order-template-grid svg {
    flex: 0 0 23px;
    width: 23px;
    fill: none;
    stroke: var(--magenta, #ec008c);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.order-notice-footer {
    display: grid;
    grid-template-columns: 1.2fr auto;
    gap: 18px;
    align-items: end;
    margin-top: 20px;
}

.order-notice-footer p {
    margin: 0;
    color: #52636f;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.order-notice-footer .order-notice-apology {
    color: #2d3942;
    text-align: right;
}

.order-notice-reopen {
    position: fixed;
    z-index: 999;
    right: 24px;
    bottom: 24px;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 48px;
    padding: 12px 18px;
    border: 1px solid #e9bad6;
    border-radius: 24px;
    background: #fff;
    color: #26333d;
    box-shadow: 0 12px 32px rgba(32, 44, 52, .16);
    font: 700 14px/1.2 var(--font-main, "Tilda Sans", Arial, sans-serif);
    cursor: pointer;
}

.order-notice-reopen[hidden] { display: none; }

@keyframes order-notice-enter {
    from { opacity: 0; transform: translateY(12px) scale(.985); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes order-repair-turn {
    0%, 12%, 54%, 100% { transform: scaleY(1); }
    18%, 32%, 46% { transform: scaleY(.65); }
    25%, 39% { transform: scaleY(1.1); }
}

@keyframes order-repair-grip {
    0%, 12%, 54%, 100% { transform: rotate(0deg); }
    18%, 32%, 46% { transform: rotate(-5deg); }
    25%, 39% { transform: rotate(3deg); }
}

@keyframes order-repair-withdraw {
    0%, 12% { transform: translateX(0); }
    54%, 80% { transform: translateX(-34px); }
    100% { transform: translateX(0); }
}

@keyframes order-repair-unscrew {
    0%, 12% { transform: rotate(0deg); }
    54%, 80% { transform: rotate(-1080deg); }
    100% { transform: rotate(0deg); }
}

@keyframes order-repair-motion-marks {
    0%, 13%, 58%, 100% { opacity: 0; }
    18%, 50% { opacity: .65; }
}

@media (max-width: 640px) {
    .order-notice-layer { padding: 10px; }
    .order-notice-dialog {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
        border-radius: 13px;
    }
    .order-notice-content { padding: 18px 20px 22px; }
    .order-notice-close { top: 16px; right: 15px; }
    .order-notice-hero {
        grid-template-columns: minmax(0, 1fr) 112px;
        gap: 6px 8px;
        align-items: start;
    }
    .order-notice-hero-copy { display: contents; }
    .order-notice-status { align-self: center; margin-right: 0; font-size: 11px; }
    .order-repair-mascot { grid-column: 2; grid-row: 1; width: 112px; margin-top: 34px; }
    .order-notice-dialog h2 { grid-column: 1 / -1; max-width: 310px; padding-right: 16px; font-size: 31px; }
    .order-notice-lead { grid-column: 1 / -1; }
    .order-notice-lead { margin-top: 13px; font-size: 15px; }
    .order-notice-manual, .order-template-section { margin-top: 17px; padding-top: 16px; }
    .order-contact-grid, .order-template-grid { grid-template-columns: 1fr; gap: 8px; }
    .order-contact-grid a, .order-template-grid a { min-height: 60px; }
    .order-notice-footer { grid-template-columns: 1fr; gap: 9px; margin-top: 17px; }
    .order-notice-footer .order-notice-apology { text-align: left; }
    .order-notice-reopen { right: 12px; bottom: 12px; max-width: calc(100% - 24px); }
}

@media (prefers-reduced-motion: reduce) {
    .order-notice-dialog { animation: none; }
    .order-contact-grid a,
    .order-template-grid a { transition: none; }
    .order-contact-grid a:hover,
    .order-template-grid a:hover { transform: none; }
    .order-repair-scene * { animation: none; }
}
