:root {
    color-scheme: light;
    --page: #f5f5f7;
    --ink: #111114;
    --ink-soft: #2a2a2d;
    --muted: #6e6e73;
    --faint: #9a9aa1;
    --line: rgba(17, 17, 20, 0.12);
    --line-strong: rgba(17, 17, 20, 0.2);
    --glass: rgba(255, 255, 255, 0.68);
    --glass-strong: rgba(255, 255, 255, 0.86);
    --accent: #0071e3;
    --accent-ink: #0057b8;
    --success: #16845f;
    --danger: #c93a3a;
    --gold: #b6974f;
    --outer-radius: 30px;
    --inner-radius: 20px;
    --control-radius: 16px;
    --shadow: 0 30px 86px rgba(28, 31, 38, 0.13), 0 8px 24px rgba(28, 31, 38, 0.08);
    --shadow-hover: 0 22px 58px rgba(0, 113, 227, 0.18), 0 10px 24px rgba(28, 31, 38, 0.1);
    --page-x: 62vw;
    --page-y: 35vh;
    --glow-x: 50%;
    --glow-y: 50%;
    --glow-opacity: 0;
    --font: "SF Pro Text", "SF Pro Display", "Inter", "Aptos", "Segoe UI Variable", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
    --display-font: "SF Pro Display", "SF Pro Text", "Inter", "Aptos Display", "Segoe UI Variable Display", "PingFang SC", "Microsoft YaHei UI", sans-serif;
    --mono: "SF Mono", "Cascadia Mono", "Roboto Mono", ui-monospace, Menlo, Consolas, monospace;
}

* {
    box-sizing: border-box;
}

*::selection {
    background: rgba(0, 113, 227, 0.16);
}

[hidden] {
    display: none !important;
}

html {
    min-height: 100%;
    background: var(--page);
}

body {
    min-height: 100svh;
    margin: 0;
    color: var(--ink);
    font-family: var(--font);
    letter-spacing: 0;
    text-rendering: geometricPrecision;
    -webkit-font-smoothing: antialiased;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.86) 0%, rgba(244, 246, 250, 0.94) 38%, rgba(251, 250, 247, 0.98) 100%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.026) 1px, transparent 1px),
        linear-gradient(0deg, rgba(0, 0, 0, 0.022) 1px, transparent 1px);
    background-size: auto, 52px 52px, 52px 52px;
    overflow-x: hidden;
}

body::before,
body::after {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
}

body::before {
    background:
        radial-gradient(420px circle at var(--page-x) var(--page-y), rgba(255, 255, 255, 0.38), rgba(0, 113, 227, 0.025) 28%, rgba(255, 255, 255, 0) 64%),
        linear-gradient(108deg, rgba(255, 255, 255, 0.76) 0 18%, rgba(255, 255, 255, 0) 42%),
        linear-gradient(248deg, rgba(182, 151, 79, 0.12), rgba(255, 255, 255, 0) 36%),
        linear-gradient(18deg, rgba(0, 113, 227, 0.08), rgba(255, 255, 255, 0) 34%);
    animation: atmosphere 18s ease-in-out infinite alternate;
}

body::after {
    opacity: 0.34;
    background-image: url("data:image/svg+xml,%3Csvg width='160' height='160' viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.34'/%3E%3C/svg%3E");
    mix-blend-mode: soft-light;
}

button,
input {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
}

h1,
h2,
p {
    margin: 0;
}

.shell {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    width: min(1080px, calc(100% - 64px));
    min-height: auto;
    display: grid;
    align-content: start;
    gap: clamp(22px, 3.5vw, 36px);
    margin: clamp(18px, 3vh, 32px) auto 0;
    padding: clamp(26px, 4.4vw, 50px);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--outer-radius);
    corner-shape: superellipse(0.72);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.56) 46%, rgba(250, 250, 252, 0.74)),
        linear-gradient(120deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.16));
    box-shadow: var(--shadow);
    backdrop-filter: blur(34px) saturate(1.26);
    -webkit-backdrop-filter: blur(34px) saturate(1.26);
    animation: panelIn 560ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
    transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1), border-color 260ms ease, box-shadow 260ms ease, background 260ms ease;
}

.shell::before {
    position: absolute;
    inset: 1px;
    z-index: -1;
    border-radius: calc(var(--outer-radius) - 1px);
    corner-shape: superellipse(0.72);
    background:
        radial-gradient(360px circle at var(--glow-x) var(--glow-y), rgba(255, 255, 255, calc(0.18 * var(--glow-opacity))), rgba(0, 113, 227, calc(0.028 * var(--glow-opacity))) 32%, rgba(255, 255, 255, 0) 68%),
        linear-gradient(132deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 34%),
        linear-gradient(305deg, rgba(0, 113, 227, 0.08), rgba(255, 255, 255, 0) 38%),
        linear-gradient(22deg, rgba(182, 151, 79, 0.1), rgba(255, 255, 255, 0) 42%);
    content: "";
    transition: opacity 260ms ease;
}

.shell:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.92);
    box-shadow: 0 38px 98px rgba(28, 31, 38, 0.15), 0 12px 32px rgba(0, 113, 227, 0.08);
}

.shell::after {
    position: absolute;
    top: -90px;
    right: -18px;
    z-index: -1;
    color: rgba(17, 17, 20, 0.035);
    content: "0";
    font-family: var(--display-font);
    font-size: clamp(220px, 30vw, 370px);
    font-weight: 760;
    line-height: 1;
    pointer-events: none;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mark {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid rgba(17, 17, 20, 0.14);
    border-radius: 13px;
    corner-shape: superellipse(0.72);
    background:
        linear-gradient(155deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.5)),
        linear-gradient(315deg, rgba(0, 113, 227, 0.1), rgba(182, 151, 79, 0.08));
    color: var(--accent-ink);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 12px 26px rgba(28, 31, 38, 0.08);
    font-family: var(--display-font);
    font-size: 20px;
    font-weight: 760;
    line-height: 1;
    transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), border-color 220ms ease, box-shadow 220ms ease;
}

.mark::before {
    position: absolute;
    inset: -1px;
    background: radial-gradient(42px circle at var(--glow-x) var(--glow-y), rgba(255, 255, 255, calc(0.72 * var(--glow-opacity))), rgba(0, 113, 227, calc(0.16 * var(--glow-opacity))) 46%, rgba(255, 255, 255, 0) 74%);
    content: "";
    z-index: -1;
}

.brand:hover .mark {
    transform: translateY(-1px) scale(1.035);
    border-color: rgba(0, 113, 227, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 16px 34px rgba(0, 113, 227, 0.12);
}

.brand strong {
    display: block;
    color: var(--ink);
    font-size: 15px;
    font-weight: 760;
    line-height: 1;
}

.brand small {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 560;
}

.service-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    border: 1px solid rgba(17, 17, 20, 0.09);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.service-nav a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: var(--muted);
    padding: 0 13px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 760;
    transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.service-nav a:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    box-shadow: 0 10px 24px rgba(28, 31, 38, 0.08);
}

.service-nav a[aria-current="page"] {
    background: var(--ink);
    color: #fff;
    box-shadow: 0 12px 28px rgba(28, 31, 38, 0.14);
}

.status-pill,
#orderStatus {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(17, 17, 20, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
    color: var(--muted);
    padding: 0 16px;
    font-size: 13px;
    font-weight: 760;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

.status-pill::after,
#orderStatus::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: radial-gradient(90px circle at var(--glow-x) var(--glow-y), rgba(255, 255, 255, calc(0.72 * var(--glow-opacity))), rgba(0, 113, 227, calc(0.12 * var(--glow-opacity))) 46%, rgba(255, 255, 255, 0) 76%);
    content: "";
}

.status-pill:hover,
#orderStatus:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 12px 24px rgba(28, 31, 38, 0.08);
}

.status-pill[data-tone="ok"],
#orderStatus[data-status="code_received"],
#orderStatus[data-status="finished"] {
    color: var(--success);
    border-color: rgba(22, 132, 95, 0.24);
    background: rgba(255, 255, 255, 0.7);
}

.status-pill[data-tone="bad"],
#orderStatus[data-status="cancelled"],
#orderStatus[data-status="failed"] {
    color: var(--danger);
    border-color: rgba(201, 58, 58, 0.22);
}

#orderStatus[data-status="active"]::before,
#orderStatus[data-status="waiting"]::before {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--accent);
    content: "";
    animation: statusBreath 1200ms ease-in-out infinite;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 360px);
    gap: clamp(24px, 5.8vw, 66px);
    align-items: end;
    padding-bottom: clamp(24px, 4vw, 40px);
    border-bottom: 1px solid var(--line);
}

.hero p:first-child {
    margin: 0 0 14px;
    color: var(--accent-ink);
    font-size: 12px;
    font-weight: 760;
    text-transform: uppercase;
}

h1 {
    max-width: 650px;
    color: var(--ink);
    font-family: var(--display-font);
    font-size: clamp(50px, 7vw, 92px);
    font-weight: 760;
    line-height: 0.94;
}

.summary {
    margin: 0 0 5px;
    color: var(--muted);
    font-size: clamp(15px, 1.65vw, 18px);
    font-weight: 460;
    line-height: 1.85;
}

.flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: -6px 0 0;
    padding: 0 0 clamp(18px, 3vw, 28px);
    list-style: none;
    border-bottom: 1px solid var(--line);
}

.flow li {
    position: relative;
    min-height: 72px;
    padding: 8px 18px 8px 0;
    color: var(--muted);
    transition: transform 200ms ease, color 200ms ease, opacity 200ms ease;
}

.flow li:not(:last-child)::after {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 28px;
    height: 1px;
    background: rgba(17, 17, 20, 0.18);
    content: "";
}

.flow span,
.flow strong,
.flow small {
    display: block;
}

.flow span {
    margin-bottom: 8px;
    color: var(--faint);
    font-family: var(--mono);
    font-size: 12px;
}

.flow strong {
    color: var(--ink);
    font-size: 14px;
    font-weight: 760;
}

.flow small {
    margin-top: 6px;
    font-size: 12px;
}

.flow li.is-active {
    transform: translateY(-1px);
}

.flow li:hover {
    transform: translateY(-2px);
}

.flow li.is-active strong,
.flow li.is-done strong {
    color: var(--accent-ink);
}

.flow li.is-done span {
    color: var(--success);
}

.workspace {
    display: grid;
    grid-template-columns: minmax(0, 760px) minmax(280px, 1fr);
    gap: clamp(28px, 5vw, 76px);
    align-items: start;
    padding-top: 2px;
}

.redeem-form {
    display: grid;
    gap: 12px;
    align-items: start;
}

.field {
    position: relative;
    min-width: 0;
    display: grid;
    gap: 12px;
}

.field::before {
    display: none;
}

.field-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.field-head label {
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 680;
}

.field-head span,
.field-help {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.field-help {
    margin: 0;
}

.input-row {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 14px;
    align-items: center;
}

.input-row::before {
    position: absolute;
    inset: -10px;
    z-index: -1;
    border-radius: calc(var(--control-radius) + 12px);
    background:
        radial-gradient(170px circle at var(--glow-x) var(--glow-y), rgba(255, 255, 255, calc(0.62 * var(--glow-opacity))), rgba(0, 113, 227, calc(0.09 * var(--glow-opacity))) 38%, rgba(255, 255, 255, 0) 72%),
        linear-gradient(120deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0));
    content: "";
    filter: blur(8px);
    opacity: 0;
    transform: scale(0.985);
    transition: opacity 220ms ease, transform 220ms ease;
}

.input-row:hover::before,
.input-row:focus-within::before {
    opacity: 1;
    transform: scale(1);
}

.field input {
    position: relative;
    width: 100%;
    height: 64px;
    border: 1px solid rgba(17, 17, 20, 0.15);
    border-radius: var(--control-radius);
    corner-shape: superellipse(0.7);
    outline: none;
    background:
        radial-gradient(140px circle at var(--glow-x) var(--glow-y), rgba(255, 255, 255, calc(0.62 * var(--glow-opacity))), rgba(0, 113, 227, calc(0.05 * var(--glow-opacity))) 45%, rgba(255, 255, 255, 0) 76%),
        rgba(255, 255, 255, 0.76);
    color: var(--ink);
    padding: 0 18px;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.85), inset 0 -14px 34px rgba(28, 31, 38, 0.035);
    font-family: var(--mono);
    font-size: clamp(19px, 2.4vw, 26px);
    font-weight: 520;
    text-transform: uppercase;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease, filter 180ms ease;
    backdrop-filter: blur(18px) saturate(1.12);
    -webkit-backdrop-filter: blur(18px) saturate(1.12);
}

.field input::placeholder {
    color: rgba(110, 110, 115, 0.7);
}

.field input:focus {
    border-color: rgba(0, 113, 227, 0.46);
    background:
        radial-gradient(160px circle at var(--glow-x) var(--glow-y), rgba(255, 255, 255, calc(0.7 * var(--glow-opacity))), rgba(0, 113, 227, calc(0.065 * var(--glow-opacity))) 45%, rgba(255, 255, 255, 0) 76%),
        rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.96), 0 0 0 5px rgba(0, 113, 227, 0.08);
    animation: focusBloom 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.field input:hover {
    border-color: rgba(0, 113, 227, 0.28);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.92), inset 0 -14px 34px rgba(28, 31, 38, 0.025), 0 14px 32px rgba(0, 113, 227, 0.07);
}

.field input.is-pressing {
    transform: translateY(1px) scale(0.998);
}

.captcha-block {
    width: 100%;
    max-width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    background: rgba(255, 255, 255, 0.78);
    padding: 14px;
}

.captcha-block p {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
}

.primary,
.secondary,
.danger {
    position: relative;
    isolation: isolate;
    min-height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    overflow: hidden;
    border-radius: var(--control-radius);
    corner-shape: superellipse(0.72);
    padding: 0 18px;
    font-size: 15px;
    font-weight: 740;
    transform: translateZ(0);
    transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 220ms ease, filter 220ms ease, border-color 220ms ease, background 220ms ease;
}

.primary {
    width: 100%;
    min-height: 64px;
    border: 1px solid rgba(0, 88, 184, 0.28);
    background:
        linear-gradient(180deg, rgba(45, 151, 255, 0.96), rgba(0, 113, 227, 1)),
        var(--accent);
    color: #fff;
    box-shadow: 0 18px 42px rgba(0, 113, 227, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.primary::before {
    position: absolute;
    inset: 0;
    transform: translateX(-110%) skewX(-18deg);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0));
    content: "";
    z-index: 0;
    transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.primary::after,
.secondary::after,
.danger::after {
    position: absolute;
    inset: 1px;
    border-radius: calc(var(--control-radius) - 1px);
    background:
        radial-gradient(120px circle at var(--glow-x) var(--glow-y), rgba(255, 255, 255, calc(0.58 * var(--glow-opacity))), rgba(255, 255, 255, 0) 68%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
    content: "";
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    transition: opacity 180ms ease;
}

.primary:hover::after,
.secondary:hover::after,
.danger:hover::after,
.primary.is-pressing::after,
.secondary.is-pressing::after,
.danger.is-pressing::after,
.primary:focus-visible::after,
.secondary:focus-visible::after,
.danger:focus-visible::after {
    opacity: 1;
}

.primary:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.006);
    border-color: rgba(0, 88, 184, 0.38);
    box-shadow: var(--shadow-hover);
    filter: saturate(1.08);
}

.primary:hover:not(:disabled)::before {
    transform: translateX(118%) skewX(-18deg);
}

.primary:active:not(:disabled),
.secondary:active:not(:disabled),
.danger:active:not(:disabled) {
    transform: translateY(0) scale(0.986);
}

.primary.is-pressing:not(:disabled),
.secondary.is-pressing:not(:disabled),
.danger.is-pressing:not(:disabled) {
    transform: translateY(1px) scale(0.986);
}

.primary.is-pressing:hover:not(:disabled),
.secondary.is-pressing:hover:not(:disabled),
.danger.is-pressing:hover:not(:disabled) {
    transform: translateY(1px) scale(0.986);
    filter: saturate(0.96) brightness(0.98);
}

.primary:focus-visible,
.secondary:focus-visible,
.danger:focus-visible {
    outline: none;
    box-shadow: 0 0 0 5px rgba(0, 113, 227, 0.1), var(--shadow-hover);
}

.primary:disabled {
    cursor: progress;
    filter: grayscale(0.18) saturate(0.8);
    opacity: 0.86;
    box-shadow: 0 10px 26px rgba(28, 31, 38, 0.1);
}

.secondary,
.danger {
    min-height: 48px;
    border: 1px solid rgba(17, 17, 20, 0.12);
    background:
        radial-gradient(110px circle at var(--glow-x) var(--glow-y), rgba(255, 255, 255, calc(0.76 * var(--glow-opacity))), rgba(0, 113, 227, calc(0.08 * var(--glow-opacity))) 52%, rgba(255, 255, 255, 0) 78%),
        rgba(255, 255, 255, 0.7);
    color: var(--ink);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: rgba(0, 113, 227, 0.26);
    color: var(--accent-ink);
    box-shadow: 0 12px 28px rgba(0, 113, 227, 0.1);
}

.danger {
    color: var(--danger);
    border-color: rgba(201, 58, 58, 0.2);
}

.danger:hover:not(:disabled) {
    transform: translateY(-2px);
    background:
        radial-gradient(110px circle at var(--glow-x) var(--glow-y), rgba(255, 255, 255, calc(0.76 * var(--glow-opacity))), rgba(201, 58, 58, calc(0.08 * var(--glow-opacity))) 52%, rgba(255, 255, 255, 0) 78%),
        rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 26px rgba(201, 58, 58, 0.08);
}

.button-text,
.spinner {
    position: relative;
    z-index: 1;
}

.spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.36);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 760ms linear infinite;
}

.busy .spinner {
    display: inline-block;
}

.notice {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: 9px minmax(0, 1fr);
    gap: 3px 12px;
    align-items: start;
    min-height: 72px;
    color: var(--muted);
    padding-top: 34px;
    border-radius: 18px;
    transition: transform 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

.notice::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: radial-gradient(210px circle at var(--glow-x) var(--glow-y), rgba(255, 255, 255, calc(0.76 * var(--glow-opacity))), rgba(0, 113, 227, calc(0.08 * var(--glow-opacity))) 42%, rgba(255, 255, 255, 0) 74%);
    content: "";
    opacity: 0;
    transition: opacity 180ms ease;
}

.notice:hover::after {
    opacity: 1;
}

.notice:hover {
    transform: translateY(-1px);
}

.notice::before {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 9px;
    height: 9px;
    margin-top: 8px;
    border-radius: 50%;
    background: var(--faint);
    content: "";
}

.notice[data-tone="work"]::before {
    background: var(--accent);
    animation: pulse 1350ms ease-out infinite;
}

.notice[data-tone="ok"]::before {
    background: var(--success);
}

.notice[data-tone="bad"]::before {
    background: var(--danger);
}

.notice strong {
    grid-column: 2;
    display: block;
    color: var(--ink);
    font-size: 14px;
    font-weight: 720;
}

.notice[data-tone="ok"] strong {
    color: var(--success);
}

.notice[data-tone="bad"] strong {
    color: var(--danger);
}

.notice[data-tone="work"] strong {
    color: var(--accent-ink);
}

.notice span {
    grid-column: 2;
    display: block;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.result {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    grid-column: 1 / -1;
    display: grid;
    gap: 20px;
    padding-top: clamp(8px, 1.4vw, 16px);
    animation: resultMaterialize 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.result::before {
    position: absolute;
    inset: -20px;
    z-index: -1;
    background: radial-gradient(260px circle at var(--glow-x) var(--glow-y), rgba(255, 255, 255, calc(0.12 * var(--glow-opacity))), rgba(0, 113, 227, calc(0.018 * var(--glow-opacity))) 38%, rgba(255, 255, 255, 0) 68%);
    content: "";
    opacity: 0.9;
    pointer-events: none;
}

.result-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    padding-top: clamp(24px, 4vw, 36px);
    border-top: 1px solid var(--line);
}

.result-head span,
.code-stage span {
    color: var(--accent-ink);
    font-size: 12px;
    font-weight: 760;
    text-transform: uppercase;
}

.result h2 {
    margin-top: 10px;
    color: var(--ink);
    font-family: var(--display-font);
    font-size: clamp(34px, 4.8vw, 58px);
    line-height: 1;
    font-weight: 760;
}

#resultHint {
    margin-top: 10px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.code-stage {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 14px 18px;
    padding: 4px 0 22px;
    border-bottom: 1px solid var(--line);
    border-radius: 18px 18px 0 0;
    transition: transform 200ms ease, border-color 200ms ease;
}

.code-stage::before {
    position: absolute;
    inset: -1px;
    z-index: -1;
    border-radius: inherit;
    background: radial-gradient(220px circle at var(--glow-x) var(--glow-y), rgba(255, 255, 255, calc(0.42 * var(--glow-opacity))), rgba(0, 113, 227, calc(0.035 * var(--glow-opacity))) 42%, rgba(255, 255, 255, 0) 75%);
    content: "";
    opacity: 0;
    transition: opacity 180ms ease;
}

.code-stage:hover::before {
    opacity: 1;
}

.code-stage:hover {
    transform: translateY(-1px);
}

.code-stage span {
    grid-column: 1 / -1;
}

.copy-target {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    min-width: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--ink);
    padding: 5px 7px;
    margin: -5px -7px;
    text-align: left;
    font-family: var(--mono);
    font-weight: 800;
    line-height: 1.05;
    overflow-wrap: anywhere;
    cursor: copy;
    transition: color 180ms ease, transform 180ms ease, filter 180ms ease;
}

.copy-target::before {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    content: "";
    opacity: 0;
    transform: scaleX(0.42);
    transform-origin: left center;
    transition: opacity 180ms ease, transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.copy-target:disabled {
    cursor: default;
    opacity: 1;
}

.copy-target:not(:disabled):hover {
    color: var(--accent-ink);
    transform: translateY(-2px);
    filter: drop-shadow(0 10px 18px rgba(0, 113, 227, 0.12));
}

.copy-target:not(:disabled):hover::before,
.copy-target:not(:disabled):focus-visible::before {
    opacity: 0.48;
    transform: scaleX(1);
}

.copy-target:not(:disabled):active {
    transform: translateY(0) scale(0.992);
    filter: brightness(0.94);
}

.copy-target.is-pressing {
    transform: translateY(1px) scale(0.992);
}

.copy-target:focus-visible {
    outline: none;
}

.copy-target.is-copied {
    color: var(--success);
}

.copy-target.is-copied::before {
    opacity: 0.72;
    transform: scaleX(1);
    animation: copyPulse 560ms ease both;
}

.code-copy {
    color: var(--faint);
    font-size: clamp(58px, 9vw, 108px);
    font-variant-numeric: tabular-nums;
}

.code-stage > small {
    min-width: 9em;
    justify-self: end;
    color: var(--muted);
    text-align: right;
    font-size: 13px;
    line-height: 1.5;
    transition: color 180ms ease, transform 180ms ease;
}

.code-stage > small.is-confirmed {
    color: var(--success);
    transform: translateY(-1px);
}

.result[data-waiting="true"] {
    border-color: rgba(0, 113, 227, 0.24);
}

.result[data-waiting="true"] .code-copy {
    color: #475467;
    font-size: clamp(38px, 5vw, 60px);
    letter-spacing: 0;
}

.result[data-waiting="true"] .code-copy::before {
    display: none;
}

.result[data-waiting="true"] .code-copy::after {
    display: inline-block;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    margin-left: 14px;
    border: 2px solid rgba(0, 113, 227, 0.16);
    border-top-color: var(--accent);
    border-radius: 50%;
    content: "";
    animation: waitRing 900ms linear infinite;
}

.result[data-waiting="true"] .code-stage > small::after {
    display: inline-block;
    width: 0;
    color: var(--accent);
    content: "...";
    overflow: hidden;
    vertical-align: bottom;
    animation: waitTextDots 1300ms steps(4, end) infinite;
}

.result[data-has-code="true"] .code-copy {
    color: var(--ink);
    animation: codePop 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.order-lines {
    display: grid;
    grid-template-columns: 1fr 1.22fr 0.86fr 0.7fr;
    border-bottom: 1px solid var(--line);
}

.order-lines > div {
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 118px;
    padding: 22px 20px;
    border-right: 1px solid var(--line);
}

.order-lines > div:first-child {
    padding-left: 0;
}

.order-lines > div:last-child {
    border-right: 0;
}

.order-lines span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.order-lines strong,
.order-lines .copy-target {
    min-width: 0;
    overflow-wrap: anywhere;
    font-family: var(--mono);
    font-size: clamp(20px, 2.4vw, 28px);
    font-weight: 800;
    line-height: 1.18;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 4px;
}

.celebration-canvas {
    position: fixed;
    inset: 0;
    z-index: 30;
    pointer-events: none;
}

footer {
    padding: 18px 0 30px;
    color: var(--faint);
    text-align: center;
    font-size: 12px;
}

@keyframes atmosphere {
    0% {
        opacity: 0.72;
        transform: scale(1);
    }
    100% {
        opacity: 1;
        transform: scale(1.03);
    }
}

@keyframes panelIn {
    from {
        opacity: 0;
        filter: blur(6px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 113, 227, 0.28);
    }
    100% {
        box-shadow: 0 0 0 12px rgba(0, 113, 227, 0);
    }
}

@keyframes statusBreath {
    0%,
    100% {
        opacity: 0.36;
        transform: scale(0.78);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes waitRing {
    to {
        transform: rotate(360deg);
    }
}

@keyframes waitTextDots {
    0% {
        width: 0;
    }
    25% {
        width: 0.35em;
    }
    50% {
        width: 0.7em;
    }
    75%,
    100% {
        width: 1em;
    }
}

@keyframes codePop {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes focusBloom {
    0% {
        box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.96), 0 0 0 0 rgba(0, 113, 227, 0.14);
    }
    100% {
        box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.96), 0 0 0 5px rgba(0, 113, 227, 0.08);
    }
}

@keyframes resultMaterialize {
    0% {
        opacity: 0;
        transform: translateY(16px) scale(0.992);
        filter: blur(6px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes copyPulse {
    0% {
        transform: scaleX(0.42);
    }
    60%,
    100% {
        transform: scaleX(1);
    }
}

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

@media (hover: none) {
    .shell:hover,
    .flow li:hover,
    .notice:hover,
    .code-stage:hover,
    .brand:hover .mark,
    .status-pill:hover,
    #orderStatus:hover,
    .primary:hover:not(:disabled),
    .secondary:hover:not(:disabled),
    .danger:hover:not(:disabled) {
        transform: none;
    }
}

@media (max-width: 900px) {
    .shell {
        width: min(100% - 36px, 1080px);
        padding: 28px;
    }

    .hero,
    .workspace,
    .redeem-form {
        grid-template-columns: 1fr;
    }

    .primary {
        grid-column: auto;
        grid-row: auto;
    }

    .input-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

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

    .flow li:nth-child(2)::after {
        display: none;
    }

    .order-lines {
        grid-template-columns: 1fr;
    }

    .order-lines > div,
    .order-lines > div:first-child {
        min-height: auto;
        padding: 18px 0;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .order-lines > div:last-child {
        border-bottom: 0;
    }
}

@media (max-width: 560px) {
    .shell {
        width: min(100% - 20px, 1080px);
        min-height: auto;
        gap: 20px;
        padding: 22px;
        border-radius: 24px;
    }

    .topbar {
        gap: 12px;
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar > div:last-child {
        width: 100%;
    }

    .service-nav {
        width: 100%;
        flex-wrap: wrap;
        border-radius: 20px;
    }

    .service-nav a {
        flex: 1 1 110px;
        justify-content: center;
    }

    .status-pill {
        min-height: 36px;
        padding: 0 12px;
        white-space: nowrap;
    }

    h1 {
        font-size: 46px;
    }

    .hero {
        gap: 18px;
        padding-bottom: 24px;
    }

    .flow {
        gap: 0 18px;
        padding-bottom: 12px;
    }

    .flow li {
        min-height: auto;
        padding: 11px 0;
    }

    .flow li::after {
        display: none;
    }

    .redeem-form {
        gap: 16px;
    }

    .field input {
        height: 60px;
        font-size: 21px;
    }

    .field-head {
        display: grid;
        gap: 6px;
        justify-content: stretch;
    }

    .notice {
        padding-top: 4px;
    }

    .result-head {
        align-items: start;
        display: grid;
        gap: 14px;
    }

    #orderStatus {
        justify-self: start;
    }

    .result h2 {
        font-size: 34px;
    }

    .code-stage {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .code-copy {
        font-size: 56px;
    }

    .result[data-waiting="true"] .code-copy {
        font-size: 38px;
    }

    .code-stage > small {
        justify-self: start;
        min-width: 0;
        text-align: left;
    }

    .actions,
    .actions button,
    .primary {
        width: 100%;
    }
}
