.np-stamp-stage {
    box-sizing: border-box;
    display: grid;
    width: min(1120px, calc(100vw - 32px));
    min-height: 100dvh;
    align-content: center;
    justify-items: center;
    gap: clamp(10px, 1.8vh, 18px);
    padding: clamp(96px, 10vh, 120px) clamp(24px, 5vw, 72px) clamp(96px, 9vh, 116px);
}

.np-device-switch,
.np-stamp-source {
    display: flex;
    max-width: min(720px, 100%);
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--np-space-2);
}

.np-device-button,
.np-stamp-source-button,
.np-stamp-text-toggle,
.np-stamp-apply {
    min-height: 42px;
    padding: 0 var(--np-space-4);
    border: 4px solid var(--np-surface-ink);
    border-radius: 8px;
    color: var(--np-text-primary);
    background: var(--np-surface-panel);
    box-shadow: var(--np-shadow-small);
    cursor: pointer;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 900;
    letter-spacing: 0;
    transition: box-shadow 120ms ease-out, transform 120ms ease-out, background-color 120ms ease-out;
}

.np-device-button[aria-pressed="true"] {
    background: var(--np-accent-cool);
    transform: rotate(-1deg);
}

.np-stamp-source-button[aria-pressed="true"] {
    background: var(--np-accent-pop);
}

.np-device-button:hover,
.np-stamp-source-button:hover,
.np-stamp-text-toggle:hover,
.np-stamp-apply:hover {
    background: var(--np-accent-action);
    transform: translate(-1px, -1px);
}

.np-device-button:active,
.np-stamp-source-button:active,
.np-stamp-text-toggle:active,
.np-stamp-apply:active {
    box-shadow: 1px 1px 0 var(--np-surface-ink);
    transform: translate(4px, 4px);
}

.np-device-button:disabled,
.np-stamp-source-button:disabled {
    cursor: wait;
    opacity: 0.72;
}

.np-stamp-table {
    position: relative;
    display: grid;
    width: min(980px, 100%);
    align-items: stretch;
    gap: var(--np-space-4);
}

.np-device-pad {
    position: relative;
    box-sizing: border-box;
    display: grid;
    min-height: clamp(380px, 52vh, 520px);
    place-items: center;
    padding: clamp(32px, 5vw, 64px);
    border: 6px solid var(--np-surface-ink);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 248, 214, 0.98)),
        repeating-linear-gradient(-8deg, rgba(17, 17, 17, 0.055) 0 18px, transparent 18px 36px);
    box-shadow: var(--np-shadow-hard);
    overflow: hidden;
    transform: rotate(0.6deg);
}

.np-device-paper {
    position: absolute;
    inset: clamp(18px, 3vw, 30px);
    border: 3px dashed rgba(17, 17, 17, 0.24);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(17, 17, 17, 0.04) 1px, transparent 1px),
        linear-gradient(0deg, rgba(17, 17, 17, 0.04) 1px, transparent 1px);
    background-size: 32px 32px;
}

.np-device-art {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: none;
    pointer-events: none;
}

.np-device-pad[data-device="stamp"] .np-art-stamp,
.np-device-pad[data-device="box"] .np-art-box,
.np-device-pad[data-device="vending"] .np-art-vending,
.np-device-pad[data-device="capsule"] .np-art-capsule {
    display: block;
}

.np-art-box,
.np-art-vending,
.np-art-capsule {
    inset: clamp(14px, 2vw, 22px);
}

.np-device-result {
    position: relative;
    z-index: 8;
    max-width: min(760px, 92%);
    margin: 0;
    color: rgba(17, 17, 17, 0.38);
    font-size: clamp(3rem, 12vw, 8rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 0.92;
    overflow-wrap: anywhere;
    text-align: center;
    text-shadow: none;
    transform: rotate(-2deg) scale(0.88);
}

.np-device-pad.has-result .np-device-result {
    color: var(--np-text-primary);
    opacity: 1;
}

.np-device-pad[data-device="stamp"] .np-device-result {
    padding: clamp(14px, 3vw, 26px) clamp(18px, 4vw, 38px);
}

.np-device-pad[data-device="stamp"].has-result .np-device-result {
    border: clamp(6px, 1vw, 10px) solid var(--np-stamp-ink);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 0 0 4px rgba(29, 85, 199, 0.12);
    animation: np-device-result-pop 620ms cubic-bezier(0.16, 1, 0.3, 1);
}

.np-device-pad[data-device="box"] .np-device-result {
    width: min(640px, 82%);
    padding: clamp(12px, 2.4vw, 22px) clamp(18px, 4vw, 34px);
    border: 5px solid transparent;
    transform: translateY(-28%) rotate(-2deg) scale(0.86);
}

.np-device-pad[data-device="box"]:not(.has-result) .np-device-result {
    opacity: 0;
}

.np-device-pad[data-device="box"].has-result .np-device-result {
    border-color: var(--np-surface-ink);
    background: var(--np-device-ticket);
    box-shadow: 8px 8px 0 var(--np-surface-ink);
    animation: np-box-ticket-pop 680ms cubic-bezier(0.16, 1, 0.3, 1);
}

.np-device-pad[data-device="vending"] .np-device-result {
    width: min(560px, 84%);
    padding: clamp(10px, 2vw, 18px) clamp(18px, 4vw, 34px);
    font-size: clamp(2.6rem, 9vw, 6.4rem);
    transform: translateY(clamp(72px, 12vh, 104px)) rotate(1.5deg) scale(0.84);
}

.np-device-pad[data-device="vending"].has-result .np-device-result {
    border: 5px solid var(--np-surface-ink);
    border-radius: 6px;
    background:
        linear-gradient(90deg, transparent 0 12px, rgba(17, 17, 17, 0.1) 12px 16px, transparent 16px),
        var(--np-device-ticket);
    background-size: 28px 100%;
    box-shadow: 7px 7px 0 var(--np-surface-ink);
    animation: np-vending-ticket-pop 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.np-device-pad[data-device="capsule"] .np-device-result {
    width: min(620px, 82%);
    padding: clamp(14px, 3vw, 24px) clamp(18px, 4vw, 36px);
    font-size: clamp(2.8rem, 10vw, 7rem);
    transform: rotate(-1deg) scale(0.84);
}

.np-device-pad[data-device="capsule"].has-result .np-device-result {
    border: 5px solid var(--np-surface-ink);
    border-radius: 999px;
    background: var(--np-device-ticket);
    box-shadow: 8px 8px 0 var(--np-surface-ink);
    animation: np-capsule-label-pop 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.np-stamp-press {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 7;
    display: grid;
    width: clamp(160px, 24vw, 270px);
    justify-items: center;
    transform: translate(-50%, -180%);
    opacity: 0;
}

.np-stamp-handle {
    width: 32%;
    height: clamp(46px, 8vw, 82px);
    border: 5px solid var(--np-surface-ink);
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
    background: linear-gradient(180deg, var(--np-accent-pop), #c71b4a);
}

.np-stamp-body {
    width: 72%;
    height: clamp(72px, 10vw, 118px);
    border: 6px solid var(--np-surface-ink);
    border-radius: 12px 12px 8px 8px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.38), transparent 42%),
        linear-gradient(180deg, var(--np-accent-action), #ffb83f);
    box-shadow: 7px 7px 0 var(--np-surface-ink);
}

.np-stamp-base {
    width: 92%;
    height: clamp(34px, 6vw, 58px);
    border: 6px solid var(--np-surface-ink);
    border-radius: 10px;
    background: linear-gradient(180deg, var(--np-stamp-ink), #0d347f);
    box-shadow: 6px 6px 0 var(--np-surface-ink);
}

.np-stamp-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    display: grid;
    width: clamp(180px, 30vw, 320px);
    aspect-ratio: 2.2 / 1;
    place-items: center;
    border: 8px solid var(--np-stamp-ink);
    border-radius: 14px;
    color: var(--np-stamp-ink);
    font-size: clamp(2.4rem, 7vw, 6rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-4deg) scale(0.62);
}

.np-box-body {
    position: absolute;
    left: 50%;
    top: 55%;
    width: clamp(250px, 42vw, 440px);
    height: clamp(150px, 23vw, 230px);
    border: 7px solid var(--np-surface-ink);
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.35), transparent 42%),
        linear-gradient(180deg, var(--np-accent-action), #ffbf4a);
    box-shadow: 10px 10px 0 var(--np-surface-ink);
    transform: translate(-50%, -20%) rotate(-1deg);
}

.np-box-body span {
    position: absolute;
    top: 22px;
    width: 46px;
    height: 34px;
    border: 4px solid var(--np-surface-ink);
    background: var(--np-accent-cool);
    transform: rotate(-8deg);
}

.np-box-body span:nth-child(1) { left: 12%; }
.np-box-body span:nth-child(2) { left: 43%; background: var(--np-accent-pop); transform: rotate(5deg); }
.np-box-body span:nth-child(3) { right: 12%; background: var(--np-device-mint); transform: rotate(11deg); }

.np-box-lid {
    position: absolute;
    left: 50%;
    top: 39%;
    z-index: 2;
    width: clamp(290px, 48vw, 500px);
    height: clamp(48px, 7vw, 76px);
    border: 7px solid var(--np-surface-ink);
    border-radius: 10px;
    background: var(--np-accent-pop);
    box-shadow: 8px 8px 0 var(--np-surface-ink);
    transform: translate(-50%, -50%) rotate(-3deg);
}

.np-box-mouth {
    position: absolute;
    left: 50%;
    top: 45%;
    z-index: 4;
    width: clamp(150px, 27vw, 260px);
    height: clamp(12px, 2vw, 18px);
    border: 4px solid var(--np-surface-ink);
    border-radius: 999px;
    background:
        linear-gradient(180deg, var(--np-device-ticket) 0 42%, var(--np-surface-ink) 42% 100%);
    box-shadow: 4px 4px 0 var(--np-surface-ink);
    transform: translate(-50%, -50%) rotate(-2deg);
}

.np-vending-top,
.np-vending-window,
.np-vending-button,
.np-vending-slot {
    position: absolute;
    border: 6px solid var(--np-surface-ink);
    box-shadow: 7px 7px 0 var(--np-surface-ink);
}

.np-vending-top {
    left: 50%;
    top: 50%;
    width: clamp(250px, 38vw, 390px);
    height: clamp(270px, 38vw, 380px);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.38), transparent 38%),
        linear-gradient(180deg, var(--np-accent-cool), #2daeea);
    transform: translate(-50%, -50%) rotate(1deg);
}

.np-vending-window {
    left: 50%;
    top: 35%;
    z-index: 2;
    display: flex;
    width: clamp(160px, 26vw, 260px);
    height: clamp(78px, 12vw, 120px);
    align-items: center;
    justify-content: center;
    gap: var(--np-space-2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.82);
    transform: translate(-50%, -50%) rotate(-1deg);
}

.np-vending-window span {
    width: 40px;
    height: 58px;
    border: 4px solid var(--np-surface-ink);
    border-radius: 999px;
    background: linear-gradient(180deg, var(--np-accent-pop) 0 50%, var(--np-device-ticket) 50% 100%);
}

.np-vending-window span:nth-child(2) {
    background: linear-gradient(180deg, var(--np-accent-action) 0 50%, var(--np-device-ticket) 50% 100%);
}

.np-vending-window span:nth-child(3) {
    background: linear-gradient(180deg, var(--np-device-mint) 0 50%, var(--np-device-ticket) 50% 100%);
}

.np-vending-button {
    right: calc(50% - min(180px, 18vw));
    top: 49%;
    z-index: 3;
    width: 58px;
    aspect-ratio: 1;
    border-radius: 999px;
    background: var(--np-accent-pop);
}

.np-vending-slot {
    left: 50%;
    top: 65%;
    z-index: 4;
    width: clamp(170px, 28vw, 280px);
    height: 30px;
    border-radius: 999px;
    background: var(--np-surface-ink);
    transform: translate(-50%, -50%);
}

.np-capsule-shell,
.np-capsule-band {
    position: absolute;
    left: 50%;
    top: 50%;
    border: 7px solid var(--np-surface-ink);
    box-shadow: 8px 8px 0 var(--np-surface-ink);
}

.np-capsule-shell {
    width: clamp(250px, 40vw, 420px);
    height: clamp(120px, 18vw, 190px);
    background: rgba(255, 255, 255, 0.88);
}

.np-capsule-shell-top {
    border-radius: 999px 999px 24px 24px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.42), transparent 42%),
        linear-gradient(180deg, var(--np-accent-pop), #ff7e9d);
    transform: translate(-50%, -92%) rotate(-2deg);
}

.np-capsule-shell-bottom {
    border-radius: 24px 24px 999px 999px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.42), transparent 42%),
        linear-gradient(180deg, var(--np-accent-cool), #88e5ff);
    transform: translate(-50%, -8%) rotate(2deg);
}

.np-capsule-band {
    z-index: 3;
    width: clamp(270px, 43vw, 450px);
    height: 26px;
    border-radius: 999px;
    background: var(--np-device-ticket);
    transform: translate(-50%, -50%);
}

.np-stamp-debris span {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 9;
    width: 16px;
    height: 28px;
    border: 3px solid var(--np-surface-ink);
    background: var(--np-accent-action);
    opacity: 0;
}

.np-stamp-debris span:nth-child(2n) {
    background: var(--np-accent-cool);
}

.np-stamp-debris span:nth-child(3n) {
    background: var(--np-accent-pop);
}

.np-stamp-stage.is-device-hit .np-stamp-debris span {
    animation: np-device-confetti 720ms ease-out;
}

.np-stamp-debris span:nth-child(1) { --device-x: -240px; --device-y: -118px; transform: rotate(-18deg); }
.np-stamp-debris span:nth-child(2) { --device-x: 210px; --device-y: -104px; transform: rotate(14deg); }
.np-stamp-debris span:nth-child(3) { --device-x: -170px; --device-y: 116px; transform: rotate(22deg); }
.np-stamp-debris span:nth-child(4) { --device-x: 188px; --device-y: 128px; transform: rotate(-28deg); }
.np-stamp-debris span:nth-child(5) { --device-x: 12px; --device-y: -164px; transform: rotate(6deg); }
.np-stamp-debris span:nth-child(6) { --device-x: -8px; --device-y: 162px; transform: rotate(-8deg); }

.np-stamp-text-panel {
    display: grid;
    align-self: start;
    gap: var(--np-space-3);
    box-sizing: border-box;
    width: min(300px, 100%);
    max-height: min(420px, 52vh);
    padding: var(--np-space-4);
    border: 5px solid var(--np-surface-ink);
    border-radius: 8px;
    background: var(--np-surface-panel);
    box-shadow: var(--np-shadow-small);
    overflow: hidden;
}

.np-stamp-text-panel[hidden] {
    display: none;
}

.np-stamp-text-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--np-space-2);
}

.np-stamp-text-panel .np-field-label {
    margin: 0;
}

.np-stamp-text-toggle {
    min-height: 34px;
    padding: 0 var(--np-space-3);
    font-size: 0.82rem;
}

.np-stamp-text-body {
    display: grid;
    min-width: 0;
    gap: var(--np-space-3);
}

.np-stamp-stage.is-text-panel-collapsed .np-stamp-text-body {
    display: none;
}

.np-stamp-stage.is-text-panel-collapsed .np-stamp-text-panel {
    width: max-content;
    min-width: 148px;
}

.np-stamp-text-input {
    width: 100%;
    height: clamp(116px, 22vh, 200px);
    resize: none;
    padding: var(--np-space-3);
    border: 4px solid var(--np-surface-ink);
    border-radius: 8px;
    color: var(--np-text-primary);
    background: var(--np-device-ticket);
    font: inherit;
    font-size: 1rem;
    font-weight: 750;
    line-height: 1.5;
}

.np-stamp-apply {
    justify-self: end;
    min-width: 96px;
}

.np-stamp-count {
    min-height: 24px;
    margin: 0;
    color: var(--np-text-muted);
    font-size: 0.9rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}

.np-device-button:focus-visible,
.np-stamp-source-button:focus-visible,
.np-stamp-text-toggle:focus-visible,
.np-stamp-apply:focus-visible,
.np-stamp-text-input:focus-visible {
    outline: 3px dashed var(--np-surface-ink);
    outline-offset: 4px;
}

@media (min-width: 900px) {
    .np-stamp-stage.is-text-source .np-stamp-table {
        width: min(1120px, 100%);
        grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
        align-items: stretch;
    }

    .np-stamp-stage.is-text-panel-collapsed .np-stamp-table {
        grid-template-columns: minmax(0, 1fr) max-content;
    }

    .np-stamp-stage.is-text-source .np-stamp-text-panel {
        align-self: stretch;
    }
}

@media (max-width: 899px) {
    .np-stamp-stage.is-text-source .np-stamp-text-panel {
        position: absolute;
        top: var(--np-space-3);
        right: var(--np-space-3);
        z-index: 14;
        width: min(300px, calc(100% - 24px));
        max-height: calc(100% - 24px);
    }

    .np-stamp-stage.is-text-panel-collapsed .np-stamp-text-panel {
        width: max-content;
        max-width: calc(100% - 24px);
    }
}

.np-stamp-stage.is-device-stamp-running .np-stamp-press {
    animation: np-stamp-slam 760ms cubic-bezier(0.16, 1, 0.3, 1);
}

.np-stamp-stage.is-device-stamp-running .np-device-pad,
.np-stamp-stage.is-device-box-running .np-device-pad,
.np-stamp-stage.is-device-vending-running .np-device-pad,
.np-stamp-stage.is-device-capsule-running .np-device-pad {
    animation: np-device-table-hit 520ms steps(2, end);
}

.np-stamp-stage.is-device-stamp-hit .np-stamp-mark {
    animation: np-stamp-ink-ring 680ms ease-out;
}

.np-stamp-stage.is-device-box-running .np-art-box {
    animation: np-box-shake 620ms steps(3, end);
}

.np-stamp-stage.is-device-vending-running .np-art-vending {
    animation: np-vending-clunk 620ms steps(3, end);
}

.np-stamp-stage.is-device-vending-running .np-vending-button {
    animation: np-vending-button-push 420ms ease-out;
}

.np-stamp-stage.is-device-capsule-running .np-art-capsule {
    animation: np-capsule-roll 620ms ease-out;
}

.np-stamp-stage.is-device-capsule-hit .np-capsule-shell-top {
    animation: np-capsule-top-open 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.np-stamp-stage.is-device-capsule-hit .np-capsule-shell-bottom {
    animation: np-capsule-bottom-open 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes np-stamp-slam {
    0% { opacity: 0; transform: translate(-50%, -190%) rotate(-8deg) scale(0.92); }
    18% { opacity: 1; transform: translate(-50%, -80%) rotate(3deg) scale(1); }
    42% { opacity: 1; transform: translate(-50%, -18%) rotate(-2deg) scale(1.08); }
    56% { opacity: 1; transform: translate(-50%, -27%) rotate(1deg) scale(0.98); }
    62% { opacity: 0; transform: translate(-50%, -46%) rotate(2deg) scale(0.96); }
    100% { opacity: 0; transform: translate(-50%, -170%) rotate(5deg) scale(0.96); }
}

@keyframes np-device-table-hit {
    0% { transform: rotate(0.6deg) translate(0, 0); }
    24% { transform: rotate(-1deg) translate(-5px, 4px); }
    45% { transform: rotate(1.2deg) translate(6px, -3px); }
    100% { transform: rotate(0.6deg) translate(0, 0); }
}

@keyframes np-stamp-ink-ring {
    0% { opacity: 0; transform: translate(-50%, -50%) rotate(-4deg) scale(0.52); filter: blur(2px); }
    20% { opacity: 0.82; transform: translate(-50%, -50%) rotate(-4deg) scale(1.04); filter: blur(0); }
    76% { opacity: 0.42; }
    100% { opacity: 0; transform: translate(-50%, -50%) rotate(-4deg) scale(1.2); }
}

@keyframes np-device-result-pop {
    0% { opacity: 0; transform: rotate(-8deg) scale(0.3); filter: blur(4px); }
    36% { opacity: 1; transform: rotate(-3deg) scale(1.16); filter: blur(0); }
    68% { transform: rotate(-4deg) scale(0.94); }
    100% { transform: rotate(-2deg) scale(1); }
}

@keyframes np-box-ticket-pop {
    0% { opacity: 0; transform: translateY(26%) rotate(4deg) scale(0.46); }
    44% { opacity: 1; transform: translateY(-34%) rotate(-4deg) scale(1.12); }
    100% { opacity: 1; transform: translateY(-28%) rotate(-2deg) scale(1); }
}

@keyframes np-vending-ticket-pop {
    0% { opacity: 0; transform: translateY(26px) rotate(1.5deg) scale(0.5); }
    44% { opacity: 1; transform: translateY(clamp(82px, 13vh, 112px)) rotate(-1deg) scale(1.08); }
    100% { opacity: 1; transform: translateY(clamp(72px, 12vh, 104px)) rotate(1.5deg) scale(1); }
}

@keyframes np-capsule-label-pop {
    0% { opacity: 0; transform: rotate(-12deg) scale(0.24); }
    42% { opacity: 1; transform: rotate(4deg) scale(1.16); }
    100% { opacity: 1; transform: rotate(-1deg) scale(1); }
}

@keyframes np-box-shake {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-6px, 3px) rotate(-1deg); }
    50% { transform: translate(5px, -2px) rotate(1deg); }
    75% { transform: translate(-4px, 2px) rotate(-1deg); }
    100% { transform: translate(0, 0); }
}

@keyframes np-vending-clunk {
    0% { transform: translate(0, 0); }
    30% { transform: translate(8px, 0); }
    62% { transform: translate(-7px, 3px); }
    100% { transform: translate(0, 0); }
}

@keyframes np-vending-button-push {
    0% { transform: translate(0, 0) scale(1); }
    36% { transform: translate(5px, 5px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes np-capsule-roll {
    0% { transform: translateX(-12px); }
    38% { transform: translateX(12px); }
    70% { transform: translateX(-7px); }
    100% { transform: translateX(0) rotate(0); }
}

@keyframes np-capsule-top-open {
    0% { transform: translate(-50%, -92%) rotate(-2deg); }
    45% { transform: translate(-54%, -116%) rotate(-15deg); }
    100% { transform: translate(-52%, -104%) rotate(-10deg); }
}

@keyframes np-capsule-bottom-open {
    0% { transform: translate(-50%, -8%) rotate(2deg); }
    45% { transform: translate(-46%, 18%) rotate(13deg); }
    100% { transform: translate(-48%, 10%) rotate(8deg); }
}

@keyframes np-device-confetti {
    0% { opacity: 0; transform: translate(-50%, -50%) rotate(0deg) scale(0.4); }
    18% { opacity: 1; }
    100% { opacity: 0; transform: translate(calc(-50% + var(--device-x)), calc(-50% + var(--device-y))) rotate(120deg) scale(1); }
}

@media (max-width: 720px) {
    .np-stamp-stage {
        min-height: calc(100dvh - 32px);
        gap: 10px;
        padding: 120px var(--np-space-4) 150px;
    }

    .np-device-switch {
        width: min(340px, 100%);
    }

    .np-device-button {
        flex: 1 1 calc(50% - var(--np-space-2));
        padding: 0 var(--np-space-2);
    }

    .np-stamp-source {
        width: min(340px, 100%);
    }

    .np-stamp-source-button {
        flex: 1 1 0;
    }

    .np-stamp-table {
        gap: var(--np-space-3);
    }

    .np-device-pad {
        min-height: clamp(340px, 44dvh, 380px);
        padding: var(--np-space-4);
        box-shadow: 7px 7px 0 var(--np-surface-ink);
    }

    .np-device-result,
    .np-device-pad[data-device="box"] .np-device-result,
    .np-device-pad[data-device="capsule"] .np-device-result {
        max-width: 94%;
        font-size: clamp(2.4rem, 15vw, 5.4rem);
    }

    .np-device-pad[data-device="vending"] .np-device-result {
        font-size: clamp(2.2rem, 13vw, 4.8rem);
        transform: translateY(72px) rotate(1.5deg) scale(0.84);
    }

    .np-vending-top {
        width: clamp(230px, 70vw, 290px);
        height: clamp(260px, 68vw, 300px);
    }

    .np-capsule-shell {
        width: clamp(240px, 70vw, 310px);
        height: clamp(112px, 30vw, 132px);
    }

    .np-vending-button {
        right: calc(50% - 138px);
        width: 46px;
    }

    .np-stamp-text-input {
        height: 116px;
    }

    .np-stamp-apply {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .np-stamp-stage *,
    .np-stamp-stage *::before,
    .np-stamp-stage *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
    }
}
