
:root {
    color-scheme: light;
    --site-header-offset: 126px;
    --ink: #17151b;
    --muted: #53515b;
    --paper: #f9f8fc;
    --panel: #fff;
    --line: #e9e6ef;
    --accent: #391ee0;
    --accent-strong: #2e12ca;
    --accent-deep: #241752;
    --tint: #eee9ff;
    --display: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
    font-family: 'Geist', 'Segoe UI', sans-serif;
    font-weight: 400;
    background: #fff;
    color: var(--ink);
    line-height: 1.48;
}

*, *::before, *::after { box-sizing: border-box; }
body { display: flex; flex-direction: column; min-height: 100vh; min-width: 280px; margin: 0; }
.store-font-geist { --display: 'Geist', 'Segoe UI', sans-serif; }
.store-font-system { --display: system-ui, sans-serif; font-family: var(--display); }
.store-accent-ocean { --accent: #1159ae; --accent-strong: #134585; --accent-deep: #102c54; --tint: #e8f2ff; }
.store-accent-pine { --accent: #166953; --accent-strong: #0f5442; --accent-deep: #123a31; --tint: #e7f5ef; }
h1, h2, h3, h4, h5, h6 { font-family: var(--display); }
#main-content { flex: 1; min-width: 0; }
a { color: inherit; }
[id] { scroll-margin-top: calc(var(--site-header-offset) + 18px); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
.ui-icon { display: inline-block; width: 1.2em; height: 1.2em; flex: none; vertical-align: -.18em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
.container { width: min(1180px, calc(100% - 80px)); margin-inline: auto; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
.skip-link { position: fixed; z-index: 20; top: 8px; left: 12px; transform: translateY(-150%); padding: 10px 16px; color: white; background: var(--accent); }
.skip-link:focus { transform: none; }

.site-brand { display: inline-flex; align-items: center; gap: 8px; justify-self: start; color: var(--ink); text-decoration: none; white-space: nowrap; font: 800 1.05rem/1 var(--display); letter-spacing: -.04em; }
.site-brand .brand-word { margin-left: .2em; color: var(--accent-strong); font-weight: 700; }
.brand-icon { display: grid; place-content: center; flex: none; width: 31px; height: 31px; border-radius: 8px; background: var(--accent); }
.brand-icon .ui-icon { width: 22px; height: 22px; stroke-width: 2.7; color: #fff; }
body:not(.page-store) #main-content { background: var(--paper); }
.app-section { padding-block: clamp(31px, 6vw, 84px); }
.compact-section, .message-section { max-width: 800px; }
.app-section h1 { margin: 0 0 13px; max-width: 22ch; font: 750 clamp(2.1rem, 4.1vw, 3.65rem)/1.06 var(--display); letter-spacing: -.055em; }
.app-section h2 { margin: 0 0 14px; font: 700 clamp(1.35rem, 2vw, 1.8rem)/1.19 var(--display); letter-spacing: -.035em; }
.app-section h3 { margin: 0 0 9px; line-height: 1.17; }
.app-lead { margin: 0 0 17px; max-width: 55ch; color: var(--muted); font-size: 1.12rem; }
.app-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 12px 25px; margin-bottom: 25px; }
.app-heading h1, .app-heading .app-lead { margin-bottom: 0; }
.app-heading .app-lead { margin-top: 6px; }
.panel { min-width: 0; padding: clamp(17px, 3.1vw, 37px); background: var(--panel); border: 1px solid var(--line); border-radius: 13px; }
.panel > p { margin: 0 0 14px; }
.panel-foot { margin-block: 16px 0; }
.muted { color: var(--muted); }
.text-link { color: var(--accent); text-underline-offset: 4px; font-weight: 700; }
.app-section > .text-link, .app-heading .text-link { display: inline-block; margin-bottom: 12px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }

.button { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 47px; padding: 9px 17px; border: 1px solid transparent; border-radius: 8px; text-decoration: none; font-weight: 700; font-size: 1rem; line-height: 1.15; text-align: center; transition: background 150ms, border-color 150ms, color 150ms; }
.button--bright { background: var(--accent); color: white; }
.button--bright:hover { background: var(--accent-strong); }
.button--line { border-color: #dcd3f6; background: white; color: var(--accent-strong); }
.button--line:hover { background: var(--tint); border-color: #c2b5f4; }
.button--small { min-height: 35px; padding: 6px 10px; font-size: .91rem; }
.notice { color: #382180; background: #f1edff; border: 1px solid #dfd6fa; border-radius: 8px; padding: 10px 13px; }
.notice--error { color: #862841; background: #fff1f3; border-color: #f1bcc9; }
.flash-wrap { padding-top: 19px; }
.flash-wrap + .app-section { padding-top: 20px; }

.stack-form { display: grid; gap: 15px; }
.stack-form label { display: grid; gap: 6px; font-weight: 700; }
.stack-form label small { color: var(--muted); font-size: .9rem; font-weight: 400; }
.stack-form :is(input:not([type=checkbox]), textarea, select) { display: block; width: 100%; min-width: 0; color: var(--ink); background: #fdfcff; border: 1px solid #d9d1ea; border-radius: 7px; padding: 10px 12px; min-height: 44px; }
.stack-form ::placeholder { color: #716784; }
.stack-form :is(input, textarea, select):focus { border-color: var(--accent); outline: 1px solid var(--accent); outline-offset: 0; }
.stack-form textarea { resize: vertical; }
.stack-form .check-field { display: flex; align-items: flex-start; gap: 9px; font-weight: 600; }
.check-field input { accent-color: var(--accent); width: 17px; height: 17px; flex: none; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.form-note { font-size: .92rem; }

.app-flow { max-width: 1120px; }
.flow-heading { margin-bottom: 19px; }
.flow-heading .app-lead { margin-bottom: 0; }
.flow-back { display: inline-block; color: var(--accent); font-weight: 700; margin-bottom: 11px; text-underline-offset: 3px; }
.purchase-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; margin: 0 0 22px; padding: 0; border-block: 1px solid var(--line); }
.purchase-steps li { position: relative; display: flex; align-items: center; gap: 7px; padding: 10px 6px; color: var(--muted); font-weight: 600; line-height: 1.04; }
.purchase-steps .step-index { display: inline-grid; flex: none; place-items: center; width: 25px; height: 25px; border-radius: 5px; background: #f0ecf7; color: #645679; font-size: .91rem; }
.purchase-steps .is-current { color: var(--accent-strong); box-shadow: inset 0 -2px var(--accent); }
.purchase-steps .is-current .step-index { background: var(--accent); color: white; }
.purchase-steps .is-past .step-index { background: #e8e1fc; color: var(--accent); }
.flow-layout { display: grid; grid-template-columns: minmax(0,1.38fr) minmax(0,.85fr); gap: clamp(14px, 3vw, 33px); align-items: start; }
.flow-summary { grid-column: 2; grid-row: 1; }
.flow-primary { grid-column: 1; grid-row: 1; }
.flow-summary-media { display: block; border: 4px solid #ebe6f6; border-radius: 7px; width: 100%; height: auto; aspect-ratio: 1.8; object-fit: cover; margin-bottom: 13px; }
.flow-summary-name, .flow-section-title { margin: 0 0 8px; }
.flow-summary-meta, .flow-summary-note { margin: 0 0 9px; color: var(--muted); }
.flow-summary-total { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: baseline; gap: 5px 10px; padding-block: 10px; border-top: 1px solid var(--line); margin-top: 10px; font-weight: 600; }
.flow-summary-total strong { font: 750 1.55rem/1 var(--display); white-space: nowrap; color: var(--accent-strong); }
.field-group { min-inline-size: 0; display: grid; gap: 10px; margin: 0; padding: 12px 0 0; border: none; border-top: 1px solid var(--line); }
.field-group legend { padding: 0 10px 0 0; font-weight: 700; color: var(--accent-strong); }
.payment-tray { padding: clamp(12px, 3vw, 23px); border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.payment-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 9px; margin-bottom: 13px; font-weight: 700; }
.paytr-frame { display: block; width: 100%; min-height: 565px; border: none; background: white; border-radius: 8px; }
.order-list { display: grid; list-style: none; padding: 0; margin: 0; }
.account-order { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.75fr) .48fr auto; align-items: center; gap: 10px 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.account-order-info, .account-order-domain, .account-order-price { min-width: 0; overflow-wrap: anywhere; }
.account-order-info h3 { margin: 0; font-size: 1.12rem; }
.account-order-info p, .account-order-domain p, .account-order-price p { margin: 3px 0 0; }
.account-order-action { display: flex; justify-content: flex-end; gap: 7px; align-items: center; flex-wrap: wrap; }
.account-empty p { color: var(--muted); margin-bottom: 14px; }
.order-state-copy { margin: 0 0 13px; color: var(--muted); }
.order-detail-list { margin: 4px 0 0; }
.order-detail-list > div { padding: 8px 0; border-bottom: 1px solid var(--line); }
.order-detail-list dt { color: var(--muted); }
.order-detail-list dd { margin: 1px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.order-domain-control { padding-top: 15px; margin-top: 19px; border-top: 1px solid var(--line); }
.state { display: inline-flex; padding: 3px 9px; border-radius: 6px; color: #78460f; background: #fff0d3; font-size: .89rem; font-weight: 700; white-space: nowrap; }
.state--paid { color: #165640; background: #def5ec; }
.state--failed { color: #852942; background: #fce4ed; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; text-align: left; border-collapse: collapse; }
.data-table :is(th, td) { min-width: 98px; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table th:first-child { padding-left: 0; }
.data-table thead th { color: var(--muted); font-size: .91rem; }
.cell-detail { display: block; margin-top: 3px; color: var(--muted); font-size: .9rem; font-weight: 400; overflow-wrap: anywhere; }
.admin-panel + .admin-panel { margin-top: 18px; }
.license-actions { display: grid; gap: 6px; justify-content: start; min-width: 155px; }
.admin-editor { max-width: 880px; }
.admin-pagination { display: flex; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; gap: 8px; }

@media (max-width: 900px) { .container { width: calc(100% - 54px); } }
@media (max-width: 700px) {
    .container { width: calc(100% - 36px); }
    .flow-layout { grid-template-columns: minmax(0,1fr); }
    .flow-summary, .flow-primary { grid-column: auto; grid-row: auto; }
    .flow-summary .flow-summary-media { display: none; }
    .account-order { grid-template-columns: 1fr auto; }
    .account-order-action, .account-order-price { justify-self: start; }
}
@media (max-width: 460px) {
    .form-row { grid-template-columns: minmax(0,1fr); }
    .purchase-steps li { flex-direction: column; align-items: flex-start; gap: 4px; font-size: .9rem; padding: 6px; }
    .purchase-steps .step-index { width: 21px; height: 21px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
