:root {
  --bg: #0f0b1e;
  --bg2: #171230;
  --card: #1d173a;
  --line: #34295f;
  --text: #ece7ff;
  --muted: #a99fd0;
  --gold: #e9b949;
  --gold2: #ffd978;
  --red: #e0525f;
  --green: #5bd08a;
  --blue: #6aa8ff;
  --radius: 12px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 600px at 70% -10%, #2a1d5a 0%, transparent 60%), var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  min-height: 100vh;
}
a { color: var(--gold2); }
[hidden] { display: none !important; }
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; border-bottom: 1px solid var(--line); background: rgba(15, 11, 30, .85);
  position: sticky; top: 0; z-index: 5; backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 18px; }
.brand b { color: var(--gold); }
.eye {
  width: 26px; height: 16px; border-radius: 50%; border: 2px solid var(--gold);
  background: radial-gradient(circle, var(--gold2) 0 3px, #2a1d5a 4px 100%);
}
.online { color: var(--muted); font-size: 13px; }
main { max-width: 1040px; margin: 0 auto; padding: 16px; }
.hero h1 { font-size: clamp(22px, 4vw, 34px); line-height: 1.2; margin: 18px 0 8px; }
.hero h1 em { color: var(--gold); font-style: normal; }
.hero p { color: var(--muted); max-width: 760px; margin: 0 0 16px; }
.card {
  background: linear-gradient(180deg, var(--card), var(--bg2)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; margin: 14px 0;
}
.card h2 { margin: 0 0 14px; font-size: 19px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card h3 { margin: 14px 0 8px; font-size: 15px; color: var(--muted); font-weight: 600; }
.step {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--gold); color: #1b1300; font-size: 14px; font-weight: 700;
}
.row { display: grid; grid-template-columns: 150px 1fr; gap: 10px 16px; align-items: start; padding: 9px 0; border-top: 1px solid rgba(255, 255, 255, .05); }
.row:first-of-type { border-top: 0; }
.row > label { padding-top: 8px; color: var(--muted); }
.row small { opacity: .8; }
.pick { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.state { color: var(--muted); font-size: 13.5px; flex: 1 1 260px; }
.state.ok { color: var(--green); }
.state.bad { color: var(--red); }
/* (13/11) Hành trình's reset dialog: signed up in a tournament not started yet */
.jreset-tours { color: var(--gold2); font-size: 13.5px; line-height: 1.45; margin: 0; padding: 8px 10px; border: 1px solid rgba(233, 185, 73, .45); border-radius: 8px; background: rgba(233, 185, 73, .08); }
input, select {
  background: #120e26; color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 11px; font: inherit; min-width: 0;
}
input:focus, select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.row input, .row select { width: min(100%, 320px); }
.btn {
  background: #2b2252; color: var(--text); border: 1px solid #4a3d85; border-radius: 8px;
  padding: 9px 14px; font: inherit; cursor: pointer; white-space: nowrap;
}
.btn:hover:not(:disabled) { border-color: var(--gold); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: linear-gradient(180deg, var(--gold2), var(--gold)); color: #1b1300; border-color: var(--gold); font-weight: 700; }
.btn.ghost { background: transparent; }
.btn.danger { background: #4a1621; border-color: var(--red); color: #ffd9de; font-weight: 700; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.hint { color: var(--muted); font-size: 13.5px; }
.saves { grid-column: 2; display: grid; gap: 6px; }
.saves label { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.saves label:has(input:checked) { border-color: var(--gold); background: rgba(233, 185, 73, .08); }
.lobby, .room { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.create, .join { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.join input { flex: 1; text-transform: uppercase; }
.rooms { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.rooms li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #150f2c; }
/* (10/11) the title as wide as it is: the players and buttons go to a line of their own when short of room (alone on its
   line, a long title still cut) */
.rooms li .title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rooms li .who { color: var(--muted); font-size: 13px; }
.rooms li.empty { color: var(--muted); justify-content: center; border-style: dashed; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); font-weight: 500; }
.code { font-family: ui-monospace, Consolas, monospace; color: var(--gold2); letter-spacing: 2px; }
.chat { display: flex; flex-direction: column; min-height: 260px; }
/* (16/11) a room's / a spectator's / a duel's chat: its own and the general one, two tabs (app.js chatTabs) */
.ctabs { display: flex; gap: 6px; margin: 0 0 8px; }
.ctab { flex: 1 1 0; min-width: 0; padding: 6px 10px; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctab:hover { color: var(--text, #fff); border-color: var(--gold); }
.ctab.on { color: var(--gold2); border-color: var(--gold); background: rgba(233, 185, 73, .14); }
.ctab:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.ctab .unread { margin-left: 6px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; }
.cpane { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.drawer .ctabs { margin-bottom: 6px; }
.drawer .ctab { padding: 4px 8px; font-size: 13px; }
.lines { list-style: none; margin: 0; padding: 8px; flex: 1; overflow-y: auto; max-height: 300px; min-height: 180px; background: #120e26; border: 1px solid var(--line); border-radius: 10px; }
.lines li { padding: 2px 0; word-wrap: break-word; }
.lines b { color: var(--gold2); font-weight: 600; }
.lines .sys { color: var(--muted); font-style: italic; }
/* the day's check-in and win quests (app.js dailyHtml), on the Hành trình's Đối thủ tab; its tab dotted while one waits */
.jdaily { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(233, 185, 73, .05); }
.jdaily > summary { padding: 9px 12px; cursor: pointer; }
.jdaily .jq-wait { color: var(--gold2); font-weight: 600; }
.jq-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding: 0 10px 10px; }
.jq { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #120e26; }
.jq.ready { border-color: var(--gold2); box-shadow: 0 0 0 1px rgba(233, 185, 73, .35) inset; }
.jq.got { opacity: .65; }
.jq-name { font-weight: 600; }
.jq-stars { color: var(--gold2); font-weight: 700; }
.jq-bar { display: block; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.jq-bar i { display: block; height: 100%; background: var(--gold2); }
.jq-n { color: var(--muted); }
.jq-got { color: var(--muted); font-size: 13px; }
.jq .btn { align-self: flex-start; }
#jhub-tabs .tab.dot::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 5px; border-radius: 50%; background: var(--red); vertical-align: 2px; }
@media (max-width: 520px) { .jq-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* the decks kept (two at most): which one duels, on the Hành trình's Bộ bài and Đối thủ tabs (app.js decksBar) */
.jdecks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.jdecks .lbl { color: var(--muted); }
.jdecks .seg { margin: 0; max-width: 100%; }
.jdecks .seg button { max-width: 16em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jdecks input { width: 14em; max-width: 100%; }
.jdecks-hint { margin: -4px 0 10px; }
/* a chat's text can be selected and copied, its links pressed (long-pressed on a phone to copy), also over the game
   (.game takes selection away for the stage's sake) */
.lines li { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
.lines a.chat-link { color: #8ec5ff; text-decoration: underline; overflow-wrap: anywhere; }
.lines a.chat-link:hover { color: #b9dcff; }
.say { display: flex; gap: 8px; margin-top: 8px; }
.say input { flex: 1; }
/* (15/11) the chats' boxes: a few lines (Shift+Enter), as an input looks, growing to five (app.js growBox) */
.say textarea { flex: 1; min-width: 0; resize: none; padding: 9px 11px; line-height: 1.4; max-height: 140px; overflow-y: auto; scrollbar-width: thin; }
.say textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.say-text { white-space: pre-line; overflow-wrap: anywhere; }
.seats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seat { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #150f2c; }
.seat .label { font-size: 12px; color: var(--muted); }
.seat .name { font-size: 17px; font-weight: 600; margin: 2px 0; }
.seat.p1 { border-left: 4px solid var(--red); }
.seat.p2 { border-left: 4px solid var(--blue); }
.seat .ready { color: var(--green); font-size: 13px; }
.seat .wait { color: var(--muted); font-size: 13px; }
.help ul { margin: 0; padding-left: 20px; color: var(--muted); }
.help li { margin: 4px 0; }
kbd { background: #2b2252; border: 1px solid #4a3d85; border-radius: 5px; padding: 0 5px; font-size: 12px; font-family: inherit; color: var(--text); }
.foot { color: var(--muted); font-size: 12.5px; text-align: center; padding: 18px 0 30px; }

/* the game */
.game { position: fixed; inset: 0; background: #000; display: flex; flex-direction: column; z-index: 10; }
.bar { display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: #0d0a1a; border-bottom: 1px solid var(--line); font-size: 14px; }
.bar .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .score { color: var(--gold2); font-weight: 700; }
.bar .net { color: var(--muted); font-size: 12px; }
.stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; }
/* The canvas covers the stage exactly, whatever SDL puts in its style (at a device pixel ratio other than 1 it
   writes the window's size there, which overflowed the stage): SDL takes this size for the window (duel.js
   sends it a resize) and the game fits its 4:3 picture inside. */
#game-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; object-fit: contain; display: block;
               outline: none; background: #000; }
/* the game's menus, its title and its debug menu, between duels (veil.js): the stage's black instead (not hidden: the
   canvas keeps the keyboard) */
#game-canvas.veiled { opacity: 0; }
/* the game area: clear of a phone's notch and corners, no text selection or callout on long presses */
.game { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
        -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* pointer play (pointer.js). The column of buttons at the stage's right edge, over the black beside the 4:3 picture on
   a wide screen, over the picture's edge otherwise; to the left while the chat or the duel's log is open there */
.pbar { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); z-index: 3; display: flex; flex-direction: column;
        gap: 8px; min-width: 150px; }
.pbar[hidden] { display: none; }
.stage:has(.drawer:not([hidden])) .pbar { right: auto; left: 12px; }
.pbtn { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border-radius: 12px; cursor: pointer;
        border: 1px solid rgba(233, 185, 73, .35); background: rgba(16, 12, 34, .9); color: var(--text); font: inherit;
        font-size: 14px; font-weight: 600; text-align: left; touch-action: none; white-space: nowrap;
        box-shadow: 0 6px 18px rgba(0, 0, 0, .35); transition: background .12s, border-color .12s, transform .06s; }
.pbtn:hover { border-color: var(--gold); background: rgba(40, 30, 84, .9); }
.pbtn:active { transform: scale(.97); }
.pbtn.primary { border-color: var(--gold2); background: linear-gradient(180deg, var(--gold2), var(--gold)); color: #1b1230; }
.pbtn.primary:hover { filter: brightness(1.06); }
.pbtn .pp-label { flex: 1; }
.pico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* the pad's buttons as the PlayStation draws them, beside what they do */
kbd.ps { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font: 700 11px/1 system-ui;
         background: #0b0918; border: 1px solid rgba(255, 255, 255, .25); }
.ps-cross { color: #7cb6ff; } .ps-circle { color: #ff7a85; } .ps-triangle { color: #5fd9a8; } .ps-square { color: #f49bd3; }
.pbtn.primary kbd.ps { background: rgba(27, 18, 48, .85); border-color: transparent; }
/* over the picture: the outlines, the line saying what to do, the card pointed at, a card's choices */
.pp { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.pp-marks { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pp-marks polygon { fill: rgba(255, 217, 120, .10); stroke: var(--gold2); stroke-width: 3; stroke-linejoin: round; }
.pp-marks .pp-act { filter: drop-shadow(0 0 6px rgba(255, 217, 120, .9)); }
.pp-marks .pp-see { fill: rgba(255, 255, 255, .06); stroke: rgba(255, 255, 255, .8); stroke-width: 2; }
.pp-marks .pp-off { fill: rgba(0, 0, 0, .25); stroke: rgba(255, 255, 255, .25); stroke-width: 1.5; stroke-dasharray: 4 4; }
.pp-marks .pp-can { fill: rgba(91, 208, 138, .18); stroke: var(--green); stroke-width: 3; stroke-dasharray: 8 6; animation: pp-pulse 1.4s ease-in-out infinite; }
.pp-marks .pp-foe { fill: rgba(224, 82, 95, .18); stroke: var(--red); stroke-width: 3; stroke-dasharray: 8 6; animation: pp-pulse 1.4s ease-in-out infinite; }
@keyframes pp-pulse { 50% { stroke-opacity: .45; } }
.pp-hint.pp-hint-side { left: auto; right: 8px; transform: none; } /* (off the duel's rank: pointer.js rankHint) */
.pp-hint { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); max-width: min(560px, calc(100% - 24px)); padding: 7px 16px;
           border-radius: 999px; background: rgba(12, 9, 26, .92); border: 1px solid rgba(233, 185, 73, .45); color: var(--text);
           font-size: 14px; font-weight: 600; text-align: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); }
.pp-card { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 168px; padding: 10px; border-radius: 14px;
           background: rgba(16, 12, 34, .95); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.pp-art { display: block; width: 100%; height: auto; aspect-ratio: 102 / 96; border-radius: 8px; background: #0b0918; image-rendering: pixelated; margin-bottom: 8px; }
.pp-name { display: block; font-size: 15px; line-height: 1.25; color: var(--gold2); }
.pp-line { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.pp-stats { margin: 6px 0 0; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pp-effect { margin: 7px 0 0; padding-top: 6px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.38; color: var(--text); }
.pp-menu { position: absolute; min-width: 190px; padding: 6px; border-radius: 14px; pointer-events: auto; background: rgba(20, 15, 42, .96);
           border: 1px solid rgba(233, 185, 73, .55); box-shadow: 0 12px 32px rgba(0, 0, 0, .55); display: flex; flex-direction: column; gap: 2px;
           animation: pp-in .12s ease-out; }
@keyframes pp-in { from { opacity: 0; transform: translateY(4px) scale(.98); } }
.pp-item { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-height: 42px; padding: 8px 10px; border: 0; border-radius: 10px;
           background: transparent; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.pp-item:hover:not(:disabled), .pp-item:focus-visible { background: rgba(233, 185, 73, .16); outline: none; }
.pp-item:first-child:not(:disabled) { color: var(--gold2); }
.pp-item:disabled { cursor: default; color: rgba(236, 231, 255, .4); }
.pp-item .pp-label { flex: 1; }
.pp-why { flex-basis: 100%; padding-left: 30px; margin-top: -4px; font-size: 12px; font-weight: 500; color: var(--muted); }
.pp-card.pp-gone { display: none; }
/* the hand's fusions (pointer.js showWays): folded under the line (a narrow screen), open in the black at the right
   where the picture leaves room (.pp-fuse-side); the cards of the one pointed at outlined and numbered over the hand */
.pp-fuse { position: absolute; left: 50%; top: 52px; transform: translateX(-50%); width: max-content; max-width: min(420px, calc(100% - 24px));
           pointer-events: auto; border-radius: 14px; background: rgba(16, 12, 34, .96); border: 1px solid rgba(124, 182, 255, .45);
           box-shadow: 0 8px 24px rgba(0, 0, 0, .45); overflow: hidden; }
.pp-fuse-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 12px; border: 0; background: transparent;
                color: #a9cdff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.pp-fuse-head::after { content: "▾"; margin-left: 2px; transition: transform .15s; }
.pp-fuse.open .pp-fuse-head::after { transform: rotate(180deg); }
.pp-fuse-list { display: none; flex-direction: column; gap: 2px; padding: 0 6px 6px; max-height: 48vh; overflow: auto; }
.pp-fuse.open .pp-fuse-list { display: flex; }
.pp-fuse-item { display: flex; flex-direction: column; gap: 2px; padding: 7px 9px; border: 0; border-radius: 10px; background: transparent;
                color: var(--text); font: inherit; text-align: left; cursor: pointer; min-height: 44px; }
.pp-fuse-item:hover, .pp-fuse-item:focus-visible { background: rgba(124, 182, 255, .16); outline: none; }
.pp-fuse-res { display: flex; gap: 8px; justify-content: space-between; align-items: baseline; font-size: 14px; }
.pp-fuse-res b { color: var(--gold2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-fuse-ad { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.pp-fuse-from { font-size: 12px; line-height: 1.3; color: var(--muted); }
.pp-fuse.pp-fuse-side { left: auto; right: 12px; top: 12px; transform: none; max-width: none; max-height: calc(100% - 24px);
                        display: flex; flex-direction: column; }
.pp-fuse.pp-fuse-side .pp-fuse-head { cursor: default; }
.pp-fuse.pp-fuse-side .pp-fuse-head::after { content: none; }
.pp-fuse.pp-fuse-side .pp-fuse-list { display: flex; max-height: none; overflow: auto; }
.pp-fuse.pp-fuse-side .pp-fuse-res { flex-direction: column; align-items: flex-start; gap: 1px; }
.pp-fuse.pp-fuse-side .pp-fuse-res b { white-space: normal; line-height: 1.25; }
.pp-fuse.pp-fuse-side .pp-fuse-head { white-space: normal; text-align: left; }
.pp-fuse-item.pp-fuse-weak { opacity: .55; }
.pp-fuse-item.pp-fuse-weak:hover { opacity: .85; }
.pbar-hint { display: none; }
.pp-marks .pp-mat { fill: rgba(124, 182, 255, .16); stroke: #7cb6ff; stroke-width: 3; filter: drop-shadow(0 0 6px rgba(124, 182, 255, .8)); }
.pp-marks .pp-num { fill: #7cb6ff; stroke: #0b0918; stroke-width: 2; }
.pp-marks .pp-num-t { fill: #0b0918; font: 800 14px/1 system-ui, sans-serif; text-anchor: middle; }
/* a wide screen: the buttons in a strip of their own under the picture, in a row at its middle, near the cards; the
   canvas the smaller by it (pointer.js style) */
@media (min-width: 901px) and (min-height: 521px) {
  .stage.pp-dock #game-canvas { height: calc(100% - 62px) !important; }
  .stage.pp-dock .pbar, .stage.pp-dock:has(.drawer:not([hidden])) .pbar { top: auto; bottom: 9px; right: auto; left: 50%;
    transform: translateX(-50%); flex-direction: row; min-width: 0; gap: 10px; max-width: calc(100% - 24px); }
  .stage.pp-dock .pbtn { flex: none; }
  .stage.pp-dock .pbtn { min-height: 44px; }
  .stage.pp-dock .pbar-hint:not([hidden]) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; flex: 0 1 auto; min-width: 0;
    align-self: center; max-width: 44vw; padding: 0 6px; overflow: hidden; line-height: 1.3; font-size: 14px; font-weight: 600; color: var(--text); }
  .stage.pp-dock .pp-fuse:not(.pp-fuse-side) { top: 10px; }
}
/* a narrow window, a phone: the buttons smaller */
@media (max-width: 900px) {
  .pbar { min-width: 0; right: 8px; }
  .pbtn { padding: 8px 10px; }
}
@media (max-height: 460px) {
  /* a phone on its side: the duel's bar thin, the picture as large as it goes */
  .game .bar { padding: 2px 8px; gap: 6px; font-size: 13px; }
  .game .bar .btn.small { min-height: 32px; padding: 4px 10px; font-size: 13px; }
  .pp-hint { top: 6px; font-size: 13px; padding: 5px 12px; }
  .pp-fuse { top: 42px; }
  .pp-fuse-head { padding: 4px 10px; }
  .pp-fuse-list { max-height: 60vh; }
  .pbar { gap: 6px; }
  .pbtn { min-height: 40px; font-size: 13px; }
}
#pointer[aria-pressed="false"], #fuse-hints[aria-pressed="false"] { opacity: .6; text-decoration: line-through; }
/* a journey's restart: away from the buttons that play, plainly what it is */
.actions .reset-link { margin-left: auto; color: var(--muted); border-color: transparent; }
.actions .reset-link:hover { color: #ffd9de; border-color: var(--red); }
.rotate { display: none; position: absolute; left: 50%; top: 8px; transform: translateX(-50%); padding: 6px 12px; border-radius: 999px;
          background: rgba(19, 14, 38, .9); border: 1px solid var(--gold); font-size: 13px; pointer-events: none; white-space: nowrap; }
.touch-only { display: none; }
/* a phone's way of playing named on the bar's button (app.js wayButton), not struck through */
#pointer.way[aria-pressed="false"] { opacity: 1; text-decoration: none; }
.play-way { margin: 0 0 4px; }
@media (pointer: coarse) and (hover: none) {
  .keyboard-only { display: none !important; }
  .row.touch-only { display: grid; } /* (folded away with the setup: #setup.folded .row) */
  .btn.small { min-height: 40px; padding: 8px 12px; }
  input, select { font-size: 16px; } /* iOS zooms into a smaller one */
  .bar .net { display: none; }
  .drawer .lines { max-height: 90px; min-height: 60px; }
  .drawer { top: 8px; bottom: auto; }
}
@media (pointer: coarse) and (hover: none) and (orientation: portrait) {
  /* upright works too (the pad goes below the picture): the hint only says landscape is roomier, then goes */
  .game:not([hidden]) .rotate { display: block; animation: hint-out 1s 3s forwards; }
}
@keyframes hint-out { to { opacity: 0; visibility: hidden; } }
/* the other player's card view (duel.js conceal): opaque, over the picture only */
.cover { position: absolute; inset: 0; display: grid; place-items: center; background: #0d0a1a;
         background-image: radial-gradient(600px 300px at 50% 45%, #2a1d5a 0%, transparent 70%); }
.cover p { margin: 0; padding: 12px 20px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 15px; }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(5, 3, 12, .55); }
.overlay .box { background: var(--card); border: 1px solid var(--gold); border-radius: var(--radius); padding: 18px 22px; max-width: 420px; text-align: center; }
.overlay p { margin: 0; font-size: 16px; }
/* while the game starts and goes to the duel (its debug menu, the save screens): nothing of it shows */
.overlay.solid { background: #05030c; }
.overlay.solid .box { border-color: var(--line); }
.overlay.solid .box::before { content: ""; display: block; width: 28px; height: 28px; margin: 0 auto 12px; border-radius: 50%;
                              border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--gold); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: rgba(29, 23, 58, .92); border: 1px solid var(--line); border-radius: 99px; padding: 6px 16px; font-size: 14px; pointer-events: none; }
.toast.bad { border-color: var(--red); }
.drawer { position: absolute; right: 10px; bottom: 10px; width: min(340px, calc(100% - 20px)); background: rgba(19, 14, 38, .94); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; }
.drawer .lines { max-height: 220px; min-height: 120px; }
/* (16/11, ATian: the black box at the game's top right with the chat open, again, on Windows Chrome drawing with no graphics
   card, "Microsoft Basic Render Driver": reproduced with Chrome's software compositing, --disable-gpu-compositing) the
   chat's lines scrolled out of sight above its list made the game's picture there black in software compositing; a
   drawer's painting kept inside its own box (its pop-ups, chatmedia.js, sit on the body, not in it) and that is gone */
.drawer { contain: paint; }
/* the chat everyone sees (app.js siteChat): the home page's card, the Hành trình's drawer over its hub and game */
#site-chat .lines { max-height: 260px; min-height: 120px; }
.site-drawer { z-index: 4; }
.site-drawer h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 6px; font-size: 14px; color: var(--muted); }
#jchat-toggle .unread { margin-left: 5px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; }
.drawer.keys { top: 10px; bottom: auto; font-size: 14px; }
.drawer.keys p { margin: 4px 0; }

@media (max-width: 760px) {
  .row { grid-template-columns: 1fr; }
  .row > label { padding-top: 0; }
  .saves { grid-column: 1; }
  .lobby, .room, .seats { grid-template-columns: 1fr; }
  main { padding: 10px; }
  .card { padding: 14px; }
  .bar { font-size: 13px; gap: 6px; }
}



/* the key layout (keys.js) */
.keys { margin-top: 10px; }
.top #open-keys { margin-left: 10px; }
.dialog { background: var(--card); color: inherit; border: 1px solid var(--gold); border-radius: var(--radius); padding: 18px 20px;
          width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
.dialog::backdrop { background: rgba(5, 3, 12, .7); }
.dialog h2 { margin: 0 0 6px; font-size: 18px; }
.dialog > .hint { margin: 0 0 12px; }
.dialog .actions { margin-top: 12px; }
.keygrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.keycap { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; }
.keycap kbd { min-width: 34px; text-align: center; }
.keycap.listening { border-color: var(--gold); background: rgba(233, 185, 73, .12); }
#keys-summary kbd { margin: 0 1px; }

/* watching a room: the board, the room's chat beside it (below on phones) */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.watch .chat .lines { max-height: 420px; }
.rooms li .room-actions { display: flex; gap: 6px; flex: none; }
@media (max-width: 980px) { .watch { grid-template-columns: minmax(0, 1fr); } }

/* spectator board (js/view.js) */
.bd-p1 { --bd-pc: var(--red); --bd-pt: #ff8d97; }
.bd-p2 { --bd-pc: var(--blue); --bd-pt: #9cc5ff; }
.bd-pn { color: var(--bd-pt); font-weight: 700; }
.bd { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; max-width: 920px; margin: 0 auto; min-width: 0; }
.bd-mat {
  min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 8px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: radial-gradient(520px 280px at 50% 50%, #251b4c 0%, transparent 70%), linear-gradient(180deg, #161131, #120e26);
}

/* a player's bar: name and wins, LP on the right, deck and hand below */
.bd-info {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who lp" "counts lp";
  align-items: center; column-gap: 10px; padding: 6px 10px; border-radius: 10px;
  border: 1px solid var(--line); border-left: 4px solid var(--bd-pc);
  background: #150f2c; background: linear-gradient(90deg, color-mix(in srgb, var(--bd-pc) 14%, #150f2c), #150f2c 65%);
}
.bd-info.bd-turn { border-color: var(--gold); border-left-color: var(--bd-pc); box-shadow: 0 0 0 1px rgba(233, 185, 73, .35), 0 0 18px rgba(233, 185, 73, .3); }
.bd-info.bd-win { border-color: var(--gold2); border-left-color: var(--bd-pc); box-shadow: 0 0 0 2px rgba(255, 217, 120, .5), 0 0 26px rgba(233, 185, 73, .45); }
.bd-who { grid-area: who; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.bd-info .bd-name { font-size: 16px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-wins { flex: none; font-size: 11.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 0 7px; }
.bd-counts { grid-area: counts; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; font-size: 12.5px; color: var(--muted); }
.bd-hand { display: inline-flex; align-items: center; gap: 6px; }
.bd-backs { display: inline-flex; gap: 2px; }
.bd-mini { display: inline-block; width: 9px; height: 13px; border-radius: 2px; border: 1px solid #8a76d0;
           background: repeating-linear-gradient(45deg, #3a2a6c 0 2px, #281d4e 2px 4px); }
.bd-lp { grid-area: lp; text-align: right; line-height: 1; }
.bd-lp small { display: block; font-size: 10px; color: var(--muted); letter-spacing: 1px; margin-bottom: 2px; }
.bd-lp b { display: inline-block; font-size: clamp(22px, 6.5vw, 30px); font-weight: 800; color: var(--gold2); font-variant-numeric: tabular-nums; transform-origin: right center; }
.bd-zero b { color: var(--red); }
.bd-hit b { animation: bd-hit .9s ease-out; }
.bd-heal b { animation: bd-heal .9s ease-out; }
.bd-delta { margin-left: 6px; font-weight: 700; letter-spacing: 0; animation: bd-fade 2.6s ease-in forwards; }
.bd-hit .bd-delta { color: var(--red); }
.bd-heal .bd-delta { color: var(--green); }
@keyframes bd-hit { from { color: var(--red); transform: scale(1.15); } }
@keyframes bd-heal { from { color: var(--green); transform: scale(1.1); } }
@keyframes bd-fade { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }

/* rows of five zones; each zone is a size container, so a tile's text follows its own width */
.bd-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(4px, 1.4vw, 10px); width: 100%; max-width: 540px; margin: 0 auto; }
.bd-zone {
  position: relative; aspect-ratio: 5 / 7; min-width: 0; container-type: inline-size; border-radius: 6px;
  border: 1px dashed rgba(169, 159, 208, .2); border-color: color-mix(in srgb, var(--bd-pc) 28%, transparent);
}
.bd-empty::after {
  content: "Quái thú"; position: absolute; inset: 0; display: grid; place-items: center; padding: 2px; text-align: center;
  font-size: 8px; font-size: clamp(7px, 10cqw, 10px); line-height: 1.2; color: rgba(169, 159, 208, .3);
}
.bd-mag .bd-empty::after { content: "Phép · Bẫy"; }
.bd-tile {
  position: absolute; inset: -1px; display: flex; flex-direction: column; gap: 1px; overflow: hidden;
  padding: 3px 4px; padding: 6cqw 7cqw; border-radius: 6px; line-height: 1.15;
  border: 1px solid var(--bd-kc, #6d5bb0); background: var(--bd-kbg, #2a1f50); color: var(--bd-kt, var(--text));
  font-size: 8px; font-size: clamp(8px, 12cqw, 12.5px); box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.bd-tile > * { flex: none; min-width: 0; }
/* defense: the card lies sideways in its zone, with THỦ above it */
.bd-tile.bd-def { inset: auto -1px; top: 50%; transform: translateY(-50%); aspect-ratio: 7 / 5; }
.bd-tag {
  position: absolute; top: 2px; left: 50%; transform: translateX(-50%); z-index: 1; padding: 0 5px; border-radius: 99px;
  font-size: 8px; font-size: clamp(7px, 10cqw, 11px); font-weight: 800; line-height: 1.45; letter-spacing: .5px;
  color: #0f0b1e; background: var(--blue);
}
.bd-tile .bd-name {
  font-weight: 600; overflow: hidden; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
}
.bd-meta { font-size: .78em; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-lv { color: var(--gold2); opacity: 1; }
.bd-stars { display: none; font-size: .85em; letter-spacing: -1px; }
.bd-stats { margin-top: auto; white-space: nowrap; overflow: hidden; font-size: 1.3em; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.bd-stats b { color: var(--gold2); }
.bd-stats span { font-size: .72em; font-weight: 600; opacity: .7; }
.bd-def .bd-name { -webkit-line-clamp: 1; line-clamp: 1; }
@container (min-width: 90px) {
  .bd-stars { display: inline; }
  .bd-lvn { display: none; }
}
@container (max-width: 89px) {
  .bd-def .bd-meta { display: none; }
  .bd-def .bd-name { -webkit-line-clamp: 2; line-clamp: 2; }
}
.bd-spell { text-align: center; }
.bd-spell .bd-name { margin: auto 0; -webkit-line-clamp: 4; line-clamp: 4; }
.bd-kind { font-size: .78em; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; color: var(--bd-kl); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the card colors (monster tan, magic green, trap purple, as on the real cards) */
.bd-k-monster { --bd-kc: #b48a3c; --bd-kbg: linear-gradient(165deg, #4a3616, #261b0b); --bd-kt: #f6ead0; --bd-kl: #f0c873; }
.bd-k-magic { --bd-kc: #33b98d; --bd-kbg: linear-gradient(165deg, #14503d, #0a2a21); --bd-kt: #e0f7ee; --bd-kl: #7fe3bf; }
.bd-k-equip { --bd-kc: #86c04a; --bd-kbg: linear-gradient(165deg, #2f4e15, #17280b); --bd-kt: #eaf6dc; --bd-kl: #b8e47e; }
.bd-k-ritual { --bd-kc: #4fa0e0; --bd-kbg: linear-gradient(165deg, #173c5e, #0c2034); --bd-kt: #e2f0fc; --bd-kl: #8cc8ff; }
.bd-k-trap { --bd-kc: #c860b4; --bd-kbg: linear-gradient(165deg, #4d1a49, #290e29); --bd-kt: #fae3f5; --bd-kl: #f29ae0; }
.bd-back {
  border: 1px solid #7a68c0;
  background: radial-gradient(ellipse 30% 22% at 50% 50%, #1b1338 0 70%, var(--gold) 74% 84%, transparent 88%),
              repeating-linear-gradient(45deg, #3a2a6c 0 3px, #281d4e 3px 6px);
}
.bd-tile.bd-back { align-items: center; justify-content: center; }
.bd-up { font-size: .85em; font-weight: 700; color: var(--gold2); }

/* the middle strip: duel, turn, field; the winner's banner once it is over */
.bd-mid {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 10px; padding: 5px 8px; margin: 2px 0;
  text-align: center; font-size: 13.5px; color: var(--muted);
  border-top: 1px solid rgba(233, 185, 73, .25); border-bottom: 1px solid rgba(233, 185, 73, .25);
  background: linear-gradient(90deg, transparent, rgba(233, 185, 73, .08), transparent);
}
.bd-mid > * { min-width: 0; overflow-wrap: anywhere; }
.bd-field { font-size: 12px; color: var(--gold2); border: 1px solid rgba(233, 185, 73, .4); border-radius: 99px; padding: 0 8px; white-space: nowrap; }
.bd-mid.bd-won { padding: 8px; background: linear-gradient(90deg, transparent, rgba(233, 185, 73, .2), transparent); border-color: rgba(233, 185, 73, .6); }
.bd-banner { flex: 0 1 100%; min-width: 0; overflow-wrap: anywhere; font-size: clamp(19px, 5.5vw, 26px); font-weight: 800; line-height: 1.2; color: var(--gold2); text-shadow: 0 0 14px rgba(233, 185, 73, .5); }

/* (10/11) the cards' pictures, what is added to ATK/DEF, the life points' bar, the last thing done (view.js) */
button.bd-tile { font: inherit; text-align: left; cursor: zoom-in; }
button.bd-tile:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; z-index: 2; }
.bd-tile.bd-art { background-size: cover; background-position: center 20%; image-rendering: pixelated; }
.bd-tile.bd-art::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 6, 24, .5) 0, rgba(10, 6, 24, 0) 30%, rgba(10, 6, 24, .15) 45%, rgba(10, 6, 24, .92) 78%); }
.bd-tile > * { position: relative; z-index: 1; }
.bd-top { display: flex; justify-content: space-between; align-items: center; gap: 2px; }
.bd-star { color: #ffe9a8; font-weight: 700; }
.bd-gname { display: none; }
.bd-art .bd-name { margin-top: auto; text-shadow: 0 1px 2px #000, 0 0 4px #000; -webkit-line-clamp: 1; line-clamp: 1; font-size: .9em; }
.bd-art .bd-stats { margin-top: 0; }
@container (max-width: 79px) {
  .bd-art .bd-name { display: none; }
  .bd-art .bd-stats { margin-top: auto; }
  .bd-art .bd-stats span { display: none; }
  .bd-art.bd-spell .bd-name { display: -webkit-box; font-size: .8em; }
}
.bd-art .bd-stats, .bd-art .bd-meta { text-shadow: 0 1px 2px #000, 0 0 3px #000; }
.bd-art.bd-spell .bd-name { margin: auto 0 0; -webkit-line-clamp: 2; line-clamp: 2; }
.bd-art .bd-kind { align-self: flex-start; padding: 0 4px; border-radius: 4px; background: rgba(10, 6, 24, .7); }
.bd-plus { font-size: .78em; font-weight: 800; line-height: 1.1; text-shadow: 0 1px 2px #000, 0 0 3px #000; }
.bd-art .bd-name + .bd-plus, .bd-art .bd-gname + .bd-plus { margin-top: 0; }
/* a card in defence lies sideways, short: its picture, its stars, what is added and its numbers; its name if there is room */
.bd-art.bd-def .bd-gname { display: none; }
.bd-art.bd-def .bd-stats { margin-top: auto; }
.bd-art.bd-def .bd-name { margin-top: 0; }
@container (max-width: 99px) {
  .bd-art.bd-def .bd-name { display: none; }
}
.bd-up-by { color: #7ef0a6; }
.bd-down-by { color: #ff8d97; }
@container (min-width: 84px) {
  .bd-gname { display: block; font-size: .72em; }
}
.bd-lpbar { display: block; width: 100%; min-width: 64px; height: 5px; margin-top: 4px; border-radius: 99px; background: rgba(169, 159, 208, .18); overflow: hidden; }
.bd-lpbar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--bd-pc), var(--gold2)); transition: width .6s ease-out; }
.bd-lpbar.bd-low i { background: linear-gradient(90deg, var(--red), #ff9a5c); }
.bd-last { flex-basis: 100%; font-size: 13px; color: var(--text); padding: 3px 8px; border-radius: 8px; background: rgba(233, 185, 73, .08);
  animation: bd-say .5s ease-out; }
@keyframes bd-say { from { opacity: .2; transform: translateY(3px); } }
.bd-ub { display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit;
  text-align: left; cursor: zoom-in; }
.bd-ub:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; border-radius: 4px; }
.bd-uimg { width: 30px; height: 24px; flex: none; border-radius: 3px; image-rendering: pixelated; object-fit: cover; background: #0c0820; }
.watch-nodisc { margin: 0 0 8px; }
.wstars { margin: 10px 0 0; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(21, 15, 44, .6); }
.wstars summary { cursor: pointer; padding: 8px 12px; color: var(--gold2); font-weight: 600; font-size: 13.5px; }
.wstars > div { padding: 0 12px 10px; }
#bcard .star-on { color: var(--gold2); font-weight: 700; }
#bcard .good { color: var(--green); }
#bcard .bad { color: var(--red); }

/* the cards used: below the mat on phones (a column per player), beside it on wider screens */
.bd-used { min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, var(--card), var(--bg2)); }
.bd-used h3 { margin: 0 0 8px; font-size: 14px; color: var(--gold2); }
.bd-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bd-group { min-width: 0; }
.bd-group h4 { margin: 0 0 5px; padding-left: 6px; border-left: 3px solid var(--bd-pc); font-size: 12.5px; color: var(--bd-pt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-group h4 span { color: var(--muted); font-weight: 500; }
.bd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.bd-u { display: flex; align-items: baseline; gap: 6px; min-width: 0; padding: 2px 6px; font-size: 12.5px; line-height: 1.3;
        border-left: 3px solid var(--bd-kc); border-radius: 0 6px 6px 0; background: rgba(255, 255, 255, .035); }
.bd-un { flex: 1; min-width: 0; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.bd-us { flex: none; color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.bd-none { margin: 0; color: var(--muted); font-size: 12.5px; font-style: italic; }

/* no duel running */
.bd-wait {
  display: grid; justify-items: center; gap: 10px; max-width: 920px; margin: 0 auto; padding: 40px 16px; text-align: center;
  color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); background: rgba(21, 15, 44, .6);
}
.bd-wait p { margin: 0; }
.bd-wait-card { width: 56px; aspect-ratio: 5 / 7; border-radius: 6px; box-shadow: 0 0 18px rgba(233, 185, 73, .18); animation: bd-breathe 3.2s ease-in-out infinite; }
.bd-score { font-size: 13px; overflow-wrap: anywhere; }
@keyframes bd-breathe { 50% { opacity: .55; transform: translateY(-3px); } }

#board { container-type: inline-size; }
@container (min-width: 840px) {
  .bd { grid-template-columns: minmax(0, 1fr) 250px; align-items: start; }
  .bd-groups { grid-template-columns: 1fr; }
  .bd-list { max-height: 300px; overflow-y: auto; }
}
@media (min-width: 760px) {
  .bd-mat { gap: 8px; padding: 12px; }
  .bd-info { padding: 7px 12px; }
  .bd-info .bd-name { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .bd-hit b, .bd-heal b, .bd-wait-card { animation: none; }
}

/* accounts (account.js): the header's chip, the marks after names (the same ★ as on Chocobo Racing Online) */
.top .acct { margin-left: 10px; max-width: 46vw; display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.acct-name { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.top .acct.in { border-color: var(--gold); }
.top { gap: 8px; }
.top .online { margin-left: auto; }
.mstr { display: inline-grid; place-items: center; min-width: 1.35em; height: 1.35em; padding: 0 .3em; border-radius: 999px;
        font-size: .78em; font-weight: 900; line-height: 1; color: #3b2400;
        background: linear-gradient(135deg, #fff3b0 0%, #ffd54f 35%, #ffb300 65%, #ff8f00 100%);
        box-shadow: 0 0 0 1px rgba(255, 214, 79, .9), 0 0 8px rgba(255, 179, 0, .75); vertical-align: .08em;
        text-shadow: 0 1px 0 rgba(255, 255, 255, .6); }
.vrf { color: var(--green); font-weight: 700; font-size: .9em; }
.link { background: none; border: 0; padding: 0; color: var(--gold2); text-decoration: underline; cursor: pointer; font: inherit; }
#name:disabled { opacity: 1; color: var(--muted); border-color: var(--line); background: transparent; cursor: default; } /* the account's name: shown, not typed */
.dialog h2 { display: flex; align-items: center; gap: 8px; }
.dialog h2 .close { margin-left: auto; }
.dialog.wide { width: min(820px, calc(100vw - 24px)); }
.tabs { display: flex; gap: 4px; margin: 8px 0 12px; border-bottom: 1px solid var(--line); }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 8px 12px; font: inherit; cursor: pointer; }
.tab.on { color: var(--gold2); border-bottom-color: var(--gold); }
.acct-form { display: grid; gap: 10px; }
.acct-form label { display: grid; gap: 4px; color: var(--muted); font-size: 13.5px; }
.acct-form input, .acct-form textarea { width: 100%; }
textarea { background: #120e26; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; resize: vertical; }
.btn.bad { border-color: rgba(224, 82, 95, .6); color: #ffb3ba; }
.btn.bad:hover:not(:disabled) { border-color: var(--red); }
select.small { padding: 4px 8px; font-size: 13px; }
/* Hành trình's 🏅 (the duel's rank, 10/11): a button's look with the native list under it (its select over the whole
   button, unseen): a phone's own picker opens, the keys and a screen reader have a real select; the medal alone on a bar
   with no room for the words (667-900 px wide: the bar's other buttons fill it) */
/* a deploy's progress (app.js showProgress, 10/11): the players still in a duel it waits for, as a bar */
.upbar { position: relative; display: block; flex: none; width: 90px; height: 8px; border-radius: 4px; overflow: hidden;
  background: rgba(255, 255, 255, .14); }
.upbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold2)); transition: width .5s ease; }
.upbar.big { width: auto; height: 18px; border-radius: 9px; margin: 6px 0 10px; }
.upbar.big b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px;
  color: var(--text); text-shadow: 0 1px 2px #000; }
.jrank { position: relative; display: inline-flex; align-items: center; gap: 5px; }
/* the bar's words that go on a bar with no room for them (667-900 px wide: its buttons fill it): Rời, ✦ alone */
@media (max-width: 900px) { .game .bar .bar-word { display: none; } }
#stars-help.on { border-color: var(--gold); }
/* the guardian stars' counters (app.js starsBoard, 10/11): a board over the picture's corner, the game still seen */
.stars-panel { position: absolute; top: 8px; right: 8px; z-index: 5; width: min(380px, calc(100% - 16px)); max-height: calc(100% - 16px);
  overflow: auto; background: rgba(13, 10, 26, .96); border: 1px solid rgba(233, 185, 73, .6); border-radius: 12px; padding: 10px 12px;
  font-size: 13.5px; line-height: 1.4; box-shadow: 0 8px 28px rgba(0, 0, 0, .55); }
.stars-panel .sp-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--gold2); }
:is(.stars-panel, .wstars) .sp-hint { margin: 6px 0; color: var(--muted); font-size: 12.5px; }
:is(.stars-panel, .wstars) .sp-table { width: 100%; border-collapse: collapse; }
:is(.stars-panel, .wstars) .sp-table th, :is(.stars-panel, .wstars) .sp-table td { text-align: left; padding: 3px 4px; white-space: nowrap; font-weight: 400; font-size: 13px; }
:is(.stars-panel, .wstars) .sp-table tbody th { color: var(--text); font-weight: 600; }
:is(.stars-panel, .wstars) .sp-table thead th { color: var(--muted); font-size: 12px; padding-bottom: 4px; }
:is(.stars-panel, .wstars) .sp-table .win { color: var(--green); }
:is(.stars-panel, .wstars) .sp-table .lose { color: #ff9aa5; }
:is(.stars-panel, .wstars) .ring2 tr:first-child th, :is(.stars-panel, .wstars) .ring2 tr:first-child td { border-top: 1px solid var(--line); padding-top: 6px; }
:is(.stars-panel, .wstars) .sg { display: inline-block; min-width: 1.1em; text-align: center; color: var(--gold2); }
@media (max-width: 360px) { :is(.stars-panel, .wstars) .sp-table th, :is(.stars-panel, .wstars) .sp-table td { white-space: normal; padding: 2px 3px; font-size: 12.5px; } }
.jrank select { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); min-width: 0; padding: 0; border: 0; opacity: 0; cursor: pointer;
  font-size: 16px; /* (iOS zooms into a smaller one, even unseen) */ }
.jrank:focus-within { outline: 2px solid var(--gold); outline-offset: 1px; }
.jrank.on { border-color: var(--gold); }
@media (max-width: 900px) { .jrank-now { display: none; } }

/* a master's tools (master.js): the menu on a name, ✕ on a chat line, the panel */
.who-btn { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; border-bottom: 1px dotted rgba(255, 217, 120, .5); }
.who-btn:hover { color: var(--gold2); }
.lines li { position: relative; padding-right: 44px; }
/* a line's own buttons (app.js addLine): answer it, a master's take it down */
.line-acts { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); display: flex; gap: 2px; }
.line-del { background: none; border: 0; color: var(--muted); cursor: pointer; opacity: .35; font-size: 12px; }
.lines li:hover .line-del, .line-del:focus { opacity: 1; color: var(--red); }
.menu { position: fixed; z-index: 30; min-width: 220px; max-width: calc(100vw - 16px); background: var(--card); border: 1px solid var(--gold);
        border-radius: 10px; padding: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); display: grid; }
.menu-head { margin: 4px 8px 6px; font-weight: 700; }
.menu-item { background: none; border: 0; color: var(--text); text-align: left; padding: 7px 10px; border-radius: 6px; font: inherit; font-size: 14px; cursor: pointer; }
.menu-item:hover:not(:disabled) { background: rgba(233, 185, 73, .12); }
.menu-item.bad { color: #ffb3ba; }
.menu-item:disabled { color: var(--muted); cursor: default; }
.m-list { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; max-height: 55vh; overflow-y: auto; }
.m-list li { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #150f2c; display: grid; gap: 6px; }
.m-list li.empty { color: var(--muted); text-align: center; border-style: dashed; }
.u-name { font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.u-meta { color: var(--muted); font-size: 13px; }
.u-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pill { font-size: 12px; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); font-weight: 500; }
.pill.bad { color: #ffb3ba; border-color: rgba(224, 82, 95, .6); }
.pill.ok { color: var(--green); border-color: rgba(91, 208, 138, .5); }
.m-password { border: 1px solid var(--gold); border-radius: 10px; padding: 10px 12px; margin: 10px 0; background: rgba(233, 185, 73, .08); }
.m-password code { font-size: 16px; color: var(--gold2); user-select: all; }
.code { font-family: ui-monospace, Consolas, monospace; }

/* a master's announcement: a band under the header for everybody */
.announce { position: sticky; top: 57px; z-index: 4; display: flex; align-items: center; gap: 10px; margin: 0; padding: 9px 16px;
            background: linear-gradient(90deg, rgba(255, 179, 0, .22), rgba(233, 185, 73, .08)); border-bottom: 1px solid var(--gold); }
.announce p { margin: 0; flex: 1; color: var(--gold2); font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .announce { top: 53px; padding: 8px 10px; }
  .top .acct { max-width: 38vw; }
}
.acct-form .state { flex: none; margin: 0; }
.acct-form .state:empty { display: none; }
.acct-form .hint { margin: 0; }
#m-q { text-transform: none; }

/* ranked duels (ranks.js): the boards, the duels just played, a player's card */
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; cursor: pointer; white-space: nowrap; }
.check input { width: auto; flex: none; accent-color: var(--gold); }
.check:has(input:disabled) { opacity: .55; cursor: default; }
.tag.ranked { color: var(--gold2); border-color: rgba(233, 185, 73, .6); }
/* the online Elo board, a trial for now (index.html #ranks) */
.tag.beta { color: var(--gold2); border-color: rgba(233, 185, 73, .6); vertical-align: middle; }
.beta-note { margin: 4px 0 10px; padding: 6px 10px; border-left: 3px solid var(--gold); background: rgba(233, 185, 73, .07); border-radius: 0 8px 8px 0; font-size: 13.5px; color: var(--text, inherit); }
.rank-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rank-tools .tabs { margin: 0; border-bottom: 0; flex-wrap: wrap; }
.ranks { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; margin-top: 10px; }
.ranks h3 { margin-top: 0; }
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 460px; overflow-y: auto; }
.board li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 64px; align-items: center; gap: 8px; padding: 7px 10px;
            border: 1px solid var(--line); border-radius: 9px; background: #150f2c; }
.board li.empty { display: block; color: var(--muted); text-align: center; border-style: dashed; }
.board .rk { text-align: center; color: var(--muted); font-weight: 700; }
.board .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .val { font-weight: 800; color: var(--gold2); font-variant-numeric: tabular-nums; }
.board .wl { color: var(--muted); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.board li.top { border-color: rgba(233, 185, 73, .45); background: linear-gradient(90deg, rgba(233, 185, 73, .12), #150f2c 60%); }
.recent { max-height: 460px; margin: 0; }
.recent li { padding: 8px 10px; }
.pc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 8px 0 12px; }
.pc-stats div { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #150f2c; display: grid; gap: 2px; text-align: center; }
.pc-stats b { font-size: 22px; color: var(--gold2); font-variant-numeric: tabular-nums; }
.pc-stats span { color: var(--muted); font-size: 12.5px; }
.pc-vs { margin: 0 0 10px; padding: 8px 12px; border-radius: 9px; border: 1px solid var(--gold); background: rgba(233, 185, 73, .08); }
.pc-list { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 4px; }
.pc-list li { padding: 5px 10px; border-left: 3px solid var(--line); background: #150f2c; border-radius: 6px; }
.pc-list li.won { border-left-color: var(--green); }
.pc-list li.lost { border-left-color: var(--red); }
#player-dialog h3 { margin: 12px 0 6px; font-size: 14px; color: var(--muted); }
#player-dialog h3 small { font-weight: 400; font-size: 12px; }
.pc-tabs { margin: 0 0 8px; }
.pc-sum { margin: 0 0 6px; color: var(--muted); font-size: 13px; }
.pc-opps { list-style: none; padding: 0; margin: 0 0 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.pc-opps li { display: grid; justify-items: center; gap: 2px; opacity: .55; }
.pc-opps li.won { opacity: 1; }
.pc-opps .face { width: 40px; height: 40px; border-radius: 6px; image-rendering: pixelated; background: #0c0820; object-fit: cover; }
.pc-opps .face:not([src]) { visibility: hidden; } /* no disc in this browser: no face, the line under it still there */
.pc-opps .w { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pc-opps .rk { color: var(--gold2); }
.pc-rarity { margin: 0 0 8px; line-height: 1.9; }
.pc-rarity b { font-variant-numeric: tabular-nums; }
.pc-rarity small { color: var(--muted); }
@media (max-width: 760px) {
  .ranks { grid-template-columns: 1fr; }
  .board li { grid-template-columns: 28px minmax(0, 1fr) auto 52px; padding: 7px 8px; }
  .pc-stats b { font-size: 18px; }
}

/* the duel's log (duellog.js): in the game (a drawer on the left, beside the chat's) and beside the spectators' board */
.log-drawer { left: 10px; right: auto; }
.log-drawer h3, .dlog-panel h3 { margin: 0 0 6px; font-size: 14px; color: var(--muted); }
.dlog-panel { margin-top: 12px; }
.dlog-panel .lines { max-height: 260px; min-height: 120px; }
.dlog li { padding: 2px 0 2px 8px; border-left: 2px solid transparent; font-size: 13.5px; padding-right: 0; }
.dlog li.turn, .dlog li.head { margin-top: 6px; color: var(--gold2); font-weight: 700; border-left-color: var(--gold); }
.dlog li.head { text-transform: uppercase; letter-spacing: .04em; }
.dlog li.attack { color: #ffd0a0; }
.dlog li.hit { color: #ffb3ba; }
.dlog li.heal { color: var(--green); }
.dlog li.summon, .dlog li.flip { color: var(--text); }
.dlog li.spell { color: #c9b8ff; }
.dlog li.set, .dlog li.pos, .dlog li.stat, .dlog li.field, .dlog li.gone { color: var(--muted); }
.dlog li.win { color: var(--gold2); font-weight: 800; border-left-color: var(--gold); }
.dlog li .tm { display: inline-block; min-width: 3.2em; margin-right: 6px; color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; opacity: .8; }
.dlog li.sub { padding-left: 22px; }
.dlog li.sub::before { content: "↳ "; color: var(--muted); }
.dlog li.fuse { color: #9fe0ff; }
.dlog li.draw { color: var(--muted); font-size: 12.5px; }
/* chat lines not read yet in a duel (app.js unread) */
#toggle-chat.unread { border-color: var(--gold); background: rgba(233, 185, 73, .2); color: var(--gold2); font-weight: 700; }
/* an icon on the Home Screen (app.js install) */
.top .install { margin-left: 6px; }
#install-dialog .steps { padding-left: 18px; margin: 8px 0 4px; display: grid; gap: 8px; }
@media (max-width: 760px) { .top .install .lbl { display: none; } }

/* people on the site (app.js showOnline): a badge that never wraps; narrow screens keep the dot and the number */
.top .online { display: inline-flex; align-items: center; gap: 5px; flex: none; white-space: nowrap; padding: 3px 9px;
               border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12.5px; }
.top .online[hidden] { display: none; }
.top .online b { color: var(--text); font-weight: 700; }
.top .online .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px rgba(91, 208, 138, .7); }
.top .brand { min-width: 0; }
@media (max-width: 420px) {
  .top .online .lbl { display: none; }
  .top .online { padding: 3px 7px; }
}

/* "Hành trình" (journey.js): the account's journey on the front page, its save state in the game's bar */
#journey > .hint, #versus > .hint { margin: 0 0 12px; max-width: 820px; }
#journey .hint.small { font-size: 12.5px; margin: 6px 0 0; }
.journey-lang { margin-top: 10px; }
.j-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 8px; }
.j-stats div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 6px; background: #150f2c; display: grid; gap: 2px; text-align: center; }
.j-stats b { font-size: 20px; color: var(--gold2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.j-stats span { color: var(--muted); font-size: 12.5px; }
.bar .jsave.ok { color: var(--green); }
.bar .jsave.bad { color: var(--red); }
/* the master panel's Hành trình: an account's duels */
/* Quản trị's Hành trình: the day at a glance, the stars given (master.js journeyOverview, setupGift) */
.m-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin: 6px 0; }
.m-stat { display: grid; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #150f2c; }
.m-stat b { font-size: 20px; font-variant-numeric: tabular-nums; }
.m-stat span { font-size: 12px; color: var(--muted); }
.m-stat.bad b { color: #ffb3ba; }
.m-gift { margin: 10px 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; }
.m-gift summary { cursor: pointer; font-weight: 600; }
.m-gift-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.m-org-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.m-org-form input { flex: 1; min-width: 160px; }
.m-gift-form input[type="number"] { width: 80px; }
.m-gift-form #m-gift-why { flex: 1; min-width: 160px; }
.pill .link { padding: 0 2px; color: inherit; }
.m-table { overflow-x: auto; margin: 8px 0; }
.m-table table { border-collapse: collapse; width: 100%; font-size: 13px; }
.m-table th, .m-table td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.m-table th { color: var(--muted); font-weight: 600; }
#master-dialog h3.sub { margin: 14px 0 6px; font-size: 15px; color: var(--muted); }
/* the journey's own screen over the game, paused between two duels: the opponents, the deck, the packs */
.jhub { position: absolute; inset: 0; overflow-y: auto; background: radial-gradient(900px 500px at 70% -10%, #2a1d5a 0%, transparent 60%), var(--bg);
        z-index: 2; }
.jhub-in { max-width: 980px; margin: 0 auto; padding: 16px; }
.jhub .tabs { position: sticky; top: -16px; background: var(--bg); z-index: 1; padding-top: 4px; }
.jhub-note { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 4px 0 8px; background: #150f2c; }
.jhub-note.win { border-color: #3d7a55; background: #11261b; }
.jhub-note.bad { border-color: #7a3d45; background: #2a1219; }
.jhub-note b { color: var(--gold2); }
.jhub-panel .hint { margin: 4px 0 10px; }
.opps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 8px; }
.opp { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #150f2c; display: grid; gap: 6px; }
.opp .nm { font-weight: 600; display: flex; justify-content: space-between; gap: 6px; align-items: baseline; }
.opp .nm small { color: var(--muted); font-weight: 400; white-space: nowrap; }
.opp .meta { color: var(--muted); font-size: 12.5px; display: flex; justify-content: space-between; gap: 6px; }
.opp .meta .w { color: var(--gold2); }
.opp .meta .share { white-space: nowrap; }
.opp .meta .share.full { color: var(--gold2); }
.opp .meta .today { white-space: nowrap; }
.opp .meta .today.full, .opp .meta .today.edge { color: var(--gold2); }
.opp .meta .lp { white-space: nowrap; color: var(--gold2); }
.star-rules ul { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.star-rules summary { line-height: 1.45; }
.opp.locked { opacity: .5; }
/* a duel's result in the card of the opponent just played (app.js opponentHtml, 10/11): the hub comes back to it */
.opp .jhub-note.inopp { margin: 0; padding: 8px 10px; font-size: 13.5px; line-height: 1.45; }
.opp.next { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(233, 185, 73, .35); }
/* its face beside its name, its record and Đấu (the game's 48 x 48 portrait, its pixels kept square) */
.opp { grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center; }
.opp > :not(.face) { grid-column: 2; }
.opp .face { grid-column: 1; grid-row: 1 / span 3; width: 72px; height: 72px; border-radius: 6px; image-rendering: pixelated;
             background: #0b0818; border: 1px solid var(--line); align-self: start; }
.opp.next .face { border-color: var(--gold); }
.opp.locked .face { filter: grayscale(1) brightness(.5); }
.clist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 10px; }
.clist li { display: flex; gap: 8px; align-items: baseline; padding: 4px 6px; border-bottom: 1px solid rgba(52, 41, 95, .6); font-size: 14px; }
.clist .cn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clist .ad { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.clist .x { color: var(--gold2); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.clist .pic { width: 40px; height: 32px; border-radius: 3px; background: #0b0818; flex: none; image-rendering: pixelated; align-self: center; }
.clist li[data-in], .clist li[data-out] { cursor: pointer; }
.clist li[data-in]:hover, .clist li[data-out]:hover { background: rgba(233, 185, 73, .08); }
.clist li { align-items: center; }
.deckbar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin: 4px 0 8px; }
.deckbar .actions { margin: 0; }
.deckbar .bad, .jhub .state.bad { color: var(--red); }
.deckfind { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.deckfind input { flex: 1; min-width: 160px; }
.deckedit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.deckedit .clist { grid-template-columns: minmax(0, 1fr); }
.cdetail { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #150f2c;
           margin: 0 0 6px; min-height: 60px; font-size: 14px; line-height: 1.5; }
.cdetail .art { width: 102px; height: 96px; border-radius: 4px; image-rendering: pixelated; background: #0b0818; flex: none; }
@media (max-width: 700px) {
  .deckedit { grid-template-columns: minmax(0, 1fr); }
}
.tier { font-size: 11px; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tier.rare { color: #8fd0ff; border-color: #2f5f86; }
.tier.super { color: #d6a8ff; border-color: #6a3f96; }
.tier.ultra { color: var(--gold2); border-color: var(--gold); background: rgba(233, 185, 73, .12); }
.new { font-size: 11px; color: #1b1300; background: var(--gold2); border-radius: 6px; padding: 0 5px; font-weight: 700; }
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 6px 0 12px; }
.pack { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: linear-gradient(160deg, #2b1f59, #150f2c); display: flex; flex-direction: column; gap: 6px; }
.pack .price small { color: var(--muted); font-weight: 400; }
.pack .hint { margin: 0; font-size: 12.5px; }
.pack .save { color: #9be59b; }
.pack .sure { color: var(--gold2); }
.pack .btn { margin-top: auto; } /* (the buttons of a row of boxes level, at their foot) */
.reveal .tally { margin: 0 0 6px; }
.pack h3 { margin: 0; font-size: 17px; }
.pack .price { color: var(--gold2); font-weight: 700; }
.odds { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.reveal { margin-top: 6px; }
/* the packs tab: what they deal (app.js hubOdds): each tier's share, then every card with its chance in a pack */
.odds-title { margin-top: 18px; }
.ptiers { border-collapse: collapse; font-size: 13.5px; margin: 0 0 8px; font-variant-numeric: tabular-nums; }
.ptiers th { color: var(--muted); font-weight: 400; font-size: 12px; text-align: right; padding: 3px 10px; }
.ptiers td { text-align: right; padding: 4px 10px; border-top: 1px solid rgba(52, 41, 95, .6); }
.ptiers th:first-child, .ptiers td:first-child { text-align: left; padding-left: 0; }
.clist.odds .lhead .cn { padding-left: 48px; }
.clist.odds .unlock { color: var(--muted); font-size: 12px; white-space: nowrap; }
@media (max-width: 560px) { .ptiers th, .ptiers td { padding: 3px 6px; } }
.reveal h3 { margin: 6px 0; font-size: 15px; }
.jhub h3.sub { margin: 16px 0 6px; font-size: 15px; color: var(--muted); font-weight: 600; }
.jhub .tabs { overflow-x: auto; scrollbar-width: none; }
.jhub .tab { white-space: nowrap; }
.clink { background: none; border: 0; padding: 0; font: inherit; color: var(--text); cursor: pointer; text-align: left;
         text-decoration: underline dotted rgba(236, 231, 255, .35); text-underline-offset: 3px; }
.clink:hover { color: var(--gold2); text-decoration-color: var(--gold); }
.clink.have { color: var(--gold2); }
.opp .meta .clink { color: var(--muted); font-size: 12px; white-space: nowrap; }
.clist li[data-card] { cursor: pointer; }
.clist li[data-card]:hover { background: rgba(233, 185, 73, .08); }
.clist.look li.none { opacity: .55; }
.clist .no { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; min-width: 2.1em; text-align: right; }
.clist.look { grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); }
.clist.wide { grid-template-columns: minmax(0, 1fr); }
.clist .pools { display: flex; gap: 4px; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--gold2); }
.clist .pools span { width: 4.6em; text-align: right; }
.clist li.lhead { color: var(--muted); font-size: 11.5px; padding-top: 0; }
.clist li.lhead .gap { width: calc(40px + 2.1em + 8px); flex: none; }
.clist li.lhead .pools { color: var(--muted); font-size: 11px; }
.deckfind .check { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13.5px; }
.deckfind .check input { padding: 0; flex: none; min-width: 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 0 0 10px; }
.seg button { background: none; border: 0; color: var(--muted); padding: 7px 14px; font: inherit; cursor: pointer; }
.seg button.on { background: rgba(233, 185, 73, .15); color: var(--gold2); }
.pairs { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; margin: 4px 0 8px; }
.pairs.cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.pairs.found { margin-bottom: 12px; }
.pair small { color: var(--muted); }
details.more { flex-basis: 100%; }
details.more summary { cursor: pointer; color: var(--muted); font-size: 13px; }
/* the opponents not open yet, folded under one line after the ones that are */
details.locked-rest { margin-top: 12px; }
details.locked-rest > summary { padding: 10px 14px; border: 1px dashed var(--line); border-radius: var(--radius); font-size: 14px; }
details.locked-rest[open] > summary { margin-bottom: 10px; }
details.more .pairs { margin: 4px 0 0; }
.fgroups { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.fgroup { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #150f2c; min-width: 0; }
.fres { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.fres .pic { width: 40px; height: 32px; image-rendering: pixelated; border-radius: 3px; background: #0b0818; flex: none; }
.fres .ad { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: auto; font-variant-numeric: tabular-nums; }
.fres small { color: var(--muted); font-weight: 400; white-space: nowrap; }
.fgroup .pairs { margin: 6px 0 0; font-size: 13px; }
.cardbox { width: min(660px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); overflow-y: auto; border: 1px solid var(--line);
           border-radius: 14px; background: #150f2c; color: var(--text); padding: 14px 16px; }
.cardbox::backdrop { background: rgba(5, 3, 14, .72); }
.cbnav { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cbhead { display: flex; gap: 14px; align-items: flex-start; line-height: 1.6; font-size: 14px; }
.cbhead .art { width: 153px; height: 144px; image-rendering: pixelated; border-radius: 6px; background: #0b0818; flex: none; }
.cbname { font-size: 18px; color: var(--gold2); }
.muted { color: var(--muted); }
.cardbox h4 { margin: 16px 0 6px; font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
/* a card's description and the rules behind it (app.js cardEffects); in the lookup, a magic card's under its name */
/* a card's small picture before its name in the fusions' and the card box's lists (app.js cardLink pic): opens its box */
.cpair { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; max-width: 100%; }
.cpic { padding: 0; margin: 0; border: 0; background: none; cursor: zoom-in; line-height: 0; flex: none; border-radius: 4px; }
.cpic:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.cpic .mini { width: 30px; height: 24px; border-radius: 3px; image-rendering: pixelated; background: #0c0820; object-fit: cover; display: block; }
.pair .cpair + .cpair, .pair .cpair { margin: 1px 0; }
.cardbox .cdesc { margin: 0 0 6px; padding: 8px 12px; border-left: 3px solid var(--gold); background: rgba(233, 185, 73, .06); border-radius: 0 8px 8px 0; font-style: italic; }
.cardbox .crules { margin: 4px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.cardbox .crules + .hint, .cardbox p.hint.small { margin: 6px 0 2px; }
.clist.look li { flex-wrap: wrap; }
.clist.look .cd { flex-basis: 100%; padding-left: calc(40px + 2.1em + 16px); color: var(--muted); font-size: 12.5px; line-height: 1.35; margin-top: -2px; }
.cardbox p { margin: 6px 0; font-size: 14px; line-height: 1.5; }
.drops { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; margin-bottom: 6px; }
.drops th, .drops td { padding: 4px 6px; border-bottom: 1px solid rgba(52, 41, 95, .6); text-align: right; white-space: nowrap; }
.drops th:first-child, .drops td:first-child { text-align: left; white-space: normal; }
.drops th { color: var(--muted); font-weight: 600; font-size: 12px; }
.drops tr.locked td { opacity: .55; }
@media (max-width: 560px) {
  .cbhead .art { width: 102px; height: 96px; }
  .clist.wide .ad, .clist.wide .tier { display: none; }
  .jhub .tab { padding: 8px 9px; }
  .fgroups { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .j-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .j-stats b { font-size: 17px; }
  .jhub-in { padding: 12px; }
  /* the hub on a phone upright: its figures in one row, the opponents (what a player came for) sooner in view */
  .jhub .j-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 4px; }
  .jhub .j-stats div { padding: 6px 2px; }
  .jhub .j-stats b { font-size: 16px; }
  .jhub .j-stats span { font-size: 11px; line-height: 1.2; }
  .jhub-opts .hint { display: none; }
}

/* ---- the UX review's fixes (phones first) ---------------------------------------------------------------------- */
/* over the Journey hub (z-index 2): what tells the player something */
.cover, .drawer { z-index: 3; }
.overlay { z-index: 4; }
.overlay .box { margin: 16px; }
/* the toast over every screen, as wide as its words */
.toast { position: fixed; top: calc(var(--top-h, 57px) + 10px); z-index: 50; width: max-content; max-width: min(92vw, 560px);
         border-radius: 14px; text-align: center; padding: 8px 16px; }
/* the header on one line: the short name on phones, the buttons pushed right by the name */
.top { justify-content: flex-start; }
.top .brand { margin-right: auto; }
.top .online { margin-left: 0; }
.brand > span:last-child { white-space: nowrap; }
@media (max-width: 480px) {
  .top { padding: 8px 12px; gap: 6px; }
  .brand { font-size: 16px; gap: 8px; }
  .brand .long { display: none; }
  .top .acct, .top .install, .top #open-keys { margin-left: 0; }
}
.announce { top: var(--top-h, 57px); }
@media (max-width: 760px) { .announce { top: var(--top-h, 53px); } }
/* (9/11) over the game while Hành trình's hub is shown (the game is fixed over the page: the band was under it, the
   user's "thông báo của Admin không hiện"), under its bar; not over a duel (a toast there) */
body:has(#game:not([hidden])):has(#jhub:not([hidden])) .announce { position: fixed; left: 0; right: 0; z-index: 11;
  background: linear-gradient(90deg, rgba(255, 179, 0, .22), rgba(233, 185, 73, .08)), #1a1430; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); }
/* checkboxes and radios are not text boxes */
input[type="checkbox"], input[type="radio"] { width: auto; min-width: 0; padding: 0; flex: none; accent-color: var(--gold); }
.check { white-space: normal; }
#room-ranked-label, .create .check { white-space: nowrap; }
.dialog { max-height: calc(100dvh - 32px); }
@media (max-width: 560px) { .dialog { padding: 14px; } }
#acct-sso { white-space: normal; text-align: left; }
/* the Journey's save state stays in the bar on phones */
@media (pointer: coarse) and (hover: none) {
  .bar .net.jsave { display: inline-block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45vw; }
  .check { min-height: 40px; }
  input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; }
  .clink { padding: 6px 0; }
  details.more summary { padding: 8px 0; }
  .seg button { min-height: 40px; }
}
/* six hub tabs side by side on phones, the icon over the name */
@media (max-width: 560px) {
  .jhub .tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; overflow: visible; }
  .jhub .tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; font-size: 12px;
               white-space: normal; line-height: 1.2; min-height: 48px; text-align: center; }
}
/* the drop rates of one opponent: on a line of their own on phones, each named */
@media (max-width: 560px) {
  .clist.wide li { flex-wrap: wrap; row-gap: 2px; }
  .clist.wide .pools { flex-basis: 100%; padding-left: calc(40px + 2.1em + 16px); gap: 10px; }
  .clist.wide .pools span { width: auto; text-align: left; }
  .clist.wide .pools span::before { content: attr(title) " "; color: var(--muted); }
  .clist li.lhead { display: none; }
}
/* the card box: its buttons stay at hand */
.cbnav { position: sticky; top: -14px; background: #150f2c; z-index: 1; padding: 6px 0; margin-top: -6px; }
/* what is not had or not open yet: readable, set apart without fading the words */
.opp.locked { opacity: 1; border-style: dashed; }
.opp.locked .nm span, .opp.locked .meta { color: var(--muted); }
.clist.look li.none { opacity: 1; }
.clist.look li.none .pic { filter: grayscale(1) brightness(.75); }
.clist.look li.none .cn { color: var(--muted); }
.drops tr.locked td { opacity: 1; color: var(--muted); }
.clink.have { font-weight: 600; }
.state.bad, .deckbar .bad, .jhub .state.bad { color: #ff8a94; }
.clist li[role="button"]:focus-visible, .clink:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.back { margin-left: auto; }
.jhub-opts { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin: 2px 0 6px; }
.jhub-opts .hint { margin: 0; }
#mute.on { border-color: var(--red); }
/* ---- the second UX review ------------------------------------------------------------------------------------------ */
/* the sticky hub tabs: their icons whole on phones (.jhub-in's padding is 12px there) */
@media (max-width: 560px) { .jhub .tabs { top: -12px; } }
/* an invite link's banner, first on the page */
.invite { border-color: var(--gold); }
.invite p { margin: 0 0 10px; font-size: 16px; }
.invite .actions { margin: 0; }
/* the deck being built: its count and Save stay in view as the lists scroll (under the hub's own sticky tabs) */
.jhub .deckbar, #odeck-dialog .deckbar { position: sticky; z-index: 1; background: var(--bg); padding: 6px 0; }
.jhub .deckbar { top: 24px; }
#odeck-dialog .deckbar { top: -18px; background: var(--card); }
@media (max-width: 560px) { .jhub .deckbar { top: 40px; } }
/* the deck's two ways (app.js deckHtml): looking (a card clicked shows what it is) and editing (✎ Sửa bộ bài: a card
   clicked goes in or out). Editing shows on the bar, the line above the lists and every row's − / ＋; the card just
   moved lights up where it went. */
.deckhint { margin: 0 0 8px; font-size: 13.5px; color: var(--muted); }
.deckhint.editing { color: var(--gold2); border: 1px dashed rgba(233, 185, 73, .55); border-radius: 8px; padding: 6px 10px; background: rgba(233, 185, 73, .06); }
.deckhint b { color: inherit; }
.jhub .deckbar.editing, #odeck-dialog .deckbar.editing { box-shadow: 0 2px 0 rgba(233, 185, 73, .45); }
.deckedit h3 small { font-weight: 400; font-size: 12px; color: var(--muted); margin-left: 6px; }
.deckedit.editing .clist li[data-in]::after, .deckedit.editing .clist li[data-out]::after {
  flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px; line-height: 1; }
.deckedit.editing .clist li[data-out]::after { content: "−"; color: #ff8a94; border: 1px solid rgba(224, 82, 95, .6); }
.deckedit.editing .clist li[data-in]::after { content: "+"; color: var(--green); border: 1px solid rgba(91, 208, 138, .6); }
.deckedit.editing .clist li[data-out]:hover::after { background: rgba(224, 82, 95, .22); }
.deckedit.editing .clist li[data-in]:hover::after { background: rgba(91, 208, 138, .22); }
.clist li.moved { animation: deck-moved 1.1s ease-out; }
@keyframes deck-moved { from { background: rgba(233, 185, 73, .38); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .clist li.moved { animation: none; background: rgba(233, 185, 73, .16); } }
/* the hub on a phone held sideways (some 320–380px tall): the opponents in view, not under the stats and the rules */
.rules { margin: 4px 0 10px; }
.rules summary { cursor: pointer; color: var(--muted); font-size: 13.5px; }
.rules .hint { margin: 6px 0 0; }
@media (max-height: 500px) {
  .jhub-in { padding-top: 8px; }
  .jhub .j-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 4px; }
  .jhub .j-stats div { padding: 4px; grid-auto-flow: column; justify-content: center; align-items: baseline; gap: 6px; }
  .jhub .j-stats b { font-size: 15px; }
  .jhub .j-stats span { font-size: 11.5px; }
  .jhub-opts { margin: 0 0 2px; }
  .jhub-opts .hint { display: none; }
  .jhub .tabs { margin: 4px 0 8px; }
}
/* the setup done on an earlier visit: one line, opened again with Sửa */
#setup.folded .row { display: none; }
.setup-done { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.setup-done .state { flex: 1; min-width: 0; overflow-wrap: anywhere; }
#journey, #setup { scroll-margin-top: calc(var(--top-h, 57px) + 8px); } /* scrolled to (leaving the Journey, needDisc): its heading not under the header */
/* the packs' odds on a phone (app.js hubOdds): the rarity kept beside the name, each chance named short */
@media (max-width: 560px) {
  .clist.odds .tier { display: inline-block; }
  .clist.odds .pools { padding-left: 48px; flex-wrap: wrap; }
  .clist.odds .pools span::before { content: attr(data-label) " "; }
  .clist.odds .unlock { flex-basis: 100%; padding-left: 48px; white-space: normal; }
}
/* a phone held upright: the duel's bar (its buttons wider than the screen) on two lines rather than its last buttons
   (Rời trận) off the edge; the score on one line */
.bar .score { white-space: nowrap; }
@media (max-width: 560px) and (orientation: portrait) {
  .game .bar { flex-wrap: wrap; row-gap: 4px; }
  .game .bar .who { flex-basis: 30%; }
}
/* a phone held upright, pointer play on (pointer.js style: .pp-dock): the picture at the top, as wide as the screen; in
   the black under it, the line saying what to do and the duel's buttons in rows, so a card's choices (opening beside the
   card, on the picture) never fall on the buttons; the fusions under them, at the bottom. (Held sideways: the column at
   the right, as before.) */
@media (max-width: 900px) and (orientation: portrait) {
  .stage.pp-dock #game-canvas { bottom: auto; height: min(calc(100% - 170px), 75vw) !important; }
  .stage.pp-dock .pbar, .stage.pp-dock:has(.drawer:not([hidden])) .pbar {
    top: calc(min(100% - 170px, 75vw) + 10px); bottom: auto; left: 8px; right: 8px; transform: none;
    flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; min-width: 0; max-width: none; }
  .stage.pp-dock .pbar-hint:not([hidden]) { display: block; flex: 1 0 100%; text-align: center; font-size: 15px; font-weight: 600;
    color: var(--text); padding: 0 4px 2px; line-height: 1.35; }
  .stage.pp-dock .pbtn { flex: 0 1 auto; min-height: 44px; padding: 8px 12px; }
  /* (its top set under the bar by pointer.js placeLow; open there always: the room is there) */
  .stage.pp-dock .pp-fuse:not(.pp-fuse-side) { bottom: auto; left: 8px; right: 8px; transform: none; width: auto; max-width: none;
    max-height: calc(100% - min(100% - 170px, 75vw) - 130px); display: flex; flex-direction: column; }
  .stage.pp-dock .pp-fuse:not(.pp-fuse-side) .pp-fuse-list { display: flex; max-height: none; overflow: auto; }
  .stage.pp-dock .pp-fuse:not(.pp-fuse-side) .pp-fuse-head { cursor: default; }
  .stage.pp-dock .pp-fuse:not(.pp-fuse-side) .pp-fuse-head::after { content: none; }
  .stage.pp-dock ~ .rotate, .stage.pp-dock .rotate { display: none; }
}
/* ---- the Hành trình's leaderboards (jranks.js): on the home page (#jranks) and in the hub's 🏆 tab ------------------- */
.jboard li { grid-template-columns: 34px 32px minmax(0, 1fr) auto 64px; }
.jboard .face { width: 32px; height: 32px; border-radius: 5px; image-rendering: pixelated; background: #0c0820; object-fit: cover; }
.jboard .face:not([src]) { visibility: hidden; } /* no disc in this browser: no face, no empty box */
.jboard .nm { display: grid; }
.jboard .nm > span, .jboard .nm small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jboard .nm .who-btn { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.jboard .nm small { color: var(--muted); font-size: 12px; }
.jboard li.me { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.board.jboard li.gap { display: block; text-align: center; color: var(--muted); border: 0; background: none; padding: 0; line-height: 1; }
.jrank-body { margin-top: 10px; }
.jme { margin: 8px 0 0; }
.jhub .board { max-height: none; overflow: visible; } /* the hub scrolls itself */
.jboard-you { margin: 2px 0 8px; }
.jboard-you b { color: var(--gold2); }
@media (max-width: 760px) {
  .jboard li { grid-template-columns: 26px 28px minmax(0, 1fr) auto 46px; gap: 6px; }
  .jboard .face { width: 28px; height: 28px; }
}

/* a deploy coming (app.js takeUpdate): a band under the header with the wait; the dialog with what is new */
.update-bar { position: sticky; top: var(--top-h, 57px); z-index: 4; display: flex; align-items: center; gap: 10px; margin: 0; padding: 9px 16px;
              background: linear-gradient(90deg, rgba(110, 168, 255, .2), rgba(110, 168, 255, .06)); border-bottom: 1px solid #6ea8ff; }
.update-bar p { margin: 0; flex: 1; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 760px) { .update-bar { padding: 8px 10px; font-size: 14px; } }
/* the Chocobo site meanwhile (10/11): a gold button in the band, a line in the dialog; on a phone the band's buttons under its words */
.update-bar .choco-go { flex: none; color: #1a1206; background: linear-gradient(180deg, #ffd66b, #e9b949); border-color: #e9b949; text-decoration: none; font-weight: 700; }
.update-bar .choco-go:hover { filter: brightness(1.06); }
@media (max-width: 600px) {
  .update-bar { flex-wrap: wrap; row-gap: 6px; }
  .update-bar p { flex: 1 1 calc(100% - 40px); }
  .update-bar .upbar { flex: 1 1 60px; }
  .update-bar .choco-more { display: none; }
}
.choco-tip { margin: 4px 0 10px; padding: 8px 12px; border-radius: 10px; font-size: 14px; line-height: 1.5;
  background: rgba(233, 185, 73, .1); border: 1px solid rgba(233, 185, 73, .45); }
.choco-tip a { color: var(--gold2); font-weight: 700; }
#update-dialog { width: min(560px, calc(100vw - 24px)); }
#update-dialog .news h3 { margin: 12px 0 4px; font-size: 15px; color: var(--gold2); }
#update-dialog .news .day { margin: 8px 0 2px; color: var(--muted); font-size: 13px; }
#update-dialog .news ul { margin: 4px 0; padding-left: 20px; display: grid; gap: 6px; }
#update-dialog .actions:has(#update-reload[hidden]) { display: none; }
.foot #news-open { margin-top: 8px; }

/* the ultra promised (app.js hubShop, cardList): the shop's line, the card it gave */
.pity-line { border-left: 3px solid #ff6ad5; padding-left: 8px; }
.clist .pity { flex: none; font-size: 11.5px; font-weight: 700; color: #ff9be6; border: 1px solid #ff6ad5; border-radius: 6px; padding: 0 5px; }

/* the field looked at from the hand (pointer.js lookAt): a card's details in the choices' popup */
.pp-menu .pp-look-name { display: block; padding: 6px 10px 2px; color: var(--gold2); font-size: 14px; }
.pp-menu .pp-look-line { margin: 0; padding: 2px 10px; font-size: 12.5px; color: var(--muted); max-width: 260px; }
.pp-menu .pp-look-line:last-child { padding-bottom: 8px; }
/* the fusions on a finger (pointer.js fuseDown): bigger to aim at, a first tap shows the fusion, the second makes it */
@media (pointer: coarse) {
  .pp-fuse-list { gap: 6px; }
  .pp-fuse-item { min-height: 48px; padding: 10px 12px; }
  .pp-fuse-head { min-height: 40px; }
}
.pp-fuse-item.armed { background: rgba(124, 182, 255, .24); box-shadow: inset 0 0 0 2px #7cb6ff; }
.pp-fuse-item.armed .pp-fuse-from::after { content: " · chạm lần nữa để dung hợp"; color: #9fd0ff; font-weight: 700; }

/* answering a line (app.js setReply, addLine): the quote over the answer, the box's "answering" line */
.lines li .re { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 2px 0 1px;
                padding-left: 6px; border-left: 2px solid var(--gold); font-size: 12px; color: var(--muted); cursor: pointer; }
.lines li .re b { color: var(--muted); font-weight: 700; }
.lines li.flash { background: rgba(233, 185, 73, .18); border-radius: 6px; }
.line-re { background: none; border: 0; color: var(--muted); cursor: pointer; opacity: .35; font-size: 14px; line-height: 1; padding: 1px 4px; }
.lines li:hover .line-re, .line-re:focus-visible { opacity: 1; color: var(--gold2); }
@media (pointer: coarse) { .line-re { opacity: .75; font-size: 16px; padding: 4px 8px; } .lines li { padding-right: 56px; } }
.say-re { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; padding: 4px 6px 4px 8px; border-left: 3px solid var(--gold);
          border-radius: 6px; background: rgba(233, 185, 73, .08); font-size: 12.5px; color: var(--muted); }
.say-re span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.say-re b { color: var(--gold2); }
.say-re-x { flex: none; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; padding: 2px 6px; }
.say-re-x:hover { color: var(--text, #fff); }

/* the field as a board (pointer.js drawBoard, Xem sân): both sides' cards at once, each with its ATK/DEF now, its
   position and its guardian star in use; a card's details under them */
.pp-board { position: absolute; left: 8px; top: 8px; right: 8px; bottom: 8px; z-index: 1; pointer-events: auto; display: flex;
            flex-direction: column; padding: 10px 12px 12px; border-radius: 14px; border: 1px solid var(--line); background: #0c091a;
            box-shadow: 0 10px 32px rgba(0, 0, 0, .55); }
.pp-board[hidden] { display: none; }
.pp-bbody { flex: 1; min-height: 0; display: flex; gap: 12px; justify-content: center; }
.pp-bbody > .pp-bgrid { flex: 0 1 760px; min-width: 0; overflow: auto; overscroll-behavior: contain; align-content: start; }
.pp-bhead { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.pp-bhead b { color: var(--gold2); font-size: 15px; }
.pp-bnote { flex: 1; min-width: 0; color: var(--muted); font-size: 12.5px; }
.pp-bsides { display: none; }
.pp-bclose { background: none; border: 1px solid var(--line); border-radius: 8px; color: inherit; cursor: pointer; padding: 6px 12px; font-size: 14px; white-space: nowrap; }
.pp-bclose:hover, .pp-bclose:focus-visible { border-color: var(--gold); outline: none; }
#pbar.pp-under-board { visibility: hidden; }
/* rows as tall as their cards (auto rows in a board of a set height would be its tiles' min-height only, the cards spilling) */
.pp-bgrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: max-content; gap: 6px; }
.pp-brow-label { grid-column: 1 / -1; font-size: 12px; color: var(--muted); margin-top: 2px; }
.pp-brow-label.mine { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); }
.pp-bcard { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; min-height: 104px; padding: 6px 4px;
            border-radius: 10px; border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .04); color: inherit;
            font: inherit; cursor: pointer; }
.pp-bcard:not(.empty):hover, .pp-bcard:not(.empty):focus-visible { border-color: var(--gold); outline: none; }
.pp-bcard > * { flex: none; }
.pp-bcard.picked { box-shadow: inset 0 0 0 2px var(--gold2); }
.pp-bcard.empty { opacity: .25; cursor: default; }
.pp-bcard.pp-bback { background: repeating-linear-gradient(45deg, rgba(140, 90, 40, .35) 0 6px, rgba(90, 55, 25, .35) 6px 12px); }
.pp-bart { width: 64px; height: 60px; max-width: 100%; object-fit: cover; border-radius: 4px; background: #000; }
.pp-bname { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; font-size: 12px; font-weight: 700; color: var(--gold2); }
.pp-bstats { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pp-bstats.up { color: #7ee08a; }
/* the PoC mode (Power of Chaos' rules, opt-in): its rules line in the hub, the effect marks and texts */
.jhub-poc-rules { font-size: 0.85em; margin: 0 0 6px; padding: 6px 8px; border-radius: 6px; background: rgba(255, 200, 80, 0.08); border: 1px solid rgba(255, 200, 80, 0.3); }
.jhub-poc-rules kbd { font-size: 0.9em; }
/* (12/11, the audit) the rules folded under one line (open on a first visit: app.js showHub), the hub's figures in one
   row whatever their number: the tabs and the opponents on the first screen */
.jhub-poc-rules > summary { cursor: pointer; list-style-position: inside; }
.jhub-poc-rules > summary small { color: var(--muted); font-weight: 400; }
.jhub-poc-rules[open] > summary { margin-bottom: 4px; }
.jhub-poc-rules > p { margin: 0; line-height: 1.5; }
.jhub .j-stats { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
[data-card] .poc { color: #ffc850; margin-left: 4px; }
.cdesc.poc { border-left: 3px solid #ffc850; padding-left: 8px; }
/* the PoC mode's pictures (pocview.js): the hand as Power of Chaos shows it, over the game's row of five, and the target
   being chosen. A card in the card game's own look; its sizes from its own width (a container: cqw) */
.poc-view { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.poc-hand-on .pp-marks { visibility: hidden; } /* (pointer.js's outlines are at the game's cards, under the row) */
.poc-table { position: absolute; border-radius: 6px 6px 0 0; border-top: 2px solid rgba(233, 185, 73, .55);
             background: linear-gradient(180deg, #2b2116 0%, #1a130c 55%, #120d08 100%); box-shadow: inset 0 6px 18px rgba(0, 0, 0, .6); }
.poc-row { position: absolute; pointer-events: auto; }
.poc-card { position: absolute; top: 0; width: var(--poc-w); height: var(--poc-h); box-sizing: border-box; container-type: inline-size;
            display: flex; flex-direction: column; gap: calc(var(--poc-w) * .015); padding: calc(var(--poc-w) * .04);
            border-radius: calc(var(--poc-w) * .03); border: 1px solid #120c05;
            background: linear-gradient(160deg, #e8c77d, #b98a3e); box-shadow: 0 4px 12px rgba(0, 0, 0, .65); user-select: none;
            transition: transform .1s ease-out, box-shadow .1s; }
.poc-row .poc-card { cursor: pointer; }
.poc-card.poc-effect { background: linear-gradient(160deg, #f2a861, #c25d22); }
.poc-card.poc-magic, .poc-card.poc-equip { background: linear-gradient(160deg, #3fb29a, #16705e); }
.poc-card.poc-trap { background: linear-gradient(160deg, #cf6fb6, #85307a); }
.poc-card.poc-ritual { background: linear-gradient(160deg, #6f97e8, #2f50a6); }
.poc-top { display: flex; align-items: center; min-height: 0; padding: 1.5cqw 3cqw; border-radius: 2cqw; background: rgba(255, 255, 255, .78);
           box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.poc-name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 9.5cqw; font-weight: 800;
            line-height: 1.15; color: #170f04; font-family: Georgia, "Noto Serif", serif; }
.poc-mid { text-align: right; font-size: 9cqw; line-height: 1; letter-spacing: -.5cqw; color: #ffcf33; text-shadow: 0 0 2px #6b2500, 0 0 1px #000;
           white-space: nowrap; overflow: hidden; min-height: 9cqw; }
.poc-magic .poc-mid, .poc-equip .poc-mid, .poc-trap .poc-mid, .poc-ritual .poc-mid { color: #fff; letter-spacing: 0; font-weight: 800; text-shadow: 0 1px 2px #000; }
.poc-frame { flex: 1; min-height: 0; padding: 2.5cqw; border-radius: 1cqw; background: linear-gradient(135deg, #6b5a3a, #2d2416);
             box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25), 0 0 0 1px rgba(0, 0, 0, .5); }
.poc-art { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; background: #0b0918; }
.poc-foot { display: flex; justify-content: space-between; gap: 2cqw; padding: 1.5cqw 3cqw; border-radius: 2cqw; background: rgba(255, 255, 255, .72);
            font-size: 8cqw; font-weight: 800; line-height: 1.1; color: #170f04; font-variant-numeric: tabular-nums; white-space: nowrap; }
.poc-kind { width: 100%; text-align: center; }
@container (max-width: 64px) {
  .poc-mid { display: none; }
  .poc-foot { justify-content: center; font-size: 11cqw; }
  .poc-def { display: none; }
  .poc-name { font-size: 12cqw; }
}
.poc-card.poc-back { align-items: center; justify-content: center; border: 1px solid #1c0f05;
                     background: radial-gradient(circle at 50% 50%, #7a4a1c 0 22%, #4b2a10 23% 40%, #2a170a 41%); }
.poc-back-mark { font-size: 40cqw; font-weight: 900; color: rgba(255, 210, 120, .5); }
.poc-card.poc-cursor { box-shadow: 0 0 0 2px #ffd860, 0 0 18px rgba(255, 216, 96, .8), 0 8px 18px rgba(0, 0, 0, .7); }
.poc-row .poc-card:hover:not(.poc-cursor) { box-shadow: 0 0 0 2px rgba(255, 255, 255, .7), 0 4px 12px rgba(0, 0, 0, .65); }
.poc-mark { position: absolute; left: -6px; top: 24%; min-width: 22px; height: 22px; padding: 0 4px; box-sizing: border-box; border-radius: 999px;
            display: grid; place-items: center; font-size: 13px; font-weight: 900; color: #1b1300; background: #ffd860; box-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
.poc-card.poc-extra { box-shadow: 0 0 0 2px #7cb6ff, 0 4px 12px rgba(0, 0, 0, .65); }
.poc-tag { position: absolute; left: 50%; top: -18px; transform: translateX(-50%); padding: 1px 7px; border-radius: 999px; white-space: nowrap;
           font-size: 11px; font-weight: 800; color: #04122a; background: #7cb6ff; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.poc-drop { position: absolute; left: -4px; right: -4px; bottom: 30%; padding: 2px 0; text-align: center; font-size: 10px; font-weight: 800;
            color: #fff; background: rgba(200, 40, 50, .92); border-radius: 4px; transform: rotate(-8deg); }
.poc-their-hand { position: absolute; z-index: 8; display: flex; flex-wrap: wrap; gap: 3px; align-items: center; box-sizing: border-box;
                   padding: 3px 6px; border-radius: 8px; background: rgba(60, 20, 20, .85); border: 1px solid rgba(240, 110, 110, .6);
                   --poc-w: 34px; --poc-h: 49px; pointer-events: none; }
.poc-their-hand b { flex-basis: 100%; font-size: 10px; color: #ffb0a0; white-space: nowrap; }
.poc-their-hand .poc-card { position: relative; width: var(--poc-w); height: var(--poc-h); flex: none; }
.poc-down-tag.poc-seen { background: rgba(200, 60, 60, .9); }
.poc-card.poc-lunge { animation: poc-lunge 0.9s cubic-bezier(.35, 0, .3, 1) 0.15s both; z-index: 30; }
@keyframes poc-lunge { 0% { transform: translate(0, 0) scale(1); } 45% { transform: translate(var(--dx), var(--dy)) scale(1.18); }
                       60% { transform: translate(calc(var(--dx) * .92), calc(var(--dy) * .92)) scale(1.12); }
                       100% { transform: translate(0, 0) scale(1); } }
.poc-card.poc-struck { animation: poc-struck 0.6s ease-out 0.5s both; }
@keyframes poc-struck { 0%, 100% { transform: translateX(0); filter: none; } 15% { transform: translateX(-6px); filter: brightness(2.2); }
                        35% { transform: translateX(6px); filter: brightness(1.6) sepia(.6) hue-rotate(-30deg); } 55% { transform: translateX(-4px); }
                        75% { transform: translateX(3px); } }
.poc-fight-line { position: absolute; left: 50%; transform: translate(-50%, -50%); z-index: 31; padding: 4px 14px; border-radius: 999px;
                  white-space: nowrap; font-weight: 800; font-size: 1.05em; color: #fff; background: rgba(160, 30, 30, .92);
                  border: 1px solid #ffd860; box-shadow: 0 0 14px rgba(255, 90, 60, .7); pointer-events: none; }
.poc-card.poc-def-pos.poc-struck { animation-name: poc-struck-def; }
@keyframes poc-struck-def { 0%, 100% { filter: none; } 20% { filter: brightness(2.2); } 45% { filter: brightness(1.6) sepia(.6) hue-rotate(-30deg); } }
@media (prefers-reduced-motion: reduce) { .poc-card.poc-lunge, .poc-card.poc-struck { animation-duration: .01s; } }
.poc-attack-arrow { position: absolute; height: 4px; margin-top: -2px; transform-origin: 0 50%; z-index: 6; pointer-events: none;
                     background: linear-gradient(90deg, rgba(255, 90, 60, 0), #ff5a3c 30%, #ffd860); border-radius: 2px;
                     box-shadow: 0 0 8px rgba(255, 120, 60, .9); animation: poc-arrow 0.9s ease-in-out infinite; }
.poc-attack-arrow::after { content: ""; position: absolute; right: -2px; top: 50%; width: 0; height: 0; transform: translateY(-50%);
                           border-left: 12px solid #ffd860; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
@keyframes poc-arrow { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
.poc-cell.poc-attacking .poc-card { box-shadow: 0 0 0 2px #ff5a3c, 0 0 14px rgba(255, 90, 60, .9); }
.poc-card.poc-vanish { animation: poc-vanish .9s ease-in forwards; pointer-events: none; }
@keyframes poc-vanish { 0% { opacity: 1; filter: none; transform: scale(1); } 40% { filter: brightness(1.8) sepia(1) hue-rotate(-30deg); }
                        100% { opacity: 0; filter: brightness(2) sepia(1) hue-rotate(-30deg); transform: scale(.6) rotate(-12deg); } }
.poc-dmg { position: absolute; z-index: 45; pointer-events: none; font-size: 26px; font-weight: 900; color: #ff5a5a;
           text-shadow: 0 2px 0 #3a0000, 0 0 10px rgba(255, 60, 60, .8); animation: poc-dmg 1.6s ease-out forwards; }
.poc-dmg.poc-heal { color: #6dff9a; text-shadow: 0 2px 0 #003a12, 0 0 10px rgba(60, 255, 120, .7); }
@keyframes poc-dmg { 0% { opacity: 0; transform: translateY(8px) scale(.7); } 15% { opacity: 1; transform: translateY(0) scale(1.15); }
                     70% { opacity: 1; transform: translateY(-14px) scale(1); } 100% { opacity: 0; transform: translateY(-30px); } }
@media (prefers-reduced-motion: reduce) { .poc-attack-arrow, .poc-card.poc-vanish, .poc-dmg { animation-duration: .01s; } }
.poc-pile-gy { cursor: pointer; pointer-events: auto; border-radius: 4px; }
.poc-pile-gy:hover { background: rgba(255, 216, 96, .18); }
.poc-grave { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); z-index: 40; pointer-events: auto; width: min(92%, 640px);
             max-height: 74%; touch-action: manipulation; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 12px;
             background: rgba(14, 10, 6, .95); border: 1px solid rgba(255, 216, 96, .5); box-shadow: 0 8px 28px rgba(0, 0, 0, .7);
             --poc-w: 64px; --poc-h: 93px; }
.poc-grave-head { display: flex; justify-content: space-between; align-items: center; color: #ffd860; }
.poc-grave-row { display: flex; flex-wrap: wrap; gap: 6px; overflow-y: auto; }
.poc-grave-row .poc-card { position: relative; width: var(--poc-w); height: var(--poc-h); flex: none; }
.poc-grave-none { color: #bdb3a0; }
/* (17/11) a card of the panel pressed: its details over the row */
.poc-grave { overflow-y: auto; }
.poc-grave-row { min-height: 70px; }
.poc-grave-row .poc-card { cursor: pointer; }
.poc-grave-row .poc-card.poc-picked, .poc-grave-row .poc-card:focus-visible { outline: 2px solid #ffd860; outline-offset: 2px; }
.poc-grave-tip { margin: 0; color: #bdb3a0; font-size: 12px; }
.poc-grave-detail { flex: none; display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 8px;
                    background: rgba(255, 216, 96, .08); border: 1px solid rgba(255, 216, 96, .25); }
.poc-grave-detail .poc-card { position: relative; flex: none; width: calc(var(--poc-w) * 1.4); height: calc(var(--poc-h) * 1.4); }
.poc-grave-detail .poc-fm-name { display: none; }
.poc-grave-info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; color: #f4ead2; font-size: 13px; line-height: 1.35; }
.poc-grave-info b { color: #ffd860; font-size: 15px; }
.poc-grave-line { color: #d9cdb0; }
.poc-grave-stats { font-weight: 700; }
.poc-grave-effect { margin: 2px 0 0; max-height: 7.2em; overflow-y: auto; white-space: pre-line; }
.poc-grave-effect.none { color: #bdb3a0; }
@media (max-width: 600px), (max-height: 560px) {
  .poc-grave-detail { padding: 6px; gap: 8px; }
  .poc-grave-detail .poc-card { width: var(--poc-w); height: var(--poc-h); }
  .poc-grave-info { font-size: 12px; gap: 2px; }
  .poc-grave-info b { font-size: 13px; }
  .poc-grave-effect { max-height: 4.1em; }
}
.rivals { margin: 6px 0 12px; padding: 8px 10px 4px; border-radius: 10px; background: linear-gradient(135deg, rgba(122, 62, 200, .14), rgba(216, 87, 42, .12));
          border: 1px solid rgba(255, 216, 96, .35); }
.rivals h3 { margin: 0 0 4px; font-size: 15px; }
.rivals .hint { margin: 0 0 6px; }
.rival-face { --rc: #8a6a3a; }
.rival-face.rk-yugi { --rc: #7a3ec8; }
.rival-face.rk-kaiba { --rc: #2f6fd6; }
.rival-face.rk-joey { --rc: #d8572a; }
.opp .face.rival-face, .rival-face { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; font-size: 24px; font-weight: 900; color: #fff;
              background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 55%), var(--rc);
              box-shadow: 0 0 0 2px rgba(255, 255, 255, .25), 0 2px 8px rgba(0, 0, 0, .5); flex: none; }
.opp.rival.locked .face.rival-face { filter: grayscale(1) brightness(.7); }
.opp .face.rival-face { width: 72px; height: 72px; font-size: 34px; border-radius: 50%; border: 0; image-rendering: auto; }
.rival-said { display: block; margin-top: 4px; opacity: .9; }
.poc-rival-bubble { position: absolute; left: 50%; top: 6px; transform: translateX(-50%); z-index: 60; display: flex; gap: 8px; align-items: center;
                    max-width: min(78%, 560px); padding: 7px 12px 7px 8px; border-radius: 14px; pointer-events: none;
                    background: rgba(20, 12, 4, .9); border: 1px solid rgba(255, 216, 96, .55); box-shadow: 0 4px 16px rgba(0, 0, 0, .6);
                    color: #fff; font-size: 14px; line-height: 1.35; animation: poc-rival-in .25s ease-out; }
.poc-rival-face { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; font-weight: 900; font-size: 17px;
                  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 55%), var(--rc); }
.poc-rival-words { display: flex; flex-direction: column; }
.poc-rival-words b { color: #ffd860; font-size: 12px; }
/* a choice up (its panel at the top): the rival's words below it */
.poc-view:has(.poc-pick:not([hidden])) ~ .poc-rival-bubble { top: auto; bottom: 34%; }
@keyframes poc-rival-in { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .poc-rival-bubble { animation: none; } }
.poc-tribute { position: absolute; right: -5px; bottom: 26%; padding: 1px 6px; border-radius: 999px; white-space: nowrap; font-size: 10px;
               font-weight: 800; color: #1b1300; background: #ffd860; box-shadow: 0 2px 6px rgba(0, 0, 0, .55); }
.poc-tribute.poc-short { color: #fff; background: #c8283a; }
.poc-pile.poc-pile-fus b { color: #c9a3ff; }
.poc-count { position: absolute; left: -6px; top: calc(-26px - var(--poc-raise, 0px)); padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 800;
             color: #1b1300; background: linear-gradient(#ffd97a, #e3a93b); box-shadow: 0 2px 6px rgba(0, 0, 0, .5); white-space: nowrap; z-index: 30; }
.poc-count.poc-over { color: #fff; background: linear-gradient(#ef5b66, #b8222e); }
/* (12/11, the audit: left 50% let them be half the stage wide at most; their own width, the stage's 92% at most) */
.poc-pick, .poc-banner { width: max-content; max-width: min(92%, 640px); box-sizing: border-box; }
.poc-pick { touch-action: manipulation; }
.poc-row { touch-action: none; } /* (a finger that drifts on a hand card started a pan: the tap was lost) */
/* (12/11 night, the owner: "lá bài nhìn không giống bản forbidden memories") the game's own field: the game's own hand
   under the PoC mode's additions (pocview.js drawHandFm: tags at the game's cards, the reserve's cards above the row's
   right end, the count); the pointer goes through to the game's cards */
.poc-row.poc-row-fm { pointer-events: none; }
.poc-row-fm .poc-slot { position: absolute; pointer-events: none; }
.poc-row-fm .poc-slot .poc-use, .poc-row-fm .poc-card { pointer-events: auto; }
.poc-row-fm .poc-count { left: 4px; top: calc(-24px - var(--poc-raise, 0px)); }
/* (a tag at the card's top edge: the game's card has its ATK and DEF at the foot) */
.poc-row-fm .poc-tribute { bottom: auto; top: -8px; right: -3px; }
.poc-row-fm .poc-extra .poc-tribute { top: auto; bottom: -9px; } /* (the reserve's card has its "Dự bị" tag at the top) */
/* (13/11, the audit) two reserve cards on a phone: a tag as wide as its card's place, on two lines (the second's lay over the first's) */
@container (max-width: 70px) {
  .poc-row-fm .poc-extra:has(~ .poc-extra) .poc-tribute, .poc-row-fm .poc-extra ~ .poc-extra .poc-tribute { max-width: calc(100% + 6px); box-sizing: border-box;
    white-space: normal; text-align: center; line-height: 1.15; border-radius: 9px; }
}
/* (13/11, the audit: the pill's look is .poc-card .poc-use's, which a slot's button is not under: it was the bar's big
   button at the slot's corner, over the card, its tag and the next card) */
.poc-row-fm .poc-slot .poc-use { position: absolute; left: 50%; top: 30%; bottom: auto; transform: translateX(-50%); z-index: 25; padding: 3px 10px;
                                 min-height: 28px; font-size: 12px; line-height: 1.4; white-space: nowrap; }
/* a card's face in Forbidden Memories' look (pocview.js face, with the game's field): a frame of its kind's colour, its
   picture, ATK over DEF as the game writes them (a Magic, Trap, Equip or Ritual card: the word); no name on it: a list's
   cards carry it under them */
.poc-card.poc-fmc { padding: 0; gap: 0; border: 1px solid #1c0f04; border-radius: 2px; overflow: visible; box-shadow: 0 2px 6px rgba(0, 0, 0, .6);
                    background: linear-gradient(180deg, #e9a04a 0%, #c9772a 55%, #a85a18 100%); }
/* (13/11, the audit: the face's shadow above took the reserve's blue ring and the cursor's gold one in a choice's row) */
.poc-fmc.poc-extra { box-shadow: 0 0 0 2px #7cb6ff, 0 2px 6px rgba(0, 0, 0, .6); }
.poc-fmc.poc-cursor { box-shadow: 0 0 0 2px #ffd860, 0 0 18px rgba(255, 216, 96, .8), 0 8px 18px rgba(0, 0, 0, .7); }
.poc-fmc.poc-fm-magic { background: linear-gradient(180deg, #58c79b 0%, #2c9a72 55%, #1c6f52 100%); }
.poc-fmc.poc-fm-trap { background: linear-gradient(180deg, #d77fc6 0%, #b24a9c 55%, #822f72 100%); }
.poc-fmc.poc-fm-equip { background: linear-gradient(180deg, #6fb7e8 0%, #3f86c2 55%, #285d92 100%); }
.poc-fmc.poc-fm-ritual { background: linear-gradient(180deg, #8f9cf0 0%, #5a63c8 55%, #3b3f96 100%); }
.poc-fm-art { flex: 1 1 auto; min-height: 0; margin: 5cqw 6cqw 0; border: 1px solid rgba(0, 0, 0, .75); background: #0b0918; overflow: hidden; }
.poc-fmc .poc-art { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.poc-fm-foot { flex: none; display: flex; flex-direction: column; align-items: flex-end; padding: 2cqw 7cqw 4cqw;
               font: 800 17cqw/1.08 "Courier New", ui-monospace, monospace; letter-spacing: 1cqw; color: #fff;
               text-shadow: 1px 1px 0 #000, -1px 0 0 #000, 0 -1px 0 #000, 1px 0 0 #000; font-variant-numeric: tabular-nums; }
.poc-fm-atk::before { content: "⚔"; margin-right: 3cqw; font-size: 13cqw; }
.poc-fm-def::before { content: "⛨"; margin-right: 3cqw; font-size: 13cqw; }
.poc-fm-kind { align-self: center; padding: 3cqw 0 5cqw; font: 700 21cqw/1.1 Georgia, "Times New Roman", serif; letter-spacing: 0; }
.poc-fm-name { display: none; }
.poc-grave-row .poc-fmc, .poc-choice-row .poc-fmc { margin-bottom: 15px; }
.poc-grave-row .poc-fm-name, .poc-choice-row .poc-fm-name { display: block; position: absolute; left: -2px; right: -2px; top: calc(100% + 2px);
  font: 600 10px/1.2 system-ui, sans-serif; color: #f4ead2; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: none; }
.poc-pick-info { min-width: 0; }
.poc-pick { position: absolute; transform: translateX(-50%); display: flex; gap: 12px; align-items: center; padding: 10px 14px; pointer-events: auto;
            border-radius: 14px; background: rgba(16, 12, 34, .92); border: 1px solid rgba(255, 216, 96, .7); box-shadow: 0 10px 28px rgba(0, 0, 0, .55); z-index: 3; }
.poc-pick .poc-card { position: relative; flex: none; }
.poc-pick-info { display: flex; flex-direction: column; gap: 4px; min-width: 150px; }
.poc-pick-title { color: #ffd860; font-size: 14px; }
.poc-pick-name { font-size: 15px; font-weight: 700; color: var(--text); }
.poc-pick-where { font-size: 12px; color: var(--muted); }
.poc-pick-buttons { display: flex; gap: 6px; margin-top: 4px; }
.poc-pick-buttons .pbtn { min-width: 40px; justify-content: center; }
/* (15/11) a name chosen (a Type, an Attribute, a zone): its buttons wrap; a zone Ground Collapse closed */
.poc-pick-buttons.poc-pick-names { flex-wrap: wrap; max-width: min(420px, 92vw); }
.poc-pick-buttons.poc-pick-names .pbtn { min-width: 72px; padding: 6px 8px; font-size: 13px; }
.poc-lock { position: absolute; transform: translate(-50%, -50%); width: 1.9em; height: 1.9em; display: grid; place-items: center; border-radius: 50%;
  background: rgba(40, 8, 8, .78); border: 1px solid rgba(240, 120, 110, .8); color: #ffb3a8; font-weight: 800; pointer-events: none; z-index: 2; }
.poc-chip .poc-chip-out { opacity: .7; font-weight: 600; }
.poc-lock.poc-lock-option { background: rgba(20, 20, 40, .35); border: 2px dashed rgba(255, 216, 96, .8); color: #ffd860; }
.poc-lock.poc-lock-aim { background: rgba(120, 80, 0, .7); border-style: solid; box-shadow: 0 0 8px rgba(255, 216, 96, .9); }
.poc-view:has(.poc-pick:not([hidden])) .poc-count { visibility: hidden; } /* (the hand's count lay over a choice's panel on a phone) */
/* (the duel's coin, told as the duel begins) */
/* (16/11) the Fusion Deck outside the deck, in the hub's deck tab */
.fdeck { margin: 8px 0 12px; }
.fdeck-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
/* (16/11 morning) the Field Spell in play: its side's chip */
.poc-chip-field { border-color: #4fb38f; color: #bff0dc; }
/* (16/11 night) a 1v1 room: the seconds left to answer a question, under its panel */
.poc-timer { margin-top: 4px; font-size: 12px; color: #d8d2c0; }
.poc-timer.soon { color: #ff8a70; font-weight: 700; }
/* (16/11 night) a rival's Match in the hub: its score's line, its two buttons side by side */
.rival-match { color: var(--gold, #e8c15a); }
.rival-btns { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.poc-coin { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); padding: 8px 16px; border-radius: 999px; z-index: 6; pointer-events: none;
  background: rgba(20, 12, 30, .9); border: 1px solid rgba(233, 185, 73, .8); color: #ffd860; font-weight: 800; white-space: nowrap; }
/* (a chain's cards so far, numbered, under the question) */
.poc-chain-links { display: block; font-size: .85em; opacity: .85; margin: 2px 0 4px; }
/* (a card named among all of them: the search box and its matches) */
.poc-name-search { width: min(260px, 70vw); padding: 6px 8px; border-radius: 6px; border: 1px solid rgba(233, 185, 73, .65); background: rgba(20, 12, 30, .9); color: #f8edd0; font: inherit; }
.poc-pick-buttons.poc-name-list { max-height: 9.5em; overflow-y: auto; }
.poc-pick-buttons.poc-name-list:empty { display: none; }
.poc-cell.poc-locked { outline: 2px dashed rgba(240, 120, 110, .85); outline-offset: -2px; background: rgba(120, 20, 20, .28); }
.poc-cell.poc-locked::after { content: "✕"; position: absolute; inset: 0; display: grid; place-items: center; color: #ffb3a8; font-weight: 800; font-size: 1.4em; pointer-events: none; }
/* the board (pocview.js drawBoard): the game's field drawn as the card game's table over the picture, the other side's
   rows above, the player's below; each side's life points at the left, its deck, hand and graveyard at the right */
/* (the owner's, 11/11 evening) the game's own field: the PoC pieces small at its edge, the field passing the pointer on */
.poc-board.poc-board-fm { pointer-events: none; overflow: visible; background: none; box-shadow: none; }
.poc-board-fm .poc-hud { position: absolute; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; pointer-events: auto; }
.poc-chip { padding: 3px 9px; border-radius: 999px; font: inherit; font-size: .9em; font-weight: 700; white-space: nowrap; color: #f8edd0;
            background: rgba(20, 12, 30, .82); border: 1px solid rgba(233, 185, 73, .65); box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.poc-chip.poc-pile-gy { cursor: pointer; }
/* (13/11, the audit) the margin's column: as wide as its chips, the margin's width at most (pocview.js drawHud: max-width),
   a chip then on two lines instead of cut at the page's edge */
.poc-board-fm .poc-hud.poc-hud-out { align-items: flex-end; width: max-content; }
.poc-board-fm .poc-hud.poc-hud-out .poc-chip { max-width: 100%; box-sizing: border-box; white-space: normal; text-align: right; }
.poc-chip.poc-pile-gy:hover, .poc-chip.poc-pile-gy:focus-visible { background: rgba(80, 50, 20, .9); }
.poc-chip-fus { color: #e2ccff; border-color: rgba(201, 163, 255, .7); }
.poc-board-fm .poc-hud.poc-theirs .poc-chip { border-color: rgba(240, 120, 110, .7); }
.poc-board-fm .poc-hud-use { position: absolute; left: 50%; transform: translateX(-50%); pointer-events: auto; white-space: nowrap; }
.poc-board-fm .poc-hud-strip { transform: none; }
/* (12/11, the audit) a phone held upright: the piles' chips in a row under the picture, a finger's size, nothing of the
   field or the hand under them; the bar's rows start below (--poc-under: pocview.js drawHud) */
.poc-board-fm .poc-hud.poc-hud-under { left: 0; right: 0; flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 6px; }
.poc-hud-under .poc-chip { display: inline-flex; align-items: center; min-height: 32px; box-sizing: border-box; padding: 4px 11px; font-size: 12.5px; }
.poc-hud .poc-chip.poc-chip-theirs { border-color: rgba(240, 120, 110, .7); }
@media (max-width: 900px) and (orientation: portrait) {
  .stage.pp-dock.poc-under .pbar, .stage.pp-dock.poc-under:has(.drawer:not([hidden])) .pbar { top: calc(min(100% - 170px, 75vw) + 10px + var(--poc-under, 40px)); }
}
/* (11/11 night) the PoC mode's phases at the bar's start (pointer.js phaseStrip) */
.pp-phases { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 12px; margin-right: 6px; }
.pp-phase { padding: 2px 8px; border-radius: 999px; color: var(--muted, #a99fd0); border: 1px solid rgba(169, 159, 208, .3); white-space: nowrap; }
.pp-phase.now { color: #1b1206; background: #f2c14e; border-color: #f2c14e; font-weight: 800; }
.pp-phase-who { font-size: 12px; color: #ffb0a0; white-space: nowrap; margin-right: 2px; }
.pp-phase-who.mine { color: #8fe3a8; }
/* (12/11, the audit) the five phases on one row: a wide screen's strip keeps them whole (the line beside them folds
   first), a phone's are smaller */
@media (min-width: 1300px) and (min-height: 521px) { .stage.pp-dock .pp-phases { flex: none; flex-wrap: nowrap; } }
/* (the strip's own width, up to the stage's: centred from left 50%, it was given half the stage and the line beside the
   buttons was squeezed to a few letters) */
@media (min-width: 901px) and (min-height: 521px) {
  .stage.pp-dock .pbar { width: max-content; }
  .stage.pp-dock .pbar-hint:not([hidden]) { max-width: 36vw; }
}
@media (max-width: 480px) {
  .pp-phases { gap: 3px; font-size: 11px; margin-right: 0; justify-content: center; }
  .pp-phase { padding: 2px 5px; }
  .pp-phase-who { font-size: 11px; }
}
.poc-board-on .pp-marks { visibility: hidden; } /* (pointer.js's outlines are at the 3D field's places, under the board) */
.poc-board { position: absolute; pointer-events: auto; overflow: hidden; border-radius: 4px; user-select: none; touch-action: manipulation;
             color: #f4ead2; line-height: 1.1; box-shadow: 0 0 0 1px rgba(233, 185, 73, .35);
             background: radial-gradient(ellipse at 50% 50%, rgba(255, 216, 120, .10), transparent 62%),
                         linear-gradient(180deg, #2b1c24 0%, #1d1622 49.5%, #121c2e 50.5%, #0f2238 100%); }
.poc-cell { position: absolute; box-sizing: border-box; border-radius: 3px; border: 1px dashed rgba(233, 205, 140, .3); background: rgba(0, 0, 0, .2);
            cursor: pointer; }
.poc-cell.poc-magic-row { border-color: rgba(110, 210, 190, .3); background: rgba(10, 40, 40, .22); }
.poc-cell:hover { border-style: solid; border-color: rgba(255, 255, 255, .75); }
.poc-cell.poc-here { border: 2px solid #ffd860; box-shadow: 0 0 10px rgba(255, 216, 96, .75); }
.poc-cell.poc-aim { border: 2px solid #ff5a5a; box-shadow: 0 0 12px rgba(255, 80, 80, .85); }
.poc-cell.poc-put { border: 2px solid #5fe08a; box-shadow: 0 0 12px rgba(95, 224, 138, .85); }
.poc-cell .poc-card { left: 50%; top: 0; translate: -50% 0; box-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
.poc-card.poc-def-pos { rotate: -90deg; scale: var(--poc-turned); }
.poc-card.poc-own-down { filter: brightness(.62) saturate(.55); }
.poc-card.poc-used { filter: grayscale(.45) brightness(.82); }
.poc-card.poc-ghost { opacity: .55; outline: 2px dashed #5fe08a; outline-offset: 2px; }
.poc-pile-deck small::before { content: ""; display: inline-block; width: .7em; height: 1em; margin-right: .3em; vertical-align: -.15em; border-radius: 2px;
                                border: 1px solid #1c0f05; background: radial-gradient(circle at 50% 50%, #7a4a1c 0 25%, #4b2a10 26% 45%, #2a170a 46%); }
.poc-foot .poc-up { color: #08702a; }
.poc-foot .poc-low { color: #b0141e; }
.poc-down-tag { position: absolute; right: -3px; top: -3px; padding: 0 .35em; border-radius: 999px; font-size: .72em; font-weight: 800; color: #fff;
                background: #5b4a90; box-shadow: 0 1px 3px rgba(0, 0, 0, .6); filter: none; }
@container (max-width: 64px) {
  .poc-def-pos .poc-atk { display: none; }
  .poc-def-pos .poc-def { display: inline; }
}
.poc-midline { position: absolute; left: 0; right: 0; display: flex; align-items: center; justify-content: center; gap: 1.4em; white-space: nowrap;
               border-top: 1px solid rgba(233, 185, 73, .5); border-bottom: 1px solid rgba(233, 185, 73, .5); background: rgba(0, 0, 0, .38);
               font-size: .85em; font-weight: 800; letter-spacing: .02em; }
.poc-turn { color: #f3a6a0; }
.poc-turn.poc-yours { color: #ffd860; }
.poc-terrain { color: #9fe3c8; }
.poc-side, .poc-piles { position: absolute; box-sizing: border-box; padding: .35em .45em; border-radius: 6px; background: rgba(8, 10, 22, .74);
                        border: 1px solid rgba(233, 185, 73, .5); }
.poc-side.poc-theirs, .poc-piles.poc-theirs { border-color: rgba(240, 110, 110, .5); }
.poc-who { display: block; font-size: .78em; color: #d4c9b0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poc-lp { display: block; font-size: 1.6em; font-weight: 900; color: #ffd860; font-variant-numeric: tabular-nums; text-shadow: 0 1px 2px #000; }
.poc-theirs .poc-lp { color: #ff9b8a; }
.poc-lpbar { height: .4em; margin-top: .25em; border-radius: 999px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.poc-lpbar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4cc97a, #c8f070); }
.poc-lpbar i.poc-lp-low { background: linear-gradient(90deg, #ff4f4f, #ff9b5a); }
.poc-piles { display: flex; flex-direction: column; gap: .15em; }
.poc-pile { display: flex; flex-direction: row-reverse; align-items: baseline; justify-content: space-between; gap: .4em; }
.poc-pile b { font-size: 1.1em; font-variant-numeric: tabular-nums; color: #fff; }
.poc-pile small { font-size: .78em; color: #bdb3a0; white-space: nowrap; }
.poc-board-small .poc-lp { font-size: 1.3em; }
/* poc-effects (pocview.js): a choice's options on the board, the deck's or graveyard's cards in a row, the card whose
   effect starts announced over the picture */
.poc-cell.poc-option { border: 2px dashed #ff9b8a; box-shadow: 0 0 8px rgba(255, 120, 110, .45); }
.poc-card .poc-use { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); z-index: 25; padding: 1px 8px;
                     min-height: 0; font-size: 11px; line-height: 1.4; white-space: nowrap; pointer-events: auto; }
.poc-midline .poc-start { pointer-events: auto; padding: 2px 10px; min-height: 0; font-size: .95em; line-height: 1.3; }
.poc-card.poc-none { position: relative; display: grid; place-items: center; background: rgba(255, 255, 255, .08); border: 1px dashed rgba(255, 255, 255, .4); }
.poc-choice-row { display: flex; gap: 6px; max-width: 100%; overflow-x: auto; padding: 10px 4px 4px; }
.poc-pick:has(.poc-choice-row) { flex-direction: column; align-items: stretch; }
.poc-choice-card { position: relative; flex: none; cursor: pointer; }
.poc-choice-card.poc-cursor { transform: translateY(-6px); }
.poc-banner { position: absolute; transform: translateX(-50%); display: flex; gap: 12px; align-items: center; padding: 10px 14px; z-index: 4;
              border-radius: 14px; background: rgba(40, 18, 6, .94); border: 1px solid #ffb84d; box-shadow: 0 0 24px rgba(255, 170, 60, .55);
              pointer-events: none; animation: poc-banner-in .25s ease-out; max-width: min(86vw, 560px); }
.poc-banner .poc-card { position: relative; flex: none; }
.poc-banner-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.poc-banner-text b { color: #ffd860; font-size: 15px; }
.poc-banner-text span { color: #f4ead2; font-size: 13px; line-height: 1.35; }
@keyframes poc-banner-in { from { opacity: 0; transform: translateX(-50%) scale(.9); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
.pp-bstar { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; color: #ffd978; white-space: nowrap; }
.pp-bline { font-size: 11px; color: var(--muted); }
.pp-bdetail { flex: 0 0 290px; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 12px; overflow: auto;
              background: rgba(255, 255, 255, .06); align-self: flex-start; max-height: 100%; }
.pp-bdetail.none { color: var(--muted); font-size: 13px; }
.pp-bdetail p { margin: 3px 0; font-size: 13px; }
.pp-bdetail b { color: var(--gold2); }
.pp-bdart { flex: none; width: 128px; height: 120px; object-fit: cover; border-radius: 6px; background: #000; }
.pp-bstars .on { color: var(--gold2); }
.pp-bstars .off { color: var(--muted); font-weight: 400; }
/* a tall board (a phone held upright, a narrow window: pointer.js placeBoard): the details in a strip under the rows */
.pp-board.tall .pp-bbody { flex-direction: column; gap: 8px; }
.pp-board.tall .pp-bbody > .pp-bgrid { flex: 1 1 auto; }
.pp-board.tall .pp-bdetail { flex: none; flex-direction: row; align-self: stretch; max-height: 42%; }
.pp-board.tall .pp-bdetail.none { display: none; }
.pp-board.tall .pp-bdart { width: 96px; height: 90px; }
/* a low screen (a phone on its side): smaller cards, a narrower panel */
@media (max-height: 520px) {
  .pp-board { padding: 6px 8px 8px; }
  .pp-bhead { margin-bottom: 2px; }
  .pp-bgrid { gap: 4px; }
  .pp-bsides { display: inline; }
  .pp-brow-label { display: none; }
  .pp-brow-label.mine { display: block; height: 0; margin: 2px 0; padding: 0; overflow: hidden; }
  .pp-bcard { min-height: 44px; padding: 3px 2px; gap: 1px; justify-content: center; }
  .pp-bart { display: none; } /* (all four rows in sight: the picture in the details) */
  .pp-bname { font-size: 10.5px; }
  .pp-bstats { font-size: 11px; }
  .pp-bstar, .pp-bline, .pp-brow-label { font-size: 10px; }
  .pp-bdetail { flex-basis: 220px; padding: 8px; }
  .pp-bdetail p { font-size: 12px; margin: 2px 0; }
  .pp-bdart { width: 80px; height: 75px; }
}
@media (max-width: 560px) {
  .pp-board { padding: 8px; }
  .pp-bgrid { gap: 4px; }
  .pp-bcard { min-height: 84px; padding: 4px 2px; }
  .pp-bart { width: 44px; height: 41px; }
  .pp-bname { font-size: 10.5px; }
  .pp-bstats { font-size: 11px; }
  .pp-bstar, .pp-bline { font-size: 10px; }
  .pp-bdart { width: 72px; height: 68px; }
}

/* Quản trị's live views (live.js, 9/11): "Máy chủ" and "Kiểm tra trận", a control room's look: a dark navy deck, cyan
   lines, glowing gauges and charts, LEDs; the panel wide while they are shown */
#master-dialog.dash { width: min(1180px, calc(100vw - 16px)); max-height: calc(100vh - 16px); }
/* (six tabs: on a phone they scroll sideways in their bar, not the panel) */
#master-dialog .tabs { overflow-x: auto; scrollbar-width: thin; }
#master-dialog .tab { flex: 0 0 auto; white-space: nowrap; }
.mon { --mc: #35e0ff; --mv: #a77bff; --ma: #ffbf3c; --mr: #ff4d6d; --mg: #3dffa2; --ml: rgba(80, 200, 255, .2);
       position: relative; display: grid; gap: 10px; padding: 10px; margin: -4px -6px 0; border-radius: 14px;
       background: radial-gradient(1000px 420px at 85% -10%, rgba(53, 224, 255, .10), transparent 60%),
                   radial-gradient(700px 380px at 0% 110%, rgba(167, 123, 255, .10), transparent 60%),
                   repeating-linear-gradient(0deg, rgba(80, 200, 255, .035) 0 1px, transparent 1px 28px),
                   repeating-linear-gradient(90deg, rgba(80, 200, 255, .035) 0 1px, transparent 1px 28px), #070b18;
       border: 1px solid var(--ml); color: #dcecff; font-variant-numeric: tabular-nums; }
.mon b, .mon time, .mon .fm { font-family: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace; }
.mon-defs { position: absolute; }
.mon-dim { color: rgba(170, 200, 230, .6); font-size: 12px; }
.mon-right { margin-left: auto; }
.mon-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12px; }
.mon-status { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px; border-radius: 99px; border: 1px solid rgba(61, 255, 162, .45);
              color: var(--mg); letter-spacing: .12em; font-size: 11px; background: rgba(61, 255, 162, .07); }
.mon-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--mg); box-shadow: 0 0 8px var(--mg); animation: mon-pulse 1.6s ease-in-out infinite; }
.mon-status.off { color: var(--ma); border-color: rgba(255, 191, 60, .45); background: rgba(255, 191, 60, .07); }
.mon-status.off i { background: var(--ma); box-shadow: 0 0 8px var(--ma); }
@keyframes mon-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
.mon-alerts { display: flex; flex-wrap: wrap; gap: 6px; }
.mon-alerts:empty { display: none; }
.mon-alert { font-size: 12.5px; padding: 4px 10px; border-radius: 8px; border: 1px solid; }
.mon-alert.ok { color: var(--mg); border-color: rgba(61, 255, 162, .35); background: rgba(61, 255, 162, .06); }
.mon-alert.warn { color: var(--ma); border-color: rgba(255, 191, 60, .5); background: rgba(255, 191, 60, .08); }
.mon-alert.bad { color: #ffd0d8; border-color: rgba(255, 77, 109, .7); background: rgba(255, 77, 109, .16); box-shadow: 0 0 14px rgba(255, 77, 109, .25);
                 animation: mon-alarm 1.2s ease-in-out infinite; }
@keyframes mon-alarm { 50% { box-shadow: 0 0 2px rgba(255, 77, 109, .1); } }
.mon-panel { position: relative; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--ml);
             background: linear-gradient(180deg, rgba(18, 28, 58, .78), rgba(8, 13, 30, .86)); box-shadow: inset 0 1px 0 rgba(160, 230, 255, .06); min-width: 0; }
/* the corners' brackets */
.mon-panel::before, .mon-panel::after { content: ""; position: absolute; width: 10px; height: 10px; border: 1.5px solid var(--mc); opacity: .55; pointer-events: none; }
.mon-panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: 12px; }
.mon-panel::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: 12px; }
.mon-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
            color: rgba(160, 225, 255, .85); }
.mon-legend { display: inline-flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; margin-left: auto; text-transform: none; letter-spacing: 0; font-size: 11.5px; color: rgba(190, 215, 240, .75); }
.mon-legend.below { margin: 4px 0 0; }
.mon-legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 2px; vertical-align: middle; }
.lg-cyan { background: var(--mc); box-shadow: 0 0 6px var(--mc); }
.lg-cyan.dim { opacity: .4; box-shadow: none; }
.lg-violet { background: var(--mv); }
.lg-amber { background: var(--ma); }
.lg-gold { background: #ffd978; }
.lg-green { background: var(--mg); }
.lg-red { background: var(--mr); }
.lg-grey { background: #7d8bb0; }
.mon-chart { display: block; width: 100%; height: 190px; touch-action: pan-y; }
.mon-chart.tall { height: 230px; }
/* the gauges */
.mon-gauges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mon-gauge { position: relative; aspect-ratio: 1 / .86; max-height: 210px; border-radius: 12px; border: 1px solid var(--ml);
             background: radial-gradient(circle at 50% 46%, rgba(53, 224, 255, .08), transparent 62%), linear-gradient(180deg, rgba(18, 28, 58, .78), rgba(8, 13, 30, .86));
             overflow: hidden; transition: border-color .4s, box-shadow .4s; }
.mon-gauge.hot { border-color: rgba(255, 77, 109, .7); box-shadow: 0 0 18px rgba(255, 77, 109, .3); }
.mon-gsvg { position: absolute; left: 0; top: 4%; width: 100%; height: 100%; }
.mon-gsvg circle { fill: none; stroke-linecap: round; }
.mon-gsvg .g-ticks { stroke: rgba(120, 210, 255, .35); stroke-width: 1; fill: none; }
.mon-gsvg .g-track { stroke: rgba(80, 200, 255, .12); stroke-width: 7; }
.mon-gsvg .g-track.thin { stroke-width: 3; }
.mon-gsvg .g-val { stroke-width: 7; transition: stroke-dasharray .9s cubic-bezier(.2, .8, .2, 1), stroke .4s; }
.mon-gsvg .g-val.lv-ok { stroke: var(--mc); }
.mon-gsvg .g-val.lv-warn { stroke: var(--ma); }
.mon-gsvg .g-val.lv-bad { stroke: var(--mr); }
.mon-gsvg .g-nice { stroke: var(--ma); stroke-width: 3; opacity: .85; transition: stroke-dasharray .9s cubic-bezier(.2, .8, .2, 1); }
.g-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 1px; padding-top: 6%; }
.g-label { font-size: 10.5px; letter-spacing: .2em; color: rgba(160, 225, 255, .75); }
.g-text b { font-size: clamp(20px, 3.2vw, 30px); color: #f0fbff; text-shadow: 0 0 12px rgba(53, 224, 255, .55); }
.g-sub { font-size: 11px; color: rgba(190, 215, 240, .7); }
/* the small figures with their lines */
.mon-minis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.mon-mini { display: grid; gap: 2px; padding: 8px 10px 4px; border-radius: 10px; border: 1px solid var(--ml); background: rgba(10, 17, 38, .8); min-width: 0; }
.mm-label { font-size: 11px; color: rgba(160, 225, 255, .7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mon-mini b { font-size: 14px; color: #eaf8ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mon-mini canvas { width: 100%; height: 30px; display: block; }
.mon .lv-ok { color: var(--mg); }
.mon .lv-warn { color: var(--ma); }
.mon .lv-bad { color: var(--mr); }
.mon-mini b.lv-ok { color: #eaf8ff; }
.mon-grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
/* the people */
.mon-people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mp { display: grid; padding: 6px 10px; border-left: 2px solid rgba(53, 224, 255, .5); background: rgba(53, 224, 255, .04); border-radius: 0 8px 8px 0; }
.mp b { font-size: 24px; color: #f0fbff; text-shadow: 0 0 10px rgba(53, 224, 255, .5); line-height: 1.1; }
.mp.big b { font-size: 34px; color: #ffe9a8; text-shadow: 0 0 14px rgba(255, 217, 120, .55); }
.mp.big { border-left-color: rgba(255, 217, 120, .7); background: rgba(255, 217, 120, .05); }
.mp span { font-size: 12.5px; color: #cfe6ff; }
.mp small { font-size: 11px; color: rgba(170, 200, 230, .6); }
/* the services */
.mon-services { display: grid; gap: 8px; }
.ms-row { display: flex; gap: 10px; align-items: flex-start; }
.ms-row b { display: block; font-family: inherit; font-size: 13.5px; color: #eaf8ff; }
.ms-row small { font-size: 11.5px; color: rgba(180, 210, 235, .7); word-break: break-word; }
.led { flex: 0 0 auto; width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; }
.led.ok { background: var(--mg); box-shadow: 0 0 10px var(--mg); animation: mon-pulse 2.4s ease-in-out infinite; }
.led.warn { background: var(--ma); box-shadow: 0 0 10px var(--ma); }
.led.bad { background: var(--mr); box-shadow: 0 0 12px var(--mr); animation: mon-pulse .8s ease-in-out infinite; }
/* the peaks */
.mon-peaks { margin-top: 8px; }
.mp-title { font-size: 11.5px; color: rgba(160, 225, 255, .8); margin-bottom: 6px; }
.mp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.pk { display: grid; padding: 5px 8px; border-radius: 8px; border: 1px solid rgba(80, 200, 255, .14); background: rgba(10, 17, 38, .7); }
.pk span { font-size: 11px; color: rgba(170, 200, 230, .7); }
.pk b { font-size: 15px; color: #eaf8ff; }
.pk small { font-size: 10.5px; color: rgba(170, 200, 230, .5); }
.mon-seg { display: inline-flex; margin-left: auto; border: 1px solid var(--ml); border-radius: 8px; overflow: hidden; }
.mon-seg button { background: none; border: 0; color: rgba(190, 215, 240, .75); padding: 3px 10px; font: inherit; font-size: 11.5px; cursor: pointer; letter-spacing: 0; text-transform: none; }
.mon-seg button.on { background: rgba(53, 224, 255, .16); color: #eaffff; }
/* Kiểm tra trận */
.chk-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.chk-card { display: flex; gap: 12px; align-items: center; }
.chk-ring { position: relative; flex: 0 0 96px; height: 96px; }
.chk-ring svg { width: 100%; height: 100%; }
.chk-ring circle { fill: none; stroke-width: 9; }
.chk-ring .ring-track { stroke: rgba(80, 200, 255, .1); }
.chk-ring .seg { transition: stroke-dasharray .6s; filter: drop-shadow(0 0 3px rgba(53, 224, 255, .35)); }
.chk-ring-n { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.chk-ring-n b { font-size: 22px; color: #f0fbff; text-shadow: 0 0 10px rgba(53, 224, 255, .5); line-height: 1; }
.chk-ring-n span { font-size: 10.5px; color: rgba(170, 200, 230, .6); }
.chk-body { min-width: 0; display: grid; gap: 3px; flex: 1; }
.chk-title { font-weight: 600; font-size: 14px; color: #eaf8ff; }
.chk-sub { font-size: 11.5px; }
.chk-vs { list-style: none; margin: 2px 0; padding: 0; display: grid; gap: 1px; font-size: 12.5px; }
.chk-vs li { display: flex; align-items: center; gap: 6px; }
.chk-vs b { margin-left: auto; color: #eaf8ff; }
.chk-vs .dot { width: 8px; height: 8px; border-radius: 2px; flex: 0 0 auto; }
.chk-queue { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.q-item { display: grid; padding: 6px 10px; border-left: 2px solid rgba(167, 123, 255, .6); background: rgba(167, 123, 255, .05); border-radius: 0 8px 8px 0; }
.q-item b { font-size: 18px; color: #f0fbff; }
.q-item span { font-size: 11.5px; color: rgba(180, 210, 235, .72); }
.chk-feed { list-style: none; margin: 0; padding: 0; max-height: 340px; overflow-y: auto; display: grid; align-content: start; gap: 2px; font-size: 12.5px; }
.chk-feed li { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto; align-items: baseline; gap: 2px 8px; padding: 3px 6px; border-radius: 6px;
               border-left: 2px solid transparent; }
.chk-feed li.empty { display: block; }
.chk-feed time { color: rgba(150, 190, 225, .6); font-size: 11.5px; }
.chk-feed .fk { font-size: 9.5px; letter-spacing: .08em; padding: 1px 6px; border-radius: 4px; border: 1px solid rgba(80, 200, 255, .3); color: var(--mc); }
.chk-feed .fk-night { color: var(--mv); border-color: rgba(167, 123, 255, .4); }
.chk-feed .fk-rules { color: #9fd8ff; }
.chk-feed .link { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chk-feed .fm { color: rgba(150, 190, 225, .6); font-size: 11.5px; }
.chk-feed .fw { grid-column: 3 / -1; font-size: 11px; color: rgba(170, 200, 230, .55); }
.chk-feed .fv-ok b { color: var(--mg); }
.chk-feed .fv-warn b { color: var(--ma); }
.chk-feed .fv-dim b { color: #8a98bd; }
.chk-feed .fv-bad { border-left-color: var(--mr); background: rgba(255, 77, 109, .08); }
.chk-feed .fv-bad b { color: #ff8da2; }
.chk-feed li.fresh { animation: chk-in .9s ease-out; }
@keyframes chk-in { from { background: rgba(53, 224, 255, .28); transform: translateX(-6px); } to { transform: none; } }
.chk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 300px; overflow-y: auto; font-size: 13px; }
.chk-list li { padding: 4px 6px; border-bottom: 1px solid rgba(80, 200, 255, .08); }
.chk-more { margin-top: 8px; font-size: 13px; }
.chk-more summary { cursor: pointer; color: rgba(190, 215, 240, .8); }
/* the flags: the serious first, each with its own ✕, a journey's all at once */
.m-flag-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 4px 0; font-size: 13px; color: var(--muted); }
.flag-chip { display: inline-flex; align-items: center; gap: 4px; }
.unflag-x { background: none; border: 0; color: inherit; cursor: pointer; padding: 0 2px; font: inherit; font-size: 11px; opacity: .7; }
.unflag-x:hover, .unflag-x:focus-visible { opacity: 1; color: #fff; }
.m-unflag-all { margin-left: 6px; }
@media (max-width: 900px) {
  .mon-minis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chk-cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .mon-gauges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mon-minis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mon-grid2 { grid-template-columns: minmax(0, 1fr); }
  .mon-chart { height: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  .mon-status i, .led, .mon-alert.bad, .chk-feed li.fresh { animation: none; }
  .mon-gsvg .g-val, .mon-gsvg .g-nice { transition: none; }
}

/* a master's event (9/11 evening: every card in the packs): the players' line in the hub, the switch in Quản trị */
.event-note { margin: 4px 0 10px; padding: 9px 12px; border: 1px solid rgba(255, 217, 120, .55); border-radius: 10px;
              background: linear-gradient(90deg, rgba(255, 179, 0, .16), rgba(233, 185, 73, .05)); color: var(--gold2); }
.m-event { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 8px 0; padding: 8px 12px; border: 1px dashed var(--line); border-radius: 10px; }
.m-event span { flex: 1 1 260px; }
.m-event.on { border: 1px solid var(--gold); background: rgba(255, 179, 0, .08); }
.event-note.reset { border-color: rgba(106, 168, 255, .55); background: linear-gradient(90deg, rgba(106, 168, 255, .16), rgba(106, 168, 255, .04)); color: #cfe2ff; }
.m-event input[type="datetime-local"] { width: auto; display: inline-block; margin: 4px 0; }
.m-event small { display: block; color: var(--muted); }
/* Hành trình closed until an hour (9/11 evening): the board counting down to it */
.jclosed { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 16px 12px; border: 1px solid var(--gold);
           border-radius: 14px; background: radial-gradient(500px 200px at 50% 0%, rgba(255, 179, 0, .16), transparent 70%), #150f2c; }
.jc-title { font-size: 17px; color: var(--gold2); }
.jc-clock { font: 700 clamp(38px, 9vw, 64px) / 1 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .06em; color: #fff3cf;
            text-shadow: 0 0 18px rgba(255, 196, 70, .55); font-variant-numeric: tabular-nums; }
.jclosed .hint { max-width: 520px; }

/* ---- the tournaments (11/11, tours.js) ------------------------------------------------------------------------------ */
#tours h4 { margin: 14px 0 6px; font-size: 13px; color: var(--gold2); text-transform: uppercase; letter-spacing: .04em; }
.btn.tiny { padding: 2px 8px; font-size: 12px; border-radius: 6px; }
.tour-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.tour-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; width: 100%; padding: 10px 12px; text-align: left; cursor: pointer;
  color: var(--text); font: inherit; border: 1px solid var(--line); border-radius: 10px; background: #150f2c; }
.tour-row:hover, .tour-row:focus-visible { border-color: var(--gold); }
.tr-name { font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.tr-meta { grid-column: 1 / -1; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.tr-chip { align-self: start; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); white-space: nowrap; }
.tr-chip.st-open { color: #7ef0a6; border-color: rgba(126, 240, 166, .5); }
.tr-chip.st-running { color: var(--gold2); border-color: rgba(233, 185, 73, .6); }
.tr-yours { color: var(--gold2); } /* (13/11) the list: the viewer's own match waiting */
.tr-chip.st-done, .tr-chip.st-cancelled { color: var(--muted); }
.tour-head { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.tour-head > div { flex: 1 1 260px; min-width: 0; }
.tour-head h3 { margin: 0 0 4px; font-size: 18px; overflow-wrap: anywhere; }
.tour-head p { margin: 2px 0; font-size: 13.5px; }
.tour-desc { white-space: pre-wrap; color: var(--text); }
.tour-champ { font-size: 15px !important; color: var(--gold2); }
.tour-rules ul, .tour-players ul { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.55; }
.tour-players ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tour-players li { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); font-size: 13px; }
.tour-players li.me { border-color: var(--gold); }
.tour-players li.dropped { opacity: .5; text-decoration: line-through; }
.tour-players .seed { font-size: 11px; color: var(--muted); }
.tour-me { margin: 12px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(110, 168, 255, .06); }
.tour-me.ready { border-color: var(--gold); background: rgba(233, 185, 73, .1); }
.tour-me h4 { margin-top: 0; }
.tour-me p { margin: 4px 0 8px; }
.tour-decks { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.tour-decks > li { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); }
.tour-decks > li.good { border-color: rgba(126, 240, 166, .45); }
.tour-problems { margin: 4px 0 0; padding-left: 16px; font-size: 13px; color: #ff9aa5; }
.ok-mark { margin-left: 6px; color: #7ef0a6; font-size: 13px; }
/* (12/11) signing up: the deck signed up with, each deck's buttons; a deck built for the tournament (tours.js buildHtml) */
.tour-me .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.td-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.tour-mine { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 0 0 8px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); }
.tour-mine.good { border-color: rgba(126, 240, 166, .45); }
.tour-mine.bad { border-color: rgba(255, 141, 151, .6); background: rgba(255, 141, 151, .06); }
.tour-mine p { margin: 2px 0; color: #ff9aa5; }
.tp-bad { font-size: 12px; color: #ff9aa5; }
.deck-build { display: grid; gap: 8px; }
.db-head h5 { margin: 0; font-size: 15px; }
.db-head p { margin: 2px 0 0; }
.db-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.db-stat { font-size: 12.5px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.db-stat.bad { border-color: rgba(255, 141, 151, .7); color: #ff9aa5; }
.db-problems { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 13px; color: #ff9aa5; }
.db-problems .good { color: #7ef0a6; }
.db-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.db-side { display: grid; gap: 6px; align-content: start; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: rgba(21, 15, 44, .6); }
.db-title { font-size: 14px; }
.db-tools, .db-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: end; }
.db-filters input[type="search"] { flex: 1 1 100%; min-width: 0; }
.db-filters label { display: grid; gap: 2px; font-size: 12px; color: var(--muted); flex: 1 1 9em; min-width: 0; }
.db-filters label.check { display: flex; align-items: center; gap: 5px; flex: 1 1 100%; }
.db-filters select { padding: 5px 6px; font-size: 13px; width: 100%; }
.db-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; max-height: 440px; overflow-y: auto; }
.db-list li { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px; border: 1px solid transparent; }
.db-list li:nth-child(odd) { background: rgba(255, 255, 255, .02); }
.db-list li.bad { border-color: rgba(255, 141, 151, .6); background: rgba(255, 141, 151, .05); }
.db-list li.no { opacity: .6; }
.db-list li.warn { border-color: rgba(233, 185, 73, .4); }
.db-list li.none { color: var(--muted); font-style: italic; }
.db-why { font-size: 11.5px; color: #ff9aa5; }
.db-why.warn { color: var(--gold2); }
.db-n { flex: none; font-size: 12.5px; color: var(--muted); min-width: 2.6em; text-align: right; }
.db-acts { display: flex; gap: 4px; flex: none; }
.db-in .db-acts .btn { min-width: 30px; }
.db-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tour-edit { margin: 10px 0 0; padding-bottom: 0; border-bottom: 0; }
@media (max-width: 760px) { .db-cols { grid-template-columns: minmax(0, 1fr); } .db-list { max-height: 55vh; } }
.tour-bracket, .tour-swiss { margin: 10px 0; }
.tb-rounds { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; align-items: flex-start; }
.tb-round { flex: 0 0 190px; display: grid; gap: 8px; align-content: start; }
.tb-rname { font-size: 12px; color: var(--muted); font-weight: 700; }
.tb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.tm { border: 1px solid var(--line); border-radius: 8px; background: #150f2c; padding: 6px 8px; font-size: 13px; display: grid; gap: 3px; }
.tm.st-ready { border-color: rgba(233, 185, 73, .6); }
.tm.st-skip { opacity: .5; }
.tm-head { display: flex; justify-content: space-between; gap: 6px; font-size: 11.5px; color: var(--muted); }
.tm-p { display: flex; justify-content: space-between; gap: 8px; padding: 1px 4px; border-radius: 4px; min-width: 0; }
.tm-p span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-p.won { color: var(--gold2); font-weight: 700; background: rgba(233, 185, 73, .08); }
.tm-p.me span { text-decoration: underline; text-decoration-color: var(--gold); }
.tm-walk { font-size: 11.5px; color: var(--muted); font-style: italic; }
.tm .btn.tiny { justify-self: start; }
.tm-force summary { cursor: pointer; font-size: 11.5px; color: var(--muted); }
.tm-force .btn { margin: 4px 4px 0 0; }
/* (11/11, the UI/UX audit) the tournament's view: where it is in a line, the champion, the matches on now, the bracket
   drawn (cards placed by tours.js wire, lines in an SVG), rounds listed on a phone, the slots' bar, the list's groups */
.tour-sum { color: var(--muted); }
.tour-sum b { color: var(--text); }
.tour-champ-banner { display: flex; align-items: center; gap: 12px; margin: 10px 0; padding: 10px 14px; border-radius: 12px;
  border: 1px solid rgba(233, 185, 73, .6); background: linear-gradient(90deg, rgba(233, 185, 73, .18), rgba(233, 185, 73, .04)); }
.tour-champ-banner .tcb-cup { font-size: 30px; line-height: 1; }
.tour-champ-banner p { margin: 0; }
.tour-champ-banner .tour-champ { font-size: 19px !important; }
.slots { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.slots-bar { display: inline-block; width: 64px; height: 6px; border-radius: 99px; background: rgba(169, 159, 208, .25); overflow: hidden; }
.slots-bar i { display: block; height: 100%; width: 0; background: var(--green); border-radius: 99px; }
.tl-group { margin-top: 16px !important; }
.tr-state { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--text); }
.tour-info { margin: 10px 0; }
.tour-info > summary { cursor: pointer; color: var(--gold2); font-weight: 600; padding: 6px 0; }
.tour-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 12px; margin: 6px 0; font-size: 13.5px; }
.tour-facts dt { color: var(--muted); }
.tour-facts dd { margin: 0; overflow-wrap: anywhere; }
.live-tag, .ready-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 99px; white-space: nowrap; text-transform: none; letter-spacing: 0; }
.live-tag { color: #ffb3bb; background: rgba(224, 82, 95, .18); }
.ready-tag { color: var(--gold2); background: rgba(233, 185, 73, .15); }
.live-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: tour-live 1.2s ease-in-out infinite; }
@keyframes tour-live { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .live-tag .dot { animation: none; } }
.tour-now ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.tour-now li { border: 1px solid rgba(233, 185, 73, .45); border-radius: 10px; padding: 8px 10px; background: rgba(233, 185, 73, .05); display: grid; gap: 4px; }
.tour-now li.live { border-color: rgba(224, 82, 95, .6); background: rgba(224, 82, 95, .06); }
.tour-now li.mine { box-shadow: 0 0 0 2px rgba(233, 185, 73, .5) inset; }
.tn-what { font-size: 12.5px; color: var(--muted); }
.tn-vs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; font-size: 15px; font-weight: 700; }
.tn-vs span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tn-vs span:last-child { text-align: right; }
.tn-vs b { color: var(--gold2); font-variant-numeric: tabular-nums; }
.tn-act { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bk-stage { margin: 12px 0; }
.bk-scroll { overflow-x: auto; padding-bottom: 6px; }
.bk-graph { position: relative; }
.bk-col { position: absolute; top: 0; width: 204px; font-size: 12px; font-weight: 700; color: var(--muted); }
.bk-lines { position: absolute; left: 0; top: 26px; overflow: visible; pointer-events: none; }
.bk-lines path { fill: none; stroke: rgba(169, 159, 208, .35); stroke-width: 1.5; }
.bk-lines path.done { stroke: rgba(233, 185, 73, .75); stroke-width: 2; }
.bk-card { width: 204px; height: 68px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; background: #150f2c;
  padding: 4px 6px; font-size: 13px; display: grid; grid-template-rows: auto 1fr 1fr; gap: 1px; }
.bk-graph .bk-card { position: absolute; }
.bk-card.st-ready { border-color: rgba(233, 185, 73, .75); }
.bk-card.st-skip, .bk-card.st-wait { background: #120d25; }
.bk-card.st-skip { opacity: .5; }
.bk-card.mine { box-shadow: 0 0 0 2px rgba(233, 185, 73, .55); }
.bk-top { display: flex; justify-content: space-between; gap: 6px; align-items: center; font-size: 11px; color: var(--muted); min-width: 0; }
.bk-top .bk-state { flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-p { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 4px; align-items: center; padding: 0 4px; border-radius: 4px; min-width: 0; }
.bk-p i { font-style: normal; font-size: 10.5px; color: var(--muted); text-align: right; }
.bk-p span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-p b { font-variant-numeric: tabular-nums; }
.bk-p.won { color: var(--gold2); font-weight: 700; background: rgba(233, 185, 73, .1); }
.bk-p.lost { opacity: .5; }
.bk-p.tbd span, .bk-p.bye span { color: var(--muted); font-style: italic; font-size: 12px; }
.bk-p.me span { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 2px; }
.bk-list { display: none; }
.bk-finals, .bk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(204px, 1fr)); gap: 8px; }
.bk-finals .bk-card, .bk-grid .bk-card, .bk-list .bk-card { width: auto; }
.tour-table tr.rank-1 td:first-child { color: var(--gold2); font-weight: 700; }
.tour-table tr.rank-top td:nth-child(2) { font-weight: 600; }
.tp-slots { margin: 0 0 6px; font-size: 13.5px; }
details.bk-lround > summary { cursor: pointer; }
@media (max-width: 700px) {
  .bk-scroll { display: none; }
  .bk-list { display: grid; gap: 10px; }
  .bk-lround { display: grid; gap: 6px; }
  .bk-lround.now { padding-left: 8px; border-left: 3px solid rgba(233, 185, 73, .6); }
  .bk-lhead { font-size: 12.5px; font-weight: 700; color: var(--muted); display: flex; gap: 6px; align-items: center; }
  .tour-now ul { grid-template-columns: minmax(0, 1fr); }
}
.tour-tablewrap { overflow-x: auto; }
.tour-table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tour-table th, .tour-table td { padding: 4px 8px; border-bottom: 1px solid rgba(52, 41, 95, .6); text-align: left; white-space: nowrap; }
.tour-table th { color: var(--muted); font-weight: 600; font-size: 12px; }
.tour-table tr.dropped td { opacity: .5; }
.tour-manage { margin: 14px 0; padding: 10px 12px; border: 1px dashed rgba(233, 185, 73, .5); border-radius: 10px; }
.tour-manage .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tour-log summary, .tour-create summary, .tour-orgs summary { cursor: pointer; color: var(--gold2); font-weight: 600; padding: 6px 0; }
.tour-log ul { margin: 4px 0 0; padding-left: 18px; font-size: 13px; max-height: 240px; overflow-y: auto; }
.tour-create, .tour-orgs { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 6px; }
.tour-form { display: grid; gap: 8px; }
.tour-form label { display: grid; gap: 3px; font-size: 13px; color: var(--muted); }
.tour-form label.check { display: flex; align-items: center; gap: 6px; }
.tour-form input:not([type="checkbox"]), .tour-form select, .tour-form textarea { width: 100%; min-width: 0; }
.tour-form .row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 560px) { .tour-form .row3 { grid-template-columns: 1fr 1fr; } .tb-round { flex-basis: 160px; } }

/* the banned cards' picker (tours.js banPickerHtml, 11/11) */
.ban-box { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(21, 15, 44, .6); }
.ban-label { font-size: 13px; color: var(--muted); }
.ban-chosen { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; max-height: 172px; overflow-y: auto; }
.ban-chosen .hint { margin: 0; }
.ban-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 4px; border-radius: 8px; border: 1px solid rgba(255, 141, 151, .55);
  background: rgba(255, 141, 151, .08); font-size: 13px; max-width: 100%; }
.ban-chip.lim { border-color: rgba(233, 185, 73, .55); background: rgba(233, 185, 73, .08); }
.ban-chip b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14em; }
.ban-chip select { padding: 2px 4px; font-size: 12px; width: auto; }
.ban-img { width: 30px; height: 24px; flex: none; border-radius: 3px; image-rendering: pixelated; object-fit: cover; background: #0c0820; }
.ban-tools { display: grid; gap: 8px; }
.ban-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 8px; }
.ban-filters label { font-size: 12px; }
.ban-filters select, .ban-filters input { padding: 5px 6px; font-size: 13px; }
.ban-range { display: flex; align-items: center; gap: 4px; }
.ban-range input { flex: 1; min-width: 0; }
.ban-range span { color: var(--muted); }
.ban-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.ban-bulk { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; font-size: 13px; padding: 6px 8px;
  border-radius: 8px; background: rgba(255, 255, 255, .03); }
.ban-bulk-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.bp-name .tier { font-size: 10px; padding: 0 4px; }
.ban-help { font-size: 12px; color: var(--muted); }
.ban-help summary { cursor: pointer; color: var(--gold2); width: max-content; }
.ban-help ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 3px; }
.ban-help b { color: var(--text, #e8e3ff); font-weight: 600; }
.more-names { display: inline; }
.more-names summary { display: inline; cursor: pointer; color: var(--gold2); }
.more-names[open] summary { margin-right: 4px; }
.ban-pick { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 360px; overflow-y: auto; }
.ban-pick li { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px; border: 1px solid transparent; }
.ban-pick li:nth-child(odd) { background: rgba(255, 255, 255, .02); }
.ban-pick li.on { border-color: rgba(233, 185, 73, .45); }
.ban-pick li.none { color: var(--muted); font-style: italic; }
.bp-name { flex: 1; min-width: 0; display: grid; font-size: 13px; line-height: 1.3; }
.bp-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-name small { color: var(--muted); font-weight: 400; }
.bp-acts { display: flex; gap: 4px; flex: none; }
@media (max-width: 560px) {
  .ban-filters { grid-template-columns: 1fr 1fr; }
  .ban-quick .btn { flex: 1; }
  .ban-pick li { flex-wrap: wrap; }
  .bp-acts { width: 100%; justify-content: flex-end; }
}

/* ---- the chat's emotions, pictures and @names (12/11: public/js/chatmedia.js; app.js addLine, setupChatBoxes) ---- */
.lines li { padding-right: 64px; }
@media (pointer: coarse) { .lines li { padding-right: 84px; } }
.say { align-items: center; }
.say-emoji, .say-pic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--text, #fff); font-size: 18px; cursor: pointer; padding: 0; line-height: 1; }
.say-emoji:hover, .say-pic:hover { border-color: var(--gold); }
.say-pic { position: relative; overflow: hidden; }
.say-pic input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.say-pic:focus-within { outline: 2px solid var(--gold); outline-offset: 1px; }
.say-pic[hidden] { display: none; }
.chat-pop { position: fixed; z-index: 2147483000; display: grid; grid-template-columns: repeat(8, 36px); gap: 2px; padding: 6px; border-radius: 10px;
  border: 1px solid var(--line); background: #1b1538; box-shadow: 0 8px 28px rgba(0, 0, 0, .5); }
.chat-pop.reacts-pick { grid-template-columns: repeat(8, 34px); }
.chat-pop button { width: 100%; aspect-ratio: 1; border: 0; border-radius: 8px; background: none; font-size: 20px; cursor: pointer; padding: 0; line-height: 1; }
.chat-pop button:hover, .chat-pop button:focus-visible { background: rgba(233, 185, 73, .18); }
@media (max-width: 420px) { .chat-pop { grid-template-columns: repeat(6, 38px); } }
.line-react { background: none; border: 0; color: var(--muted); cursor: pointer; opacity: .35; font-size: 14px; line-height: 1; padding: 1px 4px; }
.lines li:hover .line-react, .line-react:focus-visible { opacity: 1; color: var(--gold2); }
@media (pointer: coarse) { .line-react { opacity: .75; font-size: 16px; padding: 4px 6px; } }
.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin: 3px 0 1px; }
.reacts[hidden] { display: none; }
.react-chip { border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .04); color: var(--text, #fff); font-size: 12.5px;
  padding: 1px 7px; cursor: pointer; line-height: 1.5; }
.react-chip:hover { border-color: var(--gold); }
.react-chip.mine { border-color: rgba(233, 185, 73, .8); background: rgba(233, 185, 73, .16); }
.chat-pic { display: block; margin: 4px 0 2px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #0c0820; cursor: zoom-in; overflow: hidden; max-width: 100%; }
.chat-pic img { display: block; max-width: 100%; height: auto; }
dialog.pic-view { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 94vh; overflow: visible; }
dialog.pic-view::backdrop { background: rgba(5, 3, 15, .85); }
dialog.pic-view img { display: block; max-width: 96vw; max-height: 90vh; border-radius: 8px; box-shadow: 0 10px 40px rgba(0, 0, 0, .6); cursor: zoom-out; }
.pic-close { position: absolute; top: -14px; right: -14px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #1b1538;
  color: #fff; font-size: 16px; cursor: pointer; }
.say-pic-chip { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; padding: 4px 6px 4px 8px; border-left: 3px solid var(--gold);
  background: rgba(233, 185, 73, .08); border-radius: 0 6px 6px 0; font-size: 13px; }
.say-pic-chip[hidden] { display: none; }
.say-pic-chip img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; flex: none; }
.say-pic-chip span { flex: 1; min-width: 0; color: var(--muted); }
.lines li.mention { background: rgba(233, 185, 73, .12); border-left: 3px solid var(--gold); padding-left: 6px; border-radius: 0 6px 6px 0; }
/* the chat's Bot (14/11, server/bot/bot.js): its answers apart, a blue edge and tint, its name blue with "BOT" after it;
   the edge gold when it answers you */
.lines li.bot { background: rgba(106, 168, 255, .11); border-left: 3px solid var(--blue); padding-left: 6px; border-radius: 0 6px 6px 0; }
.lines li.bot.mention { border-left-color: var(--gold); }
.lines li.bot > b { color: var(--blue); }
.botb { display: inline-block; font-size: .66em; font-weight: 800; letter-spacing: .05em; line-height: 1.5; padding: 0 5px; margin-left: 3px;
  border-radius: 4px; color: #0f0b1e; background: var(--blue); vertical-align: 1px; }
.mention-tag { color: #8ec5ff; font-weight: 600; }
.mention-tag.me { color: var(--gold2); background: rgba(233, 185, 73, .18); border-radius: 4px; padding: 0 2px; }
.mention-list { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0; }
.mention-list button { border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .04); color: var(--text, #fff); font-size: 13px; padding: 3px 10px; cursor: pointer; }
.mention-list button.on, .mention-list button:hover { border-color: var(--gold); background: rgba(233, 185, 73, .16); }
.chat-bell { background: none; border: 0; cursor: pointer; font-size: 15px; padding: 0 4px; vertical-align: middle; opacity: .8; }
.chat-bell:hover { opacity: 1; }

/* ---- Trang trí (12/11, looks.js): avatars, their frames, chat bubbles, name effects, titles ---------------------- */
.lk-av { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%;
  vertical-align: -6px; margin-right: 6px; flex: none; background: #2a2250; color: #fff; font-size: 12px;
  font-weight: 700; line-height: 1; position: relative; box-sizing: border-box; }
.lk-av img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.lk-av.lk-big { width: 44px; height: 44px; font-size: 20px; }
.lk-letter.lk-h0 { background: #7b5cd6; } .lk-letter.lk-h1 { background: #c2547a; } .lk-letter.lk-h2 { background: #3f8fc4; }
.lk-letter.lk-h3 { background: #3aa37a; } .lk-letter.lk-h4 { background: #c98a2e; } .lk-letter.lk-h5 { background: #8a5a3c; }
.lk-letter.lk-h6 { background: #5560c9; } .lk-letter.lk-h7 { background: #9c4fb8; }
/* (17/11, the owner: "Làm hiệu ứng chat, khung avatar, hiệu ứng tên nổi bật lên nữa, tôi thấy vẫn đơn điệu quá") the looks
   drawn again: a bigger avatar in the chats; every frame a ring of metal or stone (a gradient, a mask cutting its middle)
   with its glow and its ornament (looks.js .lk-fx: a gem, a star, flames, a crown, wings, sparks); a bubble with its
   colour's edge, a wash and a sign at its corner; a name in metal or stone letters. Three new sets: Sấm sét, Ngân hà,
   Thiên thần. What moves (✨) moves by transform and opacity where it can (only the 6 newest lines, never in a duel). */
.lines .lk-av, .lk-line .lk-av { width: 28px; height: 28px; vertical-align: -9px; margin-right: 9px; font-size: 13px; }
@media (max-width: 560px) { .lines .lk-av { width: 26px; height: 26px; vertical-align: -8px; } }
.lk-chip .lk-av, .lka-tick .lk-av { width: 26px; height: 26px; margin: 3px 6px 3px 4px; }
.lines li:has(> .lk-f):not(.lk-bub) { padding-top: 4px; padding-bottom: 4px; } /* (a framed avatar's ring and gem clear of the next line's) */
.lines li:has(> .lk-f-fire, > .lk-f-kk, > .lk-f-champion, > .lk-f-angel):not(.lk-bub) { padding-top: 12px; } /* (flames, a crown, wings above) */
.lk-chip .lk-av.lk-f-angel, .lka-tick .lk-av.lk-f-angel { margin-left: 12px; margin-right: 12px; }
/* frames: the ring (::after), the glow (the avatar's shadow), the ornaments (.lk-fx and its ::before, ::after; behind the
   picture with z-index -1, the avatar being a stacking context of its own) */
.lk-f { --ring: #ffd34d; --ring-c: #ffd34d; --glow: transparent; isolation: isolate; box-shadow: 0 0 10px 1px var(--glow); }
.lk-f::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; pointer-events: none; padding: 3px; border: 0;
  background: var(--ring); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask-composite: exclude; }
.lk-big.lk-f::after { inset: -4px; padding: 4px; }
.lk-fx { position: absolute; inset: 0; pointer-events: none; font-size: 10px; font-style: normal; line-height: 1; }
.lk-big .lk-fx { font-size: 15px; }
.lk-fx::before, .lk-fx::after { position: absolute; line-height: 1; }
/* a gem at the bottom (gold and the stones) */
.lk-f-gold .lk-fx::after, .lk-f-ruby .lk-fx::after, .lk-f-sapphire .lk-fx::after, .lk-f-emerald .lk-fx::after, .lk-f-amethyst .lk-fx::after {
  content: ""; left: 50%; bottom: -.55em; width: .72em; height: .72em; margin-left: -.36em; transform: rotate(45deg); border-radius: 1px;
  background: var(--gem); border: 1px solid rgba(255, 255, 255, .9); box-shadow: 0 0 5px var(--glow); }
/* a star at the top right (silver, gold) */
.lk-f-silver .lk-fx::before, .lk-f-gold .lk-fx::before { content: "\2726"; top: -.55em; right: -.5em; color: #fff; text-shadow: 0 0 4px var(--glow), 0 0 2px #fff; }
.lk-f-bronze { --ring: conic-gradient(#7a4520, #e7a868, #8a5028, #f5c08a, #7a4520 50%, #d08a50, #7a4520); --ring-c: #c47f45; --glow: rgba(196, 127, 69, .35); }
.lk-f-silver { --ring: conic-gradient(#8e95a8, #ffffff, #9aa1b5, #eef1f8, #8e95a8 50%, #ffffff, #8e95a8); --ring-c: #d9dde8; --glow: rgba(220, 225, 240, .5); }
.lk-f-gold { --ring: conic-gradient(#9a6b00, #ffe27a, #c08a00, #fff3b0, #9a6b00 50%, #ffd34d, #9a6b00); --ring-c: #ffd34d; --glow: rgba(255, 200, 60, .6);
  --gem: linear-gradient(135deg, #fff6c8, #ffd34d 45%, #b8860b); }
.lk-f-ruby { --ring: conic-gradient(#7a0022, #ff4d7a, #b0103a, #ffb3c6, #7a0022 50%, #ff4d7a, #7a0022); --ring-c: #ff3d6e; --glow: rgba(255, 61, 110, .6);
  --gem: linear-gradient(135deg, #ffc2d1, #ff2d5e 45%, #8a0026); }
.lk-f-sapphire { --ring: conic-gradient(#0a2a7a, #4d9bff, #123f9e, #b3d4ff, #0a2a7a 50%, #4d9bff, #0a2a7a); --ring-c: #3d8bff; --glow: rgba(61, 139, 255, .6);
  --gem: linear-gradient(135deg, #cfe3ff, #2d7bff 45%, #0a2a7a); }
.lk-f-emerald { --ring: conic-gradient(#065a32, #3ef09a, #0b7a45, #b6ffd9, #065a32 50%, #3ef09a, #065a32); --ring-c: #2fd685; --glow: rgba(47, 214, 133, .6);
  --gem: linear-gradient(135deg, #c8ffe3, #1fd07a 45%, #065a32); }
.lk-f-amethyst { --ring: conic-gradient(#4a1a7a, #c58bff, #6a2aa8, #ead6ff, #4a1a7a 50%, #c58bff, #4a1a7a); --ring-c: #b46dff; --glow: rgba(180, 109, 255, .6);
  --gem: linear-gradient(135deg, #f0e0ff, #a64dff 45%, #4a1a7a); }
.lk-f-ice { --ring: conic-gradient(#5fc8e8, #ffffff, #8fe3ff, #e8fbff, #5fc8e8 50%, #ffffff, #5fc8e8); --ring-c: #aef0ff; --glow: rgba(150, 230, 255, .7); }
.lk-f-ice .lk-fx::before { content: "\2744"; top: -.6em; right: -.55em; font-size: 1.2em; color: #e6fbff; text-shadow: 0 0 4px #7fdcff, 0 0 8px rgba(150, 230, 255, .9); }
.lk-f-ice .lk-fx::after { content: "\2744"; bottom: -.35em; left: -.45em; font-size: .8em; color: #e6fbff; text-shadow: 0 0 4px #7fdcff; }
/* fire: a ring of flames turning, flames rising behind the picture */
.lk-f-fire { --ring: conic-gradient(#ff2a00, #ffb000, #ff5a00, #ffe066, #ff2a00 50%, #ffb000, #ff2a00); --ring-c: #ff8a1f; --glow: rgba(255, 100, 20, .75); }
.lk-f-fire::after, .lk-f-kk::after { animation: lk-spin 2.2s linear infinite; }
.lk-f-fire .lk-fx::before, .lk-f-kk .lk-fx::before { content: ""; left: -4%; right: -4%; top: -78%; height: 100%; z-index: -1; transform-origin: 50% 100%;
  background: radial-gradient(ellipse 20% 70% at 20% 100%, #ffe066 0 30%, rgba(255, 130, 0, .95) 58%, transparent 80%),
    radial-gradient(ellipse 22% 95% at 50% 100%, #fff1a8 0 30%, rgba(255, 110, 0, .95) 60%, transparent 82%),
    radial-gradient(ellipse 20% 74% at 80% 100%, #ffd34d 0 30%, rgba(255, 80, 0, .95) 58%, transparent 80%);
  animation: lk-flame .45s ease-in-out infinite alternate; }
@keyframes lk-flame { from { transform: scale(1.04, .8); opacity: .8; } to { transform: scale(.95, 1.12); opacity: 1; } }
/* rainbow: the ring turning, two stars twinkling */
.lk-f-rainbow { --ring: conic-gradient(#ff4d4d, #ffd24d, #4dff88, #4dd2ff, #9b4dff, #ff4d4d); --ring-c: #9b4dff; --glow: rgba(155, 120, 255, .55); }
.lk-f-rainbow::after { animation: lk-spin 3s linear infinite; }
.lk-f-rainbow .lk-fx::before, .lk-f-champion .lk-fx::after, .lk-f-galaxy .lk-fx::after { content: "\2726"; top: -.55em; right: -.6em; color: #fff;
  text-shadow: 0 0 4px #fff, 0 0 8px #c9b5ff; animation: lk-twinkle 1.6s ease-in-out infinite; }
.lk-f-rainbow .lk-fx::after { content: "\2726"; bottom: -.45em; left: -.55em; font-size: .75em; color: #fff; text-shadow: 0 0 4px #ffe680;
  animation: lk-twinkle 1.6s .8s ease-in-out infinite; }
@keyframes lk-twinkle { 0%, 100% { opacity: .25; transform: scale(.6) rotate(0deg); } 50% { opacity: 1; transform: scale(1.15) rotate(45deg); } }
/* the champion: a gold ring turning, a crown, a star twinkling */
.lk-f-champion { --ring: conic-gradient(#fff3b0, #ffcc33, #b8860b, #ffe680, #fff3b0 50%, #ffcc33, #b8860b, #fff3b0); --ring-c: #ffd34d;
  --glow: rgba(255, 205, 70, .85); }
.lk-f-champion::after { inset: -4px; padding: 4px; animation: lk-spin 4s linear infinite; }
.lk-f-champion .lk-fx::before { content: "\1F451"; top: -1.05em; left: 50%; font-size: 1.15em; transform: translateX(-50%); filter: drop-shadow(0 0 3px rgba(255, 210, 80, .9)); }
.lk-f-champion .lk-fx::after { color: #fff6c8; text-shadow: 0 0 4px #ffd34d, 0 0 8px #ffb000; }
/* KhươngKid's: red and gold, flames, its KK badge */
.lk-f-kk { --ring: conic-gradient(#c8102e, #ffd34d, #ff3b30, #ffe680, #c8102e 50%, #ffd34d, #c8102e); --ring-c: #ff3b30; --glow: rgba(255, 70, 40, .8); }
.lk-f-kk::after { animation-duration: 1.6s; }
.lk-f-kk .lk-fx::after { content: "KK"; left: 50%; bottom: -.55em; transform: translateX(-50%); font: 800 .7em/1 system-ui, sans-serif; letter-spacing: .02em;
  color: #ffd34d; background: #c8102e; padding: .14em .32em; border-radius: .6em; border: 1px solid #ffd34d; box-shadow: 0 0 4px rgba(255, 60, 30, .9); }
/* (new) Sấm sét: an electric ring, sparks circling, a bolt flashing */
.lk-f-thunder { --ring: conic-gradient(#1e3cff, #9ff3ff, #3d6bff, #ffffff, #1e3cff 50%, #7fd6ff, #1e3cff); --ring-c: #4d8dff; --glow: rgba(80, 150, 255, .8); }
.lk-f-thunder::after { animation: lk-spin 1.4s linear infinite; }
.lk-f-thunder .lk-fx::before { content: "\26A1"; top: -.7em; right: -.6em; font-size: 1.25em; filter: drop-shadow(0 0 3px #7fd6ff); animation: lk-zap 2.4s steps(1) infinite; }
.lk-f-thunder .lk-fx::after { content: ""; inset: -.5em; border-radius: 50%; border: 1px dashed rgba(170, 225, 255, .95); z-index: -1;
  animation: lk-spin 5s linear infinite reverse; }
@keyframes lk-zap { 0%, 70% { opacity: 1; transform: scale(1); } 72% { opacity: .2; } 74% { opacity: 1; transform: scale(1.3); } 78% { opacity: .3; } 80% { opacity: 1; transform: scale(1); } }
/* (new) Ngân hà: a nebula ring turning slowly, stars circling round it */
.lk-f-galaxy { --ring: conic-gradient(#2b0b5a, #7b2cff, #ff4fd8, #3ad2ff, #2b0b5a 50%, #b388ff, #2b0b5a); --ring-c: #9b6bff; --glow: rgba(160, 90, 255, .75); }
.lk-f-galaxy::after { animation: lk-spin 6s linear infinite; }
.lk-f-galaxy .lk-fx::before { content: ""; inset: -.75em; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle at 50% 3%, #fff 0 .09em, transparent .14em), radial-gradient(circle at 97% 60%, #ffd6ff 0 .08em, transparent .13em),
    radial-gradient(circle at 12% 82%, #bfefff 0 .08em, transparent .13em), radial-gradient(circle at 22% 12%, #fff 0 .05em, transparent .09em),
    radial-gradient(circle at 80% 92%, #fff 0 .05em, transparent .09em);
  animation: lk-spin 9s linear infinite; }
.lk-f-galaxy .lk-fx::after { color: #ffd6ff; text-shadow: 0 0 4px #ff6ad5, 0 0 8px #7b2cff; }
/* (new) Thiên thần: a white and gold ring, a wing each side beating */
.lk-f-angel { --ring: conic-gradient(#ffffff, #ffe9a8, #ffffff, #ffd56a, #ffffff 50%, #fff6d8, #ffffff); --ring-c: #fff1c1; --glow: rgba(255, 236, 170, .8); }
:is(.lines, .lk-line) .lk-av.lk-f-angel { margin-left: 9px; margin-right: 14px; }
.lk-f-angel .lk-fx::before, .lk-f-angel .lk-fx::after { content: ""; top: -18%; width: 80%; height: 64%; z-index: -1;
  background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2040%2032'%3E%3Cdefs%3E%3ClinearGradient%20id='w'%20x1='0'%20y1='0'%20x2='1'%20y2='1'%3E%3Cstop%20offset='0'%20stop-color='%23fff'/%3E%3Cstop%20offset='1'%20stop-color='%23d6e0ff'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath%20d='M39%2023C31%209%2018%202%202%203c6%204%209%206%2011%209C7%2012%204%2014%202%2018c8-2%2012%200%2015%201-5%201-8%203-9%207%209-3%2018-3%2031-1z'%20fill='url(%23w)'%20stroke='%23f2cf6b'%20stroke-width='1.1'%20stroke-linejoin='round'/%3E%3Cpath%20d='M13%2012c7%201%2014%204%2022%209M17%2019c6%200%2013%202%2019%204'%20fill='none'%20stroke='%23b9c6ee'%20stroke-width='.9'%20stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; filter: drop-shadow(0 0 3px rgba(255, 240, 200, .9)); }
.lk-f-angel .lk-fx::before { right: 62%; transform-origin: 100% 75%; animation: lk-wing-l 1.6s ease-in-out infinite alternate; }
.lk-f-angel .lk-fx::after { left: 62%; transform-origin: 0 75%; background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2040%2032'%3E%3Cdefs%3E%3ClinearGradient%20id='w'%20x1='1'%20y1='0'%20x2='0'%20y2='1'%3E%3Cstop%20offset='0'%20stop-color='%23fff'/%3E%3Cstop%20offset='1'%20stop-color='%23d6e0ff'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg%20transform='matrix(-1%200%200%201%2040%200)'%3E%3Cpath%20d='M39%2023C31%209%2018%202%202%203c6%204%209%206%2011%209C7%2012%204%2014%202%2018c8-2%2012%200%2015%201-5%201-8%203-9%207%209-3%2018-3%2031-1z'%20fill='url(%23w)'%20stroke='%23f2cf6b'%20stroke-width='1.1'%20stroke-linejoin='round'/%3E%3Cpath%20d='M13%2012c7%201%2014%204%2022%209M17%2019c6%200%2013%202%2019%204'%20fill='none'%20stroke='%23b9c6ee'%20stroke-width='.9'%20stroke-linecap='round'/%3E%3C/g%3E%3C/svg%3E"); animation: lk-wing-r 1.6s ease-in-out infinite alternate; }
@keyframes lk-wing-l { from { transform: rotate(10deg); } to { transform: rotate(-12deg); } }
@keyframes lk-wing-r { from { transform: rotate(-10deg); } to { transform: rotate(12deg); } }
@keyframes lk-spin { to { transform: rotate(360deg); } }

/* bubbles: an edge in the item's colour, a stripe at the left, a wash, a sign at the top right (--orn); what moves under
   the words (::before, z-index -1: the line a stacking context of its own) */
.lk-bub { --acc: transparent; --bglow: transparent; --orn: none; position: relative; isolation: isolate; }
.lines li.lk-bub, .lk-line.lk-bub { margin: 6px 0; padding-top: 5px; padding-bottom: 5px; padding-left: 10px; border-radius: 12px; border: 1px solid transparent;
  box-shadow: inset 3px 0 0 var(--acc), 0 0 10px var(--bglow); }
.lk-sample.lk-bub { display: inline-block; padding: 1px 9px; border-radius: 9px; border: 1px solid transparent; box-shadow: inset 2px 0 0 var(--acc), 0 0 6px var(--bglow); }
.lk-bub::after { content: var(--orn); position: absolute; top: -.7em; right: 14px; font-size: 13px; line-height: 1; pointer-events: none;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, .7)); }
.lk-sample.lk-bub::after { top: -8px; right: -7px; font-size: 11px; }
.lk-bub::before { content: none; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none; }
.lk-bub.lk-b-silver { --acc: #eef1f8; --orn: "\2726"; border-color: #c9cede; background: linear-gradient(100deg, rgba(220, 225, 240, .17), rgba(200, 206, 222, .04) 65%); }
.lk-b-silver::after { color: #f4f6fb; }
.lk-bub.lk-b-gold { --acc: #ffd34d; --bglow: rgba(255, 205, 70, .22); --orn: "\2605"; border-color: #e9b949;
  background: linear-gradient(100deg, rgba(255, 211, 77, .24), rgba(255, 211, 77, .05) 65%); }
.lk-b-gold::after { color: #ffd34d; }
.lk-bub.lk-b-sakura { --acc: #ff9cc7; --bglow: rgba(255, 156, 199, .2); --orn: "\1F338"; border-color: #ff9cc7;
  background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='-10%20-10%2020%2020'%3E%3Cg%20fill='%23ffb7d5'%20stroke='%23ff8fbf'%20stroke-width='.6'%3E%3Cellipse%20cx='0'%20cy='-5'%20rx='3.2'%20ry='4.6'/%3E%3Cellipse%20cx='0'%20cy='-5'%20rx='3.2'%20ry='4.6'%20transform='rotate(72)'/%3E%3Cellipse%20cx='0'%20cy='-5'%20rx='3.2'%20ry='4.6'%20transform='rotate(144)'/%3E%3Cellipse%20cx='0'%20cy='-5'%20rx='3.2'%20ry='4.6'%20transform='rotate(216)'/%3E%3Cellipse%20cx='0'%20cy='-5'%20rx='3.2'%20ry='4.6'%20transform='rotate(288)'/%3E%3C/g%3E%3Ccircle%20r='2'%20fill='%23ffe27a'/%3E%3C/svg%3E") right 46px top 6px / 12px no-repeat, url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='-10%20-10%2020%2020'%3E%3Cg%20fill='%23ffb7d5'%20stroke='%23ff8fbf'%20stroke-width='.6'%3E%3Cellipse%20cx='0'%20cy='-5'%20rx='3.2'%20ry='4.6'/%3E%3Cellipse%20cx='0'%20cy='-5'%20rx='3.2'%20ry='4.6'%20transform='rotate(72)'/%3E%3Cellipse%20cx='0'%20cy='-5'%20rx='3.2'%20ry='4.6'%20transform='rotate(144)'/%3E%3Cellipse%20cx='0'%20cy='-5'%20rx='3.2'%20ry='4.6'%20transform='rotate(216)'/%3E%3Cellipse%20cx='0'%20cy='-5'%20rx='3.2'%20ry='4.6'%20transform='rotate(288)'/%3E%3C/g%3E%3Ccircle%20r='2'%20fill='%23ffe27a'/%3E%3C/svg%3E") right 74px bottom 3px / 9px no-repeat, url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='-10%20-10%2020%2020'%3E%3Cg%20fill='%23ffb7d5'%20stroke='%23ff8fbf'%20stroke-width='.6'%3E%3Cellipse%20cx='0'%20cy='-5'%20rx='3.2'%20ry='4.6'/%3E%3Cellipse%20cx='0'%20cy='-5'%20rx='3.2'%20ry='4.6'%20transform='rotate(72)'/%3E%3Cellipse%20cx='0'%20cy='-5'%20rx='3.2'%20ry='4.6'%20transform='rotate(144)'/%3E%3Cellipse%20cx='0'%20cy='-5'%20rx='3.2'%20ry='4.6'%20transform='rotate(216)'/%3E%3Cellipse%20cx='0'%20cy='-5'%20rx='3.2'%20ry='4.6'%20transform='rotate(288)'/%3E%3C/g%3E%3Ccircle%20r='2'%20fill='%23ffe27a'/%3E%3C/svg%3E") right 104px top 3px / 7px no-repeat,
    linear-gradient(100deg, rgba(255, 156, 199, .3), rgba(255, 210, 230, .07) 70%); }
.lk-sample.lk-bub.lk-b-sakura { background: linear-gradient(100deg, rgba(255, 156, 199, .3), rgba(255, 210, 230, .07) 70%); }
.lk-bub.lk-b-ice { --acc: #aef0ff; --bglow: rgba(150, 230, 255, .25); --orn: "\2744"; border-color: #9be7ff;
  background: linear-gradient(115deg, rgba(150, 230, 255, .24), rgba(200, 245, 255, .05) 45%, rgba(255, 255, 255, .14) 50%, rgba(200, 245, 255, .04) 56%); }
.lk-b-ice::after { color: #e6fbff; text-shadow: 0 0 4px #7fdcff; }
.lk-bub.lk-b-night { --acc: #8c7cff; --bglow: rgba(108, 92, 231, .3); --orn: "\1F319"; border-color: #6c5ce7;
  background: radial-gradient(circle at 12% 30%, rgba(255, 255, 255, .55) 0 1px, transparent 1.5px), radial-gradient(circle at 34% 78%, rgba(255, 255, 255, .4) 0 1px, transparent 1.5px),
    radial-gradient(circle at 58% 22%, rgba(255, 255, 255, .5) 0 1px, transparent 1.5px), radial-gradient(circle at 76% 70%, rgba(255, 255, 255, .45) 0 1px, transparent 1.5px),
    radial-gradient(circle at 90% 35%, rgba(255, 255, 255, .5) 0 1.2px, transparent 1.7px), linear-gradient(100deg, #201856, #0f0b2a); }
.lk-bub.lk-b-fire { --acc: #ff8a1f; --bglow: rgba(255, 100, 20, .35); --orn: "\1F525"; border-color: #ff8a1f;
  background: linear-gradient(0deg, rgba(255, 70, 0, .34), rgba(255, 140, 30, .12) 55%, rgba(255, 190, 60, .04)); }
.lk-b-fire::before { content: ""; background: linear-gradient(0deg, rgba(255, 120, 20, .38), transparent 75%); animation: lk-heat 1.1s ease-in-out infinite alternate; }
@keyframes lk-heat { from { opacity: .2; } to { opacity: 1; } }
.lk-bub.lk-b-rainbow { --acc: transparent; --bglow: rgba(155, 120, 255, .25); --orn: "\1F308"; border: 2px solid transparent;
  background: linear-gradient(90deg, rgba(255, 77, 77, .12), rgba(77, 255, 136, .09), rgba(77, 210, 255, .12), rgba(155, 77, 255, .14)); }
/* (its rainbow edge a ring of its own, ::before, its colours turning by hue-rotate: a filter the GPU animates, where the
   background sliding on the line cost a style and a paint every frame: looks2/perf-looks.mjs) */
.lk-b-rainbow::before { content: ""; inset: -2px; padding: 2px; background: linear-gradient(90deg, #ff4d4d, #ffd24d, #4dff88, #4dd2ff, #9b4dff, #ff4d4d);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: lk-hue 4s linear infinite; }
@keyframes lk-hue { to { filter: hue-rotate(360deg); } }
.lk-bub.lk-b-champion { --acc: #ffd34d; --bglow: rgba(255, 205, 70, .45); --orn: "\1F451"; border-color: #ffd34d;
  background: linear-gradient(110deg, rgba(255, 211, 77, .10) 25%, rgba(255, 240, 180, .2) 45%, rgba(255, 211, 77, .06) 75%), linear-gradient(100deg, rgba(255, 211, 77, .18), rgba(255, 211, 77, .04)); }
/* (its shine a light coming and going, ::before's opacity: the GPU's) */
.lk-b-champion::before { content: ""; background: linear-gradient(110deg, transparent 18%, rgba(255, 214, 90, .26) 40%, rgba(255, 236, 160, .3) 46%, rgba(255, 200, 70, .1) 62%, transparent 80%);
  animation: lk-heat 1.8s ease-in-out infinite alternate; }
/* (new) Sấm sét: a storm's blue, flashes now and then */
.lk-bub.lk-b-thunder { --acc: #7fd6ff; --bglow: rgba(80, 150, 255, .35); --orn: "\26A1"; border-color: #4d8dff;
  background: linear-gradient(100deg, rgba(40, 80, 255, .3), rgba(20, 30, 90, .28) 60%, rgba(120, 200, 255, .08)); }
.lk-b-thunder::before { content: ""; background: linear-gradient(100deg, rgba(200, 235, 255, .55), rgba(140, 190, 255, .15)); opacity: 0; animation: lk-flash 3.2s steps(1) infinite; }
@keyframes lk-flash { 0%, 86% { opacity: 0; } 88% { opacity: 1; } 90% { opacity: 0; } 93% { opacity: .7; } 95% { opacity: 0; } }
/* (new) Ngân hà: a nebula, its stars twinkling */
.lk-bub.lk-b-galaxy { --acc: #ff6ad5; --bglow: rgba(160, 90, 255, .35); --orn: "\1FA90"; border-color: #9b6bff;
  background: radial-gradient(ellipse at 18% 40%, rgba(155, 77, 255, .5), transparent 60%), radial-gradient(ellipse at 72% 65%, rgba(255, 90, 200, .38), transparent 55%),
    radial-gradient(ellipse at 95% 20%, rgba(58, 210, 255, .3), transparent 45%), linear-gradient(100deg, #1b0d46, #0b1235); }
.lk-b-galaxy::before { content: ""; animation: lk-stars 2.2s ease-in-out infinite alternate;
  background: radial-gradient(circle at 8% 25%, #fff 0 1px, transparent 1.6px), radial-gradient(circle at 27% 75%, #ffd6ff 0 1px, transparent 1.6px),
    radial-gradient(circle at 46% 30%, #fff 0 1.2px, transparent 1.8px), radial-gradient(circle at 63% 80%, #bfefff 0 1px, transparent 1.6px),
    radial-gradient(circle at 81% 40%, #fff 0 1.3px, transparent 1.9px), radial-gradient(circle at 93% 78%, #ffd6ff 0 1px, transparent 1.6px); }
@keyframes lk-stars { from { opacity: .35; } to { opacity: 1; } }
/* (new) Thiên thần: white and gold light, a glow breathing */
.lk-bub.lk-b-angel { --acc: #fff6d8; --bglow: rgba(255, 240, 200, .35); --orn: "\1F54A\FE0F"; border-color: #fff1c1;
  background: linear-gradient(100deg, rgba(255, 255, 255, .17), rgba(255, 236, 170, .09) 60%, rgba(255, 255, 255, .03)); }
.lk-b-angel::before { content: ""; background: radial-gradient(ellipse at 15% 0%, rgba(255, 250, 225, .4), transparent 60%); animation: lk-heat 2.2s ease-in-out infinite alternate; }

/* names: metal and stone letters (a gradient painted in them: on the name's first element, its link or button, the
   colon and the title left as they are), a glow by drop-shadow (a text-shadow would cover such letters), a sign before
   some (--np) */
b.lk-n, .lk-n { font-weight: 700; --np: none; }
.lk-n button, .lk-n a { color: inherit; font-weight: inherit; }
.lk-n::before { content: var(--np); margin-right: 3px; }
:is(.lk-n-silver, .lk-n-gold, .lk-n-ice, .lk-n-fire, .lk-n-rainbow, .lk-n-champion, .lk-n-thunder, .lk-n-galaxy) > :first-child { background: var(--nt); background-size: var(--ns, 100% 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-fill-color: transparent; text-shadow: none; filter: drop-shadow(0 1px 0 rgba(40, 20, 0, .75)) drop-shadow(0 0 4px var(--ng)); }
.lk-n.lk-n-silver { --nt: linear-gradient(180deg, #ffffff 0%, #f1f3f8 40%, #b9c1d3 56%, #ffffff 100%); --ng: rgba(225, 230, 245, .75); color: #e3e7f2; }
.lk-n.lk-n-gold { --nt: linear-gradient(180deg, #fffdf0 0%, #ffe066 38%, #d48f00 56%, #ffe680 100%); --ng: rgba(255, 196, 40, .85); color: #ffd34d; }
.lk-n.lk-n-ice { --nt: linear-gradient(180deg, #ffffff 0%, #d8f8ff 40%, #6fd3f2 58%, #f0fcff 100%); --ng: rgba(120, 220, 255, .9); color: #b5f1ff; }
.lk-n.lk-n-glow { color: #fff; text-shadow: 0 0 4px #fff, 0 0 10px #c4b5ff, 0 0 18px #8a6cff; }
.lk-n.lk-n-fire { --nt: linear-gradient(0deg, #ff2a00 8%, #ff8a00 40%, #ffe066 70%, #fff6c8 92%); --ns: 100% 170%; --ng: rgba(255, 90, 20, .85); --np: "\1F525"; color: #ffb347; }
.lk-n-fire > :first-child { animation: lk-fire-text .9s ease-in-out infinite alternate; }
@keyframes lk-fire-text { from { background-position: 0 100%; } to { background-position: 0 0; } }
.lk-n.lk-n-neon { color: #9ffcff; text-shadow: 0 0 2px #fff, 0 0 7px #00e5ff, 0 0 14px #00b3ff, 0 0 24px #ff3df2; animation: lk-neon 2.4s ease-in-out infinite; }
.lk-n.lk-n-rainbow { --nt: linear-gradient(90deg, #ff4d4d, #ffd24d, #4dff88, #4dd2ff, #9b4dff, #ff4d4d); --ns: 200% 100%; --ng: rgba(255, 255, 255, .35); }
.lk-n-rainbow > :first-child { animation: lk-slide-text 3s linear infinite; }
.lk-n.lk-n-champion { --nt: linear-gradient(110deg, #c9961a 0 35%, #fffbe0 50%, #c9961a 65%, #ffd34d 100%); --ns: 250% 100%; --ng: rgba(255, 205, 70, .8); --np: "\1F451"; color: #ffd34d; }
.lk-n-champion > :first-child { animation: lk-shine-text 2.8s linear infinite; }
@keyframes lk-shine-text { from { background-position: 150% 0; } to { background-position: -100% 0; } }
/* (new) Sấm sét: electric letters, a bolt before them flashing */
.lk-n.lk-n-thunder { --nt: linear-gradient(90deg, #9fe6ff, #ffffff 25%, #4d8dff 50%, #c8f0ff 75%, #9fe6ff); --ns: 200% 100%; --ng: rgba(90, 170, 255, .9); --np: "\26A1"; color: #9fe6ff; }
.lk-n-thunder > :first-child { animation: lk-slide-text 1.6s linear infinite; }
.lk-n-thunder::before { display: inline-block; animation: lk-zap 2.4s steps(1) infinite; }
/* (new) Ngân hà: the nebula's colours drifting, a star before them */
.lk-n.lk-n-galaxy { --nt: linear-gradient(90deg, #b388ff, #ff6ad5, #6ad8ff, #b388ff); --ns: 300% 100%; --ng: rgba(180, 120, 255, .8); --np: "\2726"; color: #c9a8ff; }
.lk-n-galaxy > :first-child { animation: lk-slide-text 6s linear infinite; }
.lk-n-galaxy::before { display: inline-block; color: #ffd6ff; text-shadow: 0 0 4px #ff6ad5; animation: lk-twinkle 1.8s ease-in-out infinite; }
/* (new) Thiên thần: white letters in a golden light */
.lk-n.lk-n-angel { color: #fffaf0; text-shadow: 0 0 5px #fff3c4, 0 0 12px rgba(255, 225, 140, .9); --np: "\2727"; }
.lk-n-angel::before { color: #ffd56a; }
@keyframes lk-neon { 0%, 47%, 53%, 100% { opacity: 1; } 50% { opacity: .6; } }
@keyframes lk-slide-text { to { background-position: 200% 0; } }
.lk-title { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 0 5px; border-radius: 7px; vertical-align: 1px; line-height: 15px;
  color: #1a1206; background: linear-gradient(90deg, #ffd34d, #ffeaa0); white-space: nowrap; max-width: 11em; overflow: hidden; text-overflow: ellipsis;
  -webkit-text-fill-color: #1a1206; text-shadow: none; }
@media (prefers-reduced-motion: reduce) {
  .lk-f::after, .lk-fx::before, .lk-fx::after, .lk-bub, .lk-bub::before, .lk-n, .lk-n *, .lk-n::before { animation: none !important; }
}
/* the 🎨 Trang trí box */
.looks-dialog h3 { margin: 14px 0 6px; font-size: 14px; color: var(--gold2); }
.lk-preview { padding: 10px; border: 1px dashed var(--line); border-radius: 10px; margin: 8px 0; background: var(--bg2); }
.lk-line { padding: 4px 8px; border-radius: 10px; border: 1px solid transparent; }
.lk-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.lk-pick { background: var(--card); border: 2px solid var(--line); border-radius: 50%; padding: 3px; cursor: pointer; line-height: 0; }
.lk-pick .lk-av { margin: 0; width: 34px; height: 34px; }
.lk-pick.on { border-color: var(--gold2); box-shadow: 0 0 0 2px rgba(255, 217, 120, .35); }
.lk-cards { margin-top: 8px; }
.lk-cards input { width: 100%; max-width: 320px; margin: 6px 0; }
.lk-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lk-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); cursor: pointer; font: inherit; font-size: 13px; }
.lk-chip .lk-av { margin: 0 2px; }
.lk-chip.on { border-color: var(--gold2); background: rgba(255, 217, 120, .12); }
.lk-chip.locked { opacity: .45; cursor: not-allowed; }
.tour-prize { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin: 8px 0; }
.tour-prize legend { color: var(--gold2); font-size: 13px; padding: 0 4px; }
.tour-prize-line { margin: 4px 0 0; color: var(--gold2); font-size: 13px; }
.lka-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin: 10px 0; }
.lka-grant { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.lka-grant #lka-why { flex: 1 1 200px; }
@media (max-width: 560px) { .lk-pick .lk-av { width: 30px; height: 30px; } }
.lk-n .mstr { -webkit-text-fill-color: var(--gold2); } .lk-n .vrf { -webkit-text-fill-color: var(--green); }
/* (only the newest lines move: a long chat of moving bubbles and frames costs paint during a duel) */
.lines li:nth-last-child(n+7).lk-bub, .lines li:nth-last-child(n+7).lk-bub::before, .lines li:nth-last-child(n+7) .lk-f::after,
.lines li:nth-last-child(n+7) .lk-fx::before, .lines li:nth-last-child(n+7) .lk-fx::after, .lines li:nth-last-child(n+7) .lk-n,
.lines li:nth-last-child(n+7) .lk-n *, .lines li:nth-last-child(n+7) .lk-n::before { animation: none !important; }
.event-note.boost { border-color: #ff9f43; background: linear-gradient(90deg, rgba(255, 159, 67, .16), rgba(255, 217, 120, .05)); }
.lka-holders { margin: 10px 0; } .lka-holders summary { cursor: pointer; color: var(--gold2); }
.lk-chip small { color: var(--muted); font-size: 11px; }
/* the admin's ticks (★ Quản trị › 🎨 Trang trí) */
.lka-kind { border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px 10px; margin: 8px 0; }
.lka-kind legend { color: var(--gold2); font-size: 13px; padding: 0 4px; }
.lka-ticks { display: flex; flex-wrap: wrap; gap: 6px; }
.lka-tick { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); cursor: pointer; font-size: 13px; user-select: none; }
.lka-tick.on { border-color: var(--gold2); background: rgba(255, 217, 120, .12); }
.lka-tick input { margin: 0; accent-color: var(--gold); }
.lka-tick .lk-av { margin: 0 2px; }
.lka-tick small { color: var(--muted); font-size: 11px; }
/* (16/11, the owner: "kiểm tra giúp tôi bị lỗi ô vuông màu đen lại", a Hành trình duel with the chat open and a black box at
   the top right: where the hand's fusions panel (.pp-fuse-side) stood until the open chat moved it to the top middle) the
   pointer play's overlays (.pbtn, .pp-hint, .pp-card, .pp-fuse) no longer blur the game under them (backdrop-filter): a
   blurred backdrop over the WebGL canvas is a layer of its own that some GPUs leave as a black tile when it moves or
   goes. A little more opaque instead. */
/* (12/11, the owner: "xuất hiện 1 ô đen ở trên" with the chat open in a duel: moving layers over the game's WebGL canvas,
   a phone's and some desktops' compositors left a black tile on it) in a duel the chat's looks stand still: no
   animation, no rotation, no mask moving, their colours kept */
.game .lk-f::after, .game .lk-f::before, .game .lk-fx::before, .game .lk-fx::after, .game .lk-bub, .game .lk-bub::before, .game .lk-n, .game .lk-n *,
.game .lk-n::before, .game .lk-sample { animation: none !important; }
/* (17/11) the rings a plain border of their colour there, no mask; no drop-shadow filter (a layer of its own) */
.game .lk-f::after { -webkit-mask: none; mask: none; padding: 0; background: none; border: 3px solid var(--ring-c); }
.game .lk-b-rainbow::before { content: none; } .game .lk-bub.lk-b-rainbow { border-color: #9b4dff; }
.game .lk-n *, .game .lk-fx::before, .game .lk-fx::after, .game .lk-bub::after { filter: none !important; }
/* (12/11) the admin's login alerts (★ Quản trị) and the two-step login's key */
.m-alerts { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); font-size: 13px; }
.m-alerts.ok { color: var(--muted); }
.m-alerts.bad { border-color: var(--red); background: rgba(224, 82, 95, .1); }
.m-alerts summary { cursor: pointer; }
.totp-key { font: 600 18px/1.4 ui-monospace, Consolas, monospace; letter-spacing: 1px; padding: 8px 12px; border: 1px dashed var(--gold2); border-radius: 8px;
  user-select: all; word-break: break-all; }
.totp-steps { margin: 4px 0; padding-left: 18px; }
/* (12/11, the owner: "phần hiển thị avatar, dường như đang lỗi CSS") a title in a line: on a phone shorter still, the
   name, its title and the colon kept together; the rings drawn by a mask: a plain ring where a browser draws no masks */
@media (max-width: 560px) { .lk-title { max-width: 8em; font-size: 10px; } }
.lines li .lk-n, .lines li b:has(.lk-title) { white-space: nowrap; }
.lines li b:has(.lk-title) .who-btn, .lines li b:has(.lk-title) a { white-space: nowrap; }
@supports not ((mask-composite: exclude) or (-webkit-mask-composite: xor)) {
  .lk-f::after { -webkit-mask: none; mask: none; padding: 0; background: none; border: 3px solid var(--ring-c); }
  .lk-b-rainbow::before { content: none; } .lk-bub.lk-b-rainbow { border-color: #9b4dff; }
}
/* (12/11) a line's words clear of its buttons (☺ ↩, a master's ✕): room for as many as it has, wider on a touch screen */
.lines li:has(.line-acts > :nth-child(2)) { padding-right: 54px; }
.lines li:has(.line-acts > :nth-child(3)) { padding-right: 72px; }
@media (pointer: coarse), (max-width: 560px) {
  .lines li:has(.line-acts > :nth-child(2)) { padding-right: 80px; }
  .lines li:has(.line-acts > :nth-child(3)) { padding-right: 108px; }
}
/* (12/11) the legal notes: the footer's, the terms, the contact form, the master's list of messages */
.foot .legal { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.terms h3 { margin: 14px 0 4px; font-size: 14px; color: var(--gold2); }
.terms p, .terms li { font-size: 13.5px; line-height: 1.55; }
.terms ul { padding-left: 20px; margin: 4px 0; }
#contact-form textarea { width: 100%; resize: vertical; }
.m-list li.contact-rights { border-color: var(--red); }
.contact-text { white-space: pre-wrap; word-break: break-word; font-size: 13.5px; }

/* (15/11) a tournament's random deck looked at before its game: the cards grouped, monsters strongest first, a countdown */
.study { margin: 10px 0; padding: 12px; border: 1px solid var(--gold); border-radius: 12px; background: rgba(233, 185, 73, .07); }
.study-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; }
.study-time { font-size: 18px; font-weight: 800; color: var(--gold2); font-variant-numeric: tabular-nums; }
.study-sum { margin: 6px 0; font-size: 13.5px; color: var(--muted); }
.study-cards { list-style: none; margin: 6px 0; padding: 0 4px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 4px 10px;
  max-height: 46vh; overflow-y: auto; overflow-x: hidden; }
.study-cards li { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 3px 4px; border-radius: 6px; background: #150f2c; font-size: 13.5px; }
.study-cards li.spell { opacity: .92; }
.study-cards .pic { width: 40px; height: 32px; flex: none; border-radius: 4px; object-fit: cover; background: var(--bg2); }
.study-cards .sc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.study-cards .sc-stat { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.study-cards .sc-atk { color: var(--text); font-weight: 700; }
.study-cards .sc-x { color: var(--gold2); font-weight: 700; }
.study .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* (15/11) a tournament's entry fee: its chip, the pool's split, the prizes given */
.tr-chip.tr-fee { color: var(--gold2); border-color: var(--gold); }
.tour-fee { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #150f2c; }
.tour-fee h4 { margin: 0 0 6px; }
.tour-fee p { margin: 4px 0; font-size: 13.5px; }
.tour-split { border-collapse: collapse; margin: 6px 0; font-size: 13.5px; }
.tour-split th, .tour-split td { padding: 3px 12px 3px 0; text-align: left; }
.tour-split th { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.tour-split td:last-child { font-weight: 700; color: var(--gold2); font-variant-numeric: tabular-nums; }
.tour-payout { list-style: none; margin: 4px 0; padding: 0; }
.tour-payout li { padding: 2px 0; font-size: 13.5px; }
.tour-payout .pay { color: var(--gold2); font-weight: 700; }
.tour-form .fee-split { align-self: end; margin: 0 0 6px; grid-column: span 2; }
@media (max-width: 600px) {
  .study-cards { grid-template-columns: 1fr; max-height: 52vh; }
  .tour-form .fee-split { grid-column: auto; }
}

/* (15/11, the owner's: "Đưa luôn liên kết của choco nằm ở trên cạnh dòng yu gi online đi, ai muốn chơi cái nào thì chơi") the
   other game, beside the brand: a small pill; on a phone its chick alone */
.top .choco-link { flex: none; display: inline-flex; align-items: center; gap: 4px; margin: 0 auto 0 12px; padding: 3px 10px; border: 1px solid var(--line);
  border-radius: 999px; color: var(--text); text-decoration: none; font-size: 13px; white-space: nowrap; background: rgba(255, 213, 79, .06); }
.top .choco-link:hover, .top .choco-link:focus-visible { border-color: var(--gold); color: var(--gold2); }
.top .brand { margin-right: 0; } /* (the buttons pushed right by the link now, not by the name) */
@media (max-width: 560px) {
  .top .choco-link { margin: 0 auto 0 6px; padding: 3px 7px; }
  .top .choco-link .cl-more { display: none; }
}
@media (max-width: 360px) { .top .choco-link .cl-name { display: none; } }

/* ---- (15/11) the spectators' mat, livelier: dressed as its field, what happens shown where it happens (view.js) ---- */
.bd-mat { position: relative; overflow: hidden; isolation: isolate; }
.bd-mat > :not(.bd-fx) { position: relative; z-index: 1; }
/* each field: its colours and ground, and a slow living layer behind the cards (::before) */
.bd-mat::before { content: ""; position: absolute; inset: -20%; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .8s ease; }
.bd-mat.bd-t-forest { background: radial-gradient(560px 300px at 50% 50%, rgba(56, 142, 60, .38), transparent 70%), linear-gradient(180deg, #0f2a17, #0a1d10); border-color: #2e6b3a; }
.bd-mat.bd-t-forest::before { opacity: 1; background: radial-gradient(70px 46px at 14% 22%, rgba(220, 237, 200, .13), transparent 70%), radial-gradient(90px 56px at 72% 58%, rgba(220, 237, 200, .11), transparent 70%),
  radial-gradient(56px 38px at 38% 84%, rgba(220, 237, 200, .1), transparent 70%), radial-gradient(64px 42px at 86% 18%, rgba(220, 237, 200, .09), transparent 70%),
  radial-gradient(48px 32px at 55% 36%, rgba(220, 237, 200, .08), transparent 70%), linear-gradient(90deg, rgba(0, 0, 0, .25), transparent 18%, transparent 82%, rgba(0, 0, 0, .25));
  animation: bdDrift 22s ease-in-out infinite alternate; }
.bd-mat.bd-t-waste { background: radial-gradient(560px 300px at 50% 50%, rgba(191, 120, 56, .32), transparent 70%), linear-gradient(180deg, #3a2614, #22160b); border-color: #7a5428; }
.bd-mat.bd-t-waste::before { opacity: 1; background: repeating-linear-gradient(172deg, rgba(255, 183, 77, .07) 0 8px, transparent 8px 30px), repeating-linear-gradient(8deg, rgba(141, 110, 99, .06) 0 3px, transparent 3px 19px);
  animation: bdSand 16s linear infinite alternate; }
.bd-mat.bd-t-mount { background: radial-gradient(560px 300px at 50% 50%, rgba(120, 144, 156, .3), transparent 70%), linear-gradient(180deg, #1d2533, #10141d); border-color: #4f6070; }
.bd-mat.bd-t-mount::before { opacity: 1; background: radial-gradient(260px 60px at 28% 32%, rgba(236, 239, 241, .1), transparent 70%), radial-gradient(300px 70px at 74% 62%, rgba(236, 239, 241, .09), transparent 70%),
  radial-gradient(220px 50px at 50% 86%, rgba(236, 239, 241, .07), transparent 70%), linear-gradient(180deg, rgba(207, 216, 220, .06), transparent 35%, transparent 65%, rgba(0, 0, 0, .3));
  animation: bdMist 26s ease-in-out infinite alternate; }
.bd-mat.bd-t-meadow { background: radial-gradient(560px 300px at 50% 50%, rgba(139, 195, 74, .32), transparent 70%), linear-gradient(180deg, #1f3a18, #13260f); border-color: #5f8a2f; }
.bd-mat.bd-t-meadow::before { opacity: 1; background: repeating-linear-gradient(93deg, rgba(205, 220, 57, .035) 0 2px, transparent 2px 16px), radial-gradient(340px 90px at 50% 100%, rgba(255, 241, 118, .1), transparent 70%),
  radial-gradient(260px 70px at 50% 0, rgba(255, 241, 118, .06), transparent 70%);
  animation: bdSway 7s ease-in-out infinite alternate; }
.bd-mat.bd-t-sea { background: radial-gradient(560px 300px at 50% 50%, rgba(41, 121, 255, .32), transparent 70%), linear-gradient(180deg, #0b2a45, #061626); border-color: #2a6aa8; }
.bd-mat.bd-t-sea::before { opacity: 1; background: repeating-radial-gradient(ellipse 90px 22px at 50% 0, rgba(129, 212, 250, .06) 0 2px, transparent 2px 34px), radial-gradient(320px 90px at 50% 50%, rgba(129, 212, 250, .08), transparent 70%);
  animation: bdWaves 9s linear infinite; }
.bd-mat.bd-t-dark { background: radial-gradient(520px 280px at 50% 50%, rgba(123, 31, 162, .35), transparent 70%), linear-gradient(180deg, #120818, #06030a); border-color: #5b2a73; }
.bd-mat.bd-t-dark::before { opacity: 1; background: radial-gradient(circle at 50% 50%, transparent 30%, rgba(0, 0, 0, .55) 75%), conic-gradient(from 0deg at 50% 50%, rgba(186, 104, 200, .07), transparent 25%, rgba(186, 104, 200, .06) 50%, transparent 75%, rgba(186, 104, 200, .07));
  animation: bdSwirl 30s linear infinite; }
@keyframes bdDrift { from { transform: translate(-3%, -2%); } to { transform: translate(3%, 2%); } }
@keyframes bdSand { from { transform: translateX(-6%); } to { transform: translateX(6%); } }
@keyframes bdMist { from { transform: translateX(-5%); } to { transform: translateX(5%); } }
@keyframes bdSway { from { transform: skewX(-2deg); } to { transform: skewX(2deg); } }
@keyframes bdWaves { from { transform: translate(0, 0); } to { transform: translate(-60px, 18px); } }
@keyframes bdSwirl { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
/* the field's name in the middle, in its colour */
.bd-field.bd-ft-forest { color: #a5d6a7; border-color: rgba(129, 199, 132, .6); background: rgba(46, 125, 50, .25); }
.bd-field.bd-ft-waste { color: #ffcc80; border-color: rgba(255, 183, 77, .6); background: rgba(191, 120, 56, .25); }
.bd-field.bd-ft-mount { color: #cfd8dc; border-color: rgba(176, 190, 197, .6); background: rgba(84, 110, 122, .3); }
.bd-field.bd-ft-meadow { color: #e6ee9c; border-color: rgba(205, 220, 57, .6); background: rgba(124, 179, 66, .25); }
.bd-field.bd-ft-sea { color: #81d4fa; border-color: rgba(79, 195, 247, .6); background: rgba(21, 101, 192, .3); }
.bd-field.bd-ft-dark { color: #e1bee7; border-color: rgba(186, 104, 200, .6); background: rgba(74, 20, 140, .35); }
/* a monster the field helps (green) or hurts (red): a ring, and its sign with the points */
.bd-tile.bd-fb-up { box-shadow: 0 0 0 1px rgba(129, 199, 132, .9), 0 0 10px rgba(129, 199, 132, .5); }
.bd-tile.bd-fb-down { box-shadow: 0 0 0 1px rgba(239, 83, 80, .9), 0 0 10px rgba(239, 83, 80, .45); }
.bd-fb { position: absolute; right: 3px; bottom: 22%; z-index: 1; padding: 0 3px; border-radius: 4px; font-size: .72em; font-weight: 800; line-height: 1.35;
  background: rgba(10, 6, 24, .75); text-shadow: 0 1px 2px #000; white-space: nowrap; }
.bd-fb.bd-up-by { color: #a5d6a7; }
.bd-fb.bd-down-by { color: #ef9a9a; }

/* the effects' layer: over the mat, no clicks */
.bd-fx { position: absolute; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.bd-fx .fx { position: absolute; pointer-events: none; }
/* a card put down: grows in with a ring of light (a monster), slides in face down, turns over, a magic card shines in its colour */
.bd-zone::before { content: ""; position: absolute; inset: -5px; border-radius: 10px; pointer-events: none; opacity: 0; border: 2px solid var(--fx-ring, var(--gold2)); }
.bd-zone.fx-summon::before, .bd-zone.fx-cast::before, .bd-zone.fx-flip::before, .bd-zone.fx-fuse::before { animation: fxRing .9s ease-out; }
.bd-zone.fx-summon .bd-tile { animation: fxSummon .65s cubic-bezier(.2, .9, .3, 1.3); }
.bd-zone.fx-summon .bd-tile.bd-def { animation-name: fxSummonDef; }
.bd-zone.fx-set .bd-tile { animation: fxSet .5s ease-out; }
.bd-zone.fx-set .bd-tile.bd-def { animation-name: fxSetDef; }
.bd-zone.fx-flip .bd-tile { animation: fxFlip .55s ease-out; }
.bd-zone.fx-flip .bd-tile.bd-def { animation-name: fxFlipDef; }
.bd-zone.fx-cast .bd-tile { animation: fxCast .9s ease-out; }
.bd-zone.fx-c-magic { --fx-ring: #6aa8ff; }
.bd-zone.fx-c-trap { --fx-ring: #ef5350; }
.bd-zone.fx-c-equip { --fx-ring: #ffd978; }
.bd-zone.fx-c-ritual { --fx-ring: #ce93d8; }
.bd-zone.fx-pos .bd-tile { animation: fxPos .45s ease-out; }
.bd-zone.fx-up .bd-stats b { animation: fxStatUp 1s ease-out; }
.bd-zone.fx-down .bd-stats b { animation: fxStatDown 1s ease-out; }
/* a fusion: a burst of gold around the card it made */
.bd-zone.fx-fuse { --fx-ring: #ffd978; }
.bd-zone.fx-fuse::after { content: ""; position: absolute; inset: -40%; z-index: 2; pointer-events: none; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 217, 120, .55) 0 8deg, transparent 8deg 24deg); -webkit-mask: radial-gradient(circle, #000 20%, transparent 70%);
  mask: radial-gradient(circle, #000 20%, transparent 70%); animation: fxBurst 1.2s ease-out forwards; }
/* an attack: the attacker lunges at its target, a line of light between them, the target shakes */
.bd-p1 .bd-zone.fx-attacker .bd-tile { animation: fxLungeUp .6s ease-in-out; }
.bd-p2 .bd-zone.fx-attacker .bd-tile { animation: fxLungeDown .6s ease-in-out; }
.bd-p1 .bd-zone.fx-attacker .bd-tile.bd-def, .bd-p2 .bd-zone.fx-attacker .bd-tile.bd-def { animation: none; }
.bd-zone.fx-attacker .bd-tile, .bd-zone.fx-target .bd-tile { box-shadow: 0 0 0 2px rgba(239, 83, 80, .9), 0 0 16px rgba(239, 83, 80, .6); }
.bd-zone.fx-target .bd-tile { animation: fxHit .5s .25s ease-in-out; }
.bd-info.fx-target-lp { animation: fxHit .5s .25s ease-in-out; }
.fx-slash { height: 4px; margin-top: -2px; transform-origin: 0 50%; }
.fx-slash::before { content: ""; position: absolute; inset: 0; border-radius: 4px; transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff 30%, #ff5252); box-shadow: 0 0 10px #ff5252, 0 0 18px rgba(255, 82, 82, .6); animation: fxSlash .9s ease-out forwards; }
.fx-slash-star::before { background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff 30%, #ffd978); box-shadow: 0 0 10px #ffd978, 0 0 18px rgba(255, 217, 120, .6); }
.fx-slash-weak::before { background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff 30%, #b388ff); box-shadow: 0 0 10px #b388ff; }
/* a card gone: its ghost breaks up where it was */
.fx-ghost { display: grid; place-items: end center; padding: 4px; border-radius: 6px; overflow: hidden; font-size: 10px; font-weight: 700; color: #fff;
  text-shadow: 0 1px 2px #000; background: #2a1f50 center / cover no-repeat; border: 1px solid #ef5350; animation: fxGone 1s ease-in forwards; }
.fx-ghost-back { background: repeating-linear-gradient(45deg, #3b2a6e 0 6px, #2a1f50 6px 12px); }
.fx-ghost::after { content: ""; position: absolute; inset: -30%; background: radial-gradient(circle, rgba(255, 171, 64, .9), rgba(239, 83, 80, .5) 35%, transparent 65%);
  animation: fxBoom .7s ease-out forwards; }
/* numbers floating up: ATK changed on a card, life points over a player's bar */
.fx-num { display: grid; place-items: center; font-weight: 900; font-size: clamp(12px, 3.2vw, 18px); text-shadow: 0 1px 3px #000, 0 0 6px #000; animation: fxRise 1.3s ease-out forwards; }
.fx-num-up { color: #69f0ae; }
.fx-num-down { color: #ff8a80; }
.fx-lp { display: grid; place-items: center; font-weight: 900; font-size: clamp(22px, 6vw, 34px); text-shadow: 0 2px 4px #000, 0 0 10px #000; animation: fxRise 1.6s ease-out forwards; }
.fx-lp-hit { color: #ff5252; }
.fx-lp-heal { color: #69f0ae; }
.fx-lp-big { font-size: clamp(28px, 8vw, 46px); }
.fx-lp-top { animation-name: fxSink; } /* (the top player's: sinks, rising it would leave the mat) */
@keyframes fxSink { 0% { opacity: 0; transform: translateY(-10px) scale(.8); } 15% { opacity: 1; transform: translateY(0) scale(1.1); } 100% { opacity: 0; transform: translateY(36px) scale(1); } }
/* the mat shaken by a heavy blow; the field changing sweeps a light across; the winner's glow, its cup and confetti */
.bd-mat.fx-shake { animation: fxShake .6s ease-in-out; }
.bd-mat::after { content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .22) 50%, transparent 70%); }
.bd-mat.fx-terrain::after { animation: fxSweep 1.4s ease-out; }
.bd-mat.fx-win { box-shadow: inset 0 0 0 2px rgba(255, 217, 120, .6), inset 0 0 60px rgba(233, 185, 73, .35); }
.fx-banner { display: grid; place-items: center; font-weight: 900; font-size: clamp(16px, 4.6vw, 26px); letter-spacing: .5px; color: #fff; border-radius: 12px;
  text-shadow: 0 2px 6px #000; animation: fxBanner 1.6s ease-out forwards; }
.fx-banner-forest { background: linear-gradient(90deg, transparent, rgba(46, 125, 50, .85), transparent); }
.fx-banner-waste { background: linear-gradient(90deg, transparent, rgba(191, 120, 56, .85), transparent); }
.fx-banner-mount { background: linear-gradient(90deg, transparent, rgba(84, 110, 122, .9), transparent); }
.fx-banner-meadow { background: linear-gradient(90deg, transparent, rgba(124, 179, 66, .85), transparent); }
.fx-banner-sea { background: linear-gradient(90deg, transparent, rgba(21, 101, 192, .9), transparent); }
.fx-banner-dark { background: linear-gradient(90deg, transparent, rgba(74, 20, 140, .9), transparent); }
.fx-banner-plain { background: linear-gradient(90deg, transparent, rgba(52, 41, 95, .9), transparent); }
/* (16/11) a magic card / trap / ritual used (view.js boardEvent): its name over the user's magic row, in its kind's colour */
.fx-cast-banner { font-size: clamp(14px, 3.8vw, 22px); padding: 0 10px; text-align: center; animation-duration: 2.2s; }
.fx-cast-mid { left: 10%; right: 10%; top: 42%; height: 16%; }
.fx-cb-magic { background: linear-gradient(90deg, transparent, rgba(30, 90, 190, .92), transparent); }
.fx-cb-trap { background: linear-gradient(90deg, transparent, rgba(183, 28, 28, .92), transparent); }
.fx-cb-ritual { background: linear-gradient(90deg, transparent, rgba(106, 27, 154, .92), transparent); }
.fx-cb-equip { background: linear-gradient(90deg, transparent, rgba(176, 125, 20, .92), transparent); }
.bd-mat.fx-cast-mat { animation: fxCastMat .9s ease-out; }
.bd-mat.fx-cm-magic { --fx-cast: rgba(106, 168, 255, .55); }
.bd-mat.fx-cm-trap { --fx-cast: rgba(239, 83, 80, .55); }
.bd-mat.fx-cm-ritual { --fx-cast: rgba(206, 147, 216, .55); }
.bd-mat.fx-cm-equip { --fx-cast: rgba(255, 217, 120, .55); }
@keyframes fxCastMat { 0% { box-shadow: inset 0 0 0 0 transparent; } 35% { box-shadow: inset 0 0 70px 8px var(--fx-cast, rgba(106, 168, 255, .55)); } 100% { box-shadow: inset 0 0 0 0 transparent; } }
.bd-mid.fx-turn { animation: fxTurn 1.1s ease-out; }
.fx-confetti { top: -14px; width: 8px; height: 12px; border-radius: 2px; animation: fxFall 2.8s ease-in forwards; }
.fx-cf0 { background: #ffd978; } .fx-cf1 { background: #6aa8ff; } .fx-cf2 { background: #e0525f; }
.fx-cf3 { background: #5bd08a; } .fx-cf4 { background: #ce93d8; } .fx-cf5 { background: #fff; }
.fx-crown { display: grid; place-items: center; font-size: clamp(28px, 7vw, 44px); animation: fxCrown 3s ease-out forwards; }
@keyframes fxRing { 0% { opacity: 1; transform: scale(.85); } 100% { opacity: 0; transform: scale(1.25); } }
@keyframes fxSummon { 0% { transform: scale(.4); opacity: 0; filter: brightness(2.4); } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); filter: none; } }
@keyframes fxSummonDef { 0% { transform: translateY(-50%) scale(.4); opacity: 0; filter: brightness(2.4); } 60% { transform: translateY(-50%) scale(1.08); opacity: 1; } 100% { transform: translateY(-50%) scale(1); filter: none; } }
@keyframes fxSet { 0% { transform: translateY(40%); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes fxSetDef { 0% { transform: translateY(-10%); opacity: 0; } 100% { transform: translateY(-50%); opacity: 1; } }
@keyframes fxFlip { 0% { transform: perspective(420px) rotateY(90deg); filter: brightness(1.8); } 100% { transform: perspective(420px) rotateY(0); filter: none; } }
@keyframes fxFlipDef { 0% { transform: translateY(-50%) perspective(420px) rotateY(90deg); filter: brightness(1.8); } 100% { transform: translateY(-50%) perspective(420px) rotateY(0); filter: none; } }
@keyframes fxCast { 0% { filter: brightness(2.2) saturate(1.4); } 100% { filter: none; } }
@keyframes fxPos { 0% { filter: brightness(1.6); opacity: .4; } 100% { filter: none; opacity: 1; } }
@keyframes fxStatUp { 0% { color: #69f0ae; text-shadow: 0 0 8px #69f0ae; } 100% { color: inherit; text-shadow: inherit; } }
@keyframes fxStatDown { 0% { color: #ff8a80; text-shadow: 0 0 8px #ff8a80; } 100% { color: inherit; text-shadow: inherit; } }
@keyframes fxBurst { 0% { opacity: 0; transform: scale(.3) rotate(0deg); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.3) rotate(60deg); } }
@keyframes fxLungeUp { 0%, 100% { transform: none; } 45% { transform: translateY(-22%) scale(1.06); } }
@keyframes fxLungeDown { 0%, 100% { transform: none; } 45% { transform: translateY(22%) scale(1.06); } }
@keyframes fxHit { 0%, 100% { translate: 0 0; } 20% { translate: -4px 0; } 40% { translate: 4px 0; } 60% { translate: -3px 0; } 80% { translate: 2px 0; } }
@keyframes fxSlash { 0% { transform: scaleX(0); opacity: 1; } 45% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes fxGone { 0% { opacity: 1; transform: none; filter: none; } 35% { opacity: 1; transform: scale(1.06) rotate(-2deg); filter: brightness(2) saturate(0); }
  100% { opacity: 0; transform: scale(.55) rotate(9deg); filter: blur(4px) brightness(.4); } }
@keyframes fxBoom { 0% { opacity: 0; transform: scale(.2); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.4); } }
@keyframes fxRise { 0% { opacity: 0; transform: translateY(10px) scale(.8); } 15% { opacity: 1; transform: translateY(0) scale(1.1); } 100% { opacity: 0; transform: translateY(-36px) scale(1); } }
@keyframes fxShake { 0%, 100% { translate: 0 0; } 15% { translate: -6px 2px; } 30% { translate: 6px -2px; } 45% { translate: -5px 1px; } 60% { translate: 4px -1px; } 80% { translate: -2px 0; } }
@keyframes fxSweep { 0% { opacity: 1; transform: translateX(-100%); } 100% { opacity: 1; transform: translateX(100%); } }
@keyframes fxBanner { 0% { opacity: 0; transform: scale(.7); } 15% { opacity: 1; transform: scale(1.04); } 75% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1); } }
@keyframes fxTurn { 0% { background-color: rgba(233, 185, 73, .3); box-shadow: 0 0 0 1px rgba(233, 185, 73, .6); } 100% { background-color: transparent; box-shadow: none; } }
@keyframes fxFall { 0% { transform: translateY(0) rotate(0deg); opacity: 1; } 100% { transform: translateY(520px) rotate(620deg); opacity: 0; } }
@keyframes fxCrown { 0% { opacity: 0; transform: translateY(10px) scale(.5); } 20% { opacity: 1; transform: translateY(-6px) scale(1.15); } 80% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .bd-mat::before, .bd-mat::after { animation: none !important; }
  .bd-fx { display: none; }
  .bd-zone[class*="fx-"] .bd-tile, .bd-zone[class*="fx-"] .bd-stats b, .bd-zone::before, .bd-zone::after, .bd-mat.fx-shake, .bd-mid.fx-turn, .bd-info.fx-target-lp { animation: none !important; }
}
/* (16/11) the home page's board of ideas for Season 2 (feedback.js) */
.s2-season { margin: 8px 0 12px; padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(233, 185, 73, .45); background: rgba(233, 185, 73, .08); font-size: 14px; }
.s2-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.s2-tab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: transparent;
  color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.s2-tab:hover { color: var(--text); border-color: var(--gold); }
.s2-tab.on { color: var(--gold2); border-color: var(--gold); background: rgba(233, 185, 73, .14); }
.s2-tab .s2-n { min-width: 20px; padding: 0 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); font-size: 12px; text-align: center; }
.s2-tab .s2-avg { color: #ffd34d; font-size: 12px; }
.s2-form { display: grid; gap: 8px; margin: 0 0 14px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.s2-parts { display: flex; flex-wrap: wrap; gap: 6px; }
.s2-part { padding: 6px 12px; border-radius: 10px; border: 1px solid var(--line); background: #120e26; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.s2-part.on { border-color: var(--gold); background: rgba(233, 185, 73, .16); color: var(--gold2); font-weight: 700; }
.s2-part small { color: var(--muted); font-weight: 500; }
.s2-rate { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.s2-stars { display: inline-flex; gap: 2px; }
.s2-star { padding: 0 2px; border: 0; background: none; color: rgba(255, 211, 77, .45); font-size: 24px; line-height: 1; cursor: pointer; }
.s2-star.on { color: #ffd34d; }
.s2-star:focus-visible { outline: 2px solid var(--gold); border-radius: 4px; }
.s2-form textarea, .s2-edit textarea { width: 100%; min-height: 90px; resize: vertical; padding: 9px 11px; line-height: 1.45; }
.s2-gate { padding: 9px 12px; border-radius: 10px; border: 1px dashed var(--line); }
.s2-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.s2-empty { color: var(--muted); padding: 12px; text-align: center; border: 1px dashed var(--line); border-radius: 10px; }
.s2-item { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #120e26; }
.s2-item.mine { border-color: rgba(233, 185, 73, .45); }
.s2-item.hidden-one { opacity: .55; border-style: dashed; }
.s2-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 14px; }
.s2-name { color: var(--gold2); }
.s2-stars-of { color: #ffd34d; letter-spacing: 1px; }
.s2-time { margin-left: auto; color: var(--muted); font-size: 12px; }
.s2-status { padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; border: 1px solid var(--line); }
.s2-st-seen { color: #a9cdff; border-color: rgba(124, 182, 255, .5); }
.s2-st-planned { color: #5bd08a; border-color: rgba(91, 208, 138, .55); }
.s2-st-done { color: #1b1230; background: #5bd08a; border-color: #5bd08a; }
.s2-st-no { color: var(--muted); }
.s2-hidden-tag { color: var(--red); font-size: 12px; }
.s2-text { margin: 6px 0 0; white-space: pre-line; overflow-wrap: anywhere; line-height: 1.5; }
.s2-note-back { margin: 8px 0 0; padding: 7px 10px; border-left: 3px solid var(--gold); background: rgba(233, 185, 73, .07); border-radius: 0 8px 8px 0; font-size: 14px; white-space: pre-line; }
.s2-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.s2-agree.on { border-color: var(--gold); background: rgba(233, 185, 73, .18); color: var(--gold2); }
.s2-master { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 100%; }
.s2-master select { padding: 5px 6px; font-size: 13px; }
.s2-master .s2-note-in { flex: 1 1 180px; min-width: 0; padding: 5px 8px; font-size: 13px; }
.s2-edit { display: grid; gap: 6px; margin-top: 6px; }
@media (max-width: 560px) { .s2-time { margin-left: 0; flex-basis: 100%; } }
/* (16/11) a tournament's start time come with too few signed up (tours.js dueHtml); its managers (the admin's) */
.tour-due { margin: 10px 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--gold); background: rgba(233, 185, 73, .1); }
.tour-due .actions { margin-top: 8px; }
.tour-crew { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.tour-crew h4 { margin: 0 0 4px; }
.tour-crew-list { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tour-crew-list li { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 99px; border: 1px solid var(--line); font-size: 14px; }
.tour-crew-list li.muted { padding: 3px 10px; color: var(--muted); }
.tour-crew-add { display: flex; gap: 6px; flex-wrap: wrap; }
.tour-crew-add input { flex: 1 1 180px; min-width: 0; }
/* (16/11) the time left to come to a tournament match's room (tours.js lateHtml, nowHtml) */
.tour-late { margin: 6px 0 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--gold); background: rgba(233, 185, 73, .08); }
.tour-late.ok { border-color: var(--line); background: none; }
.tour-left { font-variant-numeric: tabular-nums; }
.tn-left { white-space: nowrap; }
.tn-came { font-style: normal; color: var(--green); }
/* (16/11) the player's tournaments' notice (app.js showTourAlert): at the foot of every page but a duel's (nothing over
   the game: hidden then); opaque, no backdrop-filter */
.tour-alert { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 60; width: min(760px, calc(100% - 24px));
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 14px;
  background: #241c47; border: 1px solid var(--line); box-shadow: 0 8px 30px rgba(0, 0, 0, .5); font-size: 14px; line-height: 1.45; }
.tour-alert.urgent { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(233, 185, 73, .25), 0 8px 30px rgba(0, 0, 0, .5); }
.tour-alert .ta-text { flex: 1 1 260px; min-width: 0; }
.tour-alert .ta-text b[data-until] { font-variant-numeric: tabular-nums; color: var(--gold); }
.tour-alert .ta-acts { display: flex; gap: 6px; }
.tour-alert .ta-close { margin-left: auto; }

/* ==== (16/11 night, the owner: "Giao diện hiện tại theo kiểu từ trên xuống nhìn giống giống nhau nên rất xấu"; the design
   approved: "Ok giao diện") each area its colour and its view (app.js setView, body[data-view]); the home page's own blocks
   (home.js); the phone's tab bar. Nothing here is drawn over the game (#site is hidden in a duel). ==== */
:root {
  --duel: #ff5d73; --duel2: rgba(255, 93, 115, .15);
  --trip: #3fd6b0; --trip2: rgba(63, 214, 176, .14);
  --tour: #f2bd4b; --tour2: rgba(242, 189, 75, .15);
  --talk: #6aa8ff; --talk2: rgba(106, 168, 255, .14);
  --rank: #b48cff; --rank2: rgba(180, 140, 255, .15);
}
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
main { max-width: 1180px; }
/* a view shows its own blocks only */
body[data-view="home"] #site [data-v]:not([data-v~="home"]),
body[data-view="duel"] #site [data-v]:not([data-v~="duel"]),
body[data-view="trip"] #site [data-v]:not([data-v~="trip"]),
body[data-view="tour"] #site [data-v]:not([data-v~="tour"]),
body[data-view="rank"] #site [data-v]:not([data-v~="rank"]),
body[data-view="talk"] #site [data-v]:not([data-v~="talk"]),
body[data-view="help"] #site [data-v]:not([data-v~="help"]) { display: none !important; }
/* (signed in, all ready: the profile card says the setup; ⚙ Thiết lập opens it) */
body.signed[data-view="home"] #setup.folded { display: none; }
/* each area's colour */
.v-home { --c: #f3eeff; --c2: rgba(255, 255, 255, .08); }
.v-duel, #versus, #lobby, #room, #watch, #home-live, .mode.duel { --c: var(--duel); --c2: var(--duel2); }
.v-trip, #journey, #jranks, .mode.trip { --c: var(--trip); --c2: var(--trip2); }
.v-tour, #tours, .mode.tour { --c: var(--tour); --c2: var(--tour2); }
.v-rank, #ranks, #home-podium { --c: var(--rank); --c2: var(--rank2); }
.v-talk, #site-chat, #season2, .s2-board { --c: var(--talk); --c2: var(--talk2); }
.v-help, #help { --c: #c9c2e8; --c2: rgba(201, 194, 232, .1); }
#setup { --c: var(--gold); --c2: rgba(233, 185, 73, .14); }
/* a block's head: its colour band, its mark */
#site .card[data-v] { border-top: 3px solid var(--c, var(--line)); }
#site .card[data-v] > h2 { margin: -18px -20px 14px; padding: 12px 20px; border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--c2, transparent), transparent 75%); }
#site .card[data-v] > h2 .step { background: var(--c, var(--gold)); color: #170f2c; }
#site .card[data-v] > h2 .more { margin-left: auto; }
#setup.folded > h2 { border-bottom: 0; }

/* the header: the disc, the menu */
.disc-pill { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 11px; border-radius: 99px; border: 1px solid rgba(255, 170, 80, .6);
  background: rgba(255, 150, 60, .1); color: #ffc98a; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.disc-pill.ok { border-color: rgba(91, 208, 138, .45); background: rgba(91, 208, 138, .08); color: #a5f0c4; }
.more-menu { position: relative; }
.more-menu > summary { list-style: none; cursor: pointer; min-width: 38px; }
.more-menu > summary::-webkit-details-marker { display: none; }
.more-menu .menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 230px; display: grid; gap: 2px; padding: 6px;
  border-radius: 12px; background: #1d1640; border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
.more-menu .menu a, .more-menu .menu button { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; border-radius: 8px; border: 0;
  background: none; color: var(--text); font: inherit; font-size: 14px; text-decoration: none; text-align: left; cursor: pointer; }
.more-menu .menu a:hover, .more-menu .menu button:hover { background: rgba(255, 255, 255, .06); }
.more-menu .menu [hidden] { display: none; }

/* the views' nav (wide screens): each area's colour, even when not chosen */
.vnav { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 6px; padding: 6px; border-radius: 14px; background: #130e29; border: 1px solid #241c45; }
.vnav a { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 10px; color: #cfc8ec; font-weight: 700; font-size: 14px;
  text-decoration: none; white-space: nowrap; }
.vnav a::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--c); }
.vnav a:hover { background: rgba(255, 255, 255, .04); }
.vnav a.on { color: #fff; background: var(--c2); box-shadow: inset 0 -3px 0 var(--c); }
.vbadge { font-size: 11.5px; line-height: 18px; padding: 0 7px; border-radius: 99px; background: var(--c); color: #1c1233; font-weight: 700; }
/* a view's band: its name, a line of what it is */
.vband { margin: 6px 0 4px; padding: 16px 18px; border-radius: 16px; background: linear-gradient(180deg, var(--c2), transparent); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.vband .vb-in { display: flex; align-items: center; gap: 14px; }
.vband .vb-ic { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--c2); border: 1px solid var(--c); }
.vband h1 { margin: 0; font-size: 24px; line-height: 1.2; }
.vband p { margin: 2px 0 0; color: #ddd5f7; font-size: 14.5px; }

/* home: continue, who I am */
.home-row { display: grid; grid-template-columns: 1.75fr 1fr; gap: 14px; margin: 10px 0 0; }
.home-row:has(> .cont[hidden]) { grid-template-columns: 1fr; }
.home-row:has(> .prof[hidden]) { grid-template-columns: 1fr; }
.cont { position: relative; overflow: hidden; border-radius: 18px; padding: 18px 20px; background: radial-gradient(420px 220px at 95% 0%, var(--c2), transparent 70%), var(--card);
  border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); }
.cont .k { color: var(--c); font-weight: 700; font-size: 14px; }
.cont h2 { margin: 2px 0 6px; font-size: 23px; line-height: 1.25; }
.cont .okb { display: inline-block; font-size: 12.5px; vertical-align: middle; padding: 2px 10px; border-radius: 99px; background: rgba(91, 208, 138, .15); color: #8ff0b5;
  border: 1px solid rgba(91, 208, 138, .45); margin-left: 6px; }
.cont p { margin: 0; color: #ddd5f7; max-width: 600px; position: relative; }
.cont .when { display: inline-flex; align-items: baseline; gap: 10px; margin-top: 12px; padding: 7px 14px; border-radius: 14px; background: rgba(0, 0, 0, .3);
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); position: relative; }
.cont .when b { font-size: 24px; color: var(--c); line-height: 1.1; font-variant-numeric: tabular-nums; }
.cont .acts { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; position: relative; }
.cont .alt { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px; border-radius: 12px; border: 1px dashed rgba(63, 214, 176, .6);
  background: none; color: #a9f2df; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.cont .art { position: absolute; right: 16px; bottom: 10px; width: 170px; height: 130px; opacity: .85; pointer-events: none; }
.btn.go { background: var(--c); border-color: var(--c); color: #160f2b; font-weight: 700; }
.btn.go:hover { filter: brightness(1.08); }
.btn.line { background: transparent; border-color: var(--c); color: var(--c); }
.prof { border-radius: 18px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); }
.prof .who { display: flex; align-items: center; gap: 12px; }
.prof .who b { font-size: 18px; }
.prof dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; margin: 12px 0 0; font-size: 14px; }
.prof dt { color: var(--muted); }
.prof dd { margin: 0; }
.prof dd b { color: var(--gold2); }
.prof .discline { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13.5px; color: #a5f0c4; }
.prof .discline.bad { color: #ffc98a; }
.prof .discline .btn { margin-left: auto; }
/* a name's initial in a circle, its colour from the name (home.js avOf: no style attribute, the page's CSP) */
.hav { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; font-weight: 700; font-size: 13px; color: #170f2c; background: #c7b3ff; }
.hav.big { width: 46px; height: 46px; font-size: 19px; }
.hav.h1 { background: #ff9fb0; } .hav.h2 { background: #ffd27a; } .hav.h3 { background: #8ff0c8; } .hav.h4 { background: #8cc4ff; }
.hav.h5 { background: #d6a8ff; } .hav.h6 { background: #ffb98a; } .hav.h7 { background: #a6e9ff; }

/* home: the modes as cards of the game (a frame, a name plate, a picture window, a stat bar like ATK/DEF) */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 14px 0 0; }
.mode { position: relative; border-radius: 16px; padding: 7px; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 72%, #fff 8%), color-mix(in srgb, var(--c) 35%, #000 42%));
  box-shadow: 0 12px 28px rgba(0, 0, 0, .4); }
.mode .in { position: relative; border-radius: 10px; background: var(--card); padding: 10px 12px 12px; height: 100%; display: flex; flex-direction: column; border: 1px solid rgba(0, 0, 0, .5); }
.mode .plate { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; background: linear-gradient(90deg, rgba(0, 0, 0, .45), rgba(0, 0, 0, .15));
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); }
.mode .plate b { font-size: 18px; }
.mode .plate .lv { margin-left: auto; font-size: 12.5px; color: var(--c); font-weight: 700; }
.mode .win { position: relative; margin: 10px 0 8px; height: 124px; border-radius: 8px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(160px 110px at 50% 55%, var(--c2), transparent 70%), repeating-linear-gradient(45deg, rgba(255, 255, 255, .025) 0 6px, transparent 6px 12px), #120d26;
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.mode .win .art { width: 160px; height: 112px; }
.mode .lock { position: absolute; top: 8px; right: 8px; z-index: 1; font-size: 12.5px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: rgba(0, 0, 0, .65);
  border: 1px solid #6b5bb0; color: #e3ddff; }
.mode .desc { font-size: 13.5px; color: #d5cdf2; min-height: 40px; }
.mode .stat { display: flex; justify-content: flex-end; gap: 14px; margin-top: 8px; padding: 6px 10px; border-radius: 6px; background: rgba(0, 0, 0, .35);
  border-top: 1px solid color-mix(in srgb, var(--c) 40%, transparent); font-size: 13px; color: #cfc7ee; white-space: nowrap; overflow: hidden; }
.mode .stat b { color: var(--c); font-size: 15px; }
.mode .act { margin-top: 10px; }
.mode .act .btn { width: 100%; min-height: 44px; }
.mode .act .btn.off { background: #2a2350; border-color: #3a3170; color: #b3abd8; }

/* home: the Season 2 board, a pin board with notes */
.s2-board { margin: 14px 0 0; padding: 14px 16px; border-radius: 16px; background: repeating-linear-gradient(0deg, rgba(106, 168, 255, .05) 0 1px, transparent 1px 28px), #17203d;
  border: 1px solid rgba(106, 168, 255, .4); }
.s2-board h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text); }
.s2-board h3 .meta { color: var(--muted); font-weight: 400; font-size: 13px; }
.s2-board h3 .btn { margin-left: auto; }
.s2-board .notes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.s2-note { position: relative; padding: 14px 12px 10px; border-radius: 4px; background: #f7eab0; color: #2b2410; font-size: 13.5px; box-shadow: 0 6px 14px rgba(0, 0, 0, .35);
  transform: rotate(-1deg); cursor: pointer; text-align: left; border: 0; font-family: inherit; line-height: 1.45; }
.s2-note:nth-child(2) { transform: rotate(.8deg); background: #cfe4ff; }
.s2-note::before { content: "📌"; position: absolute; top: -11px; left: 50%; transform: translateX(-50%); font-size: 16px; }
.s2-note b { color: #3a2a00; }
.s2-note .lk { float: right; font-weight: 700; color: #5a4300; }
.s2-note .tx { display: block; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* home: two columns (what is on now | the chat and the podium); Cộng đồng: the chat alone, wide */
.home-cols { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 14px; align-items: start; }
body[data-view="talk"] .home-cols { display: block; }
.col-side > .card:first-child, .col-main > .card:first-child { margin-top: 14px; }
/* what is on now: matches as VS cards, rooms waiting, the last results */
.vsr { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px;
  background: linear-gradient(90deg, var(--duel2), transparent 35%, transparent 65%, var(--duel2)), #231b46; border: 1px solid var(--line); }
.vsr + .vsr, .vsr + .waitr, .waitr + .waitr, .waitr + .vsr { margin-top: 8px; }
.vsr .side { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vsr .side b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vsr .side.r { justify-content: flex-end; text-align: right; }
.vsr .mid { text-align: center; min-width: 70px; }
.vsr .vb { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #2a1030; border: 2px solid var(--duel); color: #ffb3bf; font-weight: 700; font-size: 13px; }
.vsr .mid small { display: block; font-size: 12px; color: var(--muted); }
.vsr.tm { background: linear-gradient(90deg, var(--tour2), transparent 35%, transparent 65%, var(--tour2)), #231b46; }
.vsr.tm .vb { border-color: var(--tour); color: var(--gold2); background: #2a2010; }
.waitr { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px dashed rgba(91, 208, 138, .55); background: rgba(91, 208, 138, .06); }
.waitr .grow { flex: 1; min-width: 0; }
.home-sub { margin: 14px 0 6px; font-size: 13px; color: var(--muted); font-weight: 700; }
.ticker { display: flex; gap: 8px; flex-wrap: wrap; }
.tk { padding: 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); font-size: 13px; }
.tk b { color: #ffc2cb; }
/* the podium */
.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; align-items: end; margin-top: 4px; }
.pod { text-align: center; min-width: 0; }
.pod .nm { display: block; font-size: 13px; font-weight: 700; margin: 4px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod .blk { border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, var(--c2), rgba(0, 0, 0, .2)); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  display: grid; place-items: center; font-weight: 700; color: var(--c); font-size: 18px; }
.pod.p1 .blk { height: 88px; } .pod.p2 .blk { height: 68px; } .pod.p3 .blk { height: 54px; }
.pod .blk small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.prk { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 4px; border-bottom: 1px solid rgba(255, 255, 255, .05); font-size: 14px; }
.prk i { font-style: normal; text-align: center; font-weight: 700; color: var(--muted); }
.prk b.s { color: var(--c); }
.prk.mine { background: var(--c2); border-radius: 8px; border-bottom: 0; }

/* the phone's tab bar; hidden on wide screens, where the nav is */
.tabbar { display: none; }
@media (max-width: 760px) {
  .vnav { display: none; }
  body:not(:has(#game:not([hidden]))) { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(64px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom); background: #120d26; border-top: 1px solid #2a2150; }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #c4bce4; font-size: 12px; font-weight: 700; text-decoration: none; }
  .tabbar a .i { font-size: 20px; line-height: 1; }
  .tabbar a.on { color: var(--c); box-shadow: inset 0 3px 0 var(--c); background: var(--c2); }
  .tabbar .vbadge { position: absolute; top: 5px; left: 54%; font-size: 10.5px; line-height: 16px; padding: 0 5px; }
  .tour-alert { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .home-row { grid-template-columns: 1fr; }
  .prof { display: none; }
  .home-cols { grid-template-columns: minmax(0, 1fr); }
  .cont { padding: 14px 16px; }
  .cont h2 { font-size: 19px; }
  .cont .art { display: none; }
  .cont .acts .btn { flex: 1; }
  .cont .alt { width: 100%; justify-content: center; }
  .vband { padding: 12px 14px; }
  .vband h1 { font-size: 20px; }
  .vband .vb-ic { width: 40px; height: 40px; font-size: 20px; }
  .vband p { font-size: 13.5px; }
  .s2-board .notes { grid-template-columns: 1fr; }
  .s2-board h3 .meta { display: none; }
}
@media (max-width: 600px) {
  /* the three modes on the first screen: a row of three small cards */
  .modes { gap: 8px; }
  .mode { padding: 5px; border-radius: 14px; }
  .mode .in { padding: 6px 6px 8px; align-items: center; text-align: center; }
  .mode .plate { padding: 4px 6px; justify-content: center; width: 100%; }
  .mode .plate b { font-size: 13.5px; }
  .mode .plate .lv, .mode .desc, .mode .plate .ico { display: none; }
  .mode .win { height: 62px; margin: 6px 0 4px; width: 100%; }
  .mode .win .art { width: 74px; height: 54px; }
  .mode .lock { font-size: 11px; padding: 1px 6px; top: 4px; right: 4px; }
  .mode .stat { flex-direction: column; gap: 0; align-items: center; padding: 4px; width: 100%; margin-top: 2px; font-size: 12px; }
  .mode .stat span + span { display: none; }
  .mode .act { margin-top: auto; padding-top: 8px; width: 100%; }
  .mode .act .btn { min-height: 42px; padding: 0 4px; font-size: 13px; }
  .vsr { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .vsr > .btn { grid-column: 1 / -1; }
  .vsr .side .hav { display: none; }
  .disc-pill .lbl { display: none; }
}
/* (16/11 night) a tournament's word in a Hành trình game: in its bar, never over the picture (app.js showTourAlert) */
#game-tour { border-color: var(--gold); color: var(--gold2); }

/* (16/11 night, the redesign's first look) the continue card's colours; no hero once signed in; an area's main button in its
   colour; the head band's margins match the card's padding (14px on narrow screens); the phone's header and mode buttons */
.cont.duel { --c: var(--duel); --c2: var(--duel2); } .cont.trip { --c: var(--trip); --c2: var(--trip2); } .cont.tour { --c: var(--tour); --c2: var(--tour2); }
body.signed #hero { display: none; }
#site .card[data-v]:not(#setup):not(#tours) .btn.primary { background: var(--c); border-color: var(--c); color: #160f2b; }
.brand .eye { flex: none; }
.modes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mode .act .btn { white-space: normal; line-height: 1.2; }
@media (max-width: 760px) {
  #site .card[data-v] > h2 { margin: -14px -14px 12px; padding: 10px 14px; }
}
@media (max-width: 600px) {
  .top .choco-link .cl-name { display: none; }
  .top .choco-link { margin-left: 4px; }
  .top { gap: 5px; }
  .more-menu > summary { min-width: 34px; padding: 0 8px; }
}
@media (max-width: 600px) { .mode .stat .lg, .mode .lock { display: none; } }
/* (16/11 night, the redesign's audit) the lobby entered: 1 vs 1's view shows it, not the setup; the home's chat (the lobby's own
   is the same, its socket has it) gives way to a pointer to the lobby */
body.in-lobby[data-view="duel"] #setup, body.in-lobby #site-chat { display: none; }
.lobby-chat-note { display: none; margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--talk2); border: 1px solid rgba(106, 168, 255, .45); font-size: 14px; }
body.in-lobby .lobby-chat-note { display: block; }
/* the ⋯ menu: anchored to the header (within the screen on a phone); the old header rules for its items undone */
.more-menu { position: static; }
.more-menu .menu { right: 8px; top: calc(100% - 4px); max-width: calc(100vw - 16px); }
.more-menu .menu #open-keys, .more-menu .menu .install { margin: 0; }
.more-menu .menu .install .lbl { display: inline !important; }
/* a phone's header: room for a long account name (the online count is on the home's 1 vs 1 card) */
@media (max-width: 430px) {
  .top .online { display: none !important; }
  .top .acct { max-width: 32vw; }
}
/* (the audit's second look) a phone's header: the brand keeps its width, a long account name is cut instead */
@media (max-width: 430px) {
  .top .brand { flex: none; }
  .top .acct { min-width: 0; flex: 0 1 auto; }
}
/* (17/11, the live page's first look) the lock on the picture window's corner, not over the name plate's words */
@media (min-width: 601px) { .mode .lock { top: 62px; right: 22px; } }
