/* The 貓草帳號 pages (login, reset-password, link, account, panel), loaded only
   by them: the sign-in card and its steps, the launcher's sign-in card, the
   control panel's approval card (`pn-`) and the account centre. Cards and
   inputs follow staff.css. Buttons are rounded rectangles, never pills, and
   chips (`.ac-tag`) are not round either (the owner, 2026-11-20). */

/* Containers (cards, tiles, figure boxes, dialogs and their sheets) are 14 px
   at every width, as everywhere on the site; boxes nested inside them 12 px,
   or 10 px like a field (the key, the code's letters); buttons and fields
   10 px. */
.account-page {
  --ac-card: #222222;
  --ac-line: rgba(255, 255, 255, 0.085);
  --ac-line-strong: rgba(255, 255, 255, 0.15);
  --ac-chip: rgba(255, 255, 255, 0.075);
  --ac-good: #bff982;
  --ac-bad: #ffa294;
  --ac-bad-line: rgba(255, 162, 148, 0.4);
  --ac-radius: 14px;
  --ac-radius-inner: 12px;
}

/* The pages that are themselves the way in show no account entry in the bar. */
.account-auth .nav-account { display: none; }

.account-page [hidden] { display: none !important; }

/* Lines break between words and phrases, as on the home page. */
.account-page :is(h1, h2, p, .ac-consent):lang(ko) { word-break: keep-all; }
.account-page :is(h1, h2, p, .ac-consent):lang(ja) { word-break: auto-phrase; }

.ac-card {
  min-width: 0;
  border: 1px solid var(--ac-line);
  border-radius: var(--ac-radius);
  background: var(--ac-card);
}

.ac-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.ac-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--ac-line-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.ac-btn:hover { border-color: rgba(255, 255, 255, 0.36); background: rgba(255, 255, 255, 0.05); }
.ac-btn:focus-visible,
.ac-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ac-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ac-btn.is-busy:disabled { opacity: 1; cursor: progress; }
.ac-btn.is-busy::before { margin-right: 0; }

.ac-btn-primary {
  border-color: transparent;
  background: var(--accent-bright);
  color: var(--accent-ink);
}

.ac-btn-primary:hover { border-color: transparent; background: #d6ffa6; }
.ac-btn-primary:disabled:hover { background: var(--accent-bright); }

.ac-btn-danger { border-color: transparent; background: var(--ac-bad); color: #2a0d08; }
.ac-btn-danger:hover { border-color: transparent; background: #ffb8ad; }

/* What takes something away on a row (解除, 結束, 登出, 婉拒, turning two-step
   verification off): the plain outline in a quiet red, never filled. The
   question that follows keeps the filled red for the last word. */
.ac-btn-danger-quiet { border-color: var(--ac-bad-line); color: var(--ac-bad); }
.ac-btn-danger-quiet:hover { border-color: rgba(255, 162, 148, 0.62); background: rgba(255, 162, 148, 0.07); }
.ac-link.is-danger { color: var(--ac-bad); }
.ac-link.is-danger:hover { color: #ffbcb2; }

.ac-btn-small { min-height: 36px; padding: 0 15px; font-size: 0.82rem; }

/* A text button: the lesser choice beside a button. */
.ac-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.ac-link:hover { color: var(--text); }
.ac-link:disabled { opacity: 0.45; cursor: not-allowed; }

.ac-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.ac-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.ac-label .ac-link { font-size: inherit; letter-spacing: 0; }

.ac-input {
  width: 100%;
  min-width: 0;
  height: 50px;
  padding: 0 16px;
  border: 1px solid var(--ac-line-strong);
  border-radius: 10px;
  background: #212121;
  color: var(--text);
  font: inherit;
  font-size: 0.98rem;
  font-weight: 700;
}

.ac-input::placeholder { color: var(--text-muted); font-weight: 600; }

.ac-input:focus,
.ac-input-at:focus-within {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(191, 249, 130, 0.14);
}

.ac-input[aria-invalid="true"],
.ac-input-at.is-invalid { border-color: var(--ac-bad); }
.ac-input:disabled,
.ac-input-at.is-disabled { color: var(--text-muted); }

.ac-input-at {
  display: flex;
  align-items: center;
  gap: 2px;
}

.ac-input-at i { color: var(--text-muted); font-style: normal; font-weight: 700; }

.ac-input-at input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: none;
  color: inherit;
  font: inherit;
}

/* The line under a field: its rule, then what the API said about the value. */
.ac-note {
  margin: -2px 0 0;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.55;
}

.ac-note.is-good,
.ac-note.is-bad {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  font-weight: 700;
}

.ac-note.is-good { color: var(--ac-good); }
.ac-note.is-bad { color: var(--ac-bad); }
.ac-note .icon { flex: none; margin-top: 2px; }

/* What went wrong with the whole step. */
.ac-alert {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 162, 148, 0.34);
  border-radius: var(--ac-radius-inner);
  color: var(--ac-bad);
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.6;
}

.ac-alert .ac-link { margin-left: 8px; color: var(--text); text-decoration: underline; }

.ac-lead {
  margin: -8px 0 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
}

.ac-small {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

/* ── Sign-in, registration, reset ── */

.ac-auth {
  flex: 1;
  padding: calc(var(--nav-h) + clamp(36px, 7vh, 84px)) clamp(16px, 4vw, 64px) clamp(48px, 8vh, 96px);
}

.ac-auth-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  width: min(100%, 440px);
  margin-inline: auto;
}

.ac-auth-card,
.ac-view {
  display: grid;
  gap: 18px;
}

.ac-auth-card { padding: 28px; }

/* The steps of the one flow, drawn like the steps of the staff dialog. */
.ac-steps { display: flex; gap: 6px; }

.ac-steps i {
  width: 26px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.14);
}

.ac-steps i.is-on { background: var(--accent-bright); }

.ac-step {
  margin: 0 0 -12px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.ac-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: -8px 0 0;
  font-size: 0.9rem;
}

.ac-intro b { overflow-wrap: anywhere; font-weight: 800; }

.ac-form { display: grid; gap: 16px; }
.ac-form > .ac-btn-primary,
.ac-view > .ac-btn { width: 100%; min-height: 50px; margin-top: 2px; font-size: 0.96rem; }

.ac-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 12px;
}

.ac-legal {
  display: grid;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.65;
}

.ac-legal p { margin: 0; }

.ac-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--ac-line-strong);
  border-radius: var(--ac-radius-inner);
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.65;
  cursor: pointer;
}

.ac-consent input {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--accent-bright);
}

.ac-consent a { color: var(--accent); font-weight: 700; text-decoration: none; }
.ac-consent a:hover { text-decoration: underline; }

/* The mailed code: six digits in one field, so it can be pasted whole. */
.ac-code {
  padding: 0 0 0 0.5em;
  font-family: Inter, system-ui, sans-serif;
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: 0.5em;
  text-align: center;
}

.ac-code::placeholder { letter-spacing: 0.5em; opacity: 0.4; }

.ac-row-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}

/* Two lesser choices of one step: one at each end. */
.ac-row-apart { justify-content: space-between; }

/* A recovery code: letters and digits in groups, typed or pasted whole. */
.ac-recovery {
  font-family: Inter, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ac-recovery::placeholder { letter-spacing: 0.08em; opacity: 0.4; }

/* The other ways in, under the form: 「或」, then a button for each provider. */
.ac-or {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

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

.ac-providers { display: grid; gap: 10px; }

.ac-provider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 6px 48px;
  border: 1px solid var(--ac-line-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.ac-provider:hover { border-color: rgba(255, 255, 255, 0.36); background: rgba(255, 255, 255, 0.04); }
.ac-provider:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ac-provider:disabled { opacity: 0.45; cursor: not-allowed; }
.ac-provider.is-busy:disabled { opacity: 1; cursor: progress; }
.ac-provider .brand { position: absolute; left: 16px; }

/* The mark stands alone: no tinted disc behind it. */
.ac-mark { display: grid; color: var(--ac-good); }

.ac-result { justify-items: center; text-align: center; }
.ac-result .ac-lead { margin-top: -12px; }

@media (max-width: 767px) {
  .ac-auth { padding-top: calc(var(--nav-h) + 24px); }
  .ac-auth-card { padding: 22px 20px; }
  .ac-title { font-size: 1.32rem; }
}

@media (max-width: 380px) {
  .ac-pair { grid-template-columns: 1fr; }
}

/* ── Account centre (卯 置中個人頁) ──
   A centred head (the account's picture, 暱稱, @ID and join date, 編輯), a
   segmented control, and under it one section at a time: 統計 (figures, the
   year's grid, servers, sessions), 連結 (one grid of tiles, then 管理員身分),
   安全 (cards) or 紀錄 (a card). The column is as wide as 統計's grid needs. */

.ac-centre-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 0 72px;
}

/* An account that could not be read is said in the middle, where the head would be. */
.ac-centre > .ac-row-line { justify-content: center; }

.ac-head {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  text-align: center;
}

/* The account's picture: the face it chose (a game identity's, a branch's
   server look) or, by default and whenever the account has no face to show,
   the default avatar, Catnip's sprout; corners a fifth of its size.
   `CatnipFace` draws it (redesign.css, `[data-face]`). Inside the border the
   head is 110 px, the sprout six screen pixels a pixel (96 px). */
.ac-mono {
  --size: 112px;
  --sprout: 96px;
  display: grid;
  flex: none;
  place-items: center;
  width: var(--size);
  height: var(--size);
  border: 1px solid var(--ac-line);
  border-radius: calc(var(--size) * 0.2);
  background: linear-gradient(150deg, #313131, #222);
  color: var(--text);
}

/* 暱稱 never breaks inside itself: too long for the line, it ends in an
   ellipsis. The padding keeps descenders and accents inside the clip; the
   negative margins keep the spacing of a line 1.15 high. */
.ac-name {
  max-width: 100%;
  margin: calc(14px - 0.12em) 0 -0.12em;
  padding: 0.12em 0;
  overflow: hidden;
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* @ID and the join date: two parts that never break inside themselves and
   wrap only between each other. */
.ac-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 18px;
  max-width: 100%;
  margin: 0 0 10px;
  color: var(--text-secondary);
  font-weight: 700;
}

.ac-meta span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The segmented control: 10 px outside, 6 px for each segment (concentric
   with the 4 px between them). */
.ac-tabs {
  display: inline-flex;
  justify-self: center;
  gap: 4px;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--ac-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.ac-tab {
  padding: 9px 22px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.ac-tab:hover { color: var(--text-secondary); }
.ac-tab[aria-selected="true"] { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.ac-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.ac-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
}

/* The ring round a section follows its cards' corners: drawn 6 px out from a
   14 px radius, it bends at 20 px. */
.ac-section:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: var(--ac-radius); }

/* A section's caption: small and quiet, as the heads of its cards are
   (`.ac-sec-head h2`). */
.ac-caption {
  margin: 6px 4px 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* 連結: the password, each provider and each edition of Minecraft, tiles of
   one grid. The rows account.js draws are the tiles (their lists take no box
   of their own); what a block says, a refusal or a note, runs across it. */
.ac-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ac-tiles .ac-rows,
.ac-tile-group { display: contents; }

.ac-tiles :is(.ac-alert, .ac-sec-note, .ac-empty) { grid-column: 1 / -1; }
.ac-tiles :is(.ac-sec-note, .ac-empty) { padding: 2px 4px; border-top: 0; }

/* Every tile is as tall as the others (96 px), in every language and at
   every width: its mark; its name (with any chips), and under it one line
   (the address, the provider's name for the account, the player's name, or
   that nothing is linked); ⓘ and the button at the end, centred on the tile
   across both lines, as a row's buttons are (the owner, 2026-11-21). The
   line ends in an ellipsis rather than wrapping (the tooltip has it whole);
   a name too long for the room beside the button takes a second line,
   broken between words, never cut. */
.ac-tiles .ac-row {
  display: grid;
  grid-template-areas: "mark title actions" "mark line actions";
  grid-template-columns: 28px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-content: center;
  align-items: center;
  gap: 4px 14px;
  height: 96px;
  min-height: 0;
  padding: 0 18px;
  border: 1px solid var(--ac-line);
  border-radius: var(--ac-radius);
  background: var(--ac-card);
}

.ac-tiles .ac-row > .ac-row-icon { grid-area: mark; align-self: start; margin-top: 1px; }
.ac-tiles .ac-row > .ac-row-main { display: contents; }
/* The name's chips (目前不能使用, 唯一的登入方式) go under it when the room
   beside the button is short, and the name itself wraps between words. */
.ac-tiles .ac-row-main > b { grid-area: title; flex-wrap: wrap; row-gap: 3px; line-height: 1.3; }
.ac-tiles .ac-row-main > b > span { flex: 0 1 auto; min-width: 0; white-space: normal; overflow-wrap: break-word; }
.ac-tiles .ac-row-main > b > span:lang(ja) { word-break: auto-phrase; }
.ac-tiles .ac-row-main > b > span:lang(ko) { word-break: keep-all; }
.ac-tiles .ac-row-main > span { grid-area: line; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-tiles .ac-row > :is(.ac-btn, .ac-row-actions) { grid-area: actions; align-self: center; margin-left: 0; }

/* Not linked, not bound: an outline waiting to be filled. */
.ac-tiles .ac-row.is-off { border-style: dashed; background: transparent; }

/* A tile's mark stands alone: no tinted square behind it. A game identity's
   is the player's face. */
.ac-tiles .ac-row-icon { width: 28px; height: 28px; border-radius: 0; background: none; }
.ac-tiles .ac-row-icon svg { width: 28px; height: 28px; }
.ac-tiles .ac-row-main b { font-size: 1rem; font-weight: 900; }

.ac-sec { padding: 4px 22px 6px; }

.ac-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
}

.ac-sec-head h2 {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.ac-rows { display: grid; }

/* A row's action drops under its text, at the right, when a long label leaves
   the text too little room (phones, the longer languages). */
.ac-row,
.dv-account {
  flex-wrap: wrap;
}

.ac-row > .ac-btn,
.ac-row > .ac-row-actions,
.dv-account > .ac-link { margin-left: auto; }

/* A row's end: ⓘ, then its buttons, together. */
.ac-row-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}

/* A face on a row's mark (a game identity's, a staff identity's, a Discord
   account's, the account's own): it fills the mark's box, a tile a fifth
   round, with no chip behind it. A Discord avatar is a photo, drawn smooth,
   with Discord's mark small at its corner. */
.ac-row-face {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 20%;
  background: #2c2c2c;
  color: var(--text);
}

.ac-row-icon.has-face { position: relative; background: none; }
.ac-row-icon.has-face > .ac-row-face { width: 100%; height: 100%; }
.ac-row-face.is-photo > img { image-rendering: auto; }

.ac-row-badge {
  position: absolute;
  right: -5px;
  bottom: -5px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 5px;
  background: var(--ac-card);
}

.ac-row-icon .ac-row-badge svg { width: 11px; height: 11px; }

/* A group's icon before its name (統計, the picker): its initial on a tile
   without one. */
.ac-group-mark {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 1.2em;
  height: 1.2em;
  margin-right: 0.4em;
  overflow: hidden;
  border-radius: 4px;
  background: #2c2c2c;
  vertical-align: -0.2em;
}

/* Measured at device scales 1 to 2 (統計's servers, sessions, 最常去): the
   mark's box reads centred on the name's glyphs a hair lower than the line's
   middle. */
.ac-group-mark { position: relative; top: 0.03em; }

.ac-group-mark > img { width: 100%; height: 100%; object-fit: cover; }
.ac-group-mark > b { color: var(--text-secondary); font-size: 0.62em; font-weight: 900; line-height: 1; }

/* Inside a part of a line (a session's place, a server look's place), which
   lays its words out as a flex row, the mark is centred on the line rather
   than set at its top. */
.ac-part > .ac-group-mark { align-self: center; }

/* ⓘ and what it shows: the mark round, the button an 8 px square like the
   bar's icon buttons, the popover a 14 px container under (or over) it,
   right edges together. It shows on hover where there is one, on keyboard
   focus, and while pressed open (touch). */
.ac-info { position: relative; display: inline-flex; }

.ac-info-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.ac-info-btn:hover,
.ac-info.is-open .ac-info-btn { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.ac-info-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.ac-pop {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  gap: 4px;
  width: max-content;
  max-width: min(340px, calc(100vw - 32px));
  padding: 11px 13px;
  border: 1px solid var(--ac-line-strong);
  border-radius: var(--ac-radius);
  background: #2b2b2b;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.55;
  text-align: left;
  white-space: normal;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.12s, visibility 0.12s;
}

/* The way from the button down to the popover keeps it open under the pointer. */
.ac-pop::before { content: ""; position: absolute; right: 0; left: 0; top: -8px; height: 8px; }
.ac-info.is-up .ac-pop { top: auto; bottom: calc(100% + 6px); }
.ac-info.is-up .ac-pop::before { top: auto; bottom: -8px; }
.ac-pop .ac-agent { color: var(--text-muted); font-size: 0.7rem; font-weight: 500; overflow-wrap: anywhere; }

.ac-info.is-open .ac-pop,
.ac-info-btn:focus-visible + .ac-pop { visibility: visible; opacity: 1; }

@media (hover: hover) {
  .ac-info:hover .ac-pop { visibility: visible; opacity: 1; }
}

.ac-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: 70px;
  padding: 12px 0;
  border-top: 1px solid var(--ac-line);
}

.ac-row-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--ac-chip);
  color: var(--text);
}

/* One column as wide as the row leaves it: a long name or part is cut there,
   never wider. Narrow enough that ⓘ and one button stay beside it on a
   phone. */
.ac-row-main {
  display: grid;
  flex: 1 1 6rem;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  min-width: 0;
}

.ac-row-main i {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.ac-row-main b {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 800;
}

.ac-row-main b > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The line under a row's name. A sentence wraps as usual; a line made of
   parts (a name, an address, a date, a state; `partsInto` in account.js)
   breaks only between them. */
.ac-row-main > span {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* One part of such a line never breaks inside itself; longer than the line,
   its words end in an ellipsis and the 「・」 after them stays. */
.ac-part {
  display: inline-flex;
  max-width: 100%;
  vertical-align: bottom;
  white-space: nowrap;
}

.ac-part > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ac-dot { flex: none; color: var(--text-muted); font-style: normal; font-weight: 600; }

/* A chip (這個裝置, 唯一的登入方式, 已停用): 6 px, as chips up to 28 px tall are. */
.ac-tag {
  display: inline-flex;
  flex: none;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--ac-chip);
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

/* The timeline: what happened, then when. */
.ac-event {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  min-width: 0;
  padding: 13px 0;
  border-top: 1px solid var(--ac-line);
  font-size: 0.88rem;
  line-height: 1.5;
}

.ac-event-what { min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.ac-event-what span { color: var(--text-muted); font-weight: 600; }

/* The face of a player an entry names, before the sentence: centred on the
   sentence's glyphs (vertical-align: middle sits on the x-height, a little
   below where Chinese and Japanese glyphs read centred; the lift is
   measured), and its negative margins keep it out of the line's height, so
   an entry with a face is as tall as one without (the owner, 2026-11-21). */
.ac-event-what > .ac-event-face {
  position: relative;
  top: -0.1em;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin: -6px 7px -6px 0;
  border-radius: 4px;
  background: #2c2c2c;
  color: var(--text);
  font-size: 10px;
  vertical-align: middle;
}

.ac-event time {
  flex: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

/* What a section just did (a way in was added or removed), under its rows. */
.ac-sec-note {
  margin: 0;
  padding: 12px 0 14px;
  border-top: 1px solid var(--ac-line);
  color: var(--ac-good);
  font-size: 0.82rem;
  font-weight: 700;
}

.ac-sec-note:empty { display: none; }

/* What went wrong in a section sits between its head and its rows. */
.ac-sec > .ac-alert { margin-bottom: 14px; }

.ac-sec-foot { display: flex; justify-content: center; padding: 10px 0 12px; border-top: 1px solid var(--ac-line); }
.ac-empty { margin: 0; padding: 16px 0 18px; border-top: 1px solid var(--ac-line); color: var(--text-muted); font-size: 0.86rem; }

/* Outlines of the centre while it loads, where the head, the segmented
   control and the section that opens will be (統計's, or two tiles). */
.ac-ph-mono { width: 112px; height: 112px; border-radius: 22px; }
.ac-ph-name { width: 148px; height: 32px; margin: 24px 0 10px; }
.ac-ph-meta { width: 248px; max-width: 100%; height: 14px; margin: 4px 0 57px; }
.ac-ph-tabs { justify-self: center; width: 316px; max-width: 100%; height: 48px; border-radius: 10px; }
.ac-ph-caption { width: 128px; height: 12px; margin: 10px 4px 4px; }
.ac-ph-tile { height: 92px; border-radius: var(--ac-radius); }

/* ── 統計 (年度熱力圖) ──
   Four figures, the past year's grid of days, the servers and the sessions.
   The grid's ramp is the play-time green of Control's charts, one hue,
   darker for less; a day without play is neutral. */

.st-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }

.st-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }

.st-num {
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--ac-line);
  border-radius: var(--ac-radius);
  background: var(--ac-card);
}

/* A figure, and a server's name in it, end in an ellipsis when too long. */
.st-num b {
  display: block;
  overflow: hidden;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.st-num > span {
  display: block;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.st-card { position: relative; padding: 20px 22px; }

.st-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 0 0 16px;
}

.st-head h2 { margin: 0; font-size: 1rem; font-weight: 900; }
.st-head small { color: var(--text-muted); font-size: 0.8rem; font-weight: 700; }

.st-legend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.st-legend i { width: 10px; height: 10px; border-radius: 3px; }
.st-legend > span:first-child { margin-right: 4px; }
.st-legend > span:last-child { margin-left: 4px; }

.st-l0 { background: rgba(255, 255, 255, 0.06); }
.st-l1 { background: #3a4a26; }
.st-l2 { background: #57712f; }
.st-l3 { background: #7fa547; }
.st-l4 { background: #addb71; }

/* The grid scrolls sideways when its card is narrower (phones). The scroller
   runs right to left, so it starts at the latest weeks and stays there when
   the window changes size; the room around the grid keeps the keyboard's
   focus ring in view. */
.st-scroll { margin: -4px; padding: 4px; overflow-x: auto; direction: rtl; scrollbar-width: none; }
.st-scroll::-webkit-scrollbar { display: none; }

.st-grid {
  --c: 10px;
  --g: 3px;
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 6px;
  width: max-content;
  margin-right: auto;
  border-radius: 4px;
  direction: ltr;
}

.st-grid:focus { outline: none; }
.st-grid:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Where the grid is wider than its card, the ring goes round what is seen of it. */
@supports selector(:has(*)) {
  .st-grid:focus-visible { outline: none; }
  .st-scroll:has(> .st-grid:focus-visible) { outline: 2px solid var(--accent); border-radius: 6px; }
}

.st-months {
  position: relative;
  grid-column: 2;
  height: 18px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.st-months span { position: absolute; top: 0; white-space: nowrap; }

.st-weekdays {
  display: grid;
  grid-template-rows: repeat(7, var(--c));
  gap: var(--g);
  min-width: 22px;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: var(--c);
  white-space: nowrap;
}

.st-cells {
  display: grid;
  grid-auto-columns: var(--c);
  grid-auto-flow: column;
  grid-template-rows: repeat(7, var(--c));
  gap: var(--g);
}

.st-cells i { border-radius: 2px; }
.st-cells i.is-future { visibility: hidden; }
.st-cells i.is-hot { outline: 2px solid #f4f4f4; outline-offset: 1px; }

/* A day's time and date, above it and inside the card. */
.st-tip {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  padding: 8px 11px;
  border: 1px solid #3c3c3c;
  border-radius: 10px;
  background: #121212;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
  pointer-events: none;
}

.st-tip b { display: block; font-size: 0.95rem; font-weight: 900; }
.st-tip span { display: block; color: var(--text-muted); font-size: 0.78rem; font-weight: 700; }

/* A row per server: the names in one column, the bars from one line. */
.st-bars {
  display: grid;
  grid-template-columns: fit-content(40%) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 14px;
  font-size: 0.88rem;
  font-weight: 800;
}

.st-bar { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; min-width: 0; }
.st-bar > span { display: flex; align-items: center; min-width: 0; white-space: nowrap; }
.st-bar > span > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.st-bar > i { display: block; height: 10px; border-radius: 0 4px 4px 0; background: rgba(255, 255, 255, 0.05); }
.st-bar > i > em { display: block; min-width: 3px; height: 100%; border-radius: 0 4px 4px 0; background: #addb71; }
.st-bar > small { color: var(--text-secondary); font-size: 0.82rem; font-weight: 800; text-align: right; white-space: nowrap; }
.st-bar > small u { color: var(--text-muted); font-weight: 700; text-decoration: none; }

/* A row per session: the day, the times, where and with which edition, how long. */
.st-sessions {
  display: grid;
  grid-template-columns: max-content max-content minmax(0, 1fr) max-content;
  column-gap: 18px;
  font-size: 0.88rem;
}

.st-sess {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  align-items: center;
  min-height: 54px;
  border-top: 1px solid var(--ac-line);
}

.st-sess:first-child { border-top: 0; }
.st-sess > b { font-weight: 800; white-space: nowrap; }
.st-sess > .st-times { color: var(--text-secondary); font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.st-where { min-width: 0; font-weight: 800; }
.st-where .is-muted { color: var(--text-muted); font-size: 0.8rem; font-weight: 700; }
.st-sess > em { font-style: normal; font-weight: 800; text-align: right; white-space: nowrap; }

.st-card > .ac-alert { margin-top: 12px; }
.st-foot { display: flex; justify-content: center; margin-top: 12px; }

/* No game identity yet: what the statistics wait for, and the way to 連結. */
.st-empty { display: grid; justify-items: center; gap: 16px; padding: 30px 24px; text-align: center; }
.st-empty p { max-width: 30rem; margin: 0; color: var(--text-secondary); font-size: 0.92rem; font-weight: 600; line-height: 1.65; }
.st-none { margin: 0; padding: 28px 24px; color: var(--text-muted); font-size: 0.92rem; font-weight: 700; text-align: center; }

.st-failed { display: grid; justify-items: center; gap: 12px; }
.st-failed .ac-alert { justify-self: stretch; }

/* Outlines of 統計 while it loads: four figures, the grid, two sessions. */
.st-ph-num { height: 82px; border-radius: var(--ac-radius); }
.st-ph-year { height: 190px; border-radius: var(--ac-radius); }
.st-ph-rows { display: grid; gap: 10px; }
.st-ph-row { height: 54px; border-radius: var(--ac-radius); }

/* Dialogs of the centre: the sign-in card, opened over the page. */
.ac-dialog {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--ac-line);
  border-radius: var(--ac-radius);
  background: var(--ac-card);
  color: var(--text);
}

.ac-dialog[open] { animation: ac-dialog-in 180ms ease-out both; }
.ac-dialog::backdrop { background: rgba(24, 24, 24, 0.66); backdrop-filter: blur(4px); }
.ac-dialog-panel { display: grid; gap: 18px; padding: 28px; }
/* One column that never grows past the dialog: a line of parts that cannot
   break (a long punishment, a long name) ends in an ellipsis inside it instead
   of widening the grid until the dialog scrolls sideways. */
.ac-dialog-panel,
.ac-dialog .ac-view,
.ac-dialog .ac-rows { grid-template-columns: minmax(0, 1fr); }
.ac-dialog-panel .ac-lead { margin-top: -8px; }

.ac-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
}

.ac-dialog-actions .ac-btn { min-height: 50px; font-size: 0.96rem; }

/* A step of a dialog that stands alone under its text (the proof's 取消 when
   there is no form, 「我已經存好了」). */
.ac-dialog-panel .ac-view > .ac-btn { margin-top: 0; }

/* 頭像 in 編輯: the faces the account already has, one tile each, the default
   first. A tile is its face over two short lines, what the face is (預設,
   Java 版, 伺服器外觀) and whose or where (the player's name, the group and
   branch); a line too long for the tile ends in an ellipsis instead of
   breaking. The chosen tile is ringed in the accent and carries a check. The
   radio inside stays focusable for the keyboard (arrows move the choice). */
.ac-avatars {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  min-width: 0;
}

.ac-avatar {
  position: relative;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  padding: 12px 8px 10px;
  border: 1px solid var(--ac-line);
  border-radius: var(--ac-radius-inner);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.ac-avatar:hover { border-color: rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.04); }
.ac-avatar:has(input:checked) { border-color: var(--accent); background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--accent); }
.ac-avatar:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.ac-avatar > input {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

/* 54 px inside the border: the sprout three screen pixels a pixel (48 px). */
.ac-avatar .ac-mono { --size: 56px; --sprout: 48px; }

.ac-avatar-check {
  position: absolute;
  top: 7px;
  right: 7px;
  display: none;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-bright);
  color: var(--accent-ink);
}

.ac-avatar-check svg { width: 11px; height: 11px; stroke-width: 3; }
.ac-avatar:has(input:checked) .ac-avatar-check { display: grid; }

.ac-avatar-name {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  text-align: center;
  line-height: 1.35;
}

.ac-avatar-name > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-avatar-name b { font-size: 0.82rem; font-weight: 800; }
.ac-avatar-name > span { color: var(--text-muted); font-size: 0.74rem; font-weight: 700; }
/* The group and the branch: a second line only when both do not fit. */
.ac-avatar-name > .ac-avatar-place { overflow: visible; white-space: normal; }

/* Outlines of the tiles while the faces are read. */
.ac-ph-avatar { height: 116px; border-radius: var(--ac-radius-inner); }

.ac-avatar-failed { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ac-avatar-failed .ac-alert { flex: 1 1 14rem; }

/* What a binding's round trip found: the centre's rows. An edition that can
   be chosen is a label around its box; what an identity carries is listed
   under its row. */
label.ac-row { cursor: pointer; }

.ac-row > input[type="checkbox"] {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0 0 0 auto;
  accent-color: var(--accent-bright);
}

.ac-carried { margin-bottom: 14px; }
.ac-carried p { margin: 0; }
.ac-carried ul { margin: 4px 0 0; padding-left: 1.3em; }

/* What taking over an identity another account holds does: the alert's shape
   in the quiet colours of a note, since nothing went wrong. */
.ac-takes {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--ac-line-strong);
  border-radius: var(--ac-radius-inner);
  color: var(--text-secondary);
  font-size: 0.84rem;
  line-height: 1.6;
}
.ac-takes p { margin: 0; color: var(--text); font-weight: 650; }
.ac-takes ul { margin: 4px 0 0; padding-left: 1.3em; }

/* Setting up two-step verification: the QR code the page draws, on white so a
   camera reads it, and the same key as text. */
.ac-qr {
  justify-self: center;
  width: 196px;
  max-width: 100%;
  padding: 6px;
  border-radius: var(--ac-radius-inner);
  background: #fff;
  line-height: 0;
}

.ac-qr svg { display: block; width: 100%; height: auto; }

.ac-key {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 10px 10px 16px;
  border: 1px solid var(--ac-line-strong);
  border-radius: 10px;
  background: #212121;
}

.ac-key code,
.ac-codes li {
  font-family: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Four groups of four to a line, so the eye keeps its place while typing it. */
.ac-key code {
  flex: 1;
  min-width: 0;
  max-width: 22.5ch;
  font-size: 0.92rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
  user-select: all;
}

.ac-key .ac-btn { flex: none; margin-left: auto; }

/* The recovery codes, shown once: two columns of five. */
.ac-codes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--ac-line-strong);
  border-radius: var(--ac-radius-inner);
  background: #212121;
  list-style: none;
}

.ac-codes li {
  font-size: 0.88rem;
  line-height: 1.6;
  text-align: center;
  white-space: nowrap;
  user-select: all;
}

.ac-codes-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: -6px; }

@keyframes ac-dialog-in {
  from { opacity: 0; transform: translateY(8px); }
}

/* Phones and narrow windows: the same column, one tile to a line; 統計's
   figures two by two, its grid scrolled sideways, a session in two lines
   (the day and how long, then where and when). */
@media (max-width: 900px) {
  .ac-centre-body { padding-top: 26px; }
  .ac-name { font-size: 2.1rem; }
  .ac-ph-name { height: 28px; margin: 19px 0 5px; }
  .ac-tab { padding: 8px 13px; font-size: 0.86rem; }
  .ac-ph-tabs { width: 236px; height: 46px; }
  .ac-tiles { grid-template-columns: minmax(0, 1fr); }
  .st-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-card { padding: 18px 16px; }
  .st-grid { --c: 11px; }
  .st-bars { grid-template-columns: fit-content(36%) minmax(0, 1fr) auto; gap: 10px; }
  .st-sessions { display: block; }

  .st-sess {
    grid-template-areas: "day length" "where times";
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 12px;
    row-gap: 2px;
    padding: 10px 0;
  }

  .st-sess > b { grid-area: day; }
  .st-sess > em { grid-area: length; }
  .st-sess > .st-times { grid-area: times; color: var(--text-muted); font-size: 0.8rem; text-align: right; }
  .st-where { grid-area: where; color: var(--text-secondary); font-weight: 700; }
}

@media (max-width: 767px) {
  .ac-sec { padding: 2px 18px 4px; }
  .ac-event { flex-wrap: wrap; }

  /* A tile's line (the address above all) gets what the edges, the gaps
     and the button can spare. */
  .ac-tiles .ac-row { column-gap: 10px; padding: 0 16px; }
  .ac-tiles .ac-row .ac-btn { padding: 0 12px; }

  /* On phones a dialog is a sheet from the bottom edge. */
  .ac-dialog {
    width: 100%;
    max-width: none;
    margin: auto 0 0;
    border-width: 1px 0 0;
    border-radius: var(--ac-radius) var(--ac-radius) 0 0;
  }

  .ac-dialog-panel { padding: 22px 20px max(22px, env(safe-area-inset-bottom)); }
}

@media (max-width: 430px) {
  .ac-codes { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .ac-dialog[open] { animation: none; }
}

/* 管理員身分: the staff identity, the control panel's need for two-step
   verification, its panel sessions and the invitations, under small heads. */
.ac-sub {
  margin: 0;
  padding: 16px 0 10px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.ac-sub-lead {
  margin: -4px 0 12px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.6;
}

.ac-staff-two-step {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 12px 0 14px;
  border-top: 1px solid var(--ac-line);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.6;
}

.ac-staff-two-step .icon { flex: none; align-self: flex-start; margin-top: 3px; }
.ac-staff-two-step p { flex: 1 1 12rem; margin: 0; }
.ac-staff-two-step .ac-btn { margin-left: auto; }
.ac-staff-two-step.is-off { color: var(--ac-bad); }

/* A panel session's name, the panel's address, is read whole: on a phone
   its text takes the line beside the icon and ⓘ and 結束 drop under it. */
@media (max-width: 600px) {
  .ac-row-long .ac-row-main { flex-basis: calc(100% - 56px); }
}

.ac-row-long .ac-row-main b > span {
  overflow: visible;
  white-space: normal;
  overflow-wrap: break-word;
}

/* The control panel's approval page waits for two-step verification: the band
   above the head leads back to it. */
.ac-wait {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 16px 20px;
  border-color: rgba(191, 249, 130, 0.32);
}

.ac-wait .ac-row-icon { color: var(--ac-good); }
.ac-wait p { flex: 1 1 16rem; margin: 0; color: var(--text-secondary); font-size: 0.88rem; font-weight: 600; line-height: 1.6; }
.ac-wait-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-left: auto; }

/* ── The launcher's sign-in ── */

.dv-card { gap: 20px; }
.dv-card .ac-view { gap: 20px; }

.dv-device,
.dv-account {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--ac-line);
  border-radius: var(--ac-radius-inner);
}

.dv-account .ac-row-icon { color: var(--text-muted); }

/* The account's name and @ID keep the line; on a narrow card 換帳號 drops under
   them instead of breaking the ID inside a word. */
.dv-account .ac-row-main { flex-basis: 11rem; }

.dv-match {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 18px 16px 20px;
  border-radius: var(--ac-radius-inner);
  background: rgba(255, 255, 255, 0.05);
}

.dv-match p { margin: 0; color: var(--text-secondary); font-size: 0.84rem; font-weight: 700; text-align: center; }

.dv-code { display: flex; justify-content: center; gap: 10px; }

.dv-code b {
  display: grid;
  place-items: center;
  width: 56px;
  height: 66px;
  border: 1px solid var(--ac-line-strong);
  border-radius: 10px;
  background: #212121;
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  font-size: 1.9rem;
  font-weight: 800;
  text-transform: uppercase;
}

/* The request did not come from this network: said before the buttons. */
.dv-warn {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 162, 148, 0.34);
  border-radius: var(--ac-radius-inner);
  color: var(--ac-bad);
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.6;
}

.dv-warn .icon { flex: none; margin-top: 3px; }

.dv-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 10px;
}

/* A long label (開啟兩步驟驗證 in the longer languages) wraps between phrases
   inside its button instead of pushing the card out of a phone's width; the
   two buttons of the row stay one height. */
.dv-actions .ac-btn { min-height: 50px; font-size: 0.96rem; line-height: 1.3; text-align: center; white-space: normal; }
.dv-actions .ac-btn:lang(ja) { word-break: auto-phrase; }
.dv-actions .ac-btn:lang(ko) { word-break: keep-all; }

.dv-note {
  margin: -6px 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

.ac-result .dv-device { width: 100%; text-align: left; }
.ac-result > .ac-btn { width: 100%; }

.dv-ph { display: grid; gap: 20px; }
.dv-ph-title { width: 70%; height: 28px; }
.dv-ph-box { width: 100%; height: 72px; border-radius: var(--ac-radius-inner); }
.dv-ph-code { width: 100%; height: 132px; border-radius: var(--ac-radius-inner); }

@media (max-width: 380px) {
  .dv-code b { width: 50px; height: 60px; font-size: 1.7rem; }
}

/* ── The control panel's approval page (built like the launcher's) ── */

/* The panel the browser goes to is read whole: never cut short. */
.pn-origin .ac-row-main b > span {
  overflow: visible;
  white-space: normal;
  overflow-wrap: break-word;
}

/* Only 拒絕 is offered while approving cannot work: it takes the row. */
.dv-actions:not(:has(> .ac-btn-primary:not([hidden]))) { grid-template-columns: minmax(0, 1fr); }

/* A proof through a provider came back: 同意 waits for one more press. */
.pn-proven {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(191, 249, 130, 0.3);
  border-radius: var(--ac-radius-inner);
  color: var(--ac-good);
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.6;
}

.pn-proven .icon { flex: none; margin-top: 3px; }

/* How long the request still waits. */
.pn-clock {
  margin: -12px 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.pn-clock.is-soon { color: var(--ac-bad); }
