/* ===== BoxedAns — soft blue app style ===== */
:root {
  --bg: #f1f5fc;
  --bg-deep: #e3ecfb;
  --surface: #ffffff;
  --ink: #111a2e;
  --muted: #6b7489;
  --line: #e4e9f3;
  --blue: #3d7ef5;
  --blue-soft: #e6efff;
  --hero-top: #e4eeff;
  --hero-bottom: #a8c7f8;
  --navy: #0e1730;
  --navy-ink: #ffffff;
  --danger: #d6455d;
  --danger-soft: #ffe9ed;
  --warn-ink: #9a6400;
  --warn-soft: #fff3d6;
  --good: #1f9d74;
  --good-soft: #def6ec;
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 12px;
  --shadow: 0 1px 2px rgba(25, 45, 90, 0.05), 0 8px 24px rgba(25, 45, 90, 0.07);
  --shadow-lift: 0 10px 30px rgba(14, 23, 48, 0.18);
  --font: 'Plus Jakarta Sans', ui-rounded, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, 'Roboto Mono', monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0b1120;
    --bg-deep: #0e1630;
    --surface: #151e36;
    --ink: #eaf0ff;
    --muted: #97a3bf;
    --line: #243152;
    --blue: #6b9dff;
    --blue-soft: #1c2c55;
    --hero-top: #1b2a52;
    --hero-bottom: #2d4c8f;
    --navy: #6b9dff;
    --navy-ink: #0b1120;
    --danger: #ff8b9d;
    --danger-soft: #3b1a24;
    --warn-ink: #ffcf73;
    --warn-soft: #3a2c10;
    --good: #5fd6ab;
    --good-soft: #13372b;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-lift: 0 10px 30px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 500 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--blue); }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { letter-spacing: -0.02em; }
.hidden { display: none !important; }

.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 12px 20px;
  border: 0; border-radius: var(--r-md);
  background: var(--navy); color: var(--navy-ink);
  font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none;
  box-shadow: var(--shadow-lift);
  transition: transform 0.12s ease, opacity 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; }
.btn.block { width: 100%; }
.btn.soft { background: var(--blue-soft); color: var(--blue); box-shadow: none; }
.btn.ghost { background: var(--surface); color: var(--ink); box-shadow: none; border: 1px solid var(--line); }
.btn.danger { background: var(--danger-soft); color: var(--danger); box-shadow: none; }
.btn.small { min-height: 38px; padding: 8px 14px; font-size: 14px; border-radius: var(--r-sm); }

/* ---------- forms ---------- */
label { display: block; font-size: 14px; font-weight: 700; margin: 0 0 8px; }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; font-weight: 500; }
.field { margin: 0 0 16px; }
input[type='text'], input[type='password'], input[type='search'], input[type='date'], input[type='number'], select {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg);
  outline: none;
  font-weight: 600;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder { color: var(--muted); font-weight: 500; opacity: 0.8; }
input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
input[type='file'] {
  width: 100%; font-size: 14px; font-weight: 600; color: var(--muted);
  padding: 14px; border: 1.5px dashed var(--line); border-radius: var(--r-md); background: var(--bg);
}
input[type='file']::file-selector-button {
  font: inherit; font-weight: 700; color: var(--blue); background: var(--blue-soft);
  border: 0; border-radius: 999px; padding: 8px 14px; margin-right: 10px; cursor: pointer;
}

/* ---------- surfaces ---------- */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 20px;
}
.card + .card { margin-top: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 14px; }
.card-head h3 { margin: 0; font-size: 17px; font-weight: 700; }
.card-head .link { font-size: 14px; font-weight: 700; color: var(--blue); background: none; border: 0; cursor: pointer; padding: 0; }

.notice { border-radius: var(--r-sm); padding: 12px 14px; font-size: 14px; font-weight: 600; margin: 0 0 16px; }
.notice.error { background: var(--danger-soft); color: var(--danger); }
.notice.info { background: var(--blue-soft); color: var(--blue); }
.notice.warn { background: var(--warn-soft); color: var(--warn-ink); }

/* ---------- hero with mascot ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(255, 255, 255, 0.9), transparent 60%),
    linear-gradient(180deg, var(--hero-top) 0%, var(--hero-bottom) 100%);
  padding: 18px 16px 16px;
  box-shadow: var(--shadow);
}
.hero::before {
  /* soft light beams */
  content: '';
  position: absolute; inset: -20% 10% auto;
  height: 80%;
  background: repeating-linear-gradient(100deg, rgba(255, 255, 255, 0) 0 34px, rgba(255, 255, 255, 0.28) 34px 52px);
  filter: blur(6px);
  opacity: 0.7;
  pointer-events: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .hero::before { opacity: 0.12; }
  :root:not([data-theme='light']) .hero { background: linear-gradient(180deg, var(--hero-top), var(--hero-bottom)); }
}
.hero-title { position: relative; display: flex; align-items: center; gap: 6px; font-size: 18px; font-weight: 800; margin: 0; }
.stage { position: relative; display: grid; place-items: center; padding: 8px 0 6px; min-height: 190px; }
.bubble {
  position: relative; z-index: 2;
  background: var(--surface); color: var(--ink);
  font-size: 14px; font-weight: 600; line-height: 1.35;
  padding: 10px 14px; border-radius: 16px;
  box-shadow: var(--shadow);
  max-width: 230px; text-align: center;
  margin: 0 0 6px;
}
.bubble::after {
  content: '';
  position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%) rotate(45deg);
  width: 14px; height: 14px; background: var(--surface); border-radius: 3px;
}
.mascot { width: 132px; height: 140px; display: block; position: relative; z-index: 1; }
.mascot svg { width: 100%; height: 100%; overflow: visible; }
.bob { animation: bob 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.sparkle { position: absolute; color: #fff; opacity: 0.95; animation: twinkle 2.6s ease-in-out infinite; }
.sparkle svg { display: block; width: 100%; height: 100%; }
@keyframes twinkle { 0%, 100% { transform: scale(1); opacity: 0.95; } 50% { transform: scale(0.7); opacity: 0.5; } }
@media (prefers-reduced-motion: reduce) { .bob, .sparkle { animation: none; } }

.tiles { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.tile { background: var(--surface); border-radius: 14px; padding: 10px 12px; box-shadow: 0 1px 2px rgba(25, 45, 90, 0.06); }
.tile .k { font-size: 13px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.tile .v { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- sign-in ---------- */
.signin-bg {
  min-height: 100vh;
  background:
    radial-gradient(60% 45% at 85% 5%, rgba(61, 126, 245, 0.22), transparent 70%),
    radial-gradient(55% 40% at 0% 100%, rgba(61, 126, 245, 0.16), transparent 70%),
    var(--bg);
}
.signin { max-width: 420px; margin: 0 auto; padding: 28px 16px 40px; }
.signin .hero { margin-bottom: 14px; }
.signin h1 { font-size: 26px; font-weight: 800; margin: 2px 0 4px; }
.signin .tagline { color: var(--muted); margin: 0 0 20px; font-size: 15px; }
.code-input {
  font-family: var(--mono) !important;
  font-size: 24px !important;
  font-weight: 700 !important;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
  min-height: 62px !important;
}
.foot { margin: 16px 0 0; font-size: 13px; color: var(--muted); text-align: center; }

/* ---------- library ---------- */
.greet { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 0 16px; }
.greet h1 { margin: 0; font-size: 22px; font-weight: 800; }
.greet p { margin: 2px 0 0; color: var(--muted); font-size: 14px; font-weight: 600; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border-radius: 14px; padding: 8px 12px;
  font-weight: 800; font-size: 15px; box-shadow: var(--shadow); white-space: nowrap;
}
.cta { margin: 16px 0 6px; }
.cta-sub { text-align: center; font-size: 13px; color: var(--muted); margin: 8px 0 18px; font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 700;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chip[aria-pressed='true'] { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 4px 12px rgba(61, 126, 245, 0.35); }

.search { margin: 14px 0 0; }

.list { list-style: none; margin: 0; padding: 0; }
.list li + li { margin-top: 4px; }
.item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 6px; border-radius: 14px;
  color: var(--ink); text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.item:active { background: var(--blue-soft); }
.icon-tile {
  flex: none; width: 44px; height: 44px; border-radius: 13px;
  display: grid; place-items: center; font-size: 22px;
  background: var(--blue-soft);
}
.item .txt { flex: 1; min-width: 0; }
.item .t { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-weight: 700; line-height: 1.3; }
.item .d { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.item .chev { color: var(--muted); font-size: 22px; line-height: 1; }
.new-badge { display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; color: #fff; background: var(--blue); border-radius: 999px; padding: 2px 7px; vertical-align: 2px; }
.empty { text-align: center; color: var(--muted); padding: 28px 8px; font-weight: 600; }
.topnav { display: flex; justify-content: flex-end; padding: 14px 0 0; }
.linkbtn { background: none; border: 0; padding: 6px 0; color: var(--muted); cursor: pointer; font-size: 14px; font-weight: 700; }
.page-foot { padding: 24px 0 40px; text-align: center; font-size: 13px; color: var(--muted); font-weight: 600; }

/* ---------- admin ---------- */
.seg { display: flex; gap: 4px; padding: 5px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); margin: 0 0 16px; }
.seg button { flex: 1; border: 0; border-radius: 14px; background: transparent; padding: 11px; font-weight: 700; cursor: pointer; color: var(--muted); }
.seg button[aria-selected='true'] { background: var(--blue); color: #fff; box-shadow: 0 4px 12px rgba(61, 126, 245, 0.35); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .row { grid-template-columns: 1fr; } }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 14px; }
.stat { background: var(--surface); border-radius: 16px; padding: 12px; box-shadow: var(--shadow); }
.stat .k { font-size: 12px; font-weight: 700; color: var(--muted); }
.stat .v { font-size: 22px; font-weight: 800; }
.codes { display: grid; gap: 12px; }
.code-card { background: var(--surface); border-radius: 22px; padding: 16px; box-shadow: var(--shadow); }
.code-card .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.code-card .name { font-weight: 800; }
.code-card .code { font-family: var(--mono); font-size: 18px; font-weight: 700; letter-spacing: 0.08em; margin: 2px 0 0; }
.code-card .meta { font-size: 13px; color: var(--muted); font-weight: 600; margin: 10px 0 0; }
.code-card .meta div + div { margin-top: 3px; }
.code-card .actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.status { display: inline-block; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.status.unused { background: var(--bg-deep); color: var(--muted); }
.status.active { background: var(--good-soft); color: var(--good); }
.status.idle { background: var(--blue-soft); color: var(--blue); }
.status.off { background: var(--danger-soft); color: var(--danger); }
.created-list { display: grid; gap: 10px; }
.created-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 12px 14px; border-radius: 16px; background: var(--blue-soft); }
.created-item .code { font-family: var(--mono); font-size: 19px; font-weight: 700; letter-spacing: 0.08em; }
.edit-box { margin: 14px 0 0; padding: 14px 0 0; border-top: 1.5px dashed var(--line); }
.rev-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.rev-row + .rev-row { border-top: 1px solid var(--line); }
.rev-row .txt { flex: 1; min-width: 0; }
.rev-row .t { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rev-row .d { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.rev-actions { display: flex; gap: 6px; }
.progress { height: 8px; background: var(--bg-deep); border-radius: 999px; overflow: hidden; margin: 12px 0 0; }
.progress > div { height: 100%; width: 0; background: var(--blue); border-radius: 999px; transition: width 0.2s; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--navy); color: var(--navy-ink); padding: 12px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 700; z-index: 50; box-shadow: var(--shadow-lift); max-width: calc(100vw - 32px);
}

/* ---------- order page ---------- */
.step-head { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.step-num {
  flex: none; width: 28px; height: 28px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--blue); color: #fff; font-size: 14px; font-weight: 800;
}
.step-head h2 { margin: 0; font-size: 17px; font-weight: 800; }
.plans { display: grid; gap: 10px; }
.plan {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--r-md);
  background: var(--bg); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.plan input { position: absolute; opacity: 0; pointer-events: none; }
.plan .radio {
  flex: none; width: 22px; height: 22px; border-radius: 999px;
  border: 2px solid var(--line); background: var(--surface); position: relative;
}
.plan .pt { flex: 1; min-width: 0; }
.plan .pt b { display: block; font-size: 16px; font-weight: 800; }
.plan .pt span { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.plan .pp { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.plan.is-checked { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 3px var(--blue-soft); }
.plan.is-checked .radio { border-color: var(--blue); }
.plan.is-checked .radio::after {
  content: ''; position: absolute; inset: 4px; border-radius: 999px; background: var(--blue);
}
.qr-box {
  display: block; width: min(240px, 100%); margin: 0 auto 6px;
  background: #fff; border-radius: 18px; padding: 10px; box-shadow: var(--shadow);
}
.qr-box img { display: block; width: 100%; height: auto; border-radius: 8px; }
.qr-actions { display: flex; justify-content: center; margin: 4px 0 14px; }
.pay-rows { display: grid; gap: 8px; margin: 0 0 12px; }
.pay-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border-radius: 14px; background: var(--bg);
}
.pay-row .k { font-size: 13px; font-weight: 700; color: var(--muted); }
.pay-row .v { font-size: 16px; font-weight: 800; text-align: right; }
.pay-row .v.big { font-size: 20px; color: var(--blue); }
.pay-row .num { font-family: var(--mono); letter-spacing: 0.04em; }
.copy-btn {
  border: 0; background: var(--blue-soft); color: var(--blue); font: inherit; font-size: 13px; font-weight: 800;
  padding: 7px 12px; border-radius: 999px; cursor: pointer; margin-left: 8px;
}
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; margin: 4px 0 14px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.file-drop {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 12px; border: 1.5px dashed var(--line); border-radius: var(--r-md);
  background: var(--bg); color: var(--blue); font-weight: 800; cursor: pointer; text-align: center;
}
.file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.shot-preview { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--r-md); background: var(--bg); }
.shot-preview img { width: 64px; height: 88px; object-fit: cover; border-radius: 10px; background: var(--line); }
.shot-preview .txt { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; }
.shot-preview .txt span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.success { text-align: center; }
.success .check {
  width: 64px; height: 64px; margin: 4px auto 12px; border-radius: 999px;
  display: grid; place-items: center; background: var(--good-soft); color: var(--good); font-size: 32px; font-weight: 800;
}
.success h2 { margin: 0 0 6px; font-size: 24px; font-weight: 800; }
.order-no { display: inline-block; font-family: var(--mono); font-size: 24px; font-weight: 800; letter-spacing: 0.08em; color: var(--blue); background: var(--blue-soft); padding: 8px 16px; border-radius: 14px; margin: 6px 0 14px; }
.next-steps { text-align: left; margin: 6px 0 18px; padding: 0; list-style: none; display: grid; gap: 10px; }
.next-steps li { display: flex; gap: 10px; font-size: 15px; }
.next-steps li b { flex: none; width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-size: 13px; }
.stack { display: grid; gap: 10px; }

/* ---------- admin orders ---------- */
.order-card { background: var(--surface); border-radius: 22px; padding: 16px; box-shadow: var(--shadow); }
.order-card .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.order-card .oid { font-family: var(--mono); font-size: 18px; font-weight: 800; letter-spacing: 0.06em; }
.order-card .plan-line { font-weight: 800; margin-top: 2px; }
.order-card dl { margin: 12px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 14px; }
.order-card dt { color: var(--muted); font-weight: 700; }
.order-card dd { margin: 0; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.order-card .ref { font-family: var(--mono); letter-spacing: 0.04em; }
.order-card .shot { margin: 12px 0 0; }
.order-card .shot img { display: block; max-width: 100%; max-height: 420px; border-radius: 14px; border: 1px solid var(--line); }
.order-card .actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.order-card .code-box { margin: 12px 0 0; padding: 12px 14px; border-radius: 16px; background: var(--good-soft); }
.order-card .code-box .code { font-family: var(--mono); font-size: 19px; font-weight: 800; letter-spacing: 0.08em; }
.btn.good { background: var(--good); color: #fff; box-shadow: none; }
.tab-badge { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 12px; line-height: 18px; margin-left: 4px; }
.filters { margin: 0 0 14px; }
.pay-row .v { display: inline-flex; align-items: center; justify-content: flex-end; white-space: nowrap; }
.seg button { font-size: 14px; padding: 11px 4px; white-space: nowrap; }
/* payment status on codes */
.status.paid { background: var(--good-soft); color: var(--good); }
.status.unpaid { background: var(--warn-soft); color: var(--warn-ink); }
.code-card .pay-line { margin: 8px 0 0; }
.stats.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 480px) { .stats.four { grid-template-columns: repeat(2, 1fr); } }

/* pay-later promise + folded list */
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.promise {
  position: relative; display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; margin: 0 0 14px; border-radius: var(--r-md);
  background: var(--blue-soft); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.promise input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.promise .box {
  flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 8px;
  border: 2px solid var(--blue); background: var(--surface); display: grid; place-items: center;
  transition: background 0.15s;
}
.promise input:checked + .box { background: var(--blue); }
.promise input:checked + .box::after { content: '✓'; color: #fff; font-size: 15px; font-weight: 800; line-height: 1; }
.promise input:focus-visible + .box { outline: 2px solid var(--blue); outline-offset: 2px; }
.promise .ptxt b { display: block; font-weight: 800; }
.promise .ptxt > span { display: block; margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--muted); }
.plan .pp { min-width: 2ch; text-align: right; }
.status.free { background: #f1e8ff; color: #7442cc; }
@media (prefers-color-scheme: dark) { .status.free { background: #2c2150; color: #c9adff; } }

/* ===================== BoxedAns additions ===================== */
textarea {
  width: 100%; min-height: 96px; padding: 12px 16px; resize: vertical;
  border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--bg);
  outline: none; font: inherit; font-weight: 600; color: inherit;
}
textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row2 .btn { min-width: 0; padding-left: 10px; padding-right: 10px; }

/* sign-in: waiting order shortcut */
.order-reminder { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-bottom: 14px; padding: 14px 16px; }
.order-reminder .txt { flex: 1; min-width: 0; }
.order-reminder .txt b { display: block; font-weight: 800; }
.order-reminder .txt span { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.order-reminder .chev { color: var(--muted); font-size: 22px; }

/* order page */
.me-top { display: flex; align-items: center; gap: 12px; }
.me-top .txt { flex: 1; min-width: 0; }
.me-top .txt b { display: block; font-weight: 800; }
.me-top .txt span { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.best { display: inline-block; margin-left: 8px; font-size: 10px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: #fff; background: var(--good); border-radius: 999px; padding: 2px 8px; vertical-align: 2px; }
.plan.is-disabled { opacity: 0.55; cursor: default; }
.plan.is-disabled .pp { color: var(--good); }
.majors { margin: 14px 0 0; padding: 14px; border-radius: var(--r-md); background: var(--bg); }
.chip:disabled { opacity: 1; cursor: default; }
.nudge { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0 0; padding: 12px 14px; border-radius: var(--r-md); background: var(--good-soft); color: var(--good); font-size: 14px; font-weight: 700; }
.nudge .btn { flex: none; background: var(--good); color: #fff; box-shadow: none; }
#summary { margin: 4px 0 14px; }
.success .check.wait { background: var(--blue-soft); color: var(--blue); }
.success .check.bad { background: var(--danger-soft); color: var(--danger); }
.st-text { margin: 0 0 6px; font-size: 15px; color: var(--ink); }
.code-reveal { margin: 14px 0 0; padding: 14px; border-radius: var(--r-md); background: var(--good-soft); }
.code-reveal .code { font-family: var(--mono); font-size: 26px; font-weight: 800; letter-spacing: 0.1em; color: var(--ink); }

/* library */
.banner { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 12px 14px; border-radius: var(--r-md); background: var(--warn-soft); color: var(--warn-ink); font-size: 14px; font-weight: 700; }
.banner .b-ico { font-size: 20px; }
.banner .b-txt { flex: 1; min-width: 0; }
.banner .btn { flex: none; background: var(--warn-ink); color: var(--surface); box-shadow: none; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 999px; background: var(--danger); vertical-align: 2px; margin-left: 4px; }
.post { padding: 12px 14px; border-radius: 16px; background: var(--bg); }
.post + .post { margin-top: 8px; }
.post.pinned { background: var(--blue-soft); }
.post.unread { box-shadow: inset 3px 0 0 var(--blue); }
.post-meta { font-size: 12px; font-weight: 700; color: var(--muted); margin: 0 0 4px; }
.post-text { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
#postsCard { margin-bottom: 14px; }
.row-item { display: flex; align-items: center; gap: 2px; }
.row-item .item { flex: 1; min-width: 0; }
.item.locked .t { color: var(--muted); }
.item.locked .icon-tile { background: var(--bg-deep); }
.star { flex: none; width: 44px; height: 44px; border: 0; background: none; border-radius: 12px; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.star.on { color: #f0a400; }
.star:active { background: var(--blue-soft); }
.star-btn { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.star-btn[aria-pressed='true'] { border-color: #f0a400; color: #b77c00; background: #fff6dc; }
.saved-chip[aria-pressed='true'] { background: #f0a400; border-color: #f0a400; box-shadow: 0 4px 12px rgba(240, 164, 0, 0.35); }
.meter { height: 10px; border-radius: 999px; background: var(--bg-deep); overflow: hidden; }
.meter > div { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--good)); transition: width 0.3s; }
.install-top { display: flex; align-items: center; gap: 12px; }
.install-top img { border-radius: 14px; box-shadow: var(--shadow); flex: none; }
.install-top .txt b { display: block; font-weight: 800; }
.install-top .txt span { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.ios-steps { margin: 14px 0 0; padding: 0 0 0 20px; display: grid; gap: 8px; font-size: 15px; }
.share-ico { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--blue-soft); color: var(--blue); font-size: 13px; }
.code-line { font-family: var(--mono); font-size: 22px; font-weight: 800; letter-spacing: 0.1em; margin: 0; }
.wrap > .card { margin-top: 14px; }
.wrap > .card + .card { margin-top: 14px; }

/* admin: more tabs fit on a phone */
.seg.tabs5 { gap: 2px; padding: 4px; }
.seg.tabs5 button { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 2px 6px; font-size: 11.5px; line-height: 1.2; white-space: nowrap; }
.seg.tabs5 button .ti { font-size: 19px; line-height: 1.1; }
.seg.tabs5 .tab-badge { position: absolute; top: 2px; right: 4px; margin: 0; min-width: 18px; padding: 0 5px; font-size: 11px; line-height: 17px; }
.tag { display: inline-block; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--bg-deep); color: var(--muted); white-space: nowrap; margin: 0 4px 4px 0; }
.tag.blue { background: var(--blue-soft); color: var(--blue); }
.tag.good { background: var(--good-soft); color: var(--good); }
.tag.warn { background: var(--warn-soft); color: var(--warn-ink); }
.tag.bad { background: var(--danger-soft); color: var(--danger); }
.check-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-weight: 700; cursor: pointer; }
.check-row input { width: 20px; height: 20px; accent-color: var(--blue); flex: none; }
.req-group + .req-group { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.req-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; }
.req-item .txt { flex: 1; min-width: 0; }
.req-item .txt b { display: block; font-weight: 700; overflow-wrap: anywhere; }
.req-item .txt span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.count-badge { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 13px; font-weight: 800; flex: none; }

.plan .pt .best { display: inline-block; margin: 0 0 0 8px; font-size: 10px; color: #fff; font-weight: 800; }
.invite-link { margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg); font-family: var(--mono); font-size: 13px; font-weight: 700; word-break: break-all; }
