/* Sign-in and admin pages, in the redesign's editorial pop: ink lines,
   acid lime, Bricolage Grotesque headlines over Inter. Light and dark. */
:root {
  --bg: #FAFAF8;
  --panel: #FFFFFF;
  --soft: #F1EEE6;
  --ink: #0E0E0E;
  --fg: #0E0E0E;
  --muted: #5A5A5A;
  --line: #0E0E0E;
  --hair: #E4E1D8;
  --lime: #D4FF3A;
  --pink: #FF3D7F;
  --on-ink: #FFFFFF;
  --shadow: 6px 6px 0 var(--line);
  --shadow-sm: 3px 3px 0 var(--line);
  --ok: #1F8A3A;
  --bad: #C2263B;
  color-scheme: light;
}
/* Dark: the same values as theme.css (lime hard shadows); theme.js sets
   data-theme when someone taps the toggle. */
:root[data-theme="dark"] {
    --bg: #0E0E0E; --panel: #1A1A19; --soft: #262624; --fg: #F4F4EF; --muted: #A3A39B;
    --line: #F4F4EF; --hair: #33322E; --on-ink: #0E0E0E; --ok: #7BE08F; --bad: #FF8A9B;
    --shadow: 6px 6px 0 #D4FF3A; --shadow-sm: 3px 3px 0 #D4FF3A; color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0E0E; --panel: #1A1A19; --soft: #262624; --fg: #F4F4EF; --muted: #A3A39B;
    --line: #F4F4EF; --hair: #33322E; --on-ink: #0E0E0E; --ok: #7BE08F; --bad: #FF8A9B;
    --shadow: 6px 6px 0 #D4FF3A; --shadow-sm: 3px 3px 0 #D4FF3A; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "PingFang TC", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; }
.hidden { display: none !important; }
.display { font-family: "Bricolage Grotesque", Inter, sans-serif; font-weight: 800; letter-spacing: -0.04em; }
.hl { background: var(--lime); color: #0E0E0E; padding: 0 0.18em; border-radius: 0.22em; display: inline-block; transform: rotate(-2deg); }

/* brand */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 12px; border: 2px solid var(--line); }
.brand span { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 26px; letter-spacing: -1px; }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 999px;
  border: 2px solid var(--line); background: var(--panel); color: var(--fg); font-weight: 700; text-decoration: none; box-shadow: var(--shadow-sm);
  transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: var(--shadow); }
.btn:active { transform: translate(2px, 2px); box-shadow: none; }
.btn.ink { background: var(--line); color: var(--lime); }
:root[data-theme="dark"] .btn.ink, .dark-ink .btn.ink { color: #0E0E0E; background: var(--lime); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.ink { color: #0E0E0E; background: var(--lime); } }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.field { width: 100%; min-height: 52px; padding: 0 18px; border-radius: 16px; border: 2px solid var(--line); background: var(--panel); outline: none; }
.field:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 70%, transparent); }
.field.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
label.lbl { display: block; font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; margin: 0 0 6px; color: var(--muted); }
.icon-btn { position: relative; width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 12px; border: 2px solid var(--line); background: var(--panel); flex: none; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--lime); color: #0E0E0E; }
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--line); color: var(--bg); font: 600 12px/1.3 Inter, sans-serif; padding: 6px 10px; border-radius: 8px; white-space: nowrap; z-index: 20; pointer-events: none; }

/* switch and segmented control (no native checkboxes or selects) */
.switch { width: 52px; height: 30px; border-radius: 999px; border: 2px solid var(--line); background: var(--soft); padding: 0; position: relative; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--line); transition: left .15s; }
.switch[aria-checked="true"] { background: var(--lime); }
.switch[aria-checked="true"]::after { left: 25px; background: #0E0E0E; }
.seg { display: inline-flex; flex-wrap: wrap; max-width: 100%; gap: 4px; padding: 4px; border: 2px solid var(--line); border-radius: 24px; background: var(--panel); }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 14px; min-height: 36px; }
.seg button[aria-pressed="true"] { background: var(--line); color: var(--bg); }

.error { color: var(--bad); font-weight: 600; font-size: 14px; }
.ok { color: var(--ok); font-weight: 600; font-size: 14px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill.lime { background: var(--lime); color: #0E0E0E; border-color: #0E0E0E; }
.pill.pink { background: var(--pink); color: #fff; border-color: #0E0E0E; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--line); color: var(--bg); padding: 12px 20px; border-radius: 999px; font-weight: 700; z-index: 50; }

/* ------------------------------------------------------------ sign-in */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login .stage { position: relative; overflow: hidden; background: var(--lime); color: #0E0E0E; border-right: 2px solid #0E0E0E; padding: 40px clamp(24px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.login .stage .brand img { border-color: #0E0E0E; }
.login .stage h1 { margin: 0; font-size: clamp(48px, 6.4vw, 96px); line-height: .92; }
.login .stage h1 .hl { background: #0E0E0E; color: var(--lime); }
.login .stage p { font-size: 19px; max-width: 26rem; margin: 18px 0 0; color: #1E1E1E; }
.cast { position: relative; height: 210px; }
.cast img { position: absolute; width: 112px; height: 112px; border-radius: 50%; border: 2.5px solid #0E0E0E; background: #fff; box-shadow: 5px 5px 0 #0E0E0E; animation: bob 4s ease-in-out infinite; }
.cast img:nth-child(1) { left: 0; top: 70px; background: #FFE4EF; }
.cast img:nth-child(2) { left: 18%; top: 0; animation-delay: .5s; background: #DFF0FF; }
.cast img:nth-child(3) { left: 36%; top: 84px; animation-delay: 1s; background: #FFEBD6; }
.cast img:nth-child(4) { left: 54%; top: 8px; animation-delay: 1.5s; background: #EBE4FF; }
.cast img:nth-child(5) { left: 72%; top: 76px; animation-delay: 2s; background: #E3F6E1; }
.bubble { position: absolute; background: #fff; border: 2px solid #0E0E0E; border-radius: 18px 18px 18px 4px; padding: 8px 14px; font-weight: 700; font-size: 14px; box-shadow: 3px 3px 0 #0E0E0E; white-space: nowrap; animation: bob 4.6s ease-in-out .8s infinite; }
@keyframes bob { 50% { transform: translateY(-7px); } }
@media (prefers-reduced-motion: reduce) { .cast img, .bubble { animation: none; } }
.login .side { display: grid; place-items: center; padding: 40px 20px; }
.card { width: 100%; max-width: 420px; background: var(--panel); border: 2px solid var(--line); border-radius: 26px; box-shadow: var(--shadow); padding: 32px 28px; }
.card h2 { margin: 0 0 6px; font-size: 34px; line-height: 1.05; }
.card .sub { margin: 0 0 24px; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; font-weight: 600; margin: 8px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 2px; background: var(--hair); }
.invite { display: flex; gap: 14px; align-items: center; border: 2px dashed var(--line); border-radius: 18px; padding: 12px 14px; margin: 0 0 22px; }
.invite .avs { display: flex; padding-left: 10px; flex: none; }
.invite .avs img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line); margin-left: -10px; background: var(--soft); }
.invite b { display: block; font-size: 14px; }
.invite span { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fine { font-size: 12px; color: var(--muted); margin: 18px 0 0; }
/* The OAuth consent page (src/oauth.js) for MCP clients. */
.grants { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.grants li { position: relative; padding: 10px 12px 10px 40px; border: 2px solid var(--hair); border-radius: 14px; font-weight: 600; font-size: 15px; }
.grants li::before { content: ""; position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: var(--lime); border: 2px solid var(--line); }
.warn { margin: 14px 0 0; padding: 10px 12px; border: 2px dashed var(--bad); border-radius: 14px; font-size: 13px; color: var(--fg); }
.login.one { grid-template-columns: 1fr; }
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login .stage { border-right: 0; border-bottom: 2px solid #0E0E0E; padding: 22px 16px 26px; }
  .login .stage h1 { font-size: 52px; }
  .login .stage p { font-size: 16px; }
  .cast { height: 120px; }
  .cast img { width: 64px; height: 64px; box-shadow: 3px 3px 0 #0E0E0E; }
  .cast img:nth-child(1) { top: 40px; } .cast img:nth-child(3) { top: 46px; } .cast img:nth-child(5) { top: 42px; }
  .bubble { display: none; }
  .login .side { padding: 24px 16px 40px; place-items: start center; }
  .card { padding: 24px 20px; }
}

/* ------------------------------------------------------------ console */
.admin { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.admin nav { border-right: 2px solid var(--line); padding: 22px 16px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; background: var(--bg); }
.admin nav .brand { margin: 0 6px 22px; gap: 8px; min-width: 0; }
.admin nav .brand img { width: 34px; height: 34px; border-radius: 10px; }
.admin nav .brand span { font-size: 23px; }
.admin nav .brand em { font-style: normal; font-size: 11px; font-weight: 800; text-transform: uppercase; background: var(--lime); color: #0E0E0E; border: 1.5px solid #0E0E0E; border-radius: 999px; padding: 2px 7px; margin-left: 2px; letter-spacing: 1px; white-space: nowrap; }
.admin nav a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; text-decoration: none; font-weight: 600; border: 2px solid transparent; }
.admin nav a svg { width: 19px; height: 19px; flex: none; }
.admin nav a:hover { background: var(--soft); }
.admin nav a[aria-current="page"] { border-color: var(--line); background: var(--lime); color: #0E0E0E; box-shadow: var(--shadow-sm); }
.admin nav .me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 8px 0; border-top: 2px solid var(--hair); }
.admin nav .me img, .avatar { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); background: var(--soft); object-fit: cover; flex: none; }
.avatar.ph { display: grid; place-items: center; font-weight: 800; font-size: 14px; background: var(--lime); color: #0E0E0E; }
.admin nav .me div { min-width: 0; flex: 1; font-size: 13px; }
.admin nav .me div b, .admin nav .me div span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin nav .me div span { color: var(--muted); }
.admin main { padding: 32px clamp(16px, 4vw, 48px) 64px; min-width: 0; max-width: 1180px; }
.admin h1 { margin: 0 0 4px; font-size: 44px; line-height: 1; }
.admin .lead { margin: 0 0 28px; color: var(--muted); }
.admin .nav-sec { display: flex; flex-direction: column; gap: 2px; }
.admin .nav-sec + .nav-sec { margin-top: 14px; }
.admin .nav-sec-title { margin: 0 0 4px; padding: 0 14px; font-size: 11px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.subtabs { display: flex; gap: 4px; margin: 0 0 24px; border-bottom: 2px solid var(--hair); overflow-x: auto; scrollbar-width: none; }
.subtabs a { padding: 10px 14px; margin-bottom: -2px; border-bottom: 3px solid transparent; text-decoration: none; font-weight: 700; color: var(--muted); white-space: nowrap; }
.subtabs a:hover { color: var(--fg); }
.subtabs a[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--fg); }
.grid { display: grid; gap: 18px; }
.stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 22px; }
.stat { border: 2px solid var(--line); border-radius: 20px; padding: 18px 20px; background: var(--panel); box-shadow: var(--shadow-sm); }
.stat b { display: block; font-family: "Bricolage Grotesque", sans-serif; font-size: 44px; line-height: 1; letter-spacing: -2px; }
.stat span { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat.lime { background: var(--lime); color: #0E0E0E; } .stat.lime span { color: #2B2B2B; }
.stat .bar { display: block; height: 8px; margin-top: 12px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.stat .bar i { display: block; height: 100%; border-radius: inherit; background: var(--ok); }
.stat.warn .bar i { background: var(--bad); }
.stat.warn b { color: var(--bad); }
.stat.meter b { white-space: nowrap; }
.panel { border: 2px solid var(--line); border-radius: 22px; background: var(--panel); padding: 22px; box-shadow: var(--shadow-sm); min-width: 0; }
.panel h3 { margin: 0 0 4px; font-family: "Bricolage Grotesque", sans-serif; font-size: 22px; letter-spacing: -0.5px; }
.panel .hint { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.panel-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.panel-head .logo { width: 48px; height: 48px; border-radius: 14px; border: 2px solid var(--line); display: grid; place-items: center; background: var(--soft); flex: none; }
.panel-head .logo svg { width: 26px; height: 26px; }
.panel-head > div { flex: 1; min-width: 0; }
.panel-head h3 { margin: 0; }
.row { display: flex; gap: 10px; align-items: center; }
.row > .grow { flex: 1; min-width: 0; }
.form { display: grid; gap: 14px; }
.form > * { min-width: 0; }
.form.two { grid-template-columns: 1fr 1fr; }
.copy { display: flex; align-items: center; gap: 8px; background: var(--soft); border: 2px dashed var(--line); border-radius: 14px; padding: 6px 6px 6px 14px; }
.copy code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.checks { display: grid; gap: 10px; }
.check { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 2px solid var(--hair); border-radius: 14px; }
.check .mark { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); flex: none; font-weight: 900; }
.check.yes .mark { background: var(--lime); color: #0E0E0E; }
.check.no .mark { background: var(--pink); color: #fff; }
.check div { flex: 1; min-width: 0; } .check b { display: block; font-size: 14px; } .check span { font-size: 13px; color: var(--muted); }
.table { width: 100%; overflow-x: auto; border: 2px solid var(--line); border-radius: 20px; background: var(--panel); }
.table table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.table th { text-align: left; font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 2px solid var(--line); }
.table td { padding: 12px 14px; border-bottom: 1.5px solid var(--hair); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.who { display: flex; gap: 10px; align-items: center; min-width: 0; }
.who b, .who span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.who span { color: var(--muted); font-size: 13px; }
.num { font-variant-numeric: tabular-nums; font-weight: 700; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .field { max-width: 360px; min-height: 44px; }
.previews { display: grid; grid-template-columns: 220px 1fr; gap: 18px; }
.tlist { display: flex; flex-direction: column; gap: 8px; }
.tlist button { text-align: left; border: 2px solid var(--line); border-radius: 14px; background: var(--panel); padding: 12px 14px; font-weight: 700; }
.tlist button span { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.tlist button[aria-pressed="true"] { background: var(--lime); color: #0E0E0E; box-shadow: var(--shadow-sm); }
.tlist button[aria-pressed="true"] span { color: #2B2B2B; }
.frame { border: 2px solid var(--line); border-radius: 20px; overflow: hidden; background: #FAFAF8; }
.frame .bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 2px solid var(--line); background: var(--panel); font-size: 13px; }
.frame .bar svg { width: 18px; height: 18px; flex: none; }
.frame .bar b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frame iframe { width: 100%; height: 620px; border: 0; display: block; background: #FAFAF8; }
.sheet { position: fixed; inset: 0; background: rgb(14 14 14 / .45); display: grid; place-items: center; padding: 16px; z-index: 40; }
.sheet .card { max-width: 440px; }
.mobile-top { display: none; }
@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; align-content: start; }
  .admin nav { position: static; height: auto; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 2px solid var(--line); padding: 10px 12px; gap: 6px; }
  .admin nav .brand, .admin nav .me { display: none; }
  .admin .nav-sec { display: contents; }
  .admin .nav-sec-title { display: none; }
  .admin nav a { white-space: nowrap; padding: 8px 12px; }
  .mobile-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 2px solid var(--line); }
  .admin main { padding: 22px 16px 48px; }
  .admin h1 { font-size: 34px; }
  .form.two, .previews { grid-template-columns: 1fr; }
  .frame iframe { height: 560px; }
}

.theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: block; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: none; }
}
.corner { position: fixed; top: 16px; right: 16px; z-index: 30; }
.corner[data-tip]:hover::after { bottom: auto; top: calc(100% + 8px); left: auto; right: 0; transform: none; }

/* ------------------------------------------------------------ pricing, account, pay */
.shop-top { display: flex; align-items: center; gap: 12px; max-width: 1120px; margin: 0 auto; padding: 18px 20px; }
.shop-top .brand { margin-right: auto; }
.shop-top [data-tip]:hover::after { bottom: auto; top: calc(100% + 8px); }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 8px; border: 2px solid var(--line); border-radius: 999px; background: var(--panel); font-weight: 800; text-decoration: none; font-size: 14px; }
.chip .bean { width: 24px; height: 24px; border-radius: 50%; background: var(--lime); border: 2px solid #0E0E0E; display: grid; place-items: center; color: #0E0E0E; font-size: 12px; }
.chip:hover { background: var(--lime); color: #0E0E0E; }
.shop { max-width: 1120px; margin: 0 auto; padding: 18px 20px 80px; }
.shop h1 { margin: 10px 0 10px; font-size: clamp(44px, 6vw, 84px); line-height: .95; }
.shop .lead { margin: 0 0 26px; color: var(--muted); font-size: 18px; max-width: 38rem; }
.shop h2 { font-size: 30px; margin: 54px 0 6px; letter-spacing: -1px; }
.shop h2 + p { margin: 0 0 20px; color: var(--muted); }
.notice { display: flex; gap: 12px; align-items: center; border: 2px dashed var(--line); border-radius: 16px; padding: 12px 16px; margin: 0 0 22px; font-weight: 600; font-size: 14px; }
.notice.test { background: color-mix(in srgb, var(--lime) 35%, var(--panel)); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 22px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; border: 2px solid var(--line); border-radius: 26px; background: var(--panel); padding: 26px 24px; box-shadow: var(--shadow-sm); }
.plan.hot { background: var(--lime); color: #0E0E0E; box-shadow: var(--shadow); transform: rotate(-.6deg); }
.plan.hot .muted, .plan.hot li { color: #1E1E1E; }
.plan.hot .btn { background: #0E0E0E; color: var(--lime); border-color: #0E0E0E; }
.plan .tag { position: absolute; top: -14px; right: 20px; background: var(--pink); color: #fff; border: 2px solid #0E0E0E; border-radius: 999px; padding: 3px 12px; font-size: 12px; font-weight: 800; transform: rotate(3deg); }
.plan h3 { margin: 0; font-family: "Bricolage Grotesque", sans-serif; font-size: 26px; letter-spacing: -.5px; }
.price { display: flex; align-items: baseline; gap: 6px; margin: 14px 0 2px; }
.price b { font-family: "Bricolage Grotesque", sans-serif; font-size: 54px; line-height: 1; letter-spacing: -2px; }
.price span { font-weight: 600; color: var(--muted); }
.plan.hot .price span { color: #2B2B2B; }
.muted { color: var(--muted); font-size: 14px; margin: 0; }
.plan ul { list-style: none; padding: 0; margin: 20px 0 24px; display: grid; gap: 10px; flex: 1; align-content: start; }
.plan li { position: relative; padding-left: 30px; font-weight: 600; font-size: 15px; }
.plan li::before { content: ""; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); background: var(--lime); }
.plan.hot li::before { background: #fff; border-color: #0E0E0E; }
.plan .btn { width: 100%; }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pack { display: flex; align-items: center; gap: 18px; border: 2px solid var(--line); border-radius: 22px; background: var(--panel); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.pack .n { width: 72px; height: 72px; flex: none; border-radius: 50%; border: 2.5px solid var(--line); background: var(--lime); color: #0E0E0E; display: grid; place-items: center; font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 30px; letter-spacing: -1px; box-shadow: 3px 3px 0 var(--line); }
.pack div { flex: 1; min-width: 0; }
.pack b { display: block; font-size: 17px; }
.pack span { color: var(--muted); font-size: 14px; }
.fineprint { margin: 40px 0 0; color: var(--muted); font-size: 13px; max-width: 44rem; }
.acct { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; }
.acct .panel { box-shadow: var(--shadow-sm); }
.big { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 64px; line-height: 1; letter-spacing: -3px; margin: 8px 0 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.linkish { border: 0; background: none; padding: 0; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; color: var(--muted); }
.delta { font-weight: 800; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--ok); } .delta.down { color: var(--muted); }
.paybox { max-width: 460px; margin: 6vh auto 0; padding: 0 16px 60px; }
.paybox .card { max-width: none; }
.line-item { display: flex; align-items: center; gap: 14px; border: 2px solid var(--hair); border-radius: 16px; padding: 14px; margin: 18px 0; }
.line-item .n { width: 48px; height: 48px; border-radius: 14px; border: 2px solid var(--line); background: var(--lime); color: #0E0E0E; display: grid; place-items: center; font-weight: 800; flex: none; }
.line-item div { flex: 1; min-width: 0; } .line-item b { display: block; } .line-item span { color: var(--muted); font-size: 13px; }
.line-item strong { font-family: "Bricolage Grotesque", sans-serif; font-size: 24px; }
.fake-card { display: flex; align-items: center; gap: 10px; }
.fake-card .field { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 1px; color: var(--muted); }
@media (max-width: 900px) {
  .plans, .packs, .acct { grid-template-columns: 1fr; }
  .plan.hot { transform: none; }
  .shop h2 { margin-top: 40px; }
}

/* admin: reports */
.reports { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.panel.report { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.panel.report .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.panel.report .row .grow { flex: 1; min-width: 10rem; }
.panel.report .hint { margin: 0; }
.panel.report p { margin: 0; }
.panel.report blockquote { margin: 0; padding: 10px 12px; border-left: 4px solid var(--pink); border-radius: 10px; background: var(--bg); display: flex; flex-direction: column; gap: 2px; }
.panel.report blockquote span { white-space: pre-wrap; overflow-wrap: anywhere; }
.panel.report .acts { gap: 4px; }

/* /pricing inside the store apps: credits only, nothing for sale (shop.js) */
.app-credits { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 40px 0 24px; }
.app-credits .beans { display: flex; }
.app-credits .beans img { width: 64px; height: 64px; border-radius: 50%; margin-left: -14px; border: 2px solid var(--fg); background: var(--panel); }
.app-credits .beans img:first-child { margin-left: 0; }
.app-credits h1 { margin: 6px 0 0; }
.app-credits .big { font-family: var(--display); font-weight: 800; font-size: 88px; line-height: 1; letter-spacing: -0.05em; background: var(--lime); color: #0e0e0e; border: 2px solid var(--fg); border-radius: 28px; padding: 6px 28px; box-shadow: var(--hard-lg); }
.app-credits .lead { max-width: 26rem; color: var(--muted); }

/* account: notifications */
.notify-rows { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 24px; }
.notify-row { display: flex; gap: 12px; align-items: center; }
.notify-row span { display: flex; flex-direction: column; }
.notify-row small { color: var(--muted, #5a5a5a); }

/* Language picker (account page) */
.lang-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 24px; }
.lang-pick button { border: 2px solid var(--line); background: var(--card, transparent); color: inherit; border-radius: 999px; padding: 8px 14px; font: 600 14px/1 inherit; font-family: inherit; cursor: pointer; }
.lang-pick button[aria-checked="true"] { background: var(--lime); color: #0E0E0E; border-color: #0E0E0E; }

/* The row of languages at the bottom of pages (i18n.js) */
.lang-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; padding: 18px 16px 8px; font-size: 13px; }
.lang-row button { background: none; border: 0; padding: 4px 2px; color: var(--muted); font: inherit; cursor: pointer; }
.lang-row button:hover { color: var(--fg); text-decoration: underline; }
.lang-row button[aria-current] { color: var(--fg); font-weight: 700; }

/* iOS Safari zooms into any field under 16px when it is tapped; phones get 16px. */
@media (hover: none) and (pointer: coarse) {
  input, textarea, select, [contenteditable="true"] { font-size: 16px !important; }
}

/* Your own tools (account page, src/usertools.js). */
.tool-list { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 14px; }
.tool-item { display: flex; gap: 12px; align-items: flex-start; border: 2px solid var(--line); border-radius: 18px; background: var(--panel); padding: 14px 16px; }
.tool-item .logo { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--soft); flex: none; }
.tool-item .logo svg { width: 20px; height: 20px; }
.tool-item .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tool-item .head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tool-item .head b { font-size: 16px; }
.tool-item .host { color: var(--muted); font-size: 13px; }
.tool-item .names { display: flex; flex-wrap: wrap; gap: 4px; }
.tool-item .names code { font-size: 11.5px; background: var(--soft); border-radius: 6px; padding: 1px 6px; }
.tool-item .btns { display: flex; gap: 6px; flex: none; }
.tool-item .btns .icon-btn { width: 34px; height: 34px; border-radius: 10px; }
.tool-item .btns svg { width: 16px; height: 16px; }
.pill.warn { background: var(--bad); color: #fff; border-color: #0E0E0E; }
.tool-add { border: 2px dashed var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.tool-kinds { display: flex; gap: 8px; flex-wrap: wrap; }
.tool-kinds .kind { display: inline-flex; align-items: center; gap: 8px; border: 2px solid var(--line); border-radius: 999px; background: var(--panel); padding: 7px 14px; font-weight: 700; font-size: 14px; color: inherit; }
.tool-kinds .kind svg { width: 18px; height: 18px; }
.tool-kinds .kind[aria-pressed="true"] { background: var(--lime); color: #0E0E0E; border-color: #0E0E0E; }
.tool-form { display: flex; flex-direction: column; gap: 8px; }
.tool-form .muted a { color: inherit; font-weight: 600; }

/* /terms, /privacy, /refund */
.legal { max-width: 860px; margin: 0 auto; padding: 8px 20px 60px; }
.legal h1 { font-size: clamp(36px, 5vw, 60px); line-height: 1; margin: 18px 0 22px; letter-spacing: -1.5px; }
.legal-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.legal-tabs a { padding: 6px 14px; border: 2px solid var(--line); border-radius: 999px; color: var(--fg); text-decoration: none; font-weight: 600; font-size: 14px; background: var(--panel); }
.legal-tabs a[aria-current] { background: var(--lime); color: #0E0E0E; }
.legal-doc { font-size: 16px; line-height: 1.65; overflow-wrap: anywhere; }
.legal-doc h2 { font-size: 22px; letter-spacing: -.3px; margin: 36px 0 8px; line-height: 1.25; }
.legal-doc p { margin: 10px 0; }
.legal-doc ol, .legal-doc ul { padding-left: 1.5em; margin: 8px 0; }
.legal-doc li { margin: 6px 0; }
.legal-doc a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.legal-doc code { font-size: .9em; background: var(--soft); padding: 1px 5px; border-radius: 5px; }
.legal-doc .md-table { overflow-x: auto; margin: 14px 0; border: 1px solid var(--hair); border-radius: 10px; }
.legal-doc table { border-collapse: collapse; font-size: 14px; line-height: 1.45; min-width: 640px; width: 100%; }
.legal-doc th, .legal-doc td { border-bottom: 1px solid var(--hair); padding: 8px 10px; text-align: left; vertical-align: top; }
.legal-doc th { background: var(--soft); }
.legal-doc tr:last-child td { border-bottom: 0; }

/* Links to the terms, privacy and refund pages at the bottom of pages. */
.legal-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; padding: 0 16px 22px; font-size: 13px; }
.legal-row a { color: var(--muted); text-decoration: none; }
.legal-row a:hover { color: var(--fg); text-decoration: underline; }

/* Console → Support: the conversation list beside the open thread. */
.inbox { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; border: 2px solid var(--line); border-radius: 22px; background: var(--panel); overflow: hidden; min-height: 520px; height: calc(100vh - 260px); }
.inbox-list { border-right: 2px solid var(--line); overflow-y: auto; min-width: 0; }
.inbox-row { display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--soft); background: transparent; color: inherit; font: inherit; cursor: pointer; min-width: 0; }
.inbox-row:hover, .inbox-row[aria-current="true"] { background: var(--soft); }
.inbox-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-row .preview { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.inbox-row small { color: var(--muted); font-size: 12px; }
.inbox-row .unread { width: 9px; height: 9px; border-radius: 50%; background: var(--pink, #ff3d7f); flex: none; }
.inbox-thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.inbox-pick { margin: auto; }
.inbox-head { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-bottom: 2px solid var(--line); }
.inbox-head b { display: block; font-size: 16px; }
.inbox-head .inbox-email { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.inbox-back { display: none; }
.inbox-views { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.inbox-views::-webkit-scrollbar { display: none; }
.inbox-views button { white-space: nowrap; flex: none; }
.inbox-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.inbox-msg { max-width: 78%; display: flex; flex-direction: column; gap: 2px; align-self: flex-start; }
.inbox-msg p { margin: 0; padding: 9px 13px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--panel); white-space: pre-wrap; overflow-wrap: anywhere; }
.inbox-msg small { color: var(--muted); font-size: 12px; padding: 0 6px; }
.inbox-msg.staff, .inbox-msg.note { align-self: flex-end; text-align: right; }
.inbox-msg.staff p { background: var(--line); color: var(--bg); text-align: left; }
.inbox-msg.note p { background: var(--soft); border-style: dashed; border-color: var(--pink, #ff3d7f); text-align: left; }
.inbox-event { align-self: center; margin: 0; font-size: 12px; color: var(--muted); }
.inbox-typing { margin: 0; padding: 0 16px 8px; color: var(--muted); font-size: 13px; }
.inbox-typing[hidden] { display: none; }
.inbox-compose { border-top: 2px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.inbox-compose textarea { width: 100%; resize: vertical; min-height: 70px; }
.inbox-compose textarea.note { border-style: dashed; }
@media (max-width: 760px) {
  .inbox { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .inbox-list { border-right: 0; }
  .inbox.has-thread .inbox-list { display: none; }
  .inbox:not(.has-thread) .inbox-thread { display: none; }
  .inbox-back { display: block; flex: none; }
  .inbox-head { padding: 10px 12px; gap: 8px; align-items: center; }
  .inbox-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .inbox-tags { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .inbox-tags::-webkit-scrollbar { display: none; }
  .inbox-msgs { height: 56vh; min-height: 300px; padding: 12px; }
  .inbox-msg { max-width: 86%; }
  .inbox-compose .hint { display: none; }
  .inbox-views button { padding: 8px 12px; }
}
.inbox-compose .btn { margin-left: auto; }

/* Account page: delete my account. */
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.danger:not(:disabled):hover { background: var(--bad); color: #fff; }
.btn.danger:disabled { opacity: .45; cursor: not-allowed; }
#delete-sheet .field { width: 100%; margin: 6px 0 4px; }
