/* Node Review: the pages. Boards, walls and the editor, the stat explorer, the hand list,
   the loader (replayer) and the results graph. Tokens only (tokens.css). */

/* ---------- boards ---------- */
.board-main { margin: -8px 0 20px; }
.ribbon { margin-bottom: 24px; }
.report .tabs.sub { margin-bottom: 12px; }
.report .tab .close { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 6px; margin-right: -4px; border-radius: 50%; font-size: 13px; line-height: 1; opacity: 0; transition: opacity var(--dur) var(--ease); }
.report .tab:hover .close { opacity: .6; }
.report .tab .close:hover { opacity: 1; background: var(--fill-3); }
.report-table .tbl th { background: var(--bg-1); }
.report-table .tbl td a { cursor: pointer; }
.soon-panel { max-width: 640px; }
.soon-panel p { margin: 8px 0 0; }
.pop.library { width: 300px; }
.pop.library .item { height: auto; padding: 8px 10px; align-items: flex-start; text-align: left; }

/* ---------- walls: containers of cells ---------- */
.wall-view { padding-bottom: 8px; }
.ct.root > .ct-body { overflow-x: auto; }
.ct { display: flex; flex-direction: column; min-width: 0; }
.ct-body { min-width: 0; flex: 1; }
.ct.nested { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.ct.tabbed.side-top { flex-direction: column; }
.ct.tabbed.side-bottom { flex-direction: column-reverse; }
.ct.tabbed.side-left { flex-direction: row; }
.ct.tabbed.side-right { flex-direction: row-reverse; }
.ct-strip { display: flex; gap: 2px; flex-shrink: 0; }
.ct.side-top > .ct-strip, .ct.side-bottom > .ct-strip { align-items: flex-end; padding: 0 8px; overflow-x: auto; scrollbar-width: none; }
.ct.side-top > .ct-strip { border-bottom: 1px solid var(--line); }
.ct.side-bottom > .ct-strip { border-top: 1px solid var(--line); align-items: flex-start; }
.ct.side-left > .ct-strip, .ct.side-right > .ct-strip { flex-direction: column; width: 184px; padding: 8px; }
.ct.side-left > .ct-strip { border-right: 1px solid var(--line); }
.ct.side-right > .ct-strip { border-left: 1px solid var(--line); }
.ct.root.side-left > .ct-strip, .ct.root.side-right > .ct-strip { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-l); align-self: flex-start; position: sticky; top: 84px; }
.ct.root.side-left > .ct-body { padding-left: 20px; }
.ct.root.side-right > .ct-body { padding-right: 20px; }
.ct.root.side-top > .ct-body { padding-top: 16px; }
.ct.root.side-bottom > .ct-body { padding-bottom: 16px; }
.ct-tab {
  height: auto; border: 0; background: transparent; color: var(--text-3); font-weight: 500; font-size: var(--fs-s);
  border-radius: 0; padding: 9px 11px 8px; white-space: nowrap;
}
.ct-tab:hover:not(:disabled) { background: transparent; color: var(--text-2); }
.ct.side-top > .ct-strip > .ct-tab { border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ct.side-top > .ct-strip > .ct-tab.on { color: var(--text-strong); border-bottom-color: var(--accent); }
.ct.side-bottom > .ct-strip > .ct-tab { border-top: 2px solid transparent; margin-top: -1px; }
.ct.side-bottom > .ct-strip > .ct-tab.on { color: var(--text-strong); border-top-color: var(--accent); }
.ct.side-left > .ct-strip > .ct-tab, .ct.side-right > .ct-strip > .ct-tab { justify-content: flex-start; padding: 7px 10px; border-radius: var(--r-s); color: var(--text-2); font-size: var(--fs); }
.ct.side-left > .ct-strip > .ct-tab:hover, .ct.side-right > .ct-strip > .ct-tab:hover { background: var(--fill-2); color: var(--text); }
.ct.side-left > .ct-strip > .ct-tab.on, .ct.side-right > .ct-strip > .ct-tab.on { background: var(--fill-3); color: var(--text-strong); }
.ct-tab.add { color: var(--text-3); font-size: 16px; }
.ct.side-left > .ct-strip > .ct-sep, .ct.side-right > .ct-strip > .ct-sep { height: 1px; margin: 6px 8px; background: var(--line); flex-shrink: 0; }
.ct.side-top > .ct-strip > .ct-sep, .ct.side-bottom > .ct-strip > .ct-sep { width: 1px; margin: 9px 6px; align-self: stretch; background: var(--line); flex-shrink: 0; }
/* a frameless container: tabs and content straight on the page (the wall's sub-tabs) */
.ct.nested.bare { background: transparent; border: 0; border-radius: 0; overflow: visible; }
.ct.bare.side-top > .ct-strip { padding: 0; }
.ct.bare.side-top > .ct-body { padding-top: 14px; }

.cgrid { display: grid; width: max-content; max-width: 100%; }
.cell {
  display: flex; align-items: center; min-height: 31px; padding: 6px 14px; min-width: 0;
  border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 12.5px;
}
.cell.last-row { border-bottom-color: transparent; }
.cell.k-label { color: var(--text-2); }
.cell.k-stat { justify-content: flex-end; color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.cell.k-container { padding: 6px; border-bottom: 0; align-items: flex-start; }
.cgrid > .cell.k-container:first-child { padding-left: 0; }
.cell.k-empty { min-width: 24px; }
.cell.role-header, .cell.role-header-pink { background: var(--tint-teal); color: var(--text-2); font-size: var(--fs-xs); font-weight: 500; min-height: 28px; border-bottom-color: transparent; }
.cell.role-header-pink { background: var(--tint-pink); }
.cell.role-header:first-child, .cell.role-header-pink:first-child { color: var(--text); font-weight: 600; }
.cell.k-label.role-header ~ .cell.k-label.role-header { justify-content: flex-end; }
.cell.align-l { justify-content: flex-start; }
.cell.align-c { justify-content: center; }
.cell.align-r { justify-content: flex-end; }
.cell.bold { font-weight: 600; color: var(--text); }
.cell .val { color: inherit; cursor: pointer; }
.cell .val:hover { color: var(--accent); text-decoration: none; }
.cell .val.thin { color: var(--text-2); }
.cell .val.good { color: var(--pos); }
.cell .val.bad { color: var(--neg); }
.cell .val.thin.good, .cell .val.thin.bad { opacity: .7; }
.cell .ref { min-width: 24px; margin-left: 6px; color: var(--text-3); font-size: 10.5px; font-weight: 400; }
.cell .cnt { color: var(--text-3); font-size: var(--fs-xs); font-weight: 400; margin-left: 6px; }
.empty-page { padding: 48px 32px; color: var(--text-3); text-align: center; border: 1px dashed var(--line-2); border-radius: var(--r-l); min-width: 360px; }

/* the editor: library | canvas | properties, quiet chrome */
.wall-edit { display: grid; grid-template-columns: 252px minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.wl-lib, .wl-props { position: sticky; top: 84px; max-height: calc(100vh - 104px); display: flex; flex-direction: column; overflow: hidden; }
.wl-props { overflow-y: auto; }
.wl-head { padding: 12px 12px 8px; }
.wl-head input { width: 100%; }
.wl-hint { padding: 0 14px 8px; font-size: var(--fs-xs); color: var(--text-3); }
.wl-list { overflow-y: auto; padding: 0 6px 12px; }
.wl-cap { font-size: var(--fs-xs); color: var(--text-3); padding: 10px 8px 6px; }
.lib-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--r-s); cursor: grab; font-size: 12.5px; color: var(--text); }
.lib-item:hover { background: var(--fill-2); }
.lib-item:active { cursor: grabbing; }
.lib-item .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-canvas { min-width: 0; }
.wl-tools { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; min-height: 30px; }
.wl-tools .spacer { flex: 1; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; font-size: var(--fs-s); }
.crumb { height: 24px; padding: 0 8px; border: 0; background: transparent; color: var(--text-2); font-weight: 500; border-radius: 6px; }
.crumb:hover:not(:disabled) { background: var(--fill-2); color: var(--text); }
.crumb.now { display: inline-flex; align-items: center; color: var(--text-strong); padding: 0 8px; }
.crumbs .sep { color: var(--text-3); }
.wl-stage { overflow-x: auto; padding: 4px 4px 24px; }
.wall-edit .cell { box-shadow: inset -1px 0 0 var(--line); cursor: default; transition: background var(--dur) var(--ease); }
.wall-edit .cell.k-empty { min-width: 84px; }
.wall-edit .cell.k-empty:hover { background: var(--fill-1); }
.wall-edit .cell.k-empty:hover::after { content: '+'; margin: auto; color: var(--text-3); }
.wall-edit .cell.k-container { box-shadow: none; }
.wall-edit .cell.last-row { border-bottom-color: var(--line); }
.wall-edit .cell .sname { color: var(--text-2); font-weight: 400; max-width: 230px; overflow: hidden; text-overflow: ellipsis; }
.wall-edit .cell .nb { margin-left: 6px; }
.wall-edit .cell.sel { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent-line); }
.wall-edit .cell.k-container.sel { background: transparent; }
.wall-edit .cell.k-container.sel > .ct { box-shadow: 0 0 0 1.5px var(--accent-line); }
.wall-edit .ct.root.sel > .ct-body { box-shadow: 0 0 0 1.5px var(--accent-line); border-radius: var(--r); }
.wall-edit .cell.drop { background: var(--accent-wash); }
.wl-props .sec { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.wl-props .sec:last-child { border-bottom: 0; }
.wl-props h4 { margin: 0 0 10px; font-size: var(--fs-xs); font-weight: 500; color: var(--text-3); }
.wl-props .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.wl-props .row > span { color: var(--text-2); font-size: var(--fs-s); }
.wl-props input[type=text] { width: 100%; }
.wl-props .seg { flex-wrap: wrap; }
.wl-props .seg button { padding: 0 9px; }
.wl-props .statname { font-weight: 500; color: var(--text); word-break: break-word; }
.wl-props .small { font-size: var(--fs-xs); margin-top: 6px; line-height: 1.45; }
.wl-props .tablist { margin-top: 10px; display: grid; gap: 6px; }
.wl-props .tabrow { display: flex; gap: 6px; align-items: center; }
.wl-props .tabrow.on input { border-color: var(--accent-line); }
.wl-props .danger { color: var(--neg); margin-top: 12px; }
.wl-props .danger:hover:not(:disabled) { background: rgba(217, 96, 96, .1); color: var(--neg); }
.wl-empty { padding: 24px 16px; color: var(--text-3); font-size: var(--fs-s); text-align: center; }
.stepper { display: inline-flex; align-items: center; gap: 8px; }
.stepper button { width: 24px; height: 24px; padding: 0; border-radius: 6px; font-size: 14px; }
.stepper .num { min-width: 18px; text-align: center; color: var(--text); }
@media (max-width: 1280px) { .wall-edit { grid-template-columns: 220px minmax(0, 1fr) 248px; gap: 14px; } }
@media (max-width: 1060px) {
  .wall-edit { grid-template-columns: minmax(0, 1fr); }
  .wl-lib, .wl-props { position: static; max-height: 360px; }
  .wl-lib { order: 2; } .wl-props { order: 3; }
}
@media (max-width: 860px) {
  .ct.root.side-left, .ct.root.side-right { flex-direction: column; }
  .ct.root.side-left > .ct-strip, .ct.root.side-right > .ct-strip { position: static; width: auto; flex-direction: row; overflow-x: auto; margin-bottom: 12px; }
  .ct.root.side-left > .ct-body, .ct.root.side-right > .ct-body { padding: 0; }
}

/* ---------- the stat explorer ---------- */
.explorer { display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: 20px; align-items: start; }
.explorer.reviewing { grid-template-columns: 252px minmax(0, 1fr) minmax(380px, 540px); }
.explorer > .panel { padding: 0; }
.explorer #exList { padding: 18px 20px; }
.tree { max-height: calc(100vh - 104px); overflow: auto; position: sticky; top: 84px; padding: 10px 8px !important; }
.tree ul { list-style: none; margin: 0; padding-left: 12px; }
.tree > ul { padding-left: 0; }
.tree button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; width: 100%; padding: 5px 8px; border-radius: var(--r-s); color: var(--text-2); font-size: 12.5px; }
.tree button:hover { background: var(--fill-2); color: var(--text); }
.tree button.sel { background: var(--fill-3); color: var(--text-strong); }
.tree button span:last-child { color: var(--text-3); font-variant-numeric: tabular-nums; }
.folderpick { display: none; }
.findbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 12px; }
.findbar input[type=search] { flex: 1 1 260px; min-width: 0; }
.findbar label { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-s); }
#exSum { font-size: var(--fs-s); margin-bottom: 8px; }
#exTbl th { background: var(--bg-1); }
.review { position: sticky; top: 84px; max-height: calc(100vh - 104px); overflow: auto; padding: 20px !important; }
.review .close { float: right; }
.review h2 { margin-bottom: 4px; padding-right: 36px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; margin: 14px 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.tile { background: var(--bg-1); padding: 12px 14px; }
.tile .k { font-size: var(--fs-xs); color: var(--text-3); }
.tile .v { font-size: 19px; font-weight: 600; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.tile .s { font-size: var(--fs-s); color: var(--text-2); }
.path div { margin: 2px 0; }
.path b { color: var(--text-strong); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.words-box { background: var(--fill-1); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
pre { background: var(--bg-deep); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; overflow: auto; font: 12px/1.5 ui-monospace, 'SF Mono', Consolas, monospace; color: var(--text-2); margin: 0; }
details summary { cursor: pointer; color: var(--text-2); margin: 10px 0; }
.drills { display: flex; flex-wrap: wrap; gap: 6px; }
.drills a { display: inline-flex; align-items: center; height: 28px; background: var(--fill-2); border-radius: var(--r-pill); padding: 0 12px; color: var(--text); font-size: var(--fs-s); font-weight: 500; }
.drills a:hover { text-decoration: none; background: var(--fill-3); }
.more { margin: 12px 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
@media (max-width: 1440px) {
  .explorer.reviewing { grid-template-columns: minmax(0, 1fr) minmax(380px, 500px); }
  .explorer.reviewing .tree { display: none; }
  .explorer.reviewing .folderpick { display: block; }
}
@media (max-width: 1180px) {
  .explorer.reviewing { grid-template-columns: minmax(0, 1fr); }
  .explorer .review { position: fixed; top: 0; right: 0; bottom: 0; width: min(540px, 100vw); max-height: none; z-index: 40; border-radius: 0; box-shadow: var(--shadow-panel); background: var(--bg-raised); }
}
@media (max-width: 860px) {
  .explorer, .explorer.reviewing { grid-template-columns: minmax(0, 1fr); }
  .tree { display: none; }
  .folderpick { display: block; }
}

/* ---------- the loader (replayer-example.html) ---------- */
.loader { display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: 20px; align-items: start; }
.ld-list {
  position: sticky; top: 84px; max-height: calc(100vh - 108px); display: flex; flex-direction: column;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden;
}
.ld-list-h { padding: 12px 14px 10px; border-bottom: 1px solid var(--line); }
.ld-list-h .t { font-size: var(--fs-s); font-weight: 600; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld-list-h .s { font-size: var(--fs-xs); color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld-list-scroll { flex: 1; overflow-y: auto; padding: 6px; }
.ld-item {
  all: unset; box-sizing: border-box; position: relative; display: flex; flex-direction: column; gap: 3px; width: 100%;
  padding: 8px 10px 8px 15px; border-radius: var(--r-s); cursor: pointer; transition: background var(--dur) var(--ease);
}
.ld-item:hover { background: var(--fill-1); }
.ld-item.sel { background: var(--fill-2); }
.ld-item:focus-visible { box-shadow: 0 0 0 2px var(--accent-line); }
.ld-item .mk { position: absolute; left: 4px; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: var(--fill-3); }
.ld-item .mk.pos { background: var(--pos); } .ld-item .mk.neg { background: var(--neg); }
.ld-item:not(.sel) .mk { opacity: .5; }
.ld-item .r1 { display: flex; align-items: center; gap: 7px; min-width: 0; }
.ld-item .r1 .c { min-width: 17px; height: 19px; font-size: 10.5px; padding: 0 2px; }
.ld-item .d { flex: 1; min-width: 0; font-size: var(--fs-xs); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld-item .d b { color: var(--text); font-weight: 600; }
.ld-item .amt { font-size: var(--fs-s); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ld-item:not(.sel) .amt { opacity: .75; }
.ld-item .r2 { font-size: 10.5px; color: var(--text-3); }
.ld-more { display: flex; justify-content: center; padding: 8px 0 4px; }

.ld-main { position: relative; min-width: 0; }
.ld-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; min-height: 36px; margin-bottom: 12px; }
.ld-head .cards-lg { display: inline-flex; gap: 3px; }
.ld-head .who b { color: var(--text-strong); font-weight: 600; }
.ld-head .who span { color: var(--text-2); }
.ld-head .meta { color: var(--text-3); font-size: var(--fs-s); min-width: 0; }
.ld-head .res { margin-left: auto; font-size: var(--fs-m); font-weight: 600; font-variant-numeric: tabular-nums; }

/* the table, drawn at 1100 x 760 and scaled to fit */
.ld-canvas { position: relative; overflow: hidden; border-radius: var(--r-l); background: var(--room); border: 1px solid var(--line); user-select: none; }
.ld-view { position: relative; height: 560px; }
.ld-stage { position: absolute; left: 0; top: 0; width: 1100px; height: 760px; transform-origin: 0 0; }
.ld-table {
  position: absolute; left: 120px; top: 120px; width: 860px; height: 420px; border-radius: 50%;
  background: radial-gradient(70% 70% at 50% 40%, var(--table-hi) 0%, var(--table) 70%);
  border: 12px solid var(--table-rim);
  box-shadow: 0 30px 50px rgba(0, 0, 0, .45), inset 0 0 60px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .04);
}
.ld-logo { position: absolute; left: 50%; top: 79%; transform: translate(-50%, -50%); font-size: 34px; font-weight: 700; font-style: italic; letter-spacing: .04em; color: rgba(0, 0, 0, .22); white-space: nowrap; pointer-events: none; }
.ld-pot { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 3px; z-index: 4; }
.ld-pot .lab { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.ld-pot .amt { background: var(--table-deep); border: 1px solid var(--line-2); border-radius: var(--r-pill); padding: 4px 18px; font-size: 17px; font-weight: 600; color: var(--text-strong); white-space: nowrap; }
.ld-pot .rk { font-size: 13px; font-weight: 400; color: var(--text-3); }
.ld-board { position: absolute; transform: translate(-50%, -50%); display: flex; gap: 5px; z-index: 3; }
.ld-board.run2 { gap: 4px; }
.ld-odds { position: absolute; transform: translate(-50%, -50%); z-index: 4; padding: 4px 12px; border-radius: var(--r-pill); background: rgba(0, 0, 0, .35); color: var(--text-2); font-size: 14px; white-space: nowrap; }
.ld-dealer {
  position: absolute; transform: translate(-50%, -50%); z-index: 3; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--dealer); color: var(--on-dealer); font-size: 11px; font-weight: 700; box-shadow: 0 2px 6px rgba(0, 0, 0, .5), inset 0 -2px 0 rgba(0, 0, 0, .15);
}

/* cards on the table: the four-colour deck at size */
.ld-card {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0;
  width: 60px; height: 84px; border-radius: 6px; color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .41), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.ld-card b { font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.ld-card i { font-style: normal; font-size: 20px; line-height: 1.15; opacity: .85; }
.ld-card.suit-s { background: var(--suit-s); } .ld-card.suit-h { background: var(--suit-h); }
.ld-card.suit-c { background: var(--suit-c); } .ld-card.suit-d { background: var(--suit-d); }
.ld-card.back { background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .05) 0 4px, transparent 4px 8px), var(--card-back); border: 2px solid rgba(255, 255, 255, .12); }
.ld-card.slot { background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.ld-card.sm { width: 44px; height: 62px; border-radius: 5px; } .ld-card.sm b { font-size: 22px; } .ld-card.sm i { font-size: 15px; }
.ld-card.xs { width: 26px; height: 36px; border-radius: 4px; } .ld-card.xs b { font-size: 15px; } .ld-card.xs i { font-size: 11px; }

/* chips in front of a seat, sliding to the pot as a street ends and from it to the winners */
.ld-bet { position: absolute; transform: translate(-50%, -50%); z-index: 5; display: flex; align-items: center; gap: 6px; }
.ld-bet .discs { display: flex; flex-direction: column-reverse; align-items: center; }
.ld-bet .discs i { width: 22px; height: 8px; margin-top: -2px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, .28); box-shadow: 0 1px 1px rgba(0, 0, 0, .4); }
.ld-bet .discs i.d1 { background: var(--chip-1); } .ld-bet .discs i.d2 { background: var(--chip-2); } .ld-bet .discs i.d3 { background: var(--chip-3); }
.ld-bet .amt { padding: 3px 12px; border-radius: var(--r-pill); background: var(--table-deep); border: 1px solid var(--line-2); color: var(--text-strong); font-size: 14px; font-weight: 600; white-space: nowrap; }
.ld-bet.win .amt { color: var(--pos); }
.ld-bet.ghost { animation: ld-collect 420ms var(--ease) forwards; pointer-events: none; }
.ld-bet.fly { animation: ld-win 520ms var(--ease) both; }
@keyframes ld-collect { 75% { opacity: 1; } to { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(.8); opacity: 0; } }
@keyframes ld-win { from { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(.8); opacity: .3; } }

/* seats: a pill with the position and the cards; the name, stack and last action below */
.ld-seat { position: absolute; transform: translateX(-50%); z-index: 6; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: opacity var(--dur-slow) var(--ease); }
.ld-seat .slot { height: 98px; display: flex; align-items: center; }
.ld-seat .pill {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 100px;
  background: var(--seat); border: 1px solid var(--seat-line); box-shadow: 0 4px 10px rgba(0, 0, 0, .35);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.ld-seat.flip .pill { flex-direction: row-reverse; padding: 6px 6px 6px 12px; }
.ld-seat .av { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; background: rgba(255, 255, 255, .07); color: var(--text-2); font-size: 12px; font-weight: 600; }
.ld-seat.me .av { color: var(--text-strong); box-shadow: inset 0 0 0 1.5px var(--accent-line); }
.ld-seat .hc { display: flex; gap: 3px; }
.ld-seat .lab { display: flex; flex-direction: column; align-items: center; gap: 1px; text-align: center; }
.ld-seat .nm { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-strong); font-size: 14px; font-weight: 500; }
.ld-seat .sk { color: var(--text-2); font-size: 13px; font-weight: 600; }
.ld-seat .ac { display: flex; align-items: center; min-height: 26px; margin-top: 2px; }
.ld-seat .ac .act { height: 23px; padding: 0 9px; border-radius: 6px; font-size: 13px; }
.ld-seat .act.won { background: var(--pos-wash); color: var(--pos); }
.ld-seat.next .pill { border-color: rgba(255, 255, 255, .9); box-shadow: 0 0 0 1px rgba(255, 255, 255, .9), 0 6px 18px rgba(0, 0, 0, .45); }
.ld-seat.win .pill { border-color: rgba(92, 184, 104, .7); box-shadow: 0 0 0 1px rgba(92, 184, 104, .45), 0 0 26px rgba(92, 184, 104, .2); }
.ld-seat.out { opacity: .42; }

/* the controls along the bottom of the table */
.ld-foot {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px;
  padding: 44px 16px 14px; background: linear-gradient(180deg, transparent 0%, rgba(13, 18, 16, .6) 48%, var(--glass-deep) 100%);
}
.ld-streets button { height: 28px; padding: 0 14px; font-size: var(--fs-s); }
.ld-at { margin-right: auto; color: var(--text-3); font-size: var(--fs-xs); }
.ld-icons { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.ld-gap { width: 6px; }
.ld-ib { width: 34px; height: 34px; padding: 0; border-radius: var(--r-s); background: var(--fill-2); border: 1px solid var(--line-2); color: var(--text-2); }
.ld-ib:hover:not(:disabled) { background: var(--fill-3); color: var(--text-strong); }
.ld-ib.on { background: rgba(255, 255, 255, .16); border-color: var(--line-3); color: var(--text-strong); }
.ld-ib svg { width: 17px; height: 17px; }
.pop.ld-menu { position: absolute; right: 14px; bottom: 62px; width: 300px; z-index: 20; }
.ld-menu .ck { display: inline-grid; place-items: center; width: 16px; color: var(--text-strong); }
.ld-menu .ck svg { width: 15px; height: 15px; }
.ld-toast {
  position: absolute; left: 50%; top: 14px; z-index: 30; padding: 6px 14px; border-radius: var(--r-pill);
  background: rgba(26, 32, 29, .9); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line-2);
  color: var(--text); font-size: var(--fs-s); opacity: 0; pointer-events: none; transform: translate(-50%, -6px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.ld-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* the line street by street, and the original text one click away */
.ld-line { margin-top: 14px; padding: 16px 18px; background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-l); }
.ld-line:empty { display: none; }
.ld-hh {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 25; width: min(460px, 100%); display: flex; flex-direction: column;
  background: rgba(22, 27, 25, .94); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--line-2); border-radius: var(--r-l); box-shadow: var(--shadow-pop);
  opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.ld-hh.open { opacity: 1; pointer-events: auto; transform: none; }
.ld-hh-h { display: flex; align-items: center; gap: 4px; padding: 12px 12px 10px 18px; border-bottom: 1px solid var(--line); }
.ld-hh-h h2 { margin-right: auto; font-size: var(--fs-m); }
.ld-hh-b { flex: 1; overflow: auto; padding: 14px 18px 20px; white-space: pre-wrap; color: var(--text-2); font-size: 12px; line-height: 1.6; font-variant-numeric: tabular-nums; user-select: text; }

@media (max-width: 960px) {
  .loader { grid-template-columns: minmax(0, 1fr); }
  .ld-list { display: none; }
}
@media (max-width: 640px) {
  .ld-at { display: none; }
  .ld-streets button { padding: 0 9px; }
  .ld-foot { position: static; padding: 10px; background: var(--glass-deep); border-top: 1px solid var(--line); }
  .pop.ld-menu { bottom: 110px; }
}
@media (prefers-reduced-motion: reduce) {
  .ld-bet.ghost { display: none; }
  .ld-bet.fly { animation: none; }
}

/* ---------- graphs ---------- */
.chart { position: relative; user-select: none; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .tip { position: absolute; pointer-events: none; background: rgba(26, 32, 29, .92); backdrop-filter: var(--blur); border: 1px solid var(--line-2); border-radius: var(--r); padding: 8px 10px; font-size: var(--fs-s); white-space: nowrap; z-index: 5; box-shadow: var(--shadow-pop); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: var(--fs-s); color: var(--text-2); margin: 10px 0; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; background: var(--c); vertical-align: middle; margin-right: 6px; }
.wall-edit .cgrid { max-width: none; }
.wall-edit .ct.root > .ct-strip { position: static; }
.wall-edit .ct.root > .ct-body { overflow: visible; }
.wl-props .seg.full { display: flex; width: 100%; margin-top: 8px; }
.wl-props .seg.full button { flex: 1; padding: 0 4px; }
.wl-props .sec > .seg { display: flex; width: 100%; }
.wl-props .sec > .seg button { flex: 1 1 auto; padding: 0 6px; }
.wall-view .cell.k-empty { border-bottom-color: transparent; }

/* ---------- upload ---------- */
.upload { display: grid; gap: 20px; max-width: 980px; }
.upload h2 { margin-bottom: 6px; }
.upload p { margin: 0 0 12px; font-size: var(--fs-s); }
.upload .head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.drop {
  display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 120px; padding: 20px;
  border: 1.5px dashed var(--line-3); border-radius: var(--r-l); background: var(--fill-1); color: var(--text-2);
  cursor: pointer; transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.drop:hover, .drop.over { background: var(--accent-soft); border-color: var(--accent-line); }
.drop .ic svg { width: 26px; height: 26px; color: var(--text-3); }
.drop b { color: var(--text); font-weight: 600; }
.drop .link { color: var(--accent); }
.up-list { display: grid; gap: 6px; margin-top: 14px; }
.up-list:empty { display: none; }
.up-row { display: grid; grid-template-columns: minmax(0, 1fr) 80px 160px 120px; align-items: center; gap: 12px; padding: 8px 12px; border-radius: var(--r-s); background: var(--fill-1); font-size: var(--fs-s); }
.up-row .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-row .s { color: var(--text-3); text-align: right; }
.up-row .bar { height: 6px; border-radius: 3px; background: var(--fill-3); overflow: hidden; }
.up-row .bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width var(--dur) linear; }
.up-row.ok .bar i { background: var(--pos); }
.up-row.bad .bar i { background: var(--neg); }
.up-row .st { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-row.bad .st { color: var(--neg); }
#upNote:empty { display: none; }
.upload .pill.run { color: var(--accent); background: var(--accent-soft); }
.upload .pill.bad { color: var(--neg); background: rgba(217, 96, 96, .12); }
.upload .spin { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid currentColor; border-right-color: transparent; animation: up-spin .8s linear infinite; }
@keyframes up-spin { to { transform: rotate(360deg); } }
.upload td.path { max-width: 560px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.up-files .tblwrap { max-height: 420px; overflow-y: auto; }
@media (max-width: 700px) { .up-row { grid-template-columns: minmax(0, 1fr) 70px; } .up-row .bar, .up-row .st { grid-column: span 1; } }
