:root {
    --bg: #1a2127;
    --bg-deep: #141a1f;
    --bg-soft: #20282f;
    --bg-raise: #252e36;
    --text: #dacdb8;
    --text-hi: #f1e7d6;
    --accent: #7d3737;
    --accent-soft: #b05454;
    --accent-tint: rgba(125, 55, 55, 0.16);
    --muted: rgba(218, 205, 184, 0.62);
    --faint: rgba(218, 205, 184, 0.38);
    --line: rgba(218, 205, 184, 0.1);
    --line-hi: rgba(218, 205, 184, 0.22);
    --ok: #8fb08a;
    --ok-tint: rgba(143, 176, 138, 0.12);
    --warn: #d8a75e;
    --warn-tint: rgba(216, 167, 94, 0.12);
    --bad: #d06a5a;
    --bad-tint: rgba(208, 106, 90, 0.13);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --serif: "Fraunces", Georgia, serif;
    --sans: "Inter", "Noto Sans Thai", system-ui, sans-serif;
    --thai: "Noto Sans Thai", "Inter", sans-serif;
    --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
    --side: 268px;
    --top: 70px;
    --radius: 18px;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scrollbar-gutter: stable;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    background: none;
    border: 0;
    cursor: pointer;
}

img {
    max-width: 100%;
}

em {
    font-style: italic;
    color: var(--accent-soft);
}

::selection {
    background: var(--accent);
    color: var(--text-hi);
}

:focus-visible {
    outline: 2px solid var(--accent-soft);
    outline-offset: 3px;
    border-radius: 6px;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(218, 205, 184, 0.22);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-soft);
}

code,
.mono,
pre {
    font-family: var(--mono);
}

.ic {
    width: 18px;
    height: 18px;
    flex: none;
}

.flip {
    transform: rotate(180deg);
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 13px;
}

.strong {
    font-weight: 600;
}

.block {
    display: block;
}

.center {
    text-align: center;
}

.grow {
    flex: 1;
}

.warn-text {
    color: var(--warn);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.th {
    font-family: var(--thai);
    font-weight: 400;
    font-style: normal;
    font-size: 0.84em;
    letter-spacing: 0;
    text-transform: none;
    color: var(--faint);
    margin-left: 0.5em;
}

p.th,
.side-label .th,
.stat-label .th,
.method .th,
.cat .th,
.n-text .th,
.howto .th,
.drop-text .th,
.tx .th,
.seg .th,
.flash .th,
.pcard-price .th,
.cat-edit .th,
.empty .th,
.hero-th {
    display: block;
    margin-left: 0;
}

.btn .th,
.chip .th,
.tabs .th {
    color: inherit;
    opacity: 0.62;
}

.pill .th {
    color: inherit;
    opacity: 0.7;
    margin-left: 0.4em;
}

.grain {
    position: fixed;
    inset: 0;
    z-index: 60;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.pulse {
    position: relative;
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ok);
    flex: none;
}

.pulse::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: inherit;
    animation: ping 2.4s var(--ease) infinite;
}

@keyframes ping {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

.side {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--side);
    z-index: 40;
    display: flex;
    flex-direction: column;
    background: var(--bg-deep);
    border-right: 1px solid var(--line);
    transition: transform 0.4s var(--ease), visibility 0.4s;
}

.side-brand {
    height: var(--top);
    flex: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 24px;
    border-bottom: 1px solid var(--line);
    font-family: var(--serif);
    font-weight: 600;
    font-size: 21px;
    letter-spacing: -0.01em;
    color: var(--text-hi);
}

.brand-tag {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 3px 9px;
    border: 1px solid var(--line-hi);
    border-radius: 999px;
}

.side-nav {
    flex: 1;
    overflow-y: auto;
    padding: 18px 14px 22px;
    scrollbar-width: thin;
}

.side-group + .side-group {
    margin-top: 20px;
}

.side-title {
    display: flex;
    align-items: baseline;
    padding: 0 12px 8px;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--faint);
}

.side-title .th {
    letter-spacing: 0;
    font-size: 11px;
}

.side-group.staff .side-title {
    color: var(--accent-soft);
}

.side-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 14px;
    color: var(--muted);
    font-size: 14px;
    transition: color 0.3s, background 0.3s;
}

.side-link + .side-link {
    margin-top: 2px;
}

.side-link:hover {
    color: var(--text-hi);
    background: rgba(218, 205, 184, 0.05);
}

.side-label {
    flex: 1;
    min-width: 0;
    line-height: 1.3;
}

.side-label .th {
    font-size: 11.5px;
}

.side-link.on {
    color: var(--text-hi);
    background: linear-gradient(120deg, rgba(125, 55, 55, 0.5), rgba(125, 55, 55, 0.18));
    box-shadow: inset 0 0 0 1px rgba(176, 84, 84, 0.35);
}

.side-link.on::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--accent-soft);
}

.side-link.on .th {
    color: rgba(241, 231, 214, 0.6);
}

.side-badge {
    min-width: 22px;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--text-hi);
    font-size: 11px;
    font-weight: 600;
    line-height: 20px;
    text-align: center;
}

.side-ext {
    width: 14px;
    height: 14px;
    opacity: 0.5;
}

.side-foot {
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px 16px;
    border-top: 1px solid var(--line);
}

.side-foot a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--faint);
    font-size: 13px;
    transition: color 0.3s;
}

.side-foot a:hover {
    color: var(--text-hi);
}

.side-foot .ic {
    width: 15px;
    height: 15px;
}

.side-foot .pulse {
    margin: 0 4px;
}

.side-scrim {
    display: none;
}

.main {
    margin-left: var(--side);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top {
    position: sticky;
    top: 0;
    z-index: 30;
    height: var(--top);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 32px;
    background: rgba(26, 33, 39, 0.78);
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    border-bottom: 1px solid var(--line);
}

.icon-btn.top-menu {
    display: none;
}

.top-title {
    flex: 1;
    min-width: 0;
    font-family: var(--serif);
    font-weight: 400;
    font-size: 23px;
    letter-spacing: -0.02em;
    color: var(--text-hi);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-title .th {
    font-size: 13px;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: var(--muted);
    border: 1px solid transparent;
    transition: color 0.3s, border-color 0.3s, background 0.3s;
}

.icon-btn:hover {
    color: var(--text-hi);
    border-color: var(--line-hi);
}

.icon-btn.sm {
    width: 30px;
    height: 30px;
}

.icon-btn.sm .ic {
    width: 15px;
    height: 15px;
}

.dot {
    position: absolute;
    top: 2px;
    right: 1px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--text-hi);
    border: 2px solid var(--bg);
    font-size: 10px;
    font-weight: 700;
    line-height: 14px;
}

.chip.balance {
    height: 40px;
    gap: 9px;
    padding: 0 5px 0 15px;
    border-color: var(--line-hi);
    background: rgba(26, 33, 39, 0.5);
    color: var(--text-hi);
    font-weight: 600;
}

.chip.balance > .ic {
    color: var(--accent-soft);
}

.chip-plus {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--accent);
    color: var(--text-hi);
}

.chip-plus .ic {
    width: 15px;
    height: 15px;
}

.avatar {
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 999px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: var(--accent);
    color: var(--text-hi);
    font-weight: 600;
    border: 1px solid var(--line-hi);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar.sm {
    width: 28px;
    height: 28px;
    font-size: 12px;
}

.avatar.lg {
    width: 64px;
    height: 64px;
    font-size: 24px;
}

.pop {
    position: relative;
}

.pop-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    width: min(370px, calc(100vw - 32px));
    background: var(--bg-soft);
    border: 1px solid var(--line-hi);
    border-radius: var(--radius);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
}

.pop.open .pop-panel {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.pop-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    color: var(--text-hi);
}

.pop-head strong {
    font-weight: 500;
}

.pop-head a {
    color: var(--accent-soft);
    font-size: 13px;
}

.pop-empty {
    padding: 30px 16px;
    text-align: center;
    color: var(--muted);
}

.notice-list {
    list-style: none;
    padding: 6px;
    max-height: 400px;
    overflow-y: auto;
}

.notice-list.wide {
    max-height: none;
    padding: 0;
}

.notice-list a {
    display: flex;
    gap: 12px;
    padding: 11px;
    border-radius: 14px;
    transition: background 0.3s;
}

.notice-list a:hover {
    background: rgba(218, 205, 184, 0.04);
}

.notice-list li.new a {
    background: var(--accent-tint);
}

.n-ic {
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 999px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-hi);
    color: var(--muted);
}

.n-ic .ic {
    width: 15px;
    height: 15px;
}

.n-ic.topup,
.n-ic.wallet {
    color: var(--ok);
    border-color: rgba(143, 176, 138, 0.35);
}

.n-ic.order {
    color: var(--accent-soft);
    border-color: rgba(176, 84, 84, 0.4);
}

.n-ic.expired {
    color: var(--warn);
    border-color: rgba(216, 167, 94, 0.35);
}

.n-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    font-size: 13.5px;
    line-height: 1.45;
}

.n-text strong {
    font-weight: 500;
    color: var(--text-hi);
}

.n-body {
    color: var(--muted);
}

.n-text small {
    margin-top: 2px;
    color: var(--faint);
    font-size: 12px;
}

.content {
    flex: 1;
    width: 100%;
    max-width: 1240px;
    padding: 30px 32px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.foot {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 1240px;
    padding: 20px 32px 30px;
    color: var(--faint);
    font-size: 13px;
}

.foot-links {
    display: flex;
    gap: 18px;
}

.foot-links a:hover {
    color: var(--text-hi);
}

.card {
    position: relative;
    min-width: 0;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(165deg, rgba(37, 46, 54, 0.85), rgba(26, 33, 39, 0.85) 70%);
    box-shadow: 0 1px 0 rgba(241, 231, 214, 0.05) inset, 0 24px 50px -30px rgba(0, 0, 0, 0.6);
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.card-head h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 20px;
    letter-spacing: -0.01em;
    color: var(--text-hi);
}

.head-with-ic {
    display: flex;
    align-items: center;
    gap: 14px;
}

.head-with-ic h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 20px;
    color: var(--text-hi);
}

.link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-hi);
    font-size: 13.5px;
    border-bottom: 1px solid var(--accent-soft);
    padding-bottom: 1px;
    white-space: nowrap;
    flex: none;
}

.link .ic {
    width: 14px;
    height: 14px;
}

.back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    margin-bottom: -8px;
    color: var(--muted);
    font-size: 14px;
    transition: color 0.3s;
}

.back:hover {
    color: var(--text-hi);
}

.back .ic {
    width: 15px;
    height: 15px;
}

.index {
    display: block;
    margin-bottom: 12px;
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-soft);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: transform 0.35s var(--ease), background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary {
    background: var(--accent);
    color: var(--text-hi);
    box-shadow: 0 10px 30px -10px rgba(125, 55, 55, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -3px 0 rgba(0, 0, 0, 0.18);
}

.btn.primary:hover {
    background: #8e4040;
}

.btn.ghost {
    border-color: var(--line-hi);
    background: rgba(26, 33, 39, 0.45);
    color: var(--text);
}

.btn.ghost:hover {
    border-color: var(--text);
}

.btn.danger {
    border-color: rgba(208, 106, 90, 0.45);
    color: var(--bad);
}

.btn.danger:hover {
    background: var(--bad-tint);
}

.btn.sm {
    min-height: 34px;
    padding: 0 14px;
    font-size: 13px;
}

.btn.sm .ic {
    width: 15px;
    height: 15px;
}

.btn.block {
    display: flex;
    width: 100%;
}

.btn[disabled],
.btn.busy {
    opacity: 0.5;
    pointer-events: none;
    box-shadow: none;
}

.flash {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid;
    font-size: 14px;
    animation: drop 0.5s var(--ease);
}

.flash .ic {
    margin-top: 2px;
}

.flash.ok {
    background: var(--ok-tint);
    border-color: rgba(143, 176, 138, 0.35);
    color: #c7dcc3;
}

.flash.error {
    background: var(--bad-tint);
    border-color: rgba(208, 106, 90, 0.4);
    color: #f3c5bc;
}

.flash .th {
    color: inherit;
    opacity: 0.7;
}

@keyframes drop {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
}

.note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 18px;
    padding: 13px 15px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(218, 205, 184, 0.04);
    color: var(--text);
    font-size: 14px;
}

.note .ic {
    margin-top: 2px;
    color: var(--muted);
}

.note .th {
    display: block;
    margin-left: 0;
}

.note.warn {
    border-color: rgba(216, 167, 94, 0.3);
    background: var(--warn-tint);
}

.note.warn .ic {
    color: var(--warn);
}

.note.bad {
    border-color: rgba(208, 106, 90, 0.35);
    background: var(--bad-tint);
}

.note.bad .ic {
    color: var(--bad);
}

.form > .note:first-of-type,
.card > .note:first-child {
    margin-top: 0;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 999px;
    border: 1px solid var(--line-hi);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    color: var(--muted);
}

.pill .ic {
    width: 13px;
    height: 13px;
}

.pill.active {
    color: var(--ok);
    border-color: rgba(143, 176, 138, 0.35);
    background: rgba(143, 176, 138, 0.08);
}

.pill.setup {
    color: var(--warn);
    border-color: rgba(216, 167, 94, 0.35);
    background: rgba(216, 167, 94, 0.07);
}

.pill.expired {
    color: var(--faint);
}

.pill.cancelled {
    color: var(--bad);
    border-color: rgba(208, 106, 90, 0.4);
    background: rgba(208, 106, 90, 0.07);
}

.hello,
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    flex-wrap: wrap;
    overflow: hidden;
}

.hello::after,
.hero::after {
    content: "";
    position: absolute;
    right: -120px;
    top: -160px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(125, 55, 55, 0.35), transparent);
    pointer-events: none;
}

.hello > *,
.hero > * {
    position: relative;
    z-index: 1;
}

.hello h2 {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(28px, 3.4vw, 40px);
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text-hi);
    margin-bottom: 8px;
}

.hello-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hero {
    padding: clamp(28px, 4vw, 44px);
    align-items: stretch;
}

.hero-text {
    flex: 1 1 420px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hero-text h2 {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(30px, 4vw, 50px);
    line-height: 1.05;
    letter-spacing: -0.035em;
    color: var(--text-hi);
    max-width: 16ch;
}

.hero-th {
    font-size: 15px;
    color: var(--muted);
}

.hero-text .hello-actions {
    margin-top: 12px;
}

.hero-points {
    list-style: none;
    flex: 0 1 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.hero-points li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(20, 26, 31, 0.55);
}

.hero-points .ic {
    color: var(--accent-soft);
}

.hero-points span {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    color: var(--muted);
}

.hero-points strong {
    color: var(--text-hi);
    font-weight: 500;
    font-size: 14px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
}

.stat {
    display: flex;
    flex-direction: column;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(165deg, rgba(37, 46, 54, 0.85), rgba(26, 33, 39, 0.85) 70%);
    transition: border-color 0.3s, transform 0.4s var(--ease);
}

a.stat:hover {
    border-color: var(--line-hi);
    transform: translateY(-3px);
}

.stat strong {
    margin-top: 4px;
    font-family: var(--serif);
    font-weight: 300;
    font-size: 32px;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text-hi);
}

.stat-label {
    color: var(--muted);
    font-size: 13px;
}

.stat-ic {
    width: 38px;
    height: 38px;
    margin-bottom: 14px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(176, 84, 84, 0.4);
    color: var(--accent-soft);
}

.stat-ic .ic {
    width: 16px;
    height: 16px;
}

.stat-ic.ok {
    color: var(--ok);
    border-color: rgba(143, 176, 138, 0.35);
}

.stat-ic.warn {
    color: var(--warn);
    border-color: rgba(216, 167, 94, 0.35);
}

.stat-ic.bad {
    color: var(--bad);
    border-color: rgba(208, 106, 90, 0.4);
}

.thumb {
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 14px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line-hi);
    background: linear-gradient(150deg, rgba(125, 55, 55, 0.35), rgba(20, 26, 31, 0.6));
    color: var(--text-hi);
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb.sm {
    width: 32px;
    height: 32px;
    border-radius: 10px;
}

.thumb.sm .ic {
    width: 15px;
    height: 15px;
}

.thumb.lg {
    width: 84px;
    height: 84px;
    border-radius: 22px;
}

.thumb.lg .ic {
    width: 34px;
    height: 34px;
}

.pgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.pgrid.tight {
    grid-template-columns: repeat(auto-fill, minmax(220px, 260px));
}

.pcard {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 3px;
    padding: 24px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(20, 26, 31, 0.5);
    transition: border-color 0.3s, background 0.3s, transform 0.45s var(--ease), box-shadow 0.3s;
}

.pcard .thumb {
    margin-bottom: 14px;
}

a.pcard:hover {
    border-color: var(--line-hi);
    transform: translateY(-4px);
    box-shadow: 0 24px 40px -24px rgba(0, 0, 0, 0.8);
}

.pcard.on {
    border-color: rgba(176, 84, 84, 0.7);
    background: linear-gradient(160deg, rgba(125, 55, 55, 0.32), rgba(20, 26, 31, 0.5));
    box-shadow: 0 0 0 3px rgba(125, 55, 55, 0.22);
}

.pcard-name {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 19px;
    letter-spacing: -0.01em;
    color: var(--text-hi);
}

.pcard-price {
    color: var(--accent-soft);
    font-weight: 600;
    font-size: 16px;
}

.pcard-price .th {
    font-weight: 400;
    font-size: 11.5px;
}

.pcard-sub {
    color: var(--text);
    font-size: 14px;
}

.pcard-sum {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.cats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.cat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    transition: border-color 0.3s, background 0.3s;
}

.cat:hover {
    border-color: var(--line-hi);
    background: rgba(218, 205, 184, 0.03);
}

.cat > span:last-child {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}

.cat strong {
    font-weight: 500;
    color: var(--text-hi);
}

.cat-ic {
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 999px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(176, 84, 84, 0.4);
    color: var(--accent-soft);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 15px;
    border-radius: 999px;
    border: 1px solid var(--line-hi);
    color: var(--muted);
    font-size: 14px;
    transition: color 0.3s, border-color 0.3s, background 0.3s;
}

.chip .ic {
    width: 15px;
    height: 15px;
}

.chip:hover {
    color: var(--text-hi);
    border-color: var(--text);
}

.chip.on {
    color: var(--text-hi);
    border-color: var(--accent);
    background: var(--accent);
}

.chip.soon {
    color: var(--faint);
}

.chip-n {
    font-size: 11.5px;
    opacity: 0.7;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-self: flex-start;
    max-width: 100%;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(20, 26, 31, 0.5);
}

.tabs a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    border-radius: 999px;
    font-size: 13.5px;
    color: var(--muted);
    transition: color 0.3s, background 0.3s;
}

.tabs a:hover {
    color: var(--text-hi);
}

.tabs a.on {
    color: var(--text-hi);
    background: var(--accent);
}

.tabs b {
    font-weight: 500;
    font-size: 11.5px;
    opacity: 0.7;
}

.tabs-gap {
    width: 1px;
    margin: 6px;
    background: var(--line-hi);
}

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 40px 16px;
    text-align: center;
    color: var(--muted);
}

.empty > .ic {
    width: 32px;
    height: 32px;
    color: var(--faint);
}

.empty.big {
    padding: 70px 16px;
}

.err-code {
    font-family: var(--serif);
    font-weight: 300;
    font-size: 84px;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--accent-soft);
}

.rows {
    list-style: none;
    border-top: 1px solid var(--line);
}

.rows > li {
    border-bottom: 1px solid var(--line);
}

.rows > li:last-child {
    border-bottom: 0;
}

.row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 4px;
}

.row-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.row-main strong {
    font-weight: 500;
    color: var(--text-hi);
    transition: color 0.3s;
}

a.row:hover .row-main strong,
a.row-main:hover strong {
    color: var(--accent-soft);
}

.row-when {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.row-when .ic {
    width: 15px;
    height: 15px;
    color: var(--accent-soft);
}

.row-actions {
    display: flex;
    gap: 6px;
}

.checkout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 22px;
    align-items: start;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-width: 0;
}

.step-title {
    margin-bottom: 4px;
    font-family: var(--serif);
    font-weight: 400;
    font-size: 24px;
    letter-spacing: -0.02em;
    color: var(--text-hi);
}

.step-title .th {
    font-size: 13px;
}

.step-n {
    color: var(--accent-soft);
}

.step > .muted {
    margin-bottom: 20px;
    font-size: 14px;
}

.step-for {
    margin-bottom: 16px;
    font-size: 14.5px;
}

.step-for strong {
    color: var(--text-hi);
    font-weight: 500;
}

.summary {
    position: sticky;
    top: calc(var(--top) + 22px);
}

.sum-product {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.sum-product strong {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 19px;
    color: var(--text-hi);
}

.sum-desc {
    margin-top: 14px;
    color: var(--text);
    white-space: pre-line;
}

.checks {
    list-style: none;
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 14px;
}

.checks li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.checks .ic {
    width: 15px;
    height: 15px;
    margin-top: 3px;
    color: var(--ok);
}

.sum-lines {
    margin: 20px 0 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--line-hi);
    display: flex;
    flex-direction: column;
    gap: 9px;
    font-size: 14px;
}

.sum-lines.first {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.sum-lines div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.sum-lines dt {
    color: var(--muted);
}

.sum-lines dd {
    font-weight: 500;
    text-align: right;
    color: var(--text-hi);
}

.sum-lines .total {
    padding-top: 11px;
    border-top: 1px solid var(--line);
    font-size: 15px;
}

.sum-lines .total dd {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 400;
}

.sum-lines .total dd.neg {
    color: var(--bad);
}

.summary .small.center {
    margin-top: 10px;
}

.summary .small.center.th {
    margin-top: 2px;
}

.low {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 11px 14px;
    border-radius: 14px;
    border: 1px solid rgba(208, 106, 90, 0.4);
    background: var(--bad-tint);
    color: #f3c5bc;
    font-size: 13.5px;
}

.low span {
    flex: 1;
}

.low[hidden] {
    display: none;
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.plan {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 118px;
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(20, 26, 31, 0.5);
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}

.plan:hover {
    border-color: var(--line-hi);
}

.plan input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.radio {
    width: 24px;
    height: 24px;
    flex: none;
    border-radius: 999px;
    border: 1.5px solid var(--line-hi);
    display: grid;
    place-items: center;
    transition: border-color 0.3s;
}

.radio::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    transform: scale(0);
    transition: transform 0.35s var(--ease);
}

.plan:has(input:checked) {
    border-color: rgba(176, 84, 84, 0.7);
    background: linear-gradient(160deg, rgba(125, 55, 55, 0.3), rgba(20, 26, 31, 0.5));
    box-shadow: 0 0 0 3px rgba(125, 55, 55, 0.2);
}

.plan:has(input:checked) .radio {
    border-color: var(--accent-soft);
}

.plan:has(input:checked) .radio::after {
    transform: scale(1);
}

.plan:has(input:focus-visible) {
    outline: 2px solid var(--accent-soft);
    outline-offset: 3px;
}

.plan.out {
    opacity: 0.45;
    cursor: not-allowed;
}

.plan-name {
    flex: 1;
    display: flex;
    flex-direction: column;
    font-family: var(--serif);
    font-weight: 400;
    font-size: 20px;
    letter-spacing: -0.01em;
    color: var(--text-hi);
}

.plan-name small {
    font-family: var(--sans);
    font-size: 12.5px;
    color: var(--muted);
}

.plan-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    text-align: right;
}

.off {
    padding: 2px 9px;
    border-radius: 999px;
    border: 1px solid rgba(143, 176, 138, 0.35);
    background: rgba(143, 176, 138, 0.08);
    color: var(--ok);
    font-size: 11.5px;
    font-weight: 500;
}

.off .th {
    color: inherit;
    opacity: 0.7;
    margin-left: 0.3em;
}

.now {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.now s {
    color: var(--faint);
    font-size: 14px;
}

.now strong {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 26px;
    letter-spacing: -0.02em;
    color: var(--text-hi);
}

.plan:has(input:checked) .now strong {
    color: #f3c5bc;
}

.per {
    color: var(--muted);
    font-size: 12.5px;
}

.fields,
.form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    border: 0;
}

.field > span:first-child {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px 8px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.field > span:first-child .th {
    margin-left: 0;
    text-transform: none;
}

.field em {
    font-style: normal;
    text-transform: none;
    letter-spacing: 0;
    font-size: 12px;
    color: var(--faint);
}

.field.short {
    max-width: 160px;
}

input[type="text"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="search"],
input:not([type]),
input[inputmode],
select,
textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 15px;
    border: 1px solid var(--line-hi);
    border-radius: 14px;
    background: rgba(20, 26, 31, 0.6);
    color: var(--text-hi);
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

select option {
    background: var(--bg-soft);
}

input::placeholder,
textarea::placeholder {
    color: var(--faint);
}

input:disabled {
    color: var(--faint);
    background: rgba(20, 26, 31, 0.3);
}

textarea {
    resize: vertical;
    line-height: 1.55;
}

textarea.mono {
    font-size: 13px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent-soft);
    background: rgba(20, 26, 31, 0.85);
    box-shadow: 0 0 0 3px rgba(176, 84, 84, 0.2);
}

input:user-invalid {
    border-color: var(--bad);
}

.field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.field-row.three {
    grid-template-columns: 2fr 1fr 1fr;
}

.check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
}

.check input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.seg {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
}

.seg.small {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.seg label {
    position: relative;
    cursor: pointer;
}

.seg input {
    position: absolute;
    opacity: 0;
}

.seg label > span {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(20, 26, 31, 0.5);
    font-size: 14px;
    transition: border-color 0.3s, background 0.3s;
}

.seg.small label > span {
    align-items: center;
    padding: 10px;
}

.seg strong {
    font-weight: 500;
    color: var(--text-hi);
}

.seg small {
    color: var(--muted);
    font-size: 12.5px;
}

.seg input:checked + span {
    border-color: rgba(176, 84, 84, 0.7);
    background: linear-gradient(160deg, rgba(125, 55, 55, 0.3), rgba(20, 26, 31, 0.5));
}

.seg input:focus-visible + span {
    outline: 2px solid var(--accent-soft);
    outline-offset: 3px;
}

.help {
    font-size: 13.5px;
}

.help summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--text-hi);
}

.help summary .ic {
    width: 15px;
    height: 15px;
    color: var(--accent-soft);
}

.help ol {
    margin-top: 10px;
    padding-left: 22px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--text);
}

.help strong {
    color: var(--text-hi);
    font-weight: 500;
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 22px;
    align-items: start;
}

.split.wide-aside,
.split.even {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-width: 0;
}

.stack-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
}

.order-head {
    display: flex;
    align-items: center;
    gap: 18px;
}

.order-head > div {
    flex: 1;
    min-width: 0;
}

.order-head h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 28px;
    letter-spacing: -0.02em;
    color: var(--text-hi);
}

.kv {
    display: flex;
    flex-direction: column;
}

.kv div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 0;
    font-size: 14px;
}

.kv div + div {
    border-top: 1px solid var(--line);
}

.kv dt {
    color: var(--muted);
}

.kv dd {
    min-width: 0;
    text-align: right;
    color: var(--text-hi);
    overflow-wrap: anywhere;
}

.kv dd a {
    border-bottom: 1px solid var(--accent-soft);
}

.delivery {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(20, 26, 31, 0.7);
    color: var(--text-hi);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 1.65;
}

.code-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.code-copy .ic {
    width: 13px;
    height: 13px;
    color: var(--muted);
}

.copied {
    outline: 2px solid var(--ok);
    outline-offset: 2px;
}

.methods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.method {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(20, 26, 31, 0.5);
    transition: border-color 0.3s, background 0.3s;
}

.method img {
    flex: none;
    border-radius: 12px;
}

.method > span:nth-child(2) {
    display: flex;
    flex-direction: column;
}

.method strong {
    font-weight: 500;
    color: var(--text-hi);
}

.method:hover {
    border-color: var(--line-hi);
}

.method.on {
    border-color: rgba(176, 84, 84, 0.7);
    background: linear-gradient(160deg, rgba(125, 55, 55, 0.3), rgba(20, 26, 31, 0.5));
}

.method-ic {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-hi);
    color: var(--accent-soft);
}

.method-off {
    position: absolute;
    top: 10px;
    right: 12px;
    padding: 2px 9px;
    border-radius: 999px;
    border: 1px solid var(--line-hi);
    color: var(--faint);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.howto {
    list-style: none;
    counter-reset: how;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 18px;
}

.howto li {
    counter-increment: how;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-left: 44px;
}

.howto li::before {
    content: counter(how);
    position: absolute;
    left: 0;
    top: -2px;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(176, 84, 84, 0.55);
    color: var(--accent-soft);
    font-family: var(--serif);
    font-size: 15px;
}

.howto strong {
    font-weight: 500;
    color: var(--text-hi);
}

.howto form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bank-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--line-hi);
    border-radius: var(--radius);
    background: rgba(20, 26, 31, 0.6);
}

.bank-box img {
    border-radius: 12px;
}

.bank-box > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.bank-number {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    font-family: var(--serif);
    font-size: 26px;
    letter-spacing: 0.02em;
    color: var(--text-hi);
}

.copy-hint {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: 0;
    color: var(--accent-soft);
}

.copy-hint .ic {
    width: 13px;
    height: 13px;
}

.bank-name {
    color: var(--text);
}

.drop {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 28px 18px;
    border: 1.5px dashed var(--line-hi);
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
}

.drop:hover,
.drop.over {
    border-color: var(--accent-soft);
    background: var(--accent-tint);
}

.drop input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.drop-ic {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(176, 84, 84, 0.45);
    color: var(--accent-soft);
}

.drop.has-file .drop-ic {
    display: none;
}

.drop-preview {
    max-height: 200px;
    border-radius: 12px;
}

.drop-text {
    display: flex;
    flex-direction: column;
}

.drop-text strong {
    font-weight: 500;
    color: var(--text-hi);
}

.wallet-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-color: rgba(255, 255, 255, 0.14);
    background: linear-gradient(150deg, #8e4040, var(--accent) 50%, #4a2428);
    color: var(--text-hi);
}

.wallet-card .index {
    margin-bottom: 6px;
    color: rgba(241, 231, 214, 0.75);
}

.wallet-card .th {
    color: rgba(241, 231, 214, 0.6);
}

.wallet-card .link {
    align-self: flex-start;
    margin-top: 8px;
    border-color: rgba(241, 231, 214, 0.4);
}

.wallet-amount {
    font-family: var(--serif);
    font-weight: 300;
    font-size: 44px;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.mini {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mini li,
.mini-link {
    display: flex;
    align-items: center;
    gap: 11px;
}

.mini img {
    flex: none;
    border-radius: 8px;
}

.mini-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    font-size: 14px;
}

.mini-main strong {
    font-weight: 500;
    color: var(--text-hi);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-wrap {
    overflow-x: auto;
    margin: 0 -26px;
    padding: 0 26px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th {
    padding: 0 12px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--faint);
    white-space: nowrap;
}

.table th .th {
    letter-spacing: 0;
}

.table td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.table td strong {
    font-weight: 500;
    color: var(--text-hi);
}

.table tr:last-child td {
    border-bottom: 0;
}

.table th:first-child,
.table td:first-child {
    padding-left: 0;
}

.table th:last-child,
.table td:last-child {
    padding-right: 0;
}

.table .num {
    text-align: right;
    white-space: nowrap;
}

.table .plus {
    color: var(--ok);
}

.table .minus {
    color: var(--bad);
}

.table tr.clickable {
    cursor: pointer;
}

.table tr.clickable:hover td {
    background: rgba(218, 205, 184, 0.03);
}

.table a {
    transition: color 0.3s;
}

.table a:hover {
    color: var(--accent-soft);
}

.tx {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.tx img {
    border-radius: 6px;
}

.tx.plus > .ic {
    color: var(--ok);
}

.tx.minus > .ic {
    color: var(--bad);
}

.search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 0 5px 0 16px;
    border: 1px solid var(--line-hi);
    border-radius: 999px;
    background: rgba(20, 26, 31, 0.6);
}

.search > .ic {
    color: var(--muted);
}

.search input {
    border: 0;
    background: transparent;
    box-shadow: none !important;
    padding-left: 0;
}

.legend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 12.5px;
}

.legend i {
    width: 10px;
    height: 10px;
    margin-left: 8px;
    border-radius: 3px;
}

.lg-sales,
.bar.sales {
    background: var(--accent-soft);
}

.lg-topups,
.bar.topups {
    background: var(--text);
}

.bars {
    display: grid;
    grid-template-columns: repeat(14, minmax(0, 1fr));
    align-items: end;
    gap: 6px;
    height: 190px;
}

.bar-col {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.bar-pair {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    border-bottom: 1px solid var(--line);
}

.bar {
    width: 40%;
    max-width: 14px;
    min-height: 2px;
    border-radius: 4px 4px 0 0;
    opacity: 0.9;
}

.bar-day {
    font-size: 10.5px;
    color: var(--faint);
    white-space: nowrap;
}

.plan-edit {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(20, 26, 31, 0.45);
}

.plan-edit + .plan-edit {
    margin-top: 12px;
}

.plan-edit.new {
    border-style: dashed;
    background: transparent;
}

.plan-edit-foot {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.stock-list {
    list-style: none;
    margin-top: 18px;
    max-height: 340px;
    overflow-y: auto;
}

.stock-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-top: 1px solid var(--line);
    font-size: 13px;
}

.stock-list code {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-hi);
}

.stock-list li.sold code {
    color: var(--faint);
    text-decoration: line-through;
}

.stock-list a {
    color: var(--accent-soft);
}

.cat-edit {
    border: 1px solid var(--line);
    border-radius: 16px;
}

.cat-edit + .cat-edit {
    margin-top: 10px;
}

.cat-edit summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    list-style: none;
    cursor: pointer;
}

.cat-edit summary::-webkit-details-marker {
    display: none;
}

.cat-edit summary strong {
    font-weight: 500;
    color: var(--text-hi);
}

.cat-edit summary > .ic {
    color: var(--muted);
    transition: transform 0.35s var(--ease);
}

.cat-edit[open] summary > .ic {
    transform: rotate(180deg);
}

.cat-edit .form {
    padding: 4px 16px 18px;
}

.ic-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ic-pick input {
    position: absolute;
    opacity: 0;
}

.ic-pick span {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    color: var(--muted);
    cursor: pointer;
    transition: border-color 0.3s, color 0.3s;
}

.ic-pick input:checked + span {
    border-color: var(--accent-soft);
    color: var(--text-hi);
    background: var(--accent-tint);
}

.narrow-card {
    width: 100%;
    max-width: 480px;
    margin: 24px auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

@media (max-width: 1100px) {
    .checkout,
    .split,
    .split.wide-aside,
    .split.even {
        grid-template-columns: minmax(0, 1fr);
    }

    .summary {
        position: static;
    }
}

@media (max-width: 900px) {
    .side {
        transform: translateX(-100%);
        visibility: hidden;
    }

    body.side-open .side {
        transform: none;
        visibility: visible;
        box-shadow: 30px 0 60px -20px rgba(0, 0, 0, 0.7);
    }

    .side-scrim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 35;
        background: rgba(14, 18, 22, 0.6);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, visibility 0.3s;
    }

    body.side-open .side-scrim {
        opacity: 1;
        visibility: visible;
    }

    .main {
        margin-left: 0;
    }

    .top {
        gap: 8px;
        padding: 0 16px;
    }

    .icon-btn.top-menu {
        display: grid;
        margin-left: -8px;
    }

    .content {
        gap: 18px;
        padding: 20px 16px;
    }

    .foot {
        padding: 14px 16px 24px;
    }
}

@media (max-width: 640px) {
    .card {
        padding: 20px;
    }

    .table-wrap {
        margin: 0 -20px;
        padding: 0 20px;
    }

    .plan-grid,
    .methods,
    .field-row,
    .field-row.three {
        grid-template-columns: minmax(0, 1fr);
    }

    .plan {
        min-height: 0;
        padding: 16px 18px;
    }

    .top-title {
        font-size: 19px;
    }

    .top-title .th,
    .hide-sm {
        display: none;
    }

    .chip.balance {
        padding: 0 4px 0 11px;
        font-size: 13.5px;
    }

    .row {
        flex-wrap: wrap;
    }

    .row-main {
        flex-basis: calc(100% - 60px);
    }

    .row-when {
        margin-left: 58px;
    }

    .row-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .pgrid.tight {
        grid-template-columns: minmax(0, 1fr);
    }

    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stat {
        padding: 16px;
    }

    .stat strong {
        font-size: 25px;
    }

    .bank-number {
        font-size: 21px;
    }

    .bars {
        gap: 3px;
    }

    .bar-col:nth-child(odd) .bar-day {
        visibility: hidden;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
