@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/pjs-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/pjs-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --bg: #F4F6FA;
  --surface: #FFFFFF;
  --surface-2: #F7F8FB;
  --surface-3: #EEF1F6;
  --line: #E3E7EF;
  --line-strong: #CBD2DF;
  --text: #111729;
  --text-2: #4B5470;
  --text-3: #575F7A;
  --brand: #3555DE;
  --brand-ink: #2C47C7;
  --brand-soft: #ECF0FD;
  --on-accent: #FFFFFF;
  --accent: #3555DE;
  --accent-strong: #3555DE;
  --accent-strong-hover: #2A47C6;
  --accent-ink: #2C47C7;
  --accent-soft: #ECF0FD;
  --key-jatahlayar: #0E8F82;
  --key-jatahlayar-ink: #0A6E64;
  --key-jatahlayar-soft: #E2F4F1;
  --key-pcfun: #5A2DBF;
  --key-pcfun-ink: #5127AD;
  --key-pcfun-soft: #EFEAFB;
  --amber: #FFB648;
  --amber-soft: #FFF4E0;
  --amber-ink: #8A5600;
  --ok: #12805C;
  --ok-soft: #E4F5EE;
  --danger: #C42B2B;
  --danger-soft: #FDECEC;
  --focus: rgb(53 85 222 / .38);
  --scrim: rgb(12 16 28 / .45);
  --toast-bg: #111729;
  --toast-text: #F4F6FA;
  --shadow-1: 0 1px 2px rgb(16 24 40 / .05);
  --shadow-2: 0 1px 2px rgb(16 24 40 / .04), 0 6px 16px rgb(16 24 40 / .07);
  --shadow-3: 0 2px 6px rgb(16 24 40 / .06), 0 18px 40px rgb(16 24 40 / .16);
  --font: "Plus Jakarta Sans", system-ui, "Segoe UI", Roboto, sans-serif;
  --fs-xs: .75rem;
  --fs-sm: .8125rem;
  --fs-md: .9375rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.625rem;
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 32px;
  --s-8: 48px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --dur-1: 120ms;
  --dur-2: 200ms;
  --dur-3: 260ms;
  --sidebar-w: 256px;
  --backdrop-h: 300px;
  --tint: color-mix(in srgb, var(--accent) 18%, #F4F6FA);
  --glow: color-mix(in srgb, var(--accent) 30%, transparent);
  --motif: url("/assets/brand/motif.svg");
  --motif-ink: color-mix(in srgb, var(--accent) 9%, transparent);
  --tint-line: color-mix(in srgb, var(--accent) 16%, transparent);
  --content-w: 880px;
  --appbar-h: 56px;
  --tabbar-h: 64px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0E121B;
  --surface: #161B26;
  --surface-2: #1C2230;
  --surface-3: #232A3A;
  --line: #262E3E;
  --line-strong: #36405A;
  --text: #E9ECF3;
  --text-2: #A3ACBF;
  --text-3: #808AA0;
  --brand-ink: #9DB0FF;
  --brand-soft: #1C2547;
  --accent-strong-hover: #4664E6;
  --accent-ink: #9DB0FF;
  --accent-soft: #1C2547;
  --key-jatahlayar: #2BB3A4;
  --key-jatahlayar-ink: #5FD6C8;
  --key-jatahlayar-soft: #0F2E2B;
  --key-pcfun: #9672F0;
  --key-pcfun-ink: #BCA2FF;
  --key-pcfun-soft: #251A44;
  --amber-soft: #3A2C12;
  --amber-ink: #FFCF85;
  --ok: #5FD3A4;
  --ok-soft: #13301F;
  --danger: #FF8E86;
  --danger-soft: #3A1715;
  --focus: rgb(157 176 255 / .45);
  --scrim: rgb(0 0 0 / .6);
  --toast-bg: #E9ECF3;
  --tint: color-mix(in srgb, var(--accent) 30%, #080B12);
  --glow: color-mix(in srgb, var(--accent) 48%, transparent);
  --motif-ink: color-mix(in srgb, var(--accent-ink) 13%, transparent);
  --tint-line: color-mix(in srgb, var(--accent) 26%, transparent);
  --toast-text: #111729;
  --shadow-1: 0 0 0 1px rgb(255 255 255 / 0);
  --shadow-2: 0 1px 2px rgb(0 0 0 / .3), 0 6px 16px rgb(0 0 0 / .25);
  --shadow-3: 0 2px 6px rgb(0 0 0 / .35), 0 18px 40px rgb(0 0 0 / .5);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  position: relative;
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}

::selection { background: var(--accent-soft); color: var(--text); }

:root[data-theme="dark"] ::selection { background: #2E3B78; }

h1, h2, h3, p { margin: 0; }

h1, h2, h3 { text-wrap: balance; letter-spacing: -.015em; }

img, svg { display: block; }

a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }

button, input, select, textarea { font: inherit; color: inherit; }

button { cursor: pointer; }

ul, ol { margin: 0; padding: 0; list-style: none; }

fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }

[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip {
  position: fixed;
  left: var(--s-4);
  top: var(--s-3);
  z-index: 100;
  padding: var(--s-2) var(--s-4);
  background: var(--surface);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-2);
  transform: translateY(-200%);
}

.skip:focus { transform: none; }

.boot { padding: var(--s-8) var(--s-4); color: var(--text-3); text-align: center; }
.boot-mark { display: block; margin: 0 auto var(--s-3); }

body.is-booting [data-when="authed"],
body.is-guest [data-when="authed"] { display: none; }

body:not(.is-owner) [data-owner-only] { display: none; }

* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
  padding: var(--s-5) var(--s-4) var(--s-4);
  background: var(--surface);
  border-right: 1px solid var(--line);
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-1) var(--s-2);
  color: var(--text);
  text-decoration: none;
  border-radius: var(--r-md);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }

.brand-name { font-weight: 800; font-size: var(--fs-md); letter-spacing: -.01em; }

.brand-sub { font-size: var(--fs-xs); color: var(--text-3); font-weight: 600; }

.side-nav { display: flex; flex-direction: column; gap: 2px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 42px;
  padding: 0 var(--s-3);
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: var(--fs-md);
  font-weight: 600;
  text-decoration: none;
  transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}

.nav-link:hover { background: var(--surface-2); color: var(--text); }

.nav-link[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }

.nav-link[aria-current="page"] .icon { stroke-width: 2; }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--s-3); }

.whoami {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  padding-top: var(--s-3);
  border-top: 1px solid var(--line);
}

.whoami-link {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2);
  border-radius: var(--r-md);
  color: inherit;
  text-decoration: none;
}

.whoami-link:hover { background: var(--surface-2); }

.whoami-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }

.whoami-name, .whoami-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.whoami-name { font-weight: 700; font-size: var(--fs-sm); }

.whoami-sub { font-size: var(--fs-xs); color: var(--text-3); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--text-2);
  transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}

.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.icon-btn[aria-busy="true"] { opacity: .5; }

.avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
}

.avatar-md { width: 40px; height: 40px; font-size: var(--fs-sm); }

.avatar-lg { width: 52px; height: 52px; font-size: var(--fs-md); }

.appbar { display: none; }

.tabbar { display: none; }

.view {
  min-height: 100dvh;
  padding: var(--s-7) var(--s-7) var(--s-8) calc(var(--sidebar-w) + var(--s-7));
  outline: none;
}

.view > * { max-width: var(--content-w); margin-inline: auto; }

body.is-guest .view, body.is-booting .view { padding: 0; }

body.is-guest .view > * { max-width: none; }

.view.is-entering { animation: view-in var(--dur-2) var(--ease-out); }

@keyframes view-in {
  from { opacity: .4; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.page-head { display: flex; flex-direction: column; gap: var(--s-1); margin-bottom: var(--s-6); }

.page-title { font-size: var(--fs-xl); font-weight: 700; line-height: 1.25; outline: none; }

.page-title-lg { font-size: var(--fs-2xl); }

.page-sub { color: var(--text-2); font-size: var(--fs-md); max-width: 62ch; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  min-height: 44px;
  margin: calc(var(--s-3) * -1) 0 var(--s-1) calc(var(--s-2) * -1);
  padding: 0 var(--s-2);
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
}

.back-link:hover { color: var(--text); background: var(--surface-2); }

.section { margin-top: var(--s-7); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
  padding-inline: var(--s-1);
}

.section-title { font-size: var(--fs-base); font-weight: 700; line-height: 1.3; }

.section-meta { font-size: var(--fs-sm); color: var(--text-3); font-weight: 600; }

.section-note { margin: calc(var(--s-2) * -1) 0 var(--s-3); padding-inline: var(--s-1); color: var(--text-2); font-size: var(--fs-sm); max-width: 62ch; }

.link-sm { font-size: var(--fs-sm); font-weight: 600; text-decoration: none; }

.link-sm:hover { text-decoration: underline; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  padding: var(--s-5);
}

.card-row { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; }

.card-row > .row-main { flex: 1 1 220px; }

.list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.list:empty { display: none; }

.list-gap { margin-top: var(--s-3); }

.list > li + li, .list > .row + .row { border-top: 1px solid var(--line); }

.row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-4);
  min-height: 64px;
  padding: var(--s-3) var(--s-4);
}

.row-link { color: inherit; text-decoration: none; transition: background-color var(--dur-1) var(--ease-out); }

.row-link:hover { background: var(--surface-2); }

.row-main { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; gap: 1px; }

.row-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-2);
  font-size: var(--fs-md);
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.row-sub { color: var(--text-2); font-size: var(--fs-sm); line-height: 1.45; overflow-wrap: anywhere; }

.row-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-2);
}

.row-chevron { color: var(--text-3); width: 18px; height: 18px; }

.row-value { color: var(--text-2); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }

.row-actions { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; }

.row-extra { flex-basis: 100%; }

.row-extra:empty { display: none; }

.row > form { flex-basis: 100%; }

.app-icon { flex: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  color: var(--text-2);
  font-size: var(--fs-xs);
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0;
}

.chip.is-accent { background: var(--accent-soft); color: var(--accent-ink); }

.chip.is-ok { background: var(--ok-soft); color: var(--ok); }

.chip.is-amber { background: var(--amber-soft); color: var(--amber-ink); }

.chip .icon { width: 14px; height: 14px; stroke-width: 2.25; }

.keys { display: flex; flex-wrap: wrap; gap: var(--s-2); }

.keytag {
  --key: var(--accent);
  --key-ink: var(--accent-ink);
  --key-soft: var(--accent-soft);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 11px 0 8px;
  border-radius: var(--r-pill);
  background: var(--key-soft);
  color: var(--key-ink);
  font-size: var(--fs-xs);
  font-weight: 700;
  white-space: nowrap;
}

.keytag::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid var(--key);
  background: var(--surface);
}

.keytag[data-app="jatahlayar"] { --key: var(--key-jatahlayar); --key-ink: var(--key-jatahlayar-ink); --key-soft: var(--key-jatahlayar-soft); }

.keytag[data-app="pcfun"] { --key: var(--key-pcfun); --key-ink: var(--key-pcfun-ink); --key-soft: var(--key-pcfun-soft); }

.keytag.is-none { --key: var(--text-3); --key-ink: var(--text-2); --key-soft: var(--surface-3); }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 44px;
  padding: 0 var(--s-4);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--text);
  font-size: var(--fs-md);
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}

.btn:active:not(:disabled) { transform: scale(.98); }

.btn:disabled { cursor: not-allowed; opacity: .55; }

.btn .icon { width: 18px; height: 18px; }

.btn-block { width: 100%; }

.btn-sm { min-height: 36px; padding: 0 var(--s-3); font-size: var(--fs-sm); border-radius: 10px; }

.btn-primary { background: var(--accent-strong); color: var(--on-accent); box-shadow: 0 1px 2px rgb(16 24 40 / .12); }

.btn-primary:hover:not(:disabled) { background: var(--accent-strong-hover); box-shadow: var(--shadow-2); }

.btn-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--text); }

.btn-secondary:hover:not(:disabled) { background: var(--surface-2); }

.btn-soft { background: var(--accent-soft); color: var(--accent-ink); }

.btn-soft:hover:not(:disabled) { border-color: var(--accent); }

.btn-ghost { color: var(--accent-ink); }

.btn-ghost:hover:not(:disabled) { background: var(--surface-2); }

.btn-danger { background: var(--danger); color: #FFFFFF; }

:root[data-theme="dark"] .btn-danger { color: #2A0E0C; }

.btn-danger:hover:not(:disabled) { filter: brightness(.94); }

.btn-danger-outline { background: var(--surface); border-color: var(--line-strong); color: var(--danger); }

.btn-danger-outline:hover:not(:disabled) { background: var(--danger-soft); border-color: var(--danger); }

.btn[aria-busy="true"] { color: transparent; }

.btn[aria-busy="true"] > * { visibility: hidden; }

.btn[aria-busy="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-color: var(--text-2);
  border-right-color: transparent;
  animation: spin .7s linear infinite;
}

.btn-primary[aria-busy="true"]::after, .btn-danger[aria-busy="true"]::after { border-color: var(--on-accent); border-right-color: transparent; }

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

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }

.stack { display: flex; flex-direction: column; gap: var(--s-4); }

.stack > .btn-row { margin-top: 0; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.label { font-size: var(--fs-sm); font-weight: 650; color: var(--text); }

.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-2); }

.hint { font-size: var(--fs-sm); color: var(--text-3); }

.field-error { font-size: var(--fs-sm); color: var(--danger); font-weight: 600; }

.field-error:empty { display: none; }

.input {
  width: 100%;
  min-height: 48px;
  padding: 0 var(--s-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--text);
  font-size: max(16px, 1rem);
  transition: border-color var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out), background-color var(--dur-1) var(--ease-out);
}

.input::placeholder { color: var(--text-3); }

.input:hover { border-color: var(--text-3); }

.input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--focus); }

.input[aria-invalid="true"] { border-color: var(--danger); }

select.input {
  appearance: none;
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.input-code { font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

input[type="checkbox"], input[type="radio"] {
  width: 20px;
  height: 20px;
  margin: 0;
  flex: none;
  accent-color: var(--accent-strong);
}

.check { display: flex; align-items: flex-start; gap: var(--s-3); font-size: var(--fs-sm); color: var(--text-2); line-height: 1.5; cursor: pointer; }

.check input { margin-top: 1px; }

input.switch {
  appearance: none;
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--line-strong);
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease-out);
}

input.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-1);
  transition: transform var(--dur-1) var(--ease-out);
}

input.switch:checked { background: var(--accent-strong); }

input.switch:checked::after { transform: translateX(18px); }

input.switch:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); }

input.switch:disabled { opacity: .5; cursor: not-allowed; }

label.row { cursor: pointer; }

.choices { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; margin-top: var(--s-2); }

.choice {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 56px;
  padding: var(--s-2) var(--s-4);
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease-out);
}

.choice + .choice { border-top: 1px solid var(--line); }

.choice:hover { background: var(--surface-2); }

.choice:has(input:checked) { background: var(--accent-soft); }

.choice:has(input:disabled) { cursor: default; opacity: .6; }

.choice-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 8px; background: var(--surface-3); color: var(--text-2); }

.choice-mark .icon { width: 16px; height: 16px; }

.choice-text { display: flex; flex-direction: column; min-width: 0; }

.choice-title { font-size: var(--fs-md); font-weight: 650; }

.choice-desc { font-size: var(--fs-sm); color: var(--text-2); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s-4); }

.notice { font-size: var(--fs-sm); color: var(--danger); font-weight: 600; }

.notice:empty { display: none; }

.notice.is-ok { color: var(--ok); }

.notice.is-info { color: var(--text-2); font-weight: 500; }

.list + .notice, .section > .notice { margin-top: var(--s-3); padding-inline: var(--s-1); }

.callout {
  display: flex;
  align-items: center;
  gap: var(--s-3) var(--s-4);
  flex-wrap: wrap;
  margin-top: var(--s-4);
  padding: var(--s-4);
  border-radius: var(--r-lg);
  background: var(--amber-soft);
  color: var(--text);
}

.callout-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--surface); color: var(--amber-ink); }

.callout-text { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-sm); color: var(--text-2); }

.callout-title { font-size: var(--fs-md); font-weight: 700; color: var(--text); }

.account { display: flex; flex-direction: column; gap: var(--s-4); }

.account-top { display: flex; align-items: center; gap: var(--s-4); }

.account-id { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.account-name { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -.01em; line-height: 1.3; overflow-wrap: anywhere; }

.account-sub { font-size: var(--fs-sm); color: var(--text-2); overflow-wrap: anywhere; }

.account-keys { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2) var(--s-3); padding-top: var(--s-4); border-top: 1px solid var(--line); }

.account-keys-label { font-size: var(--fs-sm); font-weight: 650; color: var(--text-2); margin-right: var(--s-1); }

.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s-4); }

.app-card { display: flex; flex-direction: column; gap: var(--s-4); }

.app-card-head { display: flex; align-items: center; gap: var(--s-3); }

.app-card-name { font-size: var(--fs-lg); font-weight: 700; line-height: 1.25; }

.app-card-desc { color: var(--text-2); font-size: var(--fs-md); flex: 1; }

.app-card-foot { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); padding-top: var(--s-4); border-top: 1px solid var(--line); }

.app-card-foot .btn-primary { margin-left: auto; }

.soon { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; border-style: dashed; box-shadow: none; background: transparent; }

.soon-hero { display: flex; align-items: flex-start; gap: var(--s-4); flex-wrap: wrap; }

.soon-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-ink); }

.soon-text { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: var(--s-1); color: var(--text-2); font-size: var(--fs-md); }

.soon-title { font-size: var(--fs-base); font-weight: 700; color: var(--text); }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s-2); padding: var(--s-7) var(--s-5); }

.empty-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); margin-bottom: var(--s-1); }

.empty-icon .icon { width: 22px; height: 22px; }

.empty-title { font-size: var(--fs-base); font-weight: 700; }

.empty-text { color: var(--text-2); font-size: var(--fs-sm); max-width: 40ch; }

.empty .btn { margin-top: var(--s-3); }

.empty-page { margin-top: var(--s-8); }

.danger-zone { margin-top: var(--s-8); }

.invite-result { display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-4); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }

.invite-code { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: .14em; line-height: 1.2; overflow-wrap: anywhere; }

.invite-link { font-size: var(--fs-sm); color: var(--text-2); overflow-wrap: anywhere; }

.join { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--s-4); align-items: start; }

.join .callout { margin-top: 0; align-items: flex-start; }

.member-keys { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

.sheet-member { display: flex; align-items: center; gap: var(--s-3); padding-bottom: var(--s-4); margin-bottom: var(--s-2); border-bottom: 1px solid var(--line); }

.action-list { display: flex; flex-direction: column; }

.action {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  width: 100%;
  min-height: 56px;
  padding: var(--s-2) var(--s-2);
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--text);
  font-size: var(--fs-md);
  font-weight: 650;
  text-align: left;
}

.action:hover { background: var(--surface-2); }

.action .row-sub { font-weight: 500; }

.action.is-danger { color: var(--danger); }

.action.is-danger .row-icon { background: var(--danger-soft); color: var(--danger); }

.confirm { display: flex; flex-direction: column; gap: var(--s-3); color: var(--text-2); font-size: var(--fs-md); }

.confirm-detail { font-size: var(--fs-sm); }

.sheet-actions { display: flex; justify-content: flex-end; gap: var(--s-2); margin-top: var(--s-5); }

.seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 3px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 var(--s-2);
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 650;
  transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
}

.seg-btn .icon { width: 16px; height: 16px; }

.seg-btn:hover { color: var(--text); }

.seg-btn[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgb(16 24 40 / .1), 0 0 0 1px var(--line); }

.toast {
  position: fixed;
  right: var(--s-6);
  bottom: var(--s-6);
  z-index: 60;
  max-width: min(420px, calc(100vw - 32px));
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  background: var(--toast-bg);
  color: var(--toast-text);
  font-size: var(--fs-md);
  font-weight: 600;
  box-shadow: var(--shadow-3);
  animation: toast-in var(--dur-2) var(--ease-out);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.sheet {
  width: min(440px, calc(100vw - 32px));
  max-height: min(88dvh, 720px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-3);
  overflow: auto;
  overscroll-behavior: contain;
}

.sheet[open] { animation: sheet-in var(--dur-3) var(--ease-out); }

.sheet::backdrop { background: var(--scrim); opacity: calc(1 - var(--sheet-drag, 0)); animation: fade-in var(--dur-3) var(--ease-out); }

@keyframes sheet-in {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: none; }
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.sheet-grip { display: none; }

.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-4) var(--s-3) 0 var(--s-5); }

.sheet-title { font-size: var(--fs-lg); font-weight: 700; line-height: 1.3; }

.sheet-body { padding: var(--s-3) var(--s-5) var(--s-5); }

.sk { display: block; border-radius: var(--r-sm); background: var(--surface-3); animation: pulse 1.4s ease-in-out infinite; }

.sk-dot { width: 40px; height: 40px; border-radius: 50%; flex: none; }

.sk-line { height: 14px; flex: 1; max-width: 260px; }

@keyframes pulse { 50% { opacity: .5; } }

.or { display: flex; align-items: center; gap: var(--s-3); margin: var(--s-5) 0; color: var(--text-3); font-size: var(--fs-sm); }

.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.auth {
  display: grid;
  grid-template-columns: minmax(380px, 5fr) 7fr;
  min-height: 100dvh;
}

.auth-art {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--s-8);
  padding: var(--s-7) var(--s-8);
  border-right: 1px solid var(--tint-line);
  background: radial-gradient(80% 60% at 15% 0%, var(--glow), transparent 70%), linear-gradient(170deg, var(--tint) 0%, color-mix(in srgb, var(--tint) 45%, var(--bg)) 100%);
  color: var(--text);
  overflow: hidden;
}

.auth-art::before {
  content: "";
  position: absolute;
  top: -12%;
  right: -28%;
  width: 115%;
  aspect-ratio: 1;
  pointer-events: none;
  background: var(--motif-ink);
  -webkit-mask: var(--motif) center / contain no-repeat;
  mask: var(--motif) center / contain no-repeat;
  animation: motif-drift 40s ease-in-out infinite alternate;
}

@keyframes motif-drift {
  from { transform: translate3d(0, 0, 0) rotate(0deg); }
  to { transform: translate3d(-24px, 18px, 0) rotate(-2deg); }
}

.auth-art > * { position: relative; }

.auth-art-brand { display: flex; align-items: center; gap: var(--s-3); font-weight: 800; font-size: var(--fs-lg); }


.auth-art-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: var(--s-3); max-width: 400px; }

.auth-art-title { font-size: var(--fs-2xl); font-weight: 750; line-height: 1.25; letter-spacing: -.02em; text-wrap: balance; }

.auth-art-text { color: var(--text-2); font-size: var(--fs-md); }

.ring { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-5); }

.ring-item {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4) var(--s-3) var(--s-3);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}

.ring-item img { border-radius: 9px; }

.ring-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }

.ring-name { font-weight: 700; font-size: var(--fs-md); }

.ring-sub { font-size: var(--fs-sm); color: var(--text-2); }

.ring-hole { margin-left: auto; width: 12px; height: 12px; flex: none; border-radius: 50%; border: 2px solid var(--accent); }

.ring-item.is-soon { background: transparent; border-style: dashed; border-color: var(--line-strong); box-shadow: none; }

.ring-soon-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; border: 1px dashed var(--line-strong); color: var(--text-2); }

.auth-main { display: flex; flex-direction: column; min-width: 0; padding: var(--s-5) var(--s-7) var(--s-7); }

.auth-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 44px; }

.auth-logo { display: none; align-items: center; gap: var(--s-2); color: var(--text); text-decoration: none; font-weight: 800; font-size: var(--fs-md); }

.auth-top .icon-btn { margin-left: auto; }

.auth-body { width: 100%; max-width: 400px; margin: auto; padding: var(--s-7) 0; }

.auth-title { font-size: var(--fs-2xl); font-weight: 750; line-height: 1.2; outline: none; }

.auth-lead { margin: var(--s-2) 0 var(--s-6); color: var(--text-2); font-size: var(--fs-md); }

.stack > .auth-lead { margin: 0; }

.auth-switch { margin-top: var(--s-6); text-align: center; color: var(--text-2); font-size: var(--fs-md); }

.auth-switch a { font-weight: 650; }

.auth-body > .notice { margin-top: var(--s-2); }

@media (max-width: 1100px) {
  :root { --sidebar-w: 232px; }
  .view { padding-left: calc(var(--sidebar-w) + var(--s-6)); padding-right: var(--s-6); }
  .auth { grid-template-columns: minmax(320px, 4fr) 6fr; }
  .auth-art { padding: var(--s-6); }
}

@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-logo { display: inline-flex; }
}

@media (max-width: 768px) {
  html { font-size: 93.75%; }

  .sidebar { display: none; }

  .appbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-2);
    height: calc(var(--appbar-h) + var(--safe-t));
    padding: var(--safe-t) calc(var(--s-2) + var(--safe-r)) 0 calc(var(--s-3) + var(--safe-l));
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    border-bottom: 1px solid var(--line);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    backdrop-filter: saturate(1.4) blur(12px);
  }

  .appbar .brand { padding: var(--s-1); }

  .appbar-actions { display: flex; align-items: center; gap: var(--s-1); }

  .avatar-link { width: 44px; height: 44px; background: transparent; position: relative; }

  .avatar-link::before {
    content: "";
    position: absolute;
    inset: 6px;
    z-index: -1;
    border-radius: 50%;
    background: var(--brand-soft);
  }

  .avatar-link { isolation: isolate; }

  .tabbar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 30;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    height: calc(var(--tabbar-h) + var(--safe-b));
    padding: 0 var(--safe-r) var(--safe-b) var(--safe-l);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    border-top: 1px solid var(--line);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    backdrop-filter: saturate(1.4) blur(12px);
  }

  .tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    color: var(--text-2);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
  }

  .tab-pill {
    display: grid;
    place-items: center;
    width: 52px;
    height: 30px;
    border-radius: var(--r-pill);
    transition: background-color var(--dur-2) var(--ease-out);
  }

  .tab .icon { width: 22px; height: 22px; }

  .tab-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }

  .tab[aria-current="page"] { color: var(--accent-ink); font-weight: 700; }

  .tab[aria-current="page"] .tab-pill { background: var(--accent-soft); }

  .tab[aria-current="page"] .icon { stroke-width: 2.1; }

  .view {
    min-height: calc(100dvh - var(--appbar-h) - var(--safe-t));
    padding: var(--s-5) calc(var(--s-4) + var(--safe-r)) calc(var(--tabbar-h) + var(--safe-b) + var(--s-7)) calc(var(--s-4) + var(--safe-l));
  }

  .page-head { margin-bottom: var(--s-5); }

  .section { margin-top: var(--s-6); }

  .card { padding: var(--s-4); }

  .row { padding: var(--s-3) var(--s-4); min-height: 60px; }

  .row-actions { margin-left: 0; }

  .row:has(> .row-actions) .row-main { flex-basis: calc(100% - 56px); }

  .row-link { flex-wrap: nowrap; }

  .row-link .row-main { flex-basis: auto; }

  .app-row { flex-wrap: nowrap; }

  .app-row .row-main { flex-basis: auto; }

  .app-row .chip { display: none; }

  .app-grid { grid-template-columns: 1fr; gap: var(--s-3); }

  .join { grid-template-columns: 1fr; }

  .toast {
    left: var(--s-4);
    right: var(--s-4);
    bottom: calc(var(--tabbar-h) + var(--safe-b) + var(--s-3));
    max-width: none;
  }

  body.is-guest .toast { bottom: calc(var(--safe-b) + var(--s-4)); }

  .sheet {
    width: 100%;
    max-width: 100%;
    max-height: 88dvh;
    margin: auto 0 0;
    border: 0;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    padding-bottom: var(--safe-b);
  }

  .sheet[open] { animation: sheet-up var(--dur-3) var(--ease-out); }

  @keyframes sheet-up {
    from { transform: translateY(100%); }
    to { transform: none; }
  }

  .sheet-grip { display: block; width: 36px; height: 4px; margin: var(--s-2) auto 0; border-radius: var(--r-pill); background: var(--line-strong); }

  .sheet-head { padding-top: var(--s-2); padding-left: var(--s-4); }

  .sheet-body { padding: var(--s-2) var(--s-4) var(--s-5); }

  .sheet-actions { flex-direction: column-reverse; }

  .sheet-actions .btn { width: 100%; }

  .auth-main { padding: calc(var(--s-3) + var(--safe-t)) calc(var(--s-4) + var(--safe-r)) calc(var(--s-6) + var(--safe-b)) calc(var(--s-4) + var(--safe-l)); }

  .auth-body { margin: 0 auto; padding: var(--s-6) 0 0; }

  .auth-title { font-size: var(--fs-xl); }

  .auth-lead { margin-bottom: var(--s-5); }

  .danger-zone { margin-top: var(--s-7); }

  .card-row .btn { width: 100%; }

  .card-row .seg { width: 100%; }
}

@media (max-width: 380px) {
  .account-top { flex-wrap: wrap; }
  .seg-btn { padding: 0 4px; }
}

@media (hover: none) {
  .row-link:hover, .nav-link:hover, .action:hover, .choice:hover, .icon-btn:hover { background: transparent; }
  .choice:has(input:checked) { background: var(--accent-soft); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
  }
}

.verify-form { display: flex; gap: var(--s-2); flex-basis: 100%; }

.verify-form .input { flex: 1; min-width: 0; }

.pw-form { padding: var(--s-4); }

.sheet-body > .section-note { margin: 0 0 var(--s-4); padding: 0; }

.sheet-body > .seg .seg-btn { min-height: 44px; }

.row.is-skeleton { flex-wrap: nowrap; }

@media (max-width: 768px) {
  .row > .row-actions, .row > .chip { margin-left: 56px; }
  .row > .row-main + .chip + .row-actions { margin-left: 0; }
  .app-row > .btn, .row-link > .chip, .row-link > .row-value { margin-left: 0; }
  .callout > .btn { margin-left: 52px; }
  .card-row > [data-theme-seg] { flex: 1 1 100%; }
}

.seg-btn { min-width: 0; }

.sidebar .seg-btn { gap: 4px; padding: 0 4px; font-size: var(--fs-xs); }

.sidebar .seg-btn .icon { width: 14px; height: 14px; }

body:not(.is-booting) {
  background:
    radial-gradient(70% 100% at 92% 0%, var(--glow), transparent 70%) top / 100% var(--backdrop-h) no-repeat,
    linear-gradient(180deg, var(--tint) 0%, color-mix(in srgb, var(--tint) 55%, var(--bg)) 55%, var(--bg) 100%) top / 100% var(--backdrop-h) no-repeat,
    var(--bg);
}

body:not(.is-booting)::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: var(--backdrop-h);
  z-index: 0;
  pointer-events: none;
  background: var(--motif-ink);
  -webkit-mask: var(--motif) right -90px top -150px / 560px 560px no-repeat, linear-gradient(180deg, #000 0%, transparent 85%);
  -webkit-mask-composite: source-in;
  mask: var(--motif) right -90px top -150px / 560px 560px no-repeat, linear-gradient(180deg, #000 0%, transparent 85%);
  mask-composite: intersect;
}

.view { position: relative; z-index: 1; }

@media (min-width: 769px) {
  :root { --backdrop-h: 360px; }
}

@media (min-width: 861px) {
  body.is-guest { background: var(--bg); }
  body.is-guest::before { display: none; }
}

@media (max-width: 768px) {
  .appbar {
    background: color-mix(in srgb, var(--tint) 88%, transparent);
    border-bottom-color: var(--tint-line);
  }
}

.empty { position: relative; overflow: hidden; isolation: isolate; }

.empty::after {
  content: "";
  position: absolute;
  right: -48px;
  bottom: -56px;
  width: 180px;
  height: 180px;
  z-index: -1;
  pointer-events: none;
  background: var(--motif-ink);
  -webkit-mask: var(--motif) center / contain no-repeat;
  mask: var(--motif) center / contain no-repeat;
}

@media (max-width: 768px) {
  body:not(.is-booting)::before {
    -webkit-mask-size: 340px 340px, auto;
    mask-size: 340px 340px, auto;
    -webkit-mask-position: right -90px top -70px, 0 0;
    mask-position: right -90px top -70px, 0 0;
  }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

body:not(.is-admin) [data-admin-only] { display: none; }

.section-first { margin-top: 0; }

.chip.is-danger { background: var(--danger-soft); color: var(--danger); }

.money { font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.01em; }

.money-code { background: var(--amber-soft); color: var(--amber-ink); border-radius: 4px; padding: 0 2px; }

.pay-total { display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-4); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }

.pay-total .money { font-size: var(--fs-2xl); line-height: 1.2; }

.pay-total-label { font-size: var(--fs-sm); color: var(--text-2); font-weight: 600; }

.pay-total-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }

.pay-note { font-size: var(--fs-sm); color: var(--text-2); }

.pay-label { margin: var(--s-4) 0 var(--s-2); }

.pay-accounts { box-shadow: none; }

.pay-accounts .row { flex-wrap: nowrap; min-height: 56px; }

.pay-accounts .row-actions { margin-left: auto; }

.pay-deadline { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-4); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--amber-soft); color: var(--amber-ink); }

.pay-deadline .row-title { color: var(--text); }

.countdown { font-size: var(--fs-sm); font-weight: 650; font-variant-numeric: tabular-nums; }

.pay-text { margin-top: var(--s-3); font-size: var(--fs-sm); color: var(--text-2); }

.pay-amount { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

.summary { display: grid; grid-template-columns: auto 1fr; gap: 6px var(--s-4); margin: 0; font-size: var(--fs-sm); }

.summary:empty { display: none; }

.summary dt { color: var(--text-2); }

.summary dd { margin: 0; text-align: right; font-weight: 600; overflow-wrap: anywhere; }

.summary .summary-total { padding-top: 6px; border-top: 1px solid var(--line); font-size: var(--fs-md); font-weight: 750; color: var(--text); }

.summary-note { grid-column: 1 / -1; color: var(--text-3); font-size: var(--fs-xs); }

.bill-title { display: flex; align-items: center; gap: var(--s-3); }

.bill-title .app-icon { flex: none; }

.bill-status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }

.bill-tone-amber { color: var(--amber-ink); font-weight: 600; }

.bill-tone-ok { color: var(--ok); font-weight: 600; }

.bill-tone-accent { color: var(--accent-ink); font-weight: 600; }

.bill-row .bill-act { flex: none; }

.bill-main { display: flex; flex-direction: column; gap: var(--s-4); }

.bill-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); padding: var(--s-2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }

.bill-step { display: flex; align-items: center; gap: var(--s-2); min-width: 0; padding: var(--s-2); border-radius: var(--r-md); color: var(--text-2); font-size: var(--fs-sm); font-weight: 600; }

.bill-step.is-current { background: var(--accent-soft); color: var(--accent-ink); }

.bill-step.is-done { color: var(--text); }

.bill-step-num { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); font-variant-numeric: tabular-nums; }

.bill-step.is-current .bill-step-num { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }

.bill-step.is-done .bill-step-num { background: var(--ok-soft); border-color: transparent; color: var(--ok); }

.bill-step-num .icon { width: 16px; height: 16px; stroke-width: 2.25; }

.bill-step-name { min-width: 0; line-height: 1.3; }

.bill-form { gap: var(--s-3); }

.bill-form > .section-title { padding-inline: var(--s-1); outline: none; }

.bill-renew, .bill-next { display: flex; align-items: flex-start; gap: var(--s-2); font-size: var(--fs-sm); line-height: 1.5; }

.bill-renew { padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--accent-soft); color: var(--text); }

.bill-renew .icon { color: var(--accent-ink); }

.bill-next { padding-inline: var(--s-1); color: var(--text-2); }

.bill-renew .icon, .bill-next .icon { width: 18px; height: 18px; flex: none; margin-top: 1px; }

.bill-trial { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-3); padding: var(--s-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }

.bill-trial > .icon { width: 22px; height: 22px; flex: none; color: var(--accent-ink); }

.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s-3); }

.plan-card { position: relative; display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); cursor: pointer; transition: border-color var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out); }

.plan-card:hover { border-color: var(--line-strong); }

.plan-card:has(.plan-radio:checked) { border-color: var(--accent-strong); box-shadow: 0 0 0 1px var(--accent-strong), var(--shadow-2); }

.plan-card:has(.plan-radio:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

.plan-radio { position: absolute; top: var(--s-4); right: var(--s-4); width: 20px; height: 20px; margin: 0; accent-color: var(--accent-strong); }

.plan-radio:focus-visible { outline: none; }

.plan-top { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); padding-right: 28px; }

.plan-name { font-size: var(--fs-md); font-weight: 700; }


.plan-price { font-size: var(--fs-2xl); line-height: 1.15; }

.plan-per { color: var(--text-2); font-size: var(--fs-sm); font-weight: 600; }



.plan-save { color: var(--ok); font-weight: 700; }

.plan-bonus { color: var(--ok); font-size: var(--fs-sm); font-weight: 700; }


.plan-desc { color: var(--text-2); font-size: var(--fs-sm); line-height: 1.5; }

.plan-points { display: flex; flex-direction: column; gap: 6px; margin: var(--s-1) 0 0; padding: var(--s-3) 0 0; list-style: none; border-top: 1px solid var(--line); font-size: var(--fs-sm); }

.plan-points li { display: flex; align-items: flex-start; gap: var(--s-2); line-height: 1.45; }

.plan-points .icon { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--ok); stroke-width: 2.25; }

.bill-pay-box { display: flex; flex-direction: column; gap: var(--s-3); }

.bill-discount, .bill-bonus { color: var(--ok); }

.bill-pay-plan { margin: calc(var(--s-2) * -1) 0 0; color: var(--text-2); font-size: var(--fs-sm); }

.link-btn { align-self: flex-start; min-height: 32px; padding: 0; border: 0; background: none; color: var(--accent-ink); font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }

.link-btn:hover { text-decoration: underline; }

.bill-submit { align-self: flex-start; }

.bill-fine { color: var(--text-3); font-size: var(--fs-xs); line-height: 1.5; }

.bill-pending { display: flex; flex-direction: column; }

.bill-pending > .section-title { margin-bottom: var(--s-3); outline: none; }

.bill-pay-actions { margin-top: var(--s-4); }

.bill-error { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-lg); background: var(--danger-soft); color: var(--danger); }

.bill-error > .icon { width: 20px; height: 20px; flex: none; }

.bill-error-text { flex: 1 1 200px; min-width: 0; color: var(--text); font-size: var(--fs-sm); }

.section > .bill-error { margin-top: var(--s-3); }

.bill-back { margin-top: var(--s-6); text-align: center; }

.bill-back .link-sm { display: inline-flex; align-items: center; min-height: 44px; }

.sk-card { height: 220px; border-radius: var(--r-lg); }

.sk-steps { height: 62px; border-radius: var(--r-lg); }

@media (max-width: 768px) {
  .bill-step { flex-direction: column; justify-content: flex-start; gap: var(--s-1); padding: var(--s-2) var(--s-1); text-align: center; font-size: var(--fs-xs); }
  .plan-card { padding: var(--s-4); }
  .bill-submit { align-self: stretch; }
  .link-btn { min-height: 44px; }
  .bill-trial > .btn { margin-left: 34px; }
  .bill-pay-actions .btn { width: 100%; }
}

.inline-field { display: flex; gap: var(--s-2); }

.inline-field .input { flex: 1; min-width: 0; }

.textarea { min-height: 88px; padding: var(--s-3) var(--s-4); resize: vertical; line-height: 1.5; }

body.is-wide .view > * { max-width: 1180px; }






.admin-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; margin-bottom: var(--s-3); padding-inline: var(--s-1); }

.admin-head .btn-row { margin-top: 0; }

.admin-body > .section-note { margin: 0 0 var(--s-3); }

.toolbar { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-3); }

.toolbar .input { width: auto; flex: 1 1 180px; min-height: 44px; background-color: var(--surface); }

.gate { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); max-width: 520px; }

.gate .stack { width: 100%; }

.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow-x: auto; }

.dtable { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }

.dtable th { padding: var(--s-3) var(--s-4); background: var(--surface-2); color: var(--text-2); font-size: var(--fs-xs); font-weight: 700; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }

.dtable td { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); vertical-align: middle; }

.dtable tbody tr:last-child td { border-bottom: 0; }

.dtable tbody tr:hover { background: var(--surface-2); }

.dtable .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.dtable .wrap { min-width: 180px; max-width: 320px; }

.dtable .act { text-align: right; white-space: nowrap; width: 1%; }

.cell-stack { display: inline-flex; flex-direction: column; gap: 2px; min-width: 0; }

.num .cell-stack { align-items: flex-end; }

.cell-main { font-weight: 650; color: var(--text); }

.cell-sub { font-size: var(--fs-xs); color: var(--text-2); overflow-wrap: anywhere; }

.cell-app { display: inline-flex; align-items: center; gap: var(--s-3); }

.muted { color: var(--text-3); }

.btn-row-tight { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dtable .act .btn-row-tight { flex-wrap: nowrap; }

.code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: var(--fs-xs); background: var(--surface-3); border-radius: 6px; padding: 2px 6px; overflow-wrap: anywhere; }
.chip-row { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.chip-row:empty { display: none; }
.release-sig { display: flex; flex-direction: column; gap: var(--s-2); }
.file-input { font: inherit; font-size: var(--fs-sm); color: var(--text-2); max-width: 100%; }
.upload-status { display: flex; flex-direction: column; gap: var(--s-1); }
.upload-status[hidden] { display: none; }
.upload-progress { width: 100%; height: 8px; accent-color: var(--accent); }

.code.meta { display: inline-block; max-width: 100%; white-space: normal; }
.log-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "seg live" "search filter"; align-items: center; gap: var(--s-2) var(--s-3); }
.log-seg { grid-area: seg; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 360px; }
.check.log-live { grid-area: live; display: inline-flex; align-items: center; gap: var(--s-2); margin: 0; }
.check.log-live > span { line-height: 1; }
.log-bar > .input { grid-area: search; min-width: 0; min-height: 44px; background-color: var(--surface); }
.log-filter-btn { grid-area: filter; min-height: 44px; }
.log-col-time { white-space: nowrap; }
@media (min-width: 900px) {
  .log-bar { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr) auto auto; grid-template-areas: "seg search filter live"; }
}
.log-filter-btn.is-active { border-color: var(--accent); color: var(--accent-ink); }
.log-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.log-chips[hidden] { display: none; }
.log-chip { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 8px 0 12px; border: 0; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-ink); font: inherit; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; }
.log-chip .icon { width: 14px; height: 14px; }
.log-info { margin: 0; color: var(--text-2); font-size: var(--fs-xs); }
.log-info:empty { display: none; }
.log-list { margin: 0; padding: 0; list-style: none; overflow: hidden; }
.log-item { display: flex; flex-direction: column; gap: 6px; padding: var(--s-3) var(--s-4); }
.log-item + .log-item { border-top: 1px solid var(--line); }
.log-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; margin: 0; color: var(--text-2); font-size: var(--fs-xs); }
.log-time { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.log-email { color: var(--text-3); }
.log-text { margin: 0; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: var(--fs-xs); line-height: 1.55; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.log-crash-msg { font-size: var(--fs-sm); font-weight: 600; overflow-wrap: anywhere; }
.log-crash summary { cursor: pointer; }
.log-stack { max-height: 320px; margin-top: var(--s-2); padding: var(--s-2) var(--s-3); overflow: auto; border-radius: var(--r-sm); background: var(--surface-2); }
.log-dates { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }

.pager { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-3); flex-wrap: wrap; }

.pager-info { font-size: var(--fs-sm); color: var(--text-2); }

.kv { display: flex; flex-direction: column; gap: var(--s-2); align-items: flex-start; }

.kv-rows { display: flex; flex-direction: column; gap: var(--s-2); width: 100%; }

.kv-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) 44px; gap: var(--s-2); align-items: center; }

.kv-row .input { min-height: 44px; padding: 0 var(--s-3); }

.kv-row select.input { padding-right: 32px; }

.decide { display: flex; flex-direction: column; gap: var(--s-4); }

.detail-block { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-4); }

.mini-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-md); }

.mini-list > li { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-2) var(--s-3); }

.mini-list > li + li { border-top: 1px solid var(--line); }

.sheet-actions-split { justify-content: space-between; }

.sheet .summary { margin-top: var(--s-1); }

@media (min-width: 769px) {
  .sheet:has(.kv), .sheet:has(.decide), .sheet:has(.detail-block) { width: min(560px, calc(100vw - 32px)); }
}

@media (max-width: 768px) {
  .sub-row > .row-actions, .pay-row > .row-actions { margin-left: 56px; }
  .pay-row .pay-amount { flex-direction: row; align-items: center; margin-left: 56px; }
  .toolbar .input { flex: 1 1 100%; }
  .table-wrap { background: transparent; border: 0; box-shadow: none; overflow: visible; }
  .dtable, .dtable tbody, .dtable tr, .dtable td { display: block; width: 100%; }
  .dtable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .dtable tr { margin-bottom: var(--s-3); padding: var(--s-2) 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
  .dtable tbody tr:hover { background: var(--surface); }
  .dtable td { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); padding: 6px var(--s-4); border: 0; text-align: right; max-width: none; }
  .dtable td::before { content: attr(data-label); flex: none; color: var(--text-2); font-size: var(--fs-xs); font-weight: 650; text-align: left; padding-top: 2px; }
  .dtable td:first-child { padding-top: var(--s-2); }
  .dtable td.act { width: 100%; padding-top: var(--s-2); justify-content: flex-end; }
  .dtable td.act::before { display: none; }
  .dtable .cell-stack { align-items: flex-end; text-align: right; }
  .dtable .wrap { min-width: 0; }
  .kv-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; }
  .kv-row > .input:first-child { grid-column: 1 / -1; }
  .sheet-actions-split { flex-direction: column-reverse; }
}

@media (max-width: 768px) {
  .pay-row .row-main { flex-basis: calc(100% - 56px); }
}

@media (max-width: 768px) {
  .dtable td.act:empty { display: none; }
}

body:not(.is-admin-mode) [data-admin-mode-only] { display: none !important; }

body.is-admin-mode [data-member-mode-only] { display: none !important; }

.brand-admin { color: var(--amber-ink); font-weight: 750; }

.mode-bar {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin-top: calc(var(--s-3) * -1);
  padding: var(--s-3);
  border-radius: var(--r-md);
  background: var(--amber-soft);
  border: 1px solid color-mix(in srgb, var(--amber) 45%, transparent);
}

.mode-label { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--amber-ink); font-size: var(--fs-sm); font-weight: 750; }

.mode-label .icon { width: 18px; height: 18px; }

.mode-bar .btn { justify-content: flex-start; background: var(--surface); }

body.is-admin-mode .sidebar { border-right-color: color-mix(in srgb, var(--amber) 35%, var(--line)); }

.action-list-sep { margin-top: var(--s-2); padding-top: var(--s-2); border-top: 1px solid var(--line); }

a.action { text-decoration: none; }

.admin-head:empty { display: none; }

.admin-head { justify-content: flex-end; }

.admin-recent { margin-top: var(--s-6); }

button.tab { border: 0; background: transparent; font-family: inherit; padding: 0; cursor: pointer; }

.appbar-back { display: none; }

@media (max-width: 768px) {
  .appbar-back { display: inline-flex; min-height: 40px; padding: 0 var(--s-3) 0 var(--s-2); gap: 4px; font-size: var(--fs-sm); }
  body:not(.is-admin-mode) .appbar-back { display: none !important; }
  body.is-admin-mode .appbar {
    background: color-mix(in srgb, var(--amber-soft) 92%, transparent);
    border-bottom-color: color-mix(in srgb, var(--amber) 45%, transparent);
  }
  body.is-admin-mode .tab[aria-current="page"] { color: var(--accent-ink); }
}

dialog.topmenu {
  position: fixed;
  inset: auto 0 auto 0;
  margin: 0;
  padding: 0;
  width: auto;
  max-width: none;
  max-height: 60vh;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  animation: drop-in var(--dur-3) var(--ease-out);
}

dialog.topmenu.is-anchored { right: auto; width: 340px; border: 1px solid var(--line); border-radius: var(--r-lg); }

dialog.topmenu::backdrop { background: linear-gradient(180deg, transparent 0 var(--menu-top, 0px), color-mix(in srgb, var(--scrim) 70%, transparent) var(--menu-top, 0px)); animation: fade-in var(--dur-2) var(--ease-out); }

dialog.topmenu.is-anchored::backdrop { background: transparent; }

.topmenu-in { max-height: 60vh; overflow-y: auto; overscroll-behavior: contain; padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); }

.topmenu-title { font-size: var(--fs-md); font-weight: 700; }


.topmenu .seg-btn { min-height: 44px; }

.icon-btn[aria-expanded="true"] { background: var(--accent-soft); color: var(--accent-ink); }

@keyframes drop-in {
  from { clip-path: inset(0 0 100% 0); transform: translateY(-6px); }
  to { clip-path: inset(0 0 0 0); transform: none; }
}

.admin-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--s-3); margin: 0; padding: 0; list-style: none; }
.admin-app { display: flex; flex-direction: column; gap: var(--s-3); height: 100%; padding: var(--s-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); color: var(--text); text-decoration: none; transition: background-color var(--dur-1) var(--ease-out); }
.admin-app:hover { background: var(--surface-2); }
.admin-app:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); }
.admin-app-top { display: flex; align-items: center; gap: var(--s-3); }
.admin-app-top .chip { flex: none; }
.admin-app-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.admin-app-name { font-size: var(--fs-md); font-weight: 650; }
.admin-app-sub { font-size: var(--fs-xs); color: var(--text-3); }
.admin-app-facts { display: grid; gap: 6px; margin: 0; padding-top: var(--s-3); border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.admin-app-fact { display: flex; justify-content: space-between; gap: var(--s-3); }
.admin-app-fact dt { color: var(--text-2); }
.admin-app-fact dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.admin-tabs { display: flex; gap: 2px; width: fit-content; max-width: 100%; padding: 3px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); overflow-x: auto; }
.admin-tab { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s-4); border-radius: 9px; color: var(--text-2); font-size: var(--fs-sm); font-weight: 650; text-decoration: none; white-space: nowrap; transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out); }
.admin-tab:hover { color: var(--text); }
.admin-tab:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); }
.admin-tab[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgb(16 24 40 / .1), 0 0 0 1px var(--line); }
.admin-app-info { max-width: 720px; }
.admin-plan-section .toolbar .input { flex: 0 1 260px; }
.guide { padding: 0; }
.guide-sum { display: flex; align-items: center; gap: var(--s-3); min-height: 60px; padding: var(--s-3) var(--s-4); cursor: pointer; list-style: none; border-radius: var(--r-lg); }
.guide-sum::-webkit-details-marker { display: none; }
.guide-sum:hover { background: var(--surface-2); }
.guide-sum:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); }
.guide-sum-icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); }
.guide-sum-icon .icon { width: 18px; height: 18px; }
.guide-sum-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.guide-sum-title { font-size: var(--fs-md); font-weight: 650; color: var(--text); }
.guide-sum-sub { font-size: var(--fs-sm); color: var(--text-2); }
.guide-chev { flex: none; width: 18px; height: 18px; color: var(--text-3); transform: rotate(90deg); transition: transform var(--dur-2) var(--ease-out); }
.guide[open] > .guide-sum .guide-chev { transform: rotate(-90deg); }
.guide[open] > .guide-sum { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.guide-body { display: flex; flex-direction: column; gap: var(--s-5); padding: var(--s-4) var(--s-4) var(--s-5); border-top: 1px solid var(--line); }
.guide-body > * { max-width: 860px; }
.guide-platform { margin: 0; font-size: var(--fs-lg); font-weight: 700; letter-spacing: -0.015em; }
.guide-platform:not(:first-child) { padding-top: var(--s-4); border-top: 1px solid var(--line); }
.guide-part { display: flex; flex-direction: column; gap: var(--s-2); }
.guide-part-title { margin: 0; font-size: var(--fs-base); font-weight: 700; }
.guide-text { margin: 0; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.55; max-width: 72ch; }
.guide-steps { display: flex; flex-direction: column; gap: var(--s-3); margin: 0; padding: 0; list-style: none; counter-reset: guide; }
.guide-step { position: relative; display: flex; flex-direction: column; gap: 6px; padding-left: 36px; counter-increment: guide; min-width: 0; }
.guide-step::before { content: counter(guide); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); color: var(--text); font-size: var(--fs-xs); font-weight: 700; font-variant-numeric: tabular-nums; }
.guide-step-title { margin: 0; font-size: var(--fs-sm); font-weight: 650; color: var(--text); line-height: 24px; }
.guide-list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding-left: var(--s-5); list-style: disc; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.5; }
.guide-warn { display: flex; align-items: flex-start; gap: var(--s-2); margin: 0; padding: var(--s-3); border-radius: var(--r-md); background: var(--amber-soft); color: var(--amber-ink); font-size: var(--fs-sm); line-height: 1.5; max-width: 72ch; }
.guide-warn .icon { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.guide-code { display: flex; align-items: flex-start; gap: var(--s-2); min-width: 0; padding: var(--s-2); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.guide-pre { flex: 1; min-width: 0; margin: 0; padding: 6px var(--s-1); font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: var(--fs-xs); line-height: 1.6; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.guide-code .btn { flex: none; }
.guide-mini { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.guide-mini .guide-sum { min-height: 48px; padding: var(--s-2) var(--s-3); border-radius: var(--r-md); }
.guide-mini .guide-sum:hover { background: var(--surface-3); }
.guide-mini .guide-body { padding: var(--s-3); }
.guide-mini .guide-code { background: var(--surface); }
.release-sig[hidden] { display: none; }
.admin-plan-nav { display: flex; margin: calc(var(--s-2) * -1) 0 var(--s-3); }
.admin-plan-back { margin-left: calc(var(--s-3) * -1); }
.admin-plan-trial { display: flex; flex-direction: column; gap: var(--s-2); }
.admin-plan-trial-row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.admin-plan-trial-toggle { display: flex; align-items: flex-start; gap: var(--s-3); flex: 1 1 320px; cursor: pointer; }
.admin-plan-trial-toggle .switch { flex: none; margin-top: 2px; }
.admin-plan-trial-text { display: flex; flex-direction: column; gap: 2px; }
.admin-plan-trial-fields { display: flex; align-items: flex-end; gap: var(--s-3); flex-wrap: wrap; }
.admin-plan-trial-field { width: 160px; }
.admin-plan-trial-days:disabled { opacity: .55; }
.admin-plan-trial .notice:empty { display: none; }
.admin-plan-section .section-head { margin-bottom: var(--s-3); }
.admin-plan-name { display: inline-flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.admin-plan-strike { text-decoration: line-through; }
.admin-plan-periods { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.admin-plan-period { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: 0 var(--s-3); border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); font-size: var(--fs-sm); font-weight: 600; color: var(--text); cursor: pointer; }
.admin-plan-period:has(input:checked) { border-color: var(--accent-strong); background: var(--accent-soft); color: var(--accent-ink); }
.admin-plan-period:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--focus); }
.admin-plan-period input { accent-color: var(--accent-strong); margin: 0; }
.admin-plan-period-custom { margin-top: var(--s-2); max-width: 220px; }
.admin-plan-period-custom[hidden] { display: none; }

@media (min-width: 769px) {
  .sheet:has(.admin-plan-periods), .sheet:has(.guide-mini) { width: min(600px, calc(100vw - 32px)); }
}

@media (max-width: 768px) {
  .admin-apps { grid-template-columns: 1fr; }
  .admin-tabs { width: 100%; }
  .admin-tab { flex: 1 1 auto; justify-content: center; min-height: 44px; padding: 0 var(--s-3); }
  .guide-code { flex-direction: column; align-items: stretch; }
  .guide-code .btn { align-self: flex-start; }
  .admin-plan-trial-fields { width: 100%; }
  .admin-plan-trial-field { flex: 1 1 140px; width: auto; }
  .admin-plan-period { flex: 1 1 calc(50% - var(--s-2)); }
  .dtable .admin-plan-name { justify-content: flex-end; }
}
.admin-plan-bonus-picks { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-2); }

.plan-was { color: var(--text-3); font-size: var(--fs-sm); font-weight: 600; }
.plan-auto { display: inline-flex; align-items: center; gap: var(--s-1); align-self: flex-start; min-height: 24px; padding: 0 var(--s-2); border-radius: var(--r-pill); background: var(--ok-soft); color: var(--ok); font-size: var(--fs-xs); font-weight: 700; }
.plan-auto .icon { width: 14px; height: 14px; stroke-width: 2.25; }
.bill-promo-note { color: var(--ok); }
.bill-auto-note { margin: 0; }

.promo-filters { margin-bottom: var(--s-3); }
.promo-filters .admin-plan-period input { position: absolute; opacity: 0; pointer-events: none; }
.promo-filters .admin-plan-period { position: relative; }
.promo-count { color: var(--text-3); font-variant-numeric: tabular-nums; }
.promo-filters .admin-plan-period:has(input:checked) .promo-count { color: inherit; }
.promo-summary { margin: 0 0 var(--s-3); }
.promo-code-text { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .02em; }
.promo-note-text { font-style: normal; color: var(--text-3); }
.promo-actions { display: inline-flex; align-items: center; justify-content: flex-end; flex-wrap: nowrap; gap: var(--s-2); }
.promo-form [hidden] { display: none; }
.promo-section { display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; margin: 0; padding: 0 0 var(--s-4); border: 0; border-bottom: 1px solid var(--line); }
.promo-section:last-child { border-bottom: 0; padding-bottom: 0; }
.promo-legend { padding: 0; margin-bottom: var(--s-3); font-size: var(--fs-md); font-weight: 700; color: var(--text); }
.promo-sub { display: flex; flex-direction: column; gap: var(--s-2); }
.promo-plans { display: flex; flex-direction: column; gap: var(--s-3); }
.promo-plan-group { display: flex; flex-direction: column; gap: var(--s-2); }
.promo-preview { display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.promo-preview-text { margin: 0; font-size: var(--fs-sm); line-height: 1.55; color: var(--text); }
.promo-code-fixed { align-self: flex-start; }

@media (max-width: 768px) {
  .promo-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .promo-filters .admin-plan-period { flex: 0 0 auto; }
  .promo-actions { flex-wrap: wrap; }
}

.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s-3); margin: 0; padding: 0; list-style: none; }
.kpi { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: var(--s-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.kpi:has(.kpi-link) { padding: 0; }
.kpi-link { position: relative; display: flex; flex-direction: column; gap: 2px; height: 100%; padding: var(--s-4); padding-right: 40px; border-radius: inherit; color: inherit; text-decoration: none; transition: background-color var(--dur-1) var(--ease-out); }
.kpi-link:hover { background: var(--surface-2); }
.kpi-link:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); }
.kpi-chevron { position: absolute; right: var(--s-3); top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--text-3); }
.kpi-label { color: var(--text-2); font-size: var(--fs-sm); font-weight: 600; }
.kpi-value { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi-sub { color: var(--text-3); font-size: var(--fs-xs); line-height: 1.4; }
.kpi.is-attention { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 45%, transparent); }
.kpi.is-attention .kpi-sub, .kpi.is-attention .kpi-label { color: var(--amber-ink); }
.kpi.is-attention .kpi-link:hover { background: color-mix(in srgb, var(--amber) 22%, var(--amber-soft)); }
.summary-card { gap: var(--s-3); }
.summary-card > .section-head { margin: 0; padding: 0; }
.summary-card > .section-note { margin: 0; padding: 0; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--s-4); align-items: start; }
.summary-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.summary-foot .section-note { margin: 0; }
.summary-facts { margin: 0 calc(var(--s-5) * -1) calc(var(--s-2) * -1); padding: 0; list-style: none; }
.summary-facts > .row { min-height: 56px; padding: var(--s-2) var(--s-5); }
.summary-facts > .row + .row { border-top: 1px solid var(--line); }
.summary-facts .row-value { color: var(--text); font-size: var(--fs-md); font-variant-numeric: tabular-nums; }
.chart { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 180px auto; gap: 0 var(--s-2); margin: 0; }
.chart-scale { display: flex; flex-direction: column; justify-content: space-between; padding-bottom: 22px; color: var(--text-3); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; text-align: right; }
.bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s-1); min-width: 0; background: linear-gradient(var(--line), var(--line)) 0 0 / 100% 1px no-repeat, linear-gradient(var(--line), var(--line)) 0 calc(50% - 11px) / 100% 1px no-repeat; }
.bars-col { display: flex; flex-direction: column; min-width: 0; }
.bars-stack { position: relative; display: flex; flex-direction: column; justify-content: flex-end; flex: 1; border-bottom: 1px solid var(--line-strong); }
.bars-seg { display: block; width: 100%; max-width: 36px; margin: 0 auto; min-height: 2px; }
.bars-seg:first-child { border-radius: 4px 4px 0 0; }
.bars-seg.is-main { background: var(--accent); }
.bars-seg.is-soft { background: color-mix(in srgb, var(--accent) 38%, var(--surface)); }
.bars-x { height: 22px; padding-top: 4px; color: var(--text-3); font-size: var(--fs-xs); text-align: center; white-space: nowrap; }
.chart-legend { grid-column: 2; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); padding-top: var(--s-2); color: var(--text-2); font-size: var(--fs-sm); }
.chart-key { display: inline-flex; align-items: center; gap: 6px; }
.chart-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.chart-swatch.is-main { background: var(--accent); }
.chart-swatch.is-soft { background: color-mix(in srgb, var(--accent) 38%, var(--surface)); }
.chart-data > summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent-ink); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
.chart-data > summary:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); border-radius: var(--r-sm); }
.chart-data[open] > summary { margin-bottom: var(--s-2); }
.hbars { display: flex; flex-direction: column; gap: var(--s-3); margin: 0; padding: 0; list-style: none; }
.hbar { display: flex; flex-direction: column; gap: 6px; }
.hbar-head { display: flex; justify-content: space-between; gap: var(--s-3); font-size: var(--fs-sm); }
.hbar-name { font-weight: 600; overflow-wrap: anywhere; }
.hbar-val { color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbar-track { display: block; height: 8px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.hbar-fill { display: block; height: 100%; border-radius: inherit; background: var(--accent); }

@media (max-width: 768px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
  .kpi, .kpi-link { padding: var(--s-3); }
  .kpi:has(.kpi-link) { padding: 0; }
  .kpi-link { padding-right: 32px; }
  .kpi-chevron { right: var(--s-2); }
  .summary-grid { grid-template-columns: 1fr; }
  .chart { grid-template-rows: 150px auto; }
  .bars { gap: 2px; }
  .bars-x.is-odd { visibility: hidden; }
  .summary-facts { margin-inline: calc(var(--s-4) * -1); }
  .summary-facts > .row { padding-inline: var(--s-4); }
}

.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--accent-strong); color: var(--on-accent); font-size: var(--fs-xs); font-weight: 700; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.tab-pill { position: relative; }
.tab-pill .nav-badge { position: absolute; top: -4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; line-height: 18px; margin: 0; }

.voucher { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); }
.voucher-img { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; background: var(--surface-3); }
.voucher-body { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-4) var(--s-4) var(--s-3); flex: 1; }
.voucher-off { margin: 0; color: var(--ok); font-size: var(--fs-sm); font-weight: 700; }
.voucher-title { margin: 0; font-size: var(--fs-lg); font-weight: 700; line-height: 1.3; color: var(--text); overflow-wrap: anywhere; }
.voucher-desc { margin: 0; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.5; overflow-wrap: anywhere; }
.voucher-apps { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0; }
.voucher-app { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
.voucher-terms { margin: 0; padding-left: 1.1em; color: var(--text-2); font-size: var(--fs-xs); line-height: 1.6; }
.voucher-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); padding: var(--s-3) var(--s-4); border-top: 1px dashed var(--line-strong); background: var(--surface-2); }
.voucher-code { flex: 1 1 auto; min-width: 0; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: var(--fs-md); font-weight: 700; letter-spacing: .04em; color: var(--text); overflow-wrap: anywhere; }

.promo-app-icons { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.promo-app-icon { display: inline-flex; }
.promo-all-apps { white-space: nowrap; }
.promo-title-text { color: var(--text); font-weight: 600; }
.promo-app-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-2); }
.promo-app-card { position: relative; display: flex; align-items: center; gap: var(--s-3); min-height: 56px; padding: var(--s-2) var(--s-3); border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); font-size: var(--fs-sm); font-weight: 600; color: var(--text); cursor: pointer; }
.promo-app-card input { position: absolute; opacity: 0; pointer-events: none; }
.promo-app-card:has(input:checked) { border-color: var(--accent-strong); background: var(--accent-soft); color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent-strong); }
.promo-app-card:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--focus); }
.promo-app-card-name { min-width: 0; overflow-wrap: anywhere; }
.promo-plan-app { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--fs-sm); font-weight: 700; color: var(--text); }

.promo-page { display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; }
.promo-back { display: inline-flex; align-items: center; gap: var(--s-1); align-self: flex-start; min-height: 44px; }
.promo-back .icon { width: 18px; height: 18px; }
.promo-editor { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); align-items: start; }
.promo-editor [hidden] { display: none; }
.promo-editor-main { min-width: 0; padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.promo-editor-aside { min-width: 0; }
.promo-savebar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s-3); padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-2); }
.promo-savebar .notice { flex: 1 1 200px; margin: 0; }
.promo-savebar .notice:empty { display: none; }
.promo-savebar-actions { display: flex; gap: var(--s-2); margin-left: auto; }
.promo-image-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-3); }
.promo-image-preview { display: block; max-width: 240px; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-3); }
.promo-voucher-mock { display: flex; flex-direction: column; gap: 4px; margin-top: var(--s-2); padding: var(--s-3); border: 1px dashed var(--line-strong); border-radius: var(--r-md); background: var(--surface); }
.promo-voucher-mock-img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: var(--r-sm); }
.promo-voucher-mock-off { color: var(--ok); font-size: var(--fs-xs); font-weight: 700; }
.promo-voucher-mock-title { font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.promo-voucher-mock-desc { color: var(--text-2); font-size: var(--fs-xs); overflow-wrap: anywhere; }
.promo-voucher-mock-code { align-self: flex-start; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-weight: 700; letter-spacing: .04em; }
.promo-codes-actions { flex-wrap: wrap; }
.promo-add { flex: 0 1 auto; }
.promo-add-count { width: 110px; flex: none; }
.promo-codes-counts { margin: 0; }
.promo-codes-card { display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.promo-codes-card .promo-legend { margin: 0; }

@media (min-width: 1024px) {
  .promo-editor { grid-template-columns: minmax(0, 1fr) 320px; }
  .promo-editor-aside { position: sticky; top: var(--s-4); grid-column: 2; grid-row: 1; }
  .promo-editor-main { grid-column: 1; grid-row: 1; }
  .promo-savebar { grid-column: 1 / -1; }
  .promo-editor-main .promo-section .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .promo-editor-main, .promo-codes-card { padding: var(--s-4); }
  .promo-savebar { bottom: calc(var(--tabbar-h) + var(--safe-b) + var(--s-2)); padding: var(--s-3); }
  .promo-savebar-actions { width: 100%; }
  .promo-savebar-actions .btn { flex: 1; }
  .promo-app-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .promo-app-filter .admin-plan-period { flex: 0 0 auto; }
}

.site-notices { display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-5); }
.site-notices[hidden] { display: none; }
.site-notice { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.site-notice.is-warn { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 45%, transparent); color: var(--amber-ink); }
.site-notice-ic { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); }
.site-notice.is-warn .site-notice-ic { background: color-mix(in srgb, var(--amber) 30%, transparent); color: inherit; }
.site-notice-ic .icon { width: 18px; height: 18px; }
.site-notice-text { flex: 1; min-width: 0; margin: 0; font-size: var(--fs-sm); font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.site-notice .btn { flex: none; }
.site-notice-x { flex: none; }

.pay-extra { white-space: pre-line; }
.pay-help { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-4); }
.pay-help-text { margin: 0; font-size: var(--fs-sm); color: var(--text-2); font-weight: 600; }
.pay-help-links { margin-top: 0; }
.pay-help-links .btn { max-width: 100%; }
.pay-help-links .btn span { overflow: hidden; text-overflow: ellipsis; }

.set-section:first-child { margin-top: 0; }
.set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.set-example { margin: var(--s-1) 0 0; }
.set-section input[type="number"] { max-width: 220px; }
.set-list-flat { box-shadow: none; }
.set-url { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.set-url-code { flex: 1 1 280px; min-width: 0; padding: var(--s-3); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.set-guide { border: 1px solid var(--line); border-radius: var(--r-lg); }
.set-keys-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.set-key-acts { margin-top: 0; justify-content: flex-end; flex-wrap: nowrap; }

.oauth { display: grid; place-items: start center; padding-top: var(--s-6); }
.oauth-card { width: min(520px, 100%); display: flex; flex-direction: column; gap: var(--s-4); }
.oauth-card.empty { align-items: center; text-align: center; }
.oauth-brand { display: flex; align-items: center; gap: var(--s-3); }
.oauth-link { width: 32px; border-top: 2px dashed var(--line-strong); }
.oauth-client { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-3); color: var(--text); font-weight: 700; font-size: var(--fs-sm); }
.oauth-title { margin: 0; font-size: var(--fs-xl); font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.oauth-sub, .oauth-note { margin: 0; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.5; }
.oauth-choices { display: flex; flex-direction: column; gap: var(--s-2); }
.oauth-choice { display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-3) var(--s-4); border: 1px solid var(--line-strong); border-radius: var(--r-md); cursor: pointer; }
.oauth-choice:has(input:checked) { border-color: var(--accent-strong); background: var(--accent-soft); }
.oauth-choice:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--focus); }
.oauth-choice input { margin: 3px 0 0; accent-color: var(--accent-strong); }
.oauth-choice-text { display: flex; flex-direction: column; gap: 2px; }
.oauth-choice-title { font-weight: 650; }
.oauth-choice-sub { font-size: var(--fs-sm); color: var(--text-2); }
.oauth-actions { display: flex; justify-content: flex-end; gap: var(--s-2); }

.mcp-page { min-height: 100vh; margin: 0; padding: var(--s-6) var(--s-4); background: var(--bg); color: var(--text); display: grid; place-items: start center; }
.mcp-card { width: min(560px, 100%); }
.mcp-card h1 { margin: var(--s-3) 0 var(--s-2); font-size: var(--fs-xl); }
.mcp-card h2 { margin: var(--s-5) 0 var(--s-2); font-size: var(--fs-base); }
.mcp-card p, .mcp-card li { color: var(--text-2); font-size: var(--fs-md); line-height: 1.55; }
.mcp-card ol { padding-left: var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); }
.mcp-card code { overflow-wrap: anywhere; font-size: var(--fs-sm); color: var(--text); }
.mcp-brand { display: flex; align-items: center; gap: var(--s-2); margin: 0; font-weight: 800; color: var(--text); }
.mcp-note { margin-top: var(--s-4); }

@media (max-width: 768px) {
  .set-grid { grid-template-columns: minmax(0, 1fr); }
  .site-notice { flex-wrap: wrap; }
  .site-notice-text { flex: 1 1 180px; }
  .site-notice .btn { margin-left: calc(32px + var(--s-3)); }
  .oauth { padding-top: 0; }
  .oauth-actions { flex-direction: column-reverse; }
  .oauth-actions .btn { width: 100%; }
}

button.avatar-link { border: 0; padding: 0; font: inherit; font-weight: 700; cursor: pointer; }
button.avatar-link:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); }

.side-admin { display: flex; align-items: center; gap: var(--s-3); min-height: 44px; padding: 0 var(--s-3); border-radius: var(--r-md); color: var(--text-2); font-size: var(--fs-md); font-weight: 600; text-decoration: none; transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out); }
.side-admin:hover { background: var(--surface-2); color: var(--text); }
.side-admin:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); }
.side-admin span { flex: 1; }
.side-admin-chev { width: 18px; height: 18px; color: var(--text-3); }

.menu-who { display: flex; align-items: center; gap: var(--s-3); padding-bottom: var(--s-3); border-bottom: 1px solid var(--line); }
.menu { display: flex; flex-direction: column; }
.menu-item { display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 48px; padding: 0 var(--s-2); border: 0; border-radius: var(--r-md); background: transparent; color: var(--text); font: inherit; font-size: var(--fs-md); font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.menu-item:hover { background: var(--surface-2); }
.menu-item:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); }
.menu-item .icon { color: var(--text-2); }
.menu-item.is-danger, .menu-item.is-danger .icon { color: var(--danger); }


.member-row { align-items: flex-start; }
.member-row > .avatar { margin-top: 2px; }
.member-row .row-actions { align-self: center; }
.member-apps { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: var(--s-2); }
.member-app { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.member-app:not(.is-on) .app-icon { filter: grayscale(1); opacity: .45; }
.member-app.is-on { border-color: color-mix(in srgb, var(--accent-strong) 55%, var(--line)); background: var(--accent-soft); }
.member-app-btn { cursor: pointer; transition: background-color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out); }
.member-app-btn:not(.is-on) { border-style: dashed; border-color: var(--line-strong); }
.member-app-btn:hover { border-color: var(--accent-strong); }
.member-app-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); }
.member-app-btn:disabled { cursor: progress; }
.member-app-btn[aria-busy="true"] { opacity: .6; }
.member-apps-note { font-size: var(--fs-sm); color: var(--text-2); }
.members-empty { margin-top: var(--s-3); }
.members-empty[hidden] { display: none; }
.group-settings .card { padding: var(--s-4); }
.join-link { margin-top: var(--s-6); text-align: center; }

.app-picks-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.app-picks-field > .label { margin-bottom: var(--s-2); }
.app-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--s-2); }
.app-picks[hidden], .app-pick[hidden] { display: none; }
.app-picks-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.members-head { flex-wrap: wrap; gap: var(--s-2); }
.members-head .btn[hidden] { display: none; }
.sheet:has(.invite-form), .sheet:has(.app-picks-2) { width: min(560px, calc(100vw - 32px)); }
.invite-tools { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); flex-wrap: wrap; margin-bottom: var(--s-2); }
.invite-tools-btns { display: flex; gap: var(--s-1); }
.invite-count { font-size: var(--fs-sm); color: var(--text-2); }
.app-picks-field > .hint { margin: calc(var(--s-1) * -1) 0 var(--s-2); }
.app-picks-field > .input { margin-bottom: var(--s-2); }
.sheet-actions-sticky { position: sticky; bottom: 0; z-index: 1; margin: var(--s-3) calc(var(--s-5) * -1) calc(var(--s-5) * -1); padding: var(--s-3) var(--s-5) calc(var(--s-4) + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.app-pick { position: relative; display: flex; align-items: center; gap: var(--s-3); min-height: 60px; padding: var(--s-2) var(--s-3); border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); cursor: pointer; transition: background-color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out); }
.app-pick input { position: absolute; opacity: 0; pointer-events: none; }
.app-pick:hover { border-color: var(--accent-strong); }
.app-pick:has(input:checked) { border-color: var(--accent-strong); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-strong); }
.app-pick:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--focus); }
.app-pick-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 10px; background: var(--surface-3); color: var(--text-2); }
.app-pick-mark .icon { width: 18px; height: 18px; }
.app-pick-text { display: flex; flex-direction: column; min-width: 0; }
.app-pick-name { font-size: var(--fs-md); font-weight: 650; color: var(--text); }
.app-pick:has(input:checked) .app-pick-name { color: var(--accent-ink); }
.app-pick-sub { font-size: var(--fs-xs); color: var(--text-2); }
.invite-more a { font-weight: 600; }
.switch-line { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }

.check-switch { align-items: flex-start; }
.check-switch input.switch { margin-top: 0; }

.admin-plan-period { position: relative; }
.admin-plan-period input { position: absolute; opacity: 0; pointer-events: none; }

.set-tabs { margin-bottom: var(--s-4); }
.set-pane > .set-section:first-child { margin-top: 0; }
.set-dirty { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--amber-ink); font-size: var(--fs-sm); font-weight: 650; }

@media (max-width: 768px) {
  .set-tabs { flex-wrap: wrap; overflow: visible; }
  .set-tabs .admin-tab { flex: 1 1 30%; }
  .member-row { flex-wrap: wrap; }
  .member-row .row-actions { margin-left: calc(40px + var(--s-3)); }
}

@media (max-width: 400px) {
  .app-picks-2 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 768px) {
  .sheet-actions-sticky { margin-left: calc(var(--s-4) * -1); margin-right: calc(var(--s-4) * -1); padding-left: var(--s-4); padding-right: var(--s-4); }
}

:root { --qr-bg: #FFFFFF; --qr-ink: #111729; }
.qr { display: block; width: 100%; height: auto; border-radius: var(--r-sm); background: var(--qr-bg); }
.qr .qr-bg { fill: var(--qr-bg); }
.qr .qr-ink { fill: var(--qr-ink); }
.dl-page { position: relative; min-height: 100vh; margin: 0; color: var(--text); }
.dl-wrap { position: relative; z-index: 1; width: min(880px, 100%); margin: 0 auto; padding: var(--s-4) var(--s-4) var(--s-8); }
.dl-top { display: flex; align-items: center; min-height: 48px; }
.dl-brand { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--text); font-weight: 800; text-decoration: none; }
.dl-main { display: flex; flex-direction: column; gap: var(--s-3); padding-top: var(--s-5); }
.dl-main h1 { margin: 0; font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -0.015em; text-wrap: balance; }
.dl-lead { margin: 0; color: var(--text-2); font-size: var(--fs-md); }
.dl-alert { padding: var(--s-4); border: 1px solid color-mix(in srgb, var(--amber) 45%, var(--line)); border-radius: var(--r-lg); background: var(--amber-soft); color: var(--amber-ink); }
.dl-alert h2 { margin: 0; font-size: var(--fs-lg); font-weight: 700; }
.dl-alert p { margin: var(--s-1) 0 0; font-size: var(--fs-md); }
.dl-list { display: flex; flex-direction: column; gap: var(--s-4); margin: var(--s-3) 0 0; padding: 0; list-style: none; }
.dl-app { display: flex; flex-direction: column; gap: var(--s-4); }
.dl-head { display: flex; align-items: center; gap: var(--s-3); }
.dl-icon { flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--surface-3); }
.dl-title h2 { margin: 0; font-size: var(--fs-lg); font-weight: 700; }
.dl-title p { margin: 2px 0 0; color: var(--text-2); font-size: var(--fs-sm); }
.dl-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-4); align-items: start; }
.dl-rels { display: flex; flex-direction: column; gap: var(--s-2); }
.dl-rel { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.dl-rel-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dl-plat { font-size: var(--fs-md); font-weight: 700; }
.dl-meta { color: var(--text-2); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.dl-none { margin: 0; color: var(--text-2); font-size: var(--fs-md); }
.dl-qr { display: flex; flex-direction: column; align-items: center; gap: var(--s-2); width: 160px; }
.dl-qr-box { width: 160px; }
.dl-qr-text { margin: 0; color: var(--text-2); font-size: var(--fs-xs); text-align: center; }
.dl-foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.dl-short { margin: 0; color: var(--text-2); font-size: var(--fs-sm); }
.dl-code { margin-left: var(--s-1); color: var(--text); font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: var(--fs-md); font-weight: 700; overflow-wrap: anywhere; }
.dl-end { margin: var(--s-3) 0 0; color: var(--text-2); font-size: var(--fs-sm); }
@media (max-width: 560px) {
  .dl-body { grid-template-columns: minmax(0, 1fr); }
  .dl-qr { width: 100%; }
  .dl-foot-row .btn { width: 100%; }
}
.dl-body:not(:has(.dl-qr)) { grid-template-columns: minmax(0, 1fr); }

.app-group + .app-group { margin-top: var(--s-5); }
.app-group-title { display: flex; align-items: baseline; gap: var(--s-2); margin: 0 0 var(--s-3); padding-inline: var(--s-1); font-size: var(--fs-sm); font-weight: 650; line-height: 1.3; color: var(--text-2); }
.app-group-count { font-size: var(--fs-xs); font-weight: 500; color: var(--text-3); font-variant-numeric: tabular-nums; }
.is-unavailable .app-icon { filter: grayscale(1); opacity: .55; }
.is-unavailable .row-title { color: var(--text-2); }
.soon-apps { margin-bottom: var(--s-3); }
.app-icon-fallback rect { fill: var(--accent-soft); }
.app-icon-fallback text { fill: var(--accent-ink); font-size: 17px; font-weight: 700; }
.icon.is-up { transform: rotate(-90deg); }
.icon.is-down { transform: rotate(90deg); }
.admin-head > .btn-row:only-child { margin-left: auto; }
.cat-list { margin-bottom: var(--s-3); }
.cat-row { gap: var(--s-2) var(--s-3); }
.cat-row .row-main { flex: 1 1 120px; min-width: 0; }
.cat-actions { display: flex; flex-wrap: nowrap; gap: 2px; margin-left: auto; }
.cat-actions .btn-icon { width: 36px; padding: 0; justify-content: center; }
.cat-actions .btn-icon .icon { width: 18px; height: 18px; }
.cat-del { color: var(--danger); }
.cat-edit { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s-2); width: 100%; }
.cat-edit-field { flex: 1 1 200px; margin: 0; }
.cat-edit .btn-row, .cat-confirm .btn-row { margin-top: 0; }
.cat-edit .notice { flex-basis: 100%; }
.cat-confirm { display: flex; flex-direction: column; gap: var(--s-2); width: 100%; }
.cat-confirm-text { font-size: var(--fs-sm); color: var(--text); }
@media (max-width: 480px) {
  .cat-actions { width: 100%; margin-left: 0; }
  .cat-actions .btn:not(.btn-icon) { flex: 1 1 auto; }
}

.app-line { flex-wrap: nowrap; min-height: 64px; gap: var(--s-3); position: relative; }
.app-line .row-main { flex: 1 1 0; min-width: 0; }
.app-line .row-title { flex-wrap: nowrap; }
.app-line-name { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-line-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
.app-line-sub > .app-desc { display: block; overflow: hidden; text-overflow: ellipsis; }
.app-line-sub > .app-st { display: none; }
.app-line > .chip { display: inline-flex; margin-left: 0; flex: none; }
.app-line-act { display: flex; align-items: center; gap: var(--s-2); flex: none; }
.app-hit, .app-trail { display: none; }
.app-line.is-unavailable { background: var(--surface-2); }
.app-list + .app-list { margin-top: var(--s-3); }
.section .app-group + .app-group { margin-top: var(--s-5); }
@media (max-width: 768px) {
  .app-line > .chip { margin-left: 0; }
  .app-line > .btn { margin-left: 0; }
}
@media (max-width: 600px) {
  .app-line { min-height: 60px; padding-top: var(--s-2); padding-bottom: var(--s-2); }
  .app-line.has-st { height: 60px; padding-top: 0; padding-bottom: 0; }
  .app-line > .chip, .app-line-act { display: none; }
  .app-line.has-st .app-desc { display: none; }
  .app-line.has-st .app-st { display: block; overflow: hidden; text-overflow: ellipsis; font-size: var(--fs-sm); color: var(--text-3); }
  .app-st.is-ok { color: var(--ok); }
  .app-st.is-warn { color: var(--amber-ink); }
  .app-line:not(.has-st) .app-line-sub { white-space: normal; }
  .app-line:not(.has-st) .app-desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
  .app-line.is-soon .app-line-sub { color: var(--text-3); }
  .app-hit { display: block; position: absolute; inset: 0; z-index: 1; width: 100%; padding: 0; border: 0; border-radius: inherit; background: transparent; color: inherit; cursor: pointer; }
  .app-hit:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
  .app-trail { display: inline-flex; flex: none; color: var(--text-3); }
  .app-trail .icon { width: 18px; height: 18px; }
}
.contact-apps { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-3); border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-ink); font-size: var(--fs-sm); }
.contact-apps-list { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.contact-apps-list img { display: block; width: 28px; height: 28px; border-radius: 8px; }

.bill-addons, .bill-methods { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.bill-addons > .label, .bill-methods > .label { margin-bottom: var(--s-1); }
.addon-row, .method-row { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; }
.addon-row:has(input:checked), .method-row:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.addon-row input[type="checkbox"], .method-row input[type="radio"] { width: 18px; height: 18px; flex: none; accent-color: var(--brand); }
.addon-row .row-main { flex: 1; min-width: 0; }
.input-qty { width: 76px; flex: none; text-align: center; }
.bill-methods { margin-bottom: var(--s-4); }
.bill-slot .inline-field { align-items: center; flex-wrap: wrap; }
.qris-wrap { display: flex; flex-direction: column; align-items: center; gap: var(--s-2); margin: var(--s-2) 0; }
.qris-box { width: min(280px, 78vw); aspect-ratio: 1; padding: var(--s-3); background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); display: grid; place-items: center; }
.qris-box .qr { width: 100%; height: 100%; display: block; }
.qris-sk { width: 100%; height: 100%; border-radius: var(--r-md); }
.qris-merchant { font-weight: 600; color: var(--text-2); font-size: var(--fs-sm); }
.qris-auto { display: flex; gap: var(--s-2); align-items: flex-start; }
.qris-auto .icon { flex: none; margin-top: 2px; }
.aff-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--s-4); }
.aff-stat { display: flex; flex-direction: column; gap: 2px; }
.aff-stat-label { font-size: var(--fs-sm); color: var(--text-2); }
.aff-stat-value { font-size: var(--fs-xl); font-weight: 700; }
.aff-stat-sub { font-size: var(--fs-xs); color: var(--text-3); }
.aff-url { overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: var(--fs-xs); }
.aff-link .row-actions { flex-wrap: wrap; }

.proof-toast { position: fixed; left: var(--s-4); bottom: calc(var(--s-4) + env(safe-area-inset-bottom)); z-index: 40; max-width: min(360px, calc(100vw - 32px)); display: flex; align-items: flex-start; gap: var(--s-2); padding: var(--s-3) var(--s-3) var(--s-3) var(--s-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-3); font-size: var(--fs-sm); animation: proof-in var(--dur-2, .25s) var(--ease-out, ease-out); }
.proof-text { display: flex; flex-wrap: wrap; gap: 0 4px; color: var(--text); }
.proof-time { flex-basis: 100%; color: var(--text-3); font-size: var(--fs-xs); }
.proof-close { flex: none; margin: -4px -4px 0 0; }
@keyframes proof-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .proof-toast { animation: none; } }
@media (max-width: 768px) { .proof-toast { bottom: calc(var(--tabbar, 56px) + var(--s-3) + env(safe-area-inset-bottom)); } }

.notify-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--s-4); }
.notify-stat { display: flex; flex-direction: column; gap: 2px; }
.notify-stat-label { font-size: var(--fs-sm); color: var(--text-2); }
.notify-stat-value { font-size: var(--fs-xl); font-weight: 700; font-variant-numeric: tabular-nums; }
.notify-stat-value.is-danger { color: var(--danger); }
.template-row .row-title { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.template-preview, .template-live { display: flex; flex-direction: column; gap: 2px; margin-top: var(--s-2); padding: var(--s-3); border-radius: var(--r-md); background: var(--surface-2); font-size: var(--fs-sm); color: var(--text-2); white-space: pre-line; }
.template-preview b, .template-live b { color: var(--text); }
.template-vars { flex-wrap: wrap; gap: var(--s-1); }

.pay-list { display: flex; flex-direction: column; }
.pay-item { border-top: 1px solid var(--line); }
.pay-item:first-child { border-top: 0; }
.pay-sum { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) 0; cursor: pointer; list-style: none; }
.pay-sum::-webkit-details-marker { display: none; }
.pay-sum .row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pay-item[open] .pay-sum-btn { visibility: hidden; }
.pay-body { padding: 0 0 var(--s-5); }
.pay-body > div > .card { box-shadow: none; border: 1px solid var(--line); }
@media (max-width: 640px) { .pay-sum { flex-wrap: wrap; } .pay-sum .row-main { flex-basis: 100%; } }

.profile-card { display: flex; align-items: center; gap: var(--s-4); }
.profile-card > .btn { align-self: flex-start; }
.profile-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: var(--s-1); color: var(--text-2); font-size: var(--fs-sm); }
.row-btn { width: 100%; flex-wrap: nowrap; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background-color var(--dur-1) var(--ease-out); }
.row-btn:hover { background: var(--surface-2); }
.row-btn .row-main { flex: 1 1 auto; }
.row-btn.is-danger .row-title { color: var(--danger); }
.row-btn.is-danger .row-icon { background: var(--danger-soft); color: var(--danger); }
.theme-row [data-theme-seg] { flex: 1 1 260px; }
.view > .acct { width: 100%; }
.acct > * { max-width: 640px; }
.aff-pane { margin-top: var(--s-4); }
.tab-dot { width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: var(--danger); }
.view .aff-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; padding: 0; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.view .aff-stat { gap: var(--s-1); padding: var(--s-4); background: var(--surface); }
.view .aff-stat-label { font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); white-space: nowrap; }
.view .aff-stat-value { font-size: var(--fs-lg); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.aff-h { margin-top: var(--s-3); }
@media (max-width: 560px) { .view .aff-stats { grid-template-columns: 1fr 1fr; } }

.nav-group > summary { list-style: none; cursor: pointer; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group-chev { width: 16px; height: 16px; margin-left: auto; color: var(--text-3); transition: transform var(--dur-1) var(--ease-out); }
.nav-group[open] > summary .nav-group-chev { transform: rotate(90deg); }
.nav-group:not([open]):has([aria-current="page"]) > summary { color: var(--accent-ink); }
.nav-group-items { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 var(--s-1) calc(var(--s-3) + 9px); padding-left: var(--s-2); border-left: 1px solid var(--line); }
.nav-group-items .nav-link { min-height: 38px; font-size: var(--fs-sm); }
.action-group + .action-group { margin-top: var(--s-2); padding-top: var(--s-2); border-top: 1px solid var(--line); }
.action-group-title { margin: var(--s-1) var(--s-2); color: var(--text-3); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .02em; }
.feat-bar { margin-bottom: var(--s-5); gap: var(--s-3); }
.feat-item .row-title { flex-wrap: wrap; }
.feat-body { white-space: pre-line; }
.feat-reply { display: block; margin-top: var(--s-2); padding: var(--s-2) var(--s-3); border-radius: var(--r-md); background: var(--surface-2); color: var(--text); font-size: var(--fs-sm); white-space: pre-line; }
.tab-count { margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.req-body { white-space: pre-line; }
.req-quote { margin: 0; padding: var(--s-3) var(--s-4); border-left: 3px solid var(--accent); border-radius: var(--r-md); background: var(--surface-2); white-space: pre-line; }
button.admin-tab { border: 0; background: transparent; font: inherit; font-size: var(--fs-sm); font-weight: 650; cursor: pointer; }
.admin-tabs + .toolbar { margin-top: var(--s-4); }
.sheet.sheet-wide { width: min(760px, calc(100vw - 32px)); max-height: min(92dvh, 960px); }
.msg-list { display: flex; flex-direction: column; margin: calc(var(--s-2) * -1) 0; padding: 0; list-style: none; }
.msg-list > li + li { border-top: 1px solid var(--line); }
.msg-row { display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 64px; padding: var(--s-3) var(--s-1); border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: var(--r-md); }
.msg-row:hover { background: var(--surface-2); }
.msg-row .row-title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.msg-channels { display: flex; gap: 4px; flex: none; }
.msg-ch { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text-2); font-size: var(--fs-xs); font-weight: 650; }
.msg-channel { display: flex; flex-direction: column; gap: var(--s-3); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.msg-channel-title { display: flex; align-items: center; gap: var(--s-2); margin: 0; font-size: var(--fs-md); }
.msg-channel-title .icon { width: 18px; height: 18px; color: var(--accent); }
.push-preview { display: flex; flex-direction: column; gap: 2px; max-width: 380px; padding: var(--s-3) var(--s-4); border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); font-size: var(--fs-sm); color: var(--text-2); white-space: pre-line; }
.push-preview b { color: var(--text); }
.push-app { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; font-size: var(--fs-xs); color: var(--text-3); }
.push-app img { border-radius: 4px; }
.rte { border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.rte:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.rte-btn { min-width: 32px; height: 30px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text-2); font: inherit; font-size: var(--fs-sm); font-weight: 650; cursor: pointer; }
.rte-btn:hover { background: var(--surface); color: var(--text); }
.rte-btn.is-b { font-weight: 800; }
.rte-btn.is-i { font-style: italic; }
.rte-btn.is-u { text-decoration: underline; }
.rte-var { border: 1px dashed var(--line-strong); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: var(--fs-xs); }
.rte-link { display: flex; gap: var(--s-2); padding: 6px; border-bottom: 1px solid var(--line); }
.rte-link .input { min-height: 36px; }
.rte-area { min-height: 180px; max-height: 360px; overflow: auto; padding: var(--s-3) var(--s-4); outline: none; font-size: var(--fs-md); line-height: 1.6; }
.rte-area p, .rte-area ul, .rte-area ol, .rte-area h3, .rte-area h2, .rte-area blockquote { margin: 0 0 var(--s-3); }
.rte-area a { color: var(--accent); }
.rte .template-vars { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border-top: 1px solid var(--line); }
.mail-preview { width: 100%; height: 420px; border: 1px solid var(--line); border-radius: var(--r-md); background: #F2F4F8; }

.viz-root, .view { --viz-1: #2a78d6; --viz-2: #eb6834; --viz-3: #1baf7a; --viz-4: #eda100; --viz-5: #e87ba4; --viz-other: #9aa3b2; --viz-line: #111729; }
:root[data-theme="dark"] .view { --viz-1: #3987e5; --viz-2: #d95926; --viz-3: #199e70; --viz-4: #c98500; --viz-5: #d55181; --viz-other: #5b6578; --viz-line: #E6E9F2; }
.viz-s1 { fill: var(--viz-1); background: var(--viz-1); }
.viz-s2 { fill: var(--viz-2); background: var(--viz-2); }
.viz-s3 { fill: var(--viz-3); background: var(--viz-3); }
.viz-s4 { fill: var(--viz-4); background: var(--viz-4); }
.viz-s5 { fill: var(--viz-5); background: var(--viz-5); }
.viz-sother { fill: var(--viz-other); background: var(--viz-other); }
.viz-sline { background: var(--viz-line); }
.viz { position: relative; margin: 0; }
.viz-svg { display: block; width: 100%; height: auto; overflow: visible; }
.viz-grid { stroke: var(--line); stroke-width: 1; }
.viz-base { stroke: var(--line-strong); stroke-width: 1; }
.viz-tick { fill: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.viz-line { fill: none; stroke: var(--viz-line); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-dot { fill: var(--viz-line); stroke: var(--surface); stroke-width: 2; }
.viz-cross { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.viz-hit { fill: transparent; outline: none; }
.viz-hit:focus-visible { stroke: var(--accent); stroke-width: 2; }
.viz-tip { position: absolute; z-index: 5; min-width: 150px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-2); font-size: var(--fs-sm); pointer-events: none; }
.viz-tip-t { margin-bottom: 4px; color: var(--text-2); font-size: var(--fs-xs); font-weight: 650; }
.viz-tip-r { display: flex; align-items: center; gap: 6px; color: var(--text-2); }
.viz-tip-r strong { color: var(--text); font-variant-numeric: tabular-nums; }
.viz-sw { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 3px; }
.viz-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: var(--s-2); color: var(--text-2); font-size: var(--fs-xs); }
.viz-key { display: inline-flex; align-items: center; gap: 6px; }
.viz-donut { display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: var(--s-4); }
.viz-donut-plot { position: relative; }
.viz-donut-svg { display: block; width: 180px; height: 180px; }
.viz-donut-svg path { stroke: var(--surface); stroke-width: 2; outline: none; }
.viz-donut-svg path:focus-visible { stroke: var(--accent); }
.viz-empty-ring { fill: none; stroke: var(--line); stroke-width: 22; }
.viz-center { fill: var(--text); font-size: 18px; font-weight: 750; }
.viz-center-sub { fill: var(--text-3); font-size: 11px; }
.viz-donut-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: var(--fs-sm); }
.viz-donut-list li { display: grid; grid-template-columns: 10px 1fr auto 40px; align-items: center; gap: 8px; }
.viz-donut-l { min-width: 0; overflow: hidden; color: var(--text-2); text-overflow: ellipsis; white-space: nowrap; }
.viz-donut-list strong, .viz-donut-p { font-variant-numeric: tabular-nums; text-align: right; }
.viz-donut-p { color: var(--text-3); font-size: var(--fs-xs); }
.viz-none { color: var(--text-3); font-size: var(--fs-sm); }
.viz-bars { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.viz-bars-head { display: flex; justify-content: space-between; gap: var(--s-3); font-size: var(--fs-sm); }
.viz-bars-l { min-width: 0; overflow: hidden; color: var(--text-2); text-overflow: ellipsis; white-space: nowrap; }
.viz-bars-head strong { font-variant-numeric: tabular-nums; }
.viz-bars-track { height: 8px; margin-top: 4px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.viz-bars-fill { height: 100%; border-radius: 999px; background: var(--viz-1); }
.viz-bars-sub { color: var(--text-3); font-size: var(--fs-xs); }
.viz-stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: var(--s-4); }
.viz-stat-l { color: var(--text-2); font-size: var(--fs-sm); }
.viz-stat-v { font-size: var(--fs-xl); font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.15; overflow-wrap: anywhere; }
.viz-stat.is-big .viz-stat-v { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.viz-stat-s { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--text-3); font-size: var(--fs-xs); }
.viz-delta { padding: 1px 7px; border-radius: 999px; font-weight: 700; font-variant-numeric: tabular-nums; }
.viz-delta.is-up { background: var(--ok-soft, #E3F6EC); color: var(--ok, #0E7A43); }
.viz-delta.is-down { background: var(--danger-soft); color: var(--danger); }
.viz-delta.is-flat { background: var(--surface-3); color: var(--text-2); }
.viz-table { margin-top: var(--s-3); font-size: var(--fs-sm); }
.viz-table summary { width: fit-content; color: var(--text-2); cursor: pointer; }
.viz-table .table-wrap { max-height: 320px; margin-top: var(--s-2); overflow: auto; }
.dash { display: flex; flex-direction: column; gap: var(--s-4); }
.dash-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.dash-bar .input { width: auto; min-height: 36px; }
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; padding: 0; overflow: hidden; background: var(--line); }
.dash-stats > .viz-stat { background: var(--surface); }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.dash-card { display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; padding: var(--s-5); }
.dash-card.is-wide { grid-column: 1 / -1; }
.dash-card-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-2); }
.dash-card-h h3 { margin: 0; font-size: var(--fs-md); }
.dash-card-h span { color: var(--text-3); font-size: var(--fs-xs); }
.period { position: relative; }
.period-btn { gap: 8px; }
.period-d { color: var(--text-3); font-weight: 500; }
.period-pop { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; display: flex; flex-direction: column; width: 260px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-3); }
.period-list { display: flex; flex-direction: column; }
.period-opt { padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: var(--fs-sm); text-align: left; cursor: pointer; }
.period-opt:hover, .period-opt[aria-current] { background: var(--surface-2); }
.period-opt[aria-current] { font-weight: 700; }
.period-custom { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; padding: 8px 4px 4px; border-top: 1px solid var(--line); }
.period-custom .input { min-height: 36px; }
@media (max-width: 860px) {
  .dash-grid { grid-template-columns: 1fr; }
  .viz-donut { grid-template-columns: 1fr; justify-items: center; }
  .viz-donut-list { width: 100%; }
  .dash-card { padding: var(--s-4); }
}
.insights-wrap { display: flex; flex-direction: column; gap: var(--s-3); margin-bottom: var(--s-5); }
.insights { display: flex; flex-direction: column; }
.insights-h { display: flex; align-items: baseline; gap: var(--s-2); width: fit-content; margin-bottom: var(--s-3); font-size: var(--fs-md); font-weight: 700; cursor: pointer; }
.insights-p { color: var(--text-3); font-size: var(--fs-xs); font-weight: 500; }
.dash-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dash-stats .viz-stat.is-big .viz-stat-v { font-size: clamp(1.35rem, 2.2vw, 1.75rem); }
.viz-donut-l { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
.dash-bar { margin-bottom: var(--s-4); }
.dash-bar .input, .dash-bar .period-btn { min-height: 40px; }
.insights-wrap .dash-bar { margin-bottom: 0; }
@media (max-width: 860px) { .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.toolbar .check { align-self: center; white-space: nowrap; }
.buy-context { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); padding: var(--s-3) var(--s-4); }
.bill-done { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); border-color: var(--ok); background: var(--ok-soft); }
.bill-done .row-icon { background: var(--surface); color: var(--ok); }
.check a { color: var(--accent); font-weight: 650; }
.prov-logo { display: block; flex: none; width: 60px; height: 38px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; overflow: hidden; }
.prov-logo img { display: block; width: 100%; height: 100%; }
.prov-logo-other { display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.prov-cell { display: inline-flex; align-items: center; gap: var(--s-2); }
.prov-cell .prov-logo { width: 50px; height: 32px; }
.prov-cell .row-icon { width: 32px; height: 32px; border-radius: 8px; }
.prov-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: var(--s-2); max-height: 324px; overflow-y: auto; padding: 3px; margin: -3px; }
.prov-opt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: var(--s-2); border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); color: var(--text); font-size: var(--fs-sm); font-weight: 600; line-height: 1.2; text-align: center; cursor: pointer; }
.prov-opt input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.prov-opt:has(input:checked) { border-color: var(--accent-strong); background: var(--accent-soft); color: var(--accent-ink); }
.prov-opt:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--focus); }
.bill-refund { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: var(--s-2) 0 0; color: var(--text-2); font-size: var(--fs-sm); }
.bill-refund .icon { width: 16px; height: 16px; color: var(--ok); }
.bill-refund .link-btn { min-height: 0; }
.addon-refund { margin-left: var(--s-2); vertical-align: middle; }
.refund-terms { display: flex; flex-direction: column; gap: var(--s-2); margin: 0; padding-left: 20px; color: var(--text-2); font-size: var(--fs-md); }
.sheet .voucher { box-shadow: none; }
.bill-refund { display: block; line-height: 1.5; }
.bill-refund .icon { display: inline-block; vertical-align: -3px; margin-right: 4px; }
.bill-refund .link-btn { display: inline; vertical-align: baseline; }
.addon-row .row-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.addon-refund { margin-left: 0; }
.bill-renew { position: sticky; top: var(--s-3); z-index: 6; transition: box-shadow var(--dur-2) var(--ease-out), background-color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out); border: 1px solid transparent; }
.bill-renew.is-stuck { background: color-mix(in srgb, var(--surface) 88%, transparent); border-color: var(--line); box-shadow: var(--shadow-2); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); }
.bill-renew-probe { display: block; height: 0; }
@media (max-width: 768px) { .bill-renew { top: calc(var(--appbar-h) + var(--safe-t) + var(--s-2)); } }
.bill-refund.is-offer, .bill-refund.is-on { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-3); padding: var(--s-3); border-radius: var(--r-md); }
.bill-refund.is-offer { border: 1px dashed var(--line-strong); background: var(--surface-2); }
.bill-refund.is-on { background: var(--ok-soft); }
.bill-refund.is-offer > .icon, .bill-refund.is-on > .icon { flex: none; width: 20px; height: 20px; margin: 0; vertical-align: 0; }
.bill-refund.is-offer > .icon { color: var(--accent-ink); }
.bill-refund-text { flex: 1; min-width: 0; color: var(--text-2); }
.bill-refund-text strong { color: var(--text); }
.bill-refund.is-offer .btn { flex: none; }
.price-tail { font-size: .62em; font-weight: 700; letter-spacing: 0; }
.bill-renew { top: 0; }
.bill-renew.is-stuck { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--text); border-top-left-radius: 0; border-top-right-radius: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
@media (max-width: 768px) {
  .bill-renew { top: calc(var(--appbar-h) + var(--safe-t)); }
  .bill-renew.is-stuck { margin-left: calc(-1 * (var(--s-4) + var(--safe-l))); margin-right: calc(-1 * (var(--s-4) + var(--safe-r))); padding-left: calc(var(--s-4) + var(--safe-l)); padding-right: calc(var(--s-4) + var(--safe-r)); border-radius: 0; border-left: 0; border-right: 0; }
}
.pay-help { flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-3); }
.pay-help-link { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 var(--s-2); border-radius: var(--r-md); color: var(--accent-ink); font-size: var(--fs-sm); font-weight: 650; text-decoration: none; }
.pay-help-link:hover { background: var(--surface-2); }
.pay-help-link .icon { width: 18px; height: 18px; }
.pay-account { flex-wrap: nowrap; gap: var(--s-3); }
.pay-account .row-main { flex: 1 1 auto; min-width: 0; }
.pay-acc-no { font-size: var(--fs-md); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; overflow-wrap: anywhere; }
.pay-account .btn { flex: none; }
.pay-proof { display: flex; flex-direction: column; gap: var(--s-3); margin-top: var(--s-4); padding: var(--s-4); border: 1px dashed var(--line-strong); border-radius: var(--r-md); background: var(--surface-2); }
.pay-proof.is-sent { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; border-style: solid; border-color: color-mix(in srgb, var(--ok) 30%, transparent); background: var(--ok-soft); }
.pay-proof-text { display: flex; align-items: flex-start; gap: var(--s-2); margin: 0; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.5; }
.pay-proof-text strong { color: var(--text); }
.pay-proof-text .icon { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--ok); }
@media (max-width: 400px) { .pay-account .btn span { display: none; } .pay-account .btn { padding: 0 var(--s-2); } }
.proof-img { display: block; width: 100%; max-height: 70dvh; object-fit: contain; border-radius: var(--r-md); background: var(--surface-2); }
.voucher-more summary { width: fit-content; color: var(--accent-ink); font-size: var(--fs-sm); font-weight: 650; cursor: pointer; }
.voucher-more .voucher-terms { margin-top: var(--s-2); }

.voucher-open { display: flex; align-items: center; gap: var(--s-3); width: 100%; padding: var(--s-3) var(--s-4); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); border-radius: var(--r-lg); background: var(--accent-soft); box-shadow: var(--shadow-1); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color var(--dur-2) var(--ease-out), background-color var(--dur-2) var(--ease-out); }
.voucher-open:hover { border-color: var(--accent-strong); }
.voucher-open .row-icon { width: 40px; height: 40px; background: var(--surface); color: var(--accent-ink); }
.voucher-open .row-title { font-size: var(--fs-md); font-weight: 700; }
.voucher-open[hidden] { display: none; }
.voucher-stack { display: flex; flex-direction: column; gap: var(--s-3); }
.voucher-stack .voucher-body { padding: var(--s-3) var(--s-4) var(--s-2); }
.voucher-stack .voucher-foot { padding: var(--s-2) var(--s-4); }
.tip-wrap { position: relative; display: inline-flex; }
.tip-btn { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.tip-btn .icon { width: 15px; height: 15px; color: var(--text-3); }
.tip-btn[aria-expanded="true"] .icon, .tip-btn:hover .icon { color: var(--accent-ink); }
.tip { position: absolute; left: 0; top: calc(100% + 8px); z-index: 6; width: max-content; max-width: min(280px, 78vw); padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-2); color: var(--text-2); font-size: var(--fs-xs); font-weight: 500; line-height: 1.5; white-space: normal; pointer-events: none; }
.tip[hidden] { display: none; }
.voucher-open .row-sub { color: var(--accent-ink); }
.voucher-open.is-used { border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: var(--ok-soft); }
.voucher-open.is-used .row-icon { color: var(--ok); }
.voucher-open.is-used .row-sub { color: var(--text-2); }
.bill-pay-box { --pad: var(--s-5); padding: var(--pad); overflow: hidden; }
.bill-pay-box > .bill-fine:empty { display: none; }
.bill-pay-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-4); flex-wrap: wrap; margin: var(--s-1) calc(-1 * var(--pad)) calc(-1 * var(--pad)); padding: var(--s-4) var(--pad); border-top: 1px solid var(--line); background: var(--surface-2); }
.bill-total { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bill-total-label { color: var(--text-2); font-size: var(--fs-sm); font-weight: 600; }
.bill-total-amount { font-size: var(--fs-xl); font-weight: 800; line-height: 1.15; letter-spacing: -.01em; color: var(--text); font-variant-numeric: tabular-nums; }
.bill-pay-foot .bill-submit { align-self: center; }
.bill-code-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.bill-code { padding: 1px 6px; border-radius: 6px; background: var(--ok-soft); color: var(--ok); font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .03em; }
.chip-x { display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--text-3); cursor: pointer; }
.chip-x:hover { background: var(--surface-3); color: var(--danger); }
.chip-x .icon { width: 14px; height: 14px; }
.bill-addons > .bill-refund.is-offer, .bill-addons > .bill-refund.is-on { margin-top: var(--s-1); }
@media (max-width: 768px) {
  .bill-pay-box { --pad: var(--s-4); }
  .bill-pay-foot { flex-direction: column; align-items: stretch; }
  .bill-pay-foot .bill-total { flex-direction: row; align-items: baseline; justify-content: space-between; }
  .bill-pay-foot .bill-submit { align-self: stretch; }
  .chip-x { width: 32px; height: 32px; }
}
.bill-promo .inline-field { align-items: center; }
.promo-input { position: relative; flex: 1; min-width: 0; display: flex; }
.bill-promo .input-code { flex: 1; min-width: 0; min-height: 40px; height: 40px; padding-right: 40px; font-size: var(--fs-sm); font-weight: 650; letter-spacing: .04em; }
.bill-promo .input-code::placeholder { font-weight: 500; letter-spacing: 0; text-transform: none; }
.promo-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.bill-promo .input-code:placeholder-shown + .promo-clear { display: none; }
.bill-promo .btn-sm { min-height: 40px; }
.bill-promo .field-error, .bill-promo .bill-promo-note { font-size: var(--fs-xs); }
.plan-card:has(.plan-radio:checked) { background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); }
.plan-points:empty { display: none; }
.plan-anchor { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; padding-top: 4px; text-align: right; white-space: nowrap; font-size: var(--fs-sm); }
.plan-anchor .plan-was { font-weight: 500; font-variant-numeric: tabular-nums; }
.plan-anchor .plan-save { font-size: var(--fs-xs); }
.plan-per { margin-top: -4px; font-weight: 500; }
.plan-monthly { color: var(--text-3); font-weight: 400; }
.bill-form { container: bill / inline-size; }
.bill-cols, .bill-main, .bill-side { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
.bill-dock { display: none; }
@container bill (min-width: 820px) {
  .bill-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: var(--s-5); }
  .bill-side { position: sticky; top: 64px; }
  .bill-side .bill-pay-foot { flex-direction: column; align-items: stretch; }
  .bill-side .bill-pay-foot .bill-total { flex-direction: row; align-items: baseline; justify-content: space-between; }
  .bill-side .bill-pay-foot .bill-submit { align-self: stretch; }
  .bill-side .voucher-open { padding: var(--s-3); }
}
@media (max-width: 768px) {
  .bill-dock { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-b)); z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-2) calc(var(--s-4) + var(--safe-r)) var(--s-2) calc(var(--s-4) + var(--safe-l)); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: 0 -6px 16px rgb(16 24 40 / .06); transform: translateY(110%); opacity: 0; pointer-events: none; transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-2) var(--ease-out); }
  .bill-dock.is-on { transform: none; opacity: 1; pointer-events: auto; }
  .bill-dock-total { display: flex; flex-direction: column; min-width: 0; }
  .bill-dock-label { color: var(--text-2); font-size: var(--fs-xs); font-weight: 600; }
  .bill-dock-amount { font-size: var(--fs-lg); font-weight: 800; font-variant-numeric: tabular-nums; }
  .bill-dock .btn { flex: none; min-width: 140px; }
  body:has(.bill-dock.is-on) .proof-toast { display: none; }
}
.plan-grid { display: flex; flex-direction: column; gap: var(--s-3); }
.plan-price-row { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-1); }
.plan-promo-until { color: var(--text-2); font-size: var(--fs-sm); }
.price-cur { margin-right: .18em; font-size: .6em; font-weight: 650; color: var(--text-2); letter-spacing: 0; }
.bill-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); align-items: start; padding: 0; background: none; border: 0; box-shadow: none; }
.bill-step { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 6px; row-gap: var(--s-2); padding: 0; background: none; color: var(--text-2); font-size: var(--fs-xs); font-weight: 600; text-align: left; }
.bill-step::before { content: ""; grid-column: 1 / -1; height: 4px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--text-3) 35%, transparent); }
.bill-step.is-done::before, .bill-step.is-current::before { background: var(--accent-strong); }
.bill-step.is-current { background: none; color: var(--accent-ink); font-weight: 700; }
.bill-step.is-done { color: var(--text); }
.bill-step-num, .bill-step.is-current .bill-step-num, .bill-step.is-done .bill-step-num { display: inline-flex; width: auto; height: auto; border: 0; border-radius: 0; background: none; color: inherit; font-size: inherit; }
.bill-step.is-done .bill-step-num { color: var(--ok); }
.bill-step-num .icon { width: 14px; height: 14px; }
.bill-step-name { white-space: normal; line-height: 1.35; }
@media (max-width: 768px) {
  .bill-step { display: grid; padding: 0; text-align: left; font-size: var(--fs-xs); }
}
.proof-toast { align-items: center; }
.proof-close { width: 32px; height: 32px; min-height: 32px; margin: -6px -6px -6px 0; }
.voucher-foot > .btn-primary { flex: none; }
.voucher-use { gap: 6px; }
.voucher-use-chev { width: 16px; height: 16px; transform: rotate(90deg); transition: transform var(--dur-2) var(--ease-out); }
.voucher-use[aria-expanded="true"] .voucher-use-chev { transform: rotate(-90deg); }
.voucher-pick { display: flex; flex-direction: column; gap: var(--s-1); flex-basis: 100%; }
.voucher-pick[hidden] { display: none; }
.voucher-pick-label { margin: var(--s-1) 0 0; color: var(--text-2); font-size: var(--fs-xs); font-weight: 600; }
.voucher-pick-row { display: flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: 0 var(--s-3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--text); font-size: var(--fs-sm); font-weight: 650; text-decoration: none; }
.voucher-pick-row:hover { border-color: var(--accent-strong); background: var(--accent-soft); }
.voucher-pick-row > span { flex: 1; }
.voucher-foot { flex-direction: row; flex-wrap: wrap; align-items: center; border-top-style: solid; border-top-color: var(--line); }
.voucher-codebox { display: flex; flex: 1 1 0; align-items: center; gap: var(--s-2); min-width: 0; padding: 6px 6px 6px var(--s-3); border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, var(--line-strong)); border-radius: var(--r-md); background: var(--surface); }
.voucher-codebox .voucher-code { flex: 1; font-size: var(--fs-sm); }
.voucher-codebox .btn { flex: none; }
.voucher-apps { gap: 6px; }
.voucher-app { display: inline-flex; }
.voucher-stack .voucher-img { aspect-ratio: 5 / 2; }
.voucher-stack .voucher-body { gap: 6px; }
.voucher-foot > .btn-primary { min-height: 44px; padding: 0 var(--s-4); }
.voucher-go { width: 16px; height: 16px; }
.voucher-top { display: flex; flex-direction: row-reverse; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: var(--s-1) var(--s-3); }
.voucher-top .voucher-off { margin-right: auto; }
.voucher-top .voucher-apps { flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.voucher-all { flex: none; }
.google-consent { margin: var(--s-2) 0 0; text-align: center; color: var(--text-3); font-size: var(--fs-xs); line-height: 1.5; }
.policy-body { color: var(--text-2); font-size: var(--fs-sm); line-height: 1.6; }
.policy-body > :first-child { margin-top: 0; }
.policy-body h3 { margin: var(--s-4) 0 var(--s-1); color: var(--text); font-size: var(--fs-md); }
.policy-body p { margin: 0 0 var(--s-2); }
.policy-body ul { margin: 0 0 var(--s-2); padding-left: 1.2em; list-style: disc; }
.policy-body li { margin-bottom: 4px; }
.policy-body strong { color: var(--text); }
.promo-editor-main { display: flex; flex-direction: column; gap: var(--s-3); padding: 0; border: 0; background: none; }
.promo-editor-main > .promo-section { gap: var(--s-3); padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); }
.promo-editor-main > .promo-section:last-child { padding-bottom: var(--s-5); border-bottom: 1px solid var(--line); }
.promo-editor-main .promo-legend { float: left; width: 100%; margin-bottom: 0; font-size: var(--fs-lg); }
.promo-editor-main .promo-legend + * { clear: both; }
.promo-section-note { margin: calc(var(--s-2) * -1) 0 0; color: var(--text-2); font-size: var(--fs-sm); }
.promo-section > .label { margin-top: var(--s-2); margin-bottom: calc(var(--s-1) * -1); }
.promo-section input[type="file"] { padding: 6px; }
.promo-section input[type="file"]::file-selector-button { margin-right: var(--s-3); padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-sm); font-weight: 650; cursor: pointer; }
.promo-section input[type="file"]::file-selector-button:hover { border-color: var(--accent-strong); color: var(--accent-ink); }
.promo-voucher-fields { padding-top: var(--s-2); border-top: 1px dashed var(--line); }
.promo-editor-aside .promo-preview { background: var(--surface); box-shadow: var(--shadow-1); }
@media (max-width: 768px) {
  .promo-editor-main > .promo-section { padding: var(--s-4); }
}
