/* view styles: support tickets (views/tickets.js) as list | detail, then the member pages (Store, License, Terms /
   Privacy / Copyright) under their own class names (sto-, plan-box, lc-, od-, lp-); v-member.css keeps only .vm and the
   checkout window. One layer on app.css's tokens and groupboxes. */

/* ---------------------------------------------------------------- tickets: the list beside the open ticket */
.tk-grid { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: var(--gap); align-items: start; }
/* both columns reach the bottom of the screen: the list scrolls inside its box, the ticket with the page */
.tk { --tk-h: calc(100dvh - var(--hdr-h) - var(--sub-h) - 2px - var(--sp-4) - var(--foot-stick) - var(--sp-5)); }
.tk-side { position: sticky; top: calc(var(--hdr-h) + var(--sub-h) + 2px + var(--sp-4)); display: flex; flex-direction: column; min-width: 0;
  height: max(320px, var(--tk-h)); }
.tk-list { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.tk-list > .card-b { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.tk-list .card-h .seg { margin-right: -4px; }
.tk-main { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.tk-pad { padding: var(--sp-3) var(--g-r) var(--sp-3) var(--g-l); }

/* a ticket in the list: the state square, the subject bold while open, when; the number and the last reply under it */
.tk-row { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 10px var(--g-r) 10px var(--g-l); cursor: pointer; }
.tk-row + .tk-row { border-top: 1px solid var(--e-hair); }
.tk-row.on, .tk-row.on:hover { background: var(--ac-wash); box-shadow: inset 2px 0 0 var(--ac); }
.tk-r1 { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.tk-sub { flex: 1; min-width: 0; font: 400 var(--fs-base)/18px var(--ui); color: var(--tx-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color var(--hover); }
.tk-row:not(.closed) .tk-sub, .tk-row:hover .tk-sub, .tk-row.on .tk-sub { color: var(--tx); }
.tk-row:not(.closed) .tk-sub { font-weight: 700; }
.tk-r1 .tk-t { flex: none; font-size: var(--fs-sm); color: var(--tx-4); white-space: nowrap; }
.tk-meta { display: flex; align-items: center; gap: 4px 7px; min-width: 0; font-size: var(--fs-sm); line-height: 16px; color: var(--tx-3); }
.tk-meta .mono { font-size: var(--fs-sm); color: var(--tx-3); }
.tk-meta b { font-weight: 400; color: var(--tx-2); }
.tk-row .tk-meta { padding-left: 14px; white-space: nowrap; overflow: hidden; }
.tk-row .tk-meta > * { flex: none; }
.tk-row .tk-meta > .lr { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.chip.tk-st { height: 18px; padding: 0 6px; }
.chip.tk-st::before { content: ""; width: 6px; height: 6px; flex: none; box-shadow: 0 0 0 1px #000; background: linear-gradient(180deg, var(--ok), #446F3E); }
.chip.tk-st.off { color: var(--tx-3); }
.chip.tk-st.off::before { background: linear-gradient(180deg, #727278, #47474C); }
.tk-empty .empty { padding: var(--sp-5) var(--g-r) var(--sp-5) var(--g-l); text-align: center; }
/* skeleton bars while loading */
.tk-sk { display: flex; flex-direction: column; gap: var(--sp-2); padding: 14px var(--g-r) 14px var(--g-l); }
.tk-sk + .tk-sk { border-top: 1px solid var(--e-hair); }
.tk-sk i { display: block; height: 10px; max-width: 100%;
  background: linear-gradient(90deg, rgba(255,255,255,.035) 30%, rgba(255,255,255,.08) 50%, rgba(255,255,255,.035) 70%) 0 0 / 300% 100%; animation: sk-shim 1.4s linear infinite; }
.tk-sk i:first-child { height: 12px; }

/* the right column without a ticket: the form, or the shared pointer (ui.js pickPane) as tall as the list */
.card.tk-ph { min-height: max(340px, var(--tk-h)); }
.tk-form { display: flex; flex-direction: column; gap: var(--sp-3); }
.tk-form textarea.field { min-height: 160px; }
.tk-tools { display: flex; align-items: center; gap: var(--sp-2); }
.tk-hint { font-size: var(--fs-md); color: var(--tx-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the open ticket: a groupbox whose title bar is the ticket's head, the messages, the reply box docked at its foot */
.tk-th { display: flex; flex-direction: column; }
.tk-head { position: relative; display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-3) var(--g-r) var(--sp-3) var(--g-l);
  background: linear-gradient(180deg, #1D1D21, #17171A); border-bottom: 1px solid #000; box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 1px 0 rgba(255,255,255,.025); }
.tk-head::before { content: ""; position: absolute; left: -1px; top: -1px; bottom: 0; width: 2px; background: var(--ac-grad-v); }
.tk-head > .crumbs { display: none; }
.tk-head .tk-sk { padding: 0; }
.tk-head .tk-sk i:first-child { height: 18px; }
.tk-th-h { display: flex; align-items: flex-start; gap: var(--sp-3); }
.tk-th-h h2 { font: 700 var(--fs-lg)/22px var(--ui); color: var(--tx); overflow-wrap: anywhere; }
.tk-th-h .tk-meta { flex-wrap: wrap; margin-top: 5px; }
.tk-th-h .acts { display: flex; gap: 6px; flex: none; padding-top: 1px; }
.tk-log { flex: 1; display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-4) var(--g-r) var(--sp-4) var(--g-l); }
.tk-day { display: flex; align-items: center; gap: var(--sp-3); }
.tk-day::before, .tk-day::after { content: ""; flex: 1; height: 1px; background: var(--e-hair); }
.tk-day .mono { font-size: var(--fs-sm); color: var(--tx-4); }
.tk-msg { display: flex; align-items: flex-start; gap: 10px; max-width: 780px; }
.tk-msg.me { flex-direction: row-reverse; margin-left: auto; }
.tk-bub { flex: 0 1 auto; min-width: 220px; padding: 8px var(--sp-3) 10px; border: 1px solid #000; background: linear-gradient(180deg, #1D1D21, #19191D);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.tk-msg.me .tk-bub { background: linear-gradient(180deg, #24202F, #1D1A27); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), inset 0 0 0 1px rgba(155,123,255,.12); }
.tk-msg.staff .tk-bub { box-shadow: inset 2px 0 0 var(--ok), inset 0 1px 0 rgba(255,255,255,.04); }
.tk-msg.me.staff .tk-bub { box-shadow: inset -2px 0 0 var(--ok), inset 0 1px 0 rgba(255,255,255,.05); }
.tk-mh { display: flex; align-items: center; gap: var(--sp-2); min-height: 20px; margin-bottom: 4px; font-size: var(--fs-md); line-height: 18px; white-space: nowrap; }
.tk-mh .who { font-weight: 700; }
.tk-mh .tk-t { font-size: var(--fs-sm); color: var(--tx-4); }
.tk-mb { font-size: var(--fs-base); line-height: 21px; color: var(--tx); white-space: pre-wrap; overflow-wrap: anywhere; }
.tk-skav { width: 32px; height: 32px; }
.tk-msg .tk-sk { flex: 1; max-width: 420px; border: 1px solid #000; background: #1A1A1E; }
.tk-log > .empty { text-align: center; }
.tk-dock { position: sticky; bottom: calc(var(--foot-stick) + var(--in-b)); z-index: 5; padding: var(--sp-3) var(--g-r) 10px var(--g-l);
  background: var(--ac-grad) 0 0 / 100% 2px no-repeat, var(--s-box); border-top: 1px solid #000; box-shadow: 0 -10px 24px rgba(0,0,0,.45); }
.tk-dock textarea.field { min-height: 72px; height: 72px; }
.tk-dock:empty { display: none; }
.tk-comp { display: flex; flex-direction: column; gap: var(--sp-2); }
.tk-closed { display: flex; align-items: center; gap: 10px; min-height: var(--ctl-h); font-size: var(--fs-md); color: var(--tx-2); }
/* the docked reply box owns the bottom edge: toasts move under the header */
body:has(.tk-dock) .toasts { top: calc(var(--hdr-h) + var(--sub-h) + 14px + var(--in-t)); bottom: auto; }

@media (max-width: 1000px) {
  .tk-grid { grid-template-columns: minmax(0, 1fr); }
  .tk-side { position: static; height: auto; }
  .tk-list > .card-b { overflow: visible; }
  .card.tk-ph { min-height: 0; }
  .tk-grid.sel > .tk-side, .tk-grid:not(.sel) > .tk-main.idle { display: none; }
  .tk-grid:not(.sel) > .tk-main { order: -1; }
  .tk-head > .crumbs { display: flex; }
}
@media (max-width: 840px) {
  .tk-th-h { flex-wrap: wrap; }
  .tk-th-h .acts { width: 100%; }
  .tk-msg { max-width: none; }
  .tk-msg:not(.me) { margin-right: 20px; }
  .tk-msg.me { margin-left: 20px; }
  .tk-bub { flex: 1; min-width: 0; }
  .tk-dock { bottom: var(--in-b); }
  .tk-new .card-h .aside { display: none; }
  /* keeps its flex space so the buttons stay right */
  .tk-hint { visibility: hidden; }
}

/* ---------------------------------------------------------------- the member pages: shared */
.sto, .lc, .lp { display: flex; flex-direction: column; gap: var(--gap); }
.sto > .ph, .lc > .ph, .lp > .ph { margin: 0; }
.sto > *, .lc > *, .lp > * { margin: 0; }
/* a headline in a well (the plan price, the license's days left, the bound PC): the value big and bold, a line by it */
.pc-price, .lc-big { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; padding: 10px var(--sp-3); }
.pc-price > b, .lc-big b { font: 700 var(--fs-xl)/24px var(--ui); color: var(--tx); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- store (views/store.js, js/plans.js .plan-box): a row
   of plan groupboxes with the badged plan lit, then the license and the facts as two equal boxes under it */
.sto-segw > .seg { display: flex; }
.sto-segw > .seg > button { flex: 1; justify-content: center; }
.sto-segw:not([hidden]) { display: none; }
.sto-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--gap); align-items: stretch; }
.sto-empty { grid-column: 1 / -1; }
.plan-box { display: flex; flex-direction: column; }
.plan-box > .card-b { flex: 1; display: flex; flex-direction: column; padding-top: var(--sp-4); }
.plan-box .hm-game { margin-bottom: var(--sp-3); }
.plan-box .card-h .chip { height: 18px; padding: 0 6px; }
.pc-price { flex-wrap: wrap; align-items: baseline; row-gap: 2px; margin-bottom: var(--sp-2); }
.pc-price > span { margin-left: auto; font-size: var(--fs-md); color: var(--tx-3); white-space: nowrap; }
.sk.pc-sk { margin-bottom: var(--sp-3); }
.plan-box .kv { font-size: var(--fs-md); }
/* the renew line and Buy sit on the box's floor, so the boxes line up whatever their rows */
.plan-box .hint { margin: auto 0 var(--sp-3); padding-top: 10px; }
/* the featured plan: the accent strip along its top (as on the loader card), the cap lit, the price in the accent */
.plan-box.rec { border-color: var(--ac-line); border-bottom-color: #2C2444; }
.plan-box.rec::after { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 2px; background: var(--ac-grad); pointer-events: none; }
.plan-box.rec > .card-h { background: linear-gradient(180deg, #282535, #1B1A23); }
.plan-box.rec > .card-h::before { display: none; }
.plan-box.rec > .card-b { background: linear-gradient(180deg, rgba(155,123,255,.05), transparent 140px); }
.plan-box.rec .pc-price { background: linear-gradient(180deg, #0F0D16, #0B0A10); box-shadow: inset 0 0 0 1px rgba(155,123,255,.16), 0 1px 0 var(--bev-hi); }
.plan-box.rec .pc-price > b { color: var(--ac-hi); }
.plan-box.owned .pc-price > b { color: var(--tx-2); }
.pt-cons { font-size: var(--fs-md); line-height: 18px; color: var(--tx-4); }
.pt-cons:empty { display: none; }
.pt-consent { max-width: 760px; }

.sto-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); align-items: stretch; }
.sto-cols > .card { display: flex; flex-direction: column; min-width: 0; }
.sto-cols > .card > .card-b { flex: 1; }
.sto-lic .hint { margin-top: var(--sp-2); }
/* an admin-typed plan ("standard") reads as a name */
.sto-lic .kv:first-child > .v::first-letter, .lc-box .meter + .kv > .v::first-letter { text-transform: uppercase; }
.sto-fact { display: flex; align-items: flex-start; gap: 10px; }
.sto-fact + .sto-fact { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--e-hair); }
.sto-fact > .sq { margin-top: 6px; }
.sto-fact b { display: block; font: 700 var(--fs-md)/18px var(--ui); color: var(--tx); }
.sto-fact p { margin-top: 2px; font-size: var(--fs-md); line-height: 18px; color: var(--tx-3); }

/* ---------------------------------------------------------------- license (views/license.js): the CS2 Premium box and
   the PC binding as a two-column groupbox grid, the orders under them */
.lc-grid { align-items: stretch; }
.lc-grid > .callout { grid-column: 1 / -1; }
.lc-grid > .card { display: flex; flex-direction: column; }
.lc-grid > .card > .card-b { flex: 1; display: flex; flex-direction: column; padding-top: var(--sp-4); }
.lc-grid .hm-game { margin-bottom: var(--sp-3); }
.lc-big { min-height: 60px; }
.lc-big > .grow > span { display: block; margin-top: 1px; font-size: var(--fs-md); line-height: 17px; color: var(--tx-3); }
.lc-big b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-big b::first-letter { text-transform: uppercase; }
.lc-big.warn b { color: var(--warn); }
.lc-big.err b { color: var(--err); }
.lc-big.off b { font-size: var(--fs-lg); color: var(--tx-2); }
.lc-big.on b { color: var(--ac-hi); }
.sk.lc-bsk { margin-bottom: var(--sp-2); }
.lc-tile { width: 38px; height: 38px; flex: none; display: grid; place-items: center; color: var(--tx-4); border: 1px solid #000;
  background: linear-gradient(180deg, #1D1D21, #151518); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.lc-tile > svg { width: 18px; height: 18px; }
.lc-big.on .lc-tile { color: var(--ac-hi); background: linear-gradient(180deg, var(--tab-t), var(--tab-b)); }
.lc-grid .meter { margin: 10px 0 var(--sp-3); }
.lc-pc .lc-big { margin-bottom: var(--sp-3); }
.lc-grid .kv { font-size: var(--fs-md); }
.lc-grid .hint { margin-top: var(--sp-2); }
.lc-incl { display: flex; flex-direction: column; gap: 6px; margin: var(--sp-2) 0 0; padding: 0; list-style: none; font-size: var(--fs-md); line-height: 18px; color: var(--tx-2); }
.lc-incl > li { display: flex; align-items: flex-start; gap: 10px; }
.lc-incl > li > .sq { margin-top: 6px; }
/* the box's button on its floor, so the two boxes end level */
.lc-grid .card-b > .btn.full { margin-top: auto; }
.lc-grid .card-b > :has(+ .btn.full) { margin-bottom: var(--sp-4); }
.od-list { list-style: none; margin: 0; padding: 0; }
.od-row { display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 8px var(--g-r) 8px var(--g-l); transition: background var(--hover); }
.od-row + .od-row { border-top: 1px solid var(--e-hair); }
.od-row:hover { background: var(--s-hover); }
.od-nm { font: 700 var(--fs-base)/18px var(--ui); color: var(--tx); }
.od-nm::first-letter { text-transform: uppercase; }
.od-m { display: flex; align-items: center; gap: var(--sp-2); margin-top: 1px; font-size: var(--fs-sm); color: var(--tx-4); }
.od-m .mono { font-size: var(--fs-sm); color: var(--tx-3); }
.od-amt { margin-left: auto; font: 700 var(--fs-base)/18px var(--ui); color: var(--ac-hi); white-space: nowrap; font-variant-numeric: tabular-nums; }
.od-row > .chip { min-width: 64px; justify-content: center; }
.od-empty .err-line { padding: 10px var(--g-r) 10px var(--g-l); }

/* ---------------------------------------------------------------- Terms, Privacy (views/legal.js) and Copyright
   (views/copyright.js): the policy in a groupbox, each section under a hairline with the accent tick on its title.
   Terms and Privacy have the contents and the legal pages beside it, Copyright the notice form. */
.lp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--gap); align-items: start; }
.lp-cgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.lp-side { position: sticky; top: calc(var(--hdr-h) + var(--sub-h) + 2px + var(--sp-4)); display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.lp-toc nav { display: flex; flex-direction: column; padding: 4px 0; }
.lp-toc-r { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 30px; padding: 4px var(--g-r) 4px var(--g-l); border: 0; background: none; text-align: left;
  font: 400 var(--fs-md)/16px var(--ui); color: var(--tx-2); transition: background var(--hover), color var(--hover); }
.lp-toc-r:hover { background: var(--s-hover); color: var(--tx); }
.lp-toc-r.on { color: var(--tx); background: var(--ac-wash); box-shadow: inset 2px 0 0 var(--ac); }
.lp-toc-r > .sq { background: linear-gradient(180deg, #727278, #47474C); }
.lp-toc-r.on > .sq, .lp-toc-r:hover > .sq { background: linear-gradient(180deg, var(--ac-hi), var(--ac-deep)); }
.lp-policy > .card-b { padding: var(--sp-4) var(--sp-5) var(--sp-5); }
.lp-lead { font-size: var(--fs-base); line-height: 21px; color: var(--tx); }
.lp-sec { scroll-margin-top: calc(var(--hdr-h) + var(--sub-h) + 2px + var(--sp-4)); }
.lp-sec + .lp-sec, .lp-lead + .lp-sec { margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid #000; box-shadow: inset 0 1px 0 var(--e-hair); }
.lp-sec h2 { display: flex; align-items: center; gap: 10px; margin-bottom: var(--sp-2); font: 700 var(--fs-base)/18px var(--ui); color: var(--tx); }
.lp-sec h2::before { content: ""; width: 2px; height: 14px; flex: none; background: var(--ac-grad-v); }
.lp-sec p { font-size: var(--fs-base); line-height: 21px; color: var(--tx-2); }
.lp-sec p + ol { margin-top: var(--sp-2); }
.lp-list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding-left: 20px; font-size: var(--fs-base); line-height: 21px; color: var(--tx-2); }
.lp-list li::marker { color: var(--tx-4); }
/* the rules: numbered rows, the number in a small well */
.lp-rules { list-style: none; counter-reset: lp; margin: 0; padding: 0; font-size: var(--fs-base); line-height: 21px; color: var(--tx-2); }
.lp-rules > li { counter-increment: lp; display: flex; gap: var(--sp-3); padding: var(--sp-2) 0; }
.lp-rules > li + li { border-top: 1px solid var(--e-hair); }
.lp-rules > li::before { content: counter(lp, decimal-leading-zero); flex: none; width: 28px; height: 20px; margin-top: 1px; display: grid; place-items: center;
  font: 700 var(--fs-sm)/1 var(--ui); color: var(--ac-hi); background: var(--s-well); border: 1px solid #000; box-shadow: inset 0 1px 2px rgba(0,0,0,.6), 0 1px 0 var(--bev-hi); }
.lp-mail { font-weight: 700; overflow-wrap: anywhere; }
.lp-contact { margin-bottom: 14px; }
.lp-contact > .t2 { font-size: var(--fs-md); }
.lp-f { display: flex; flex-direction: column; gap: var(--sp-3); }
.lp-g3 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.lp-g3 > :last-child { grid-column: 1 / -1; }
.lp-fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lp-fld > .hint { font-size: var(--fs-sm); line-height: 16px; }
.lp-fld .opt { color: var(--tx-4); }
.lp-fld textarea.field { min-height: 88px; }
.lp-checks { display: flex; flex-direction: column; gap: 2px; padding: 6px 10px; }
.lp-checks .check-row { align-items: flex-start; padding: 4px 0; }
.lp-checks .check-row .ck { margin-top: 5px; }
.lp-cap { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.lp-cap > .inp { flex: 1 1 160px; }
.lp-ff { display: flex; align-items: center; gap: var(--sp-4); padding-top: var(--sp-3); border-top: 1px solid #000; box-shadow: inset 0 1px 0 var(--e-hair); }
.lp-warn { flex: 1; min-width: 0; font-size: var(--fs-md); line-height: 18px; color: var(--tx-3); }
.lp-again { margin-top: 10px; }

/* ---------------------------------------------------------------- member pages: responsive */
@media (max-width: 1200px) {
  .lp-cgrid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1000px) {
  .lp-grid { grid-template-columns: minmax(0, 1fr); }
  .lp-side { position: static; order: -1; }
  .lp-side > .lp-rel { display: none; }
}
@media (max-width: 840px) {
  .sto-segw:not([hidden]) { display: block; }
  .sto-plans { grid-template-columns: minmax(0, 1fr); }
  .sto-plans > .sto-off { display: none; }
  .sto-cols { grid-template-columns: minmax(0, 1fr); }
  .lp-policy > .card-b { padding: var(--sp-3) var(--g-r) var(--sp-4) var(--g-l); }
  .lp-g3 { grid-template-columns: minmax(0, 1fr); }
  .lp-ff { flex-direction: column; align-items: stretch; gap: var(--sp-3); }
  .lp-cap > .inp { flex-basis: 100%; }
  .od-row { gap: 10px; }
  .od-row > .chip { min-width: 0; }
}
