/* GalaxyDresser web: one stylesheet for every page (WebUpload / WebPick / WebDone / WebStates artboards).
   Dark galaxy theme: a slowly drifting star field (.sky, CSS only, static under reduced motion) behind
   frosted-glass surfaces. No external resources: every image here is a CSS gradient or an inline SVG data URI. */
:root {
  color-scheme: dark;

  /* space */
  --space-0: #05060f;
  --space-1: #070914;
  --space-2: #11143a;
  /* the page canvas: the scrollbar gutter / track next to the fixed sky shows only this colour (no image), so it
     matches the sky's right edge, vignette included (measured rgb 12–20, 14–21, 39–54 top to bottom) */
  --space-edge: #111232;

  /* text: AA on every glass surface, measured over the brightest part of the nebula */
  --ink: #eef0ff;
  --ink-2: #d5d8f5;
  --muted: #bcc0e2;
  --muted-2: #a8add2;
  --faint: rgba(238, 240, 255, .42);          /* disabled text only */

  /* accent (promo video: #16171c / #7c84ff) with cyan and pink highlights */
  --accent: #7c84ff;
  --accent-ink: #b0b5ff;                      /* accent-coloured text */
  --violet: #a07bff;
  --cyan: #6fdcff;
  --pink: #f27fd6;
  --on-accent: #0b0d26;                       /* text on the bright accent gradient (6:1 and up) */
  --grad: linear-gradient(120deg, #7c84ff 0%, #9580ff 55%, #b48bff 100%);
  --grad-hover: linear-gradient(120deg, #8b92ff 0%, #a48cff 50%, #8fd8ff 100%);
  --grad-bar: linear-gradient(90deg, #7c84ff, #a07bff 60%, #6fdcff);

  /* glass */
  --glass-tint: rgba(14, 16, 40, .30);        /* under the white sheen; opaque when backdrop-filter is missing */
  --glass-sheen: linear-gradient(180deg, rgba(255, 255, 255, .095), rgba(255, 255, 255, .045));
  --glass-in: rgba(255, 255, 255, .045);      /* rows inside a glass surface */
  --glass-menu: #151839;                      /* opaque: the menu hangs over page text, outside the header glass */
  --line: rgba(255, 255, 255, .13);           /* panel edges (not controls) */
  --line-2: rgba(255, 255, 255, .40);         /* control edges: 3.3:1 on glass, 3.6:1 on the brightest bare sky */
  --line-3: rgba(255, 255, 255, .58);         /* control edges on hover */
  --line-soft: rgba(255, 255, 255, .07);
  --highlight: rgba(255, 255, 255, .16);      /* 1px top edge of every glass surface */
  --blur: blur(22px) saturate(140%);
  --blur-sm: blur(18px) saturate(140%);
  --shadow: 0 24px 60px -26px rgba(0, 0, 0, .75), 0 2px 10px rgba(0, 0, 0, .22);
  --shadow-lg: 0 36px 90px -24px rgba(0, 0, 0, .85), 0 4px 18px rgba(0, 0, 0, .32);

  /* tones */
  --ok: #74e8b5;
  --ok-bg: rgba(64, 214, 150, .12);
  --ok-line: rgba(116, 232, 181, .4);
  --warn: #ffd18c;
  --warn-bg: rgba(255, 184, 77, .11);
  --warn-line: rgba(255, 204, 128, .42);
  --err: #ffa1ad;
  --err-bg: rgba(255, 92, 120, .13);
  --err-line: rgba(255, 138, 156, .7);        /* also the 「빼기」 button edge: 3.3:1 on a failed row */

  --focus: #c6caff;

  /* scale */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 24px;
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s7: 32px;
  --s8: 40px;
  --s9: 56px;

  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.4 8.6l3 3 6.2-6.7' fill='none' stroke='%230b0d26' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23c6caff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --download: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 2.5v7.5M4.8 7l3.2 3.2L11.2 7M3 13h10' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* no backdrop-filter: the same surfaces, nearly opaque, so text never sits on the bare star field */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  :root { --glass-tint: rgba(18, 21, 50, .93); }
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%; scrollbar-color: rgba(165, 171, 255, .35) transparent;
  scrollbar-gutter: stable;                     /* no sideways jump when a long upload list brings the scrollbar */
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex; flex-direction: column;        /* the footer sits at the bottom of short pages */
  background: var(--space-edge);
  color: var(--ink);
  font-family: 'Pretendard Variable', Pretendard, 'IBM Plex Sans KR', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  word-break: keep-all;                         /* Korean wraps between words, not between syllables */
  overflow-wrap: anywhere;                      /* …but long file names and Latin tokens still break */
  -webkit-font-smoothing: antialiased;
}
body > main { flex: 1 0 auto; width: 100%; }
::selection { background: rgba(124, 132, 255, .5); color: #fff; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { color: #d2d5ff; }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- sky: deep space behind every page (decorative markup, CSS only) ----------
   Four fixed layers, each moved only by a compositor transform/opacity animation (no layout, no paint, no JS loop):
   two soft nebulae (plain wide gradients, no filter) and two star tiles, each at most one tile larger than the window.
   The drift is a few px per second, so every layer moves in steps of 0.2 s (steps(duration × 5)), all on the same
   beat: between beats nothing changes and the compositor redraws nothing, glass blur included (a fifth of the GPU work
   of a 60 fps drift; each step is under half a pixel, so it still reads as smooth). Paused by the footer switch, by
   the frame-rate check in app.js (html[data-motion]) and, unless the viewer turned it on, by prefers-reduced-motion. */
.sky {
  position: fixed; inset: 0; z-index: -1;
  overflow: hidden; pointer-events: none; contain: strict;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(52, 58, 150, .32), transparent 62%),
    linear-gradient(180deg, var(--space-1) 0%, #0a0c26 48%, var(--space-2) 100%);
}
.sky::after {                                   /* vignette: the middle of the page stays calm */
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 90% 80% at 50% 42%, transparent 52%, rgba(3, 4, 12, .6) 100%);
}
.sky > div { position: absolute; will-change: transform; animation: var(--drift); }
.sky-neb {
  inset: -6%;
  background:
    radial-gradient(42% 38% at 18% 26%, rgba(118, 86, 255, .32), rgba(118, 86, 255, .15) 40%, rgba(118, 86, 255, .05) 70%, rgba(118, 86, 255, 0)),
    radial-gradient(38% 33% at 86% 14%, rgba(72, 98, 255, .25), rgba(72, 98, 255, .11) 42%, rgba(72, 98, 255, .03) 72%, rgba(72, 98, 255, 0)),
    radial-gradient(34% 31% at 70% 84%, rgba(206, 88, 222, .16), rgba(206, 88, 222, .07) 42%, rgba(206, 88, 222, .02) 72%, rgba(206, 88, 222, 0));
  --drift: gd-neb-a 70s steps(350) infinite alternate;
}
.sky-neb.b {
  background:
    radial-gradient(36% 32% at 23% 89%, rgba(70, 196, 255, .14), rgba(70, 196, 255, .06) 42%, rgba(70, 196, 255, 0)),
    radial-gradient(32% 38% at 98% 60%, rgba(150, 100, 255, .2), rgba(150, 100, 255, .08) 42%, rgba(150, 100, 255, 0)),
    linear-gradient(118deg, transparent 30%, rgba(124, 110, 255, .04) 42%, rgba(124, 110, 255, .09) 50%, rgba(124, 110, 255, .04) 58%, transparent 70%);
  --drift: gd-neb-b 95s steps(475) infinite alternate;
}
/* star tiles: the layer is one tile larger than the window and moves by exactly one tile per loop, so the drift is
   seamless; the near layer has the bigger, brighter stars and moves faster (parallax) */
.sky-stars { top: 0; left: 0; }
.sky-stars.s1 {
  right: -280px; bottom: -200px; opacity: .75;
  background-size: 280px 200px;
  --drift: gd-drift-1 300s steps(1500) infinite;
  background-image:
    radial-gradient(circle at 8% 14%, rgba(255, 255, 255, .8) 0 .7px, transparent 1.4px),
    radial-gradient(circle at 27% 62%, rgba(200, 210, 255, .7) 0 .7px, transparent 1.4px),
    radial-gradient(circle at 44% 31%, rgba(255, 255, 255, .6) 0 .6px, transparent 1.3px),
    radial-gradient(circle at 61% 84%, rgba(255, 255, 255, .75) 0 .7px, transparent 1.4px),
    radial-gradient(circle at 73% 9%, rgba(190, 220, 255, .65) 0 .6px, transparent 1.3px),
    radial-gradient(circle at 86% 47%, rgba(255, 255, 255, .7) 0 .7px, transparent 1.4px),
    radial-gradient(circle at 15% 91%, rgba(255, 228, 250, .6) 0 .6px, transparent 1.3px),
    radial-gradient(circle at 53% 55%, rgba(255, 255, 255, .5) 0 .6px, transparent 1.2px),
    radial-gradient(circle at 95% 76%, rgba(255, 255, 255, .55) 0 .6px, transparent 1.3px),
    radial-gradient(circle at 36% 6%, rgba(255, 255, 255, .55) 0 .6px, transparent 1.2px),
    radial-gradient(circle at 4% 52%, rgba(186, 200, 255, .7) 0 .8px, transparent 1.5px),
    radial-gradient(circle at 68% 36%, rgba(255, 255, 255, .65) 0 .8px, transparent 1.5px),
    radial-gradient(circle at 34% 79%, rgba(170, 230, 255, .6) 0 .8px, transparent 1.5px);
}
.sky-stars.s2 {
  right: -420px; bottom: -300px; opacity: .8;
  background-size: 420px 300px;
  --drift: gd-drift-2 200s steps(1000) infinite;
  background-image:
    radial-gradient(circle at 12% 22%, rgba(255, 255, 255, .85) 0 1px, transparent 1.8px),
    radial-gradient(circle at 38% 74%, rgba(186, 200, 255, .8) 0 1px, transparent 1.8px),
    radial-gradient(circle at 57% 18%, rgba(255, 255, 255, .7) 0 .9px, transparent 1.7px),
    radial-gradient(circle at 79% 63%, rgba(255, 214, 246, .7) 0 .9px, transparent 1.7px),
    radial-gradient(circle at 91% 11%, rgba(255, 255, 255, .8) 0 1px, transparent 1.8px),
    radial-gradient(circle at 24% 95%, rgba(170, 230, 255, .7) 0 .9px, transparent 1.7px),
    radial-gradient(circle at 66% 44%, rgba(255, 255, 255, .6) 0 .8px, transparent 1.6px),
    radial-gradient(circle at 30% 40%, rgba(255, 255, 255, .95) 0 1.2px, rgba(170, 180, 255, .3) 2.2px, transparent 5px),
    radial-gradient(circle at 84% 86%, rgba(255, 220, 248, .9) 0 1.2px, rgba(242, 127, 214, .25) 2.2px, transparent 4.5px),
    radial-gradient(circle at 48% 58%, rgba(255, 255, 255, .85) 0 1.1px, rgba(150, 220, 255, .22) 2px, transparent 4px);
}
@keyframes gd-neb-a {
  from { transform: translate3d(-2%, -1.5%, 0) scale(1); }
  to { transform: translate3d(2.5%, 2%, 0) scale(1.1); }
}
@keyframes gd-neb-b {
  from { transform: translate3d(2%, 1%, 0) scale(1.06) rotate(-4deg); opacity: .7; }
  to { transform: translate3d(-2%, -2%, 0) scale(1) rotate(3deg); opacity: 1; }
}
@keyframes gd-drift-1 { to { transform: translate3d(-280px, -200px, 0); } }
@keyframes gd-drift-2 { to { transform: translate3d(-420px, -300px, 0); } }
@keyframes gd-spin { to { transform: rotate(360deg); } }
@keyframes gd-pulse { 50% { opacity: .35; transform: scale(.75); } }
@keyframes gd-shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes gd-sweep { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@keyframes gd-float { 50% { transform: translateY(-4px); } }
@keyframes gd-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* ---------- glass: every panel, card, dialog and the header ---------- */
.top-inner, .panel, .box, .drop, .state, .prefab, .summary, .card, .table-box, .plan, .selectbox, .toolbar > .btn {
  background-color: var(--glass-tint);
  background-image: var(--glass-sheen);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--highlight), var(--shadow);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}

/* ---------- header ---------- */
.top { position: relative; z-index: 10; padding: 18px 24px 0; }
.top-inner {
  position: relative;                           /* the account menu hangs from its right edge */
  max-width: 1132px; margin: 0 auto; min-height: 66px; padding: 10px 12px 10px 20px;   /* = the content column */
  border-radius: var(--r-lg);
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px;
  font-size: 14px;
}
.brand {
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  font-size: 19px; font-weight: 800; letter-spacing: -.01em; text-decoration: none;
  color: var(--ink);
  background: linear-gradient(90deg, #ffffff 0%, #d3d6ff 55%, #9fe4ff 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.brand::before {                                /* a small planet */
  content: ''; flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #ffffff 0, #d0d3ff 12%, #8a90ff 40%, #5a3fd0 70%, #1d1656 100%);
  box-shadow: 0 0 18px rgba(124, 132, 255, .6), inset -3px -4px 8px rgba(10, 8, 40, .55);
}
.brand::after {                                 /* …and the front half of its ring */
  content: ''; position: absolute; left: -6px; top: 50%; width: 38px; height: 12px;
  border: 1.5px solid rgba(206, 210, 255, .75); border-top-color: transparent; border-radius: 50%;
  transform: translateY(-50%) rotate(-18deg);
}
.brand:hover { color: var(--ink); }
.spacer { flex: 1 1 0; }
.top nav { display: flex; flex-wrap: wrap; gap: 6px; }
.top nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px;
  color: var(--ink-2); font-weight: 600; text-decoration: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .04)); border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
  transition: background-color .18s, border-color .18s, color .18s, box-shadow .18s;
}
.top nav a:hover {
  background: rgba(255, 255, 255, .13); border-color: var(--line-3); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 6px 18px -8px rgba(124, 132, 255, .5);
}
.top nav a:active { background: rgba(255, 255, 255, .06); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .4); }
.quota {                                        /* status, not a control: no edge, no fill */
  display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 4px;
  color: #d6d9ff; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.quota::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-ink); box-shadow: 0 0 8px var(--accent); }
.badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; line-height: 1.3; border: 1px solid transparent; white-space: nowrap;
}
.badge.ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.badge.ok::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.account > summary {
  list-style: none; cursor: pointer;
  width: 40px; height: 40px; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .45), transparent 50%), var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; color: var(--on-accent);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .14), 0 6px 18px -6px rgba(124, 132, 255, .8);
  transition: box-shadow .18s, transform .12s;
}
.account > summary:hover { box-shadow: 0 0 0 2px rgba(255, 255, 255, .3), 0 8px 24px -6px rgba(124, 132, 255, .95); }
.account > summary:active { transform: scale(.96); }
.account > summary::-webkit-details-marker { display: none; }
.account-menu {
  /* inside the header's glass (its backdrop root): solid, not blurred. Anchored to the header's right edge, not to the
     avatar, so it opens on screen wherever the avatar wraps to */
  position: absolute; right: 10px; top: calc(100% + 8px); z-index: 20;
  min-width: 240px; max-width: calc(100vw - 32px);
  background: var(--glass-menu); border: 1px solid var(--line-2); border-radius: var(--r-md);
  box-shadow: inset 0 1px 0 var(--highlight), var(--shadow-lg);
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
  animation: gd-pop .18s ease-out;
}
.account-menu .who { font-weight: 700; }
.account-menu .sid { font-size: 12px; color: var(--muted-2); }

/* ---------- page body ---------- */
.wrap {
  max-width: 1180px; margin: 0 auto; padding: 56px 24px 64px;
  display: flex; flex-direction: column; gap: 28px;
}
.wrap.tight { padding-top: 44px; gap: 24px; }
.head { display: flex; flex-direction: column; gap: 10px; }
.head h1 {
  font-size: 40px; font-weight: 800; line-height: 1.22; letter-spacing: -.02em; color: #f6f7ff;
  text-shadow: 0 2px 28px rgba(124, 132, 255, .35);
}
.wrap.tight .head h1 { font-size: 36px; }
.head .eyebrow {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px; border-radius: 999px;
  background: rgba(124, 132, 255, .14); border: 1px solid rgba(150, 156, 255, .34);
  font-size: 13px; font-weight: 600; color: var(--accent-ink);
}
.head .eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.head .eyebrow:empty { display: none; }
.lead { font-size: 17px; color: var(--ink-2); max-width: 64em; }
.muted { color: var(--muted); }
.small { font-size: 13px; color: var(--muted-2); }
.fine { font-size: 13px; color: var(--muted-2); line-height: 1.65; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.end { align-self: flex-end; }
.loading { display: inline-flex; align-items: center; gap: 12px; color: var(--muted); font-size: 15px; }
.loading::before {
  content: ''; flex: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(165, 171, 255, .25); border-top-color: var(--accent-ink);
  animation: gd-spin .9s linear infinite;
}

/* ---------- buttons: primary = accent gradient, default = glass, danger = outlined ghost ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .06));
  color: var(--ink);
  font-size: 14px; font-weight: 600; line-height: 1.2; letter-spacing: .005em;
  text-decoration: none; cursor: pointer; white-space: nowrap; user-select: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 6px 16px -8px rgba(0, 0, 0, .6);
  transition: border-color .18s, box-shadow .18s, color .18s, transform .12s, filter .18s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover {
  color: #fff; border-color: var(--line-3);
  background: linear-gradient(180deg, rgba(255, 255, 255, .19), rgba(255, 255, 255, .09));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 8px 22px -8px rgba(124, 132, 255, .45);
}
.btn:active {
  transform: translateY(1px);
  background: rgba(255, 255, 255, .06);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .4);
}
.btn-sm { min-height: 40px; padding: 0 14px; border-radius: 11px; font-size: 13px; }
.btn-lg { min-height: 52px; padding: 0 30px; border-radius: 14px; font-size: 16px; font-weight: 700; }
.btn-primary, .btn-light {
  border-color: rgba(255, 255, 255, .3);
  background: var(--grad);
  color: var(--on-accent); font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 10px 26px -10px rgba(124, 132, 255, .85), 0 0 0 1px rgba(124, 132, 255, .25);
}
.btn-primary:hover, .btn-light:hover {
  color: var(--on-accent); border-color: rgba(255, 255, 255, .5);
  background: var(--grad-hover);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 12px 34px -8px rgba(124, 132, 255, .95), 0 0 26px rgba(143, 216, 255, .35);
}
.btn-primary:active, .btn-light:active {
  transform: translateY(1px) scale(.99); filter: brightness(.9);
  background: var(--grad);
  box-shadow: inset 0 2px 8px rgba(30, 20, 90, .5), 0 4px 12px -6px rgba(124, 132, 255, .7);
}
.btn-accent {                                   /* glass with an accent edge: the header 구독하기 (one gradient CTA per screen) */
  border-color: rgba(176, 181, 255, .72);
  background: linear-gradient(180deg, rgba(124, 132, 255, .3), rgba(124, 132, 255, .14));
  color: #eceeff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 6px 18px -8px rgba(124, 132, 255, .6);
}
.btn-accent:hover {
  border-color: #c3c7ff; color: #fff;
  background: linear-gradient(180deg, rgba(124, 132, 255, .42), rgba(124, 132, 255, .22));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26), 0 8px 24px -8px rgba(124, 132, 255, .85), 0 0 18px rgba(143, 216, 255, .22);
}
.btn-accent:active { background: rgba(124, 132, 255, .2); box-shadow: inset 0 2px 6px rgba(10, 8, 40, .5); }
.btn-ink {                                      /* solid light: Steam login */
  border-color: rgba(255, 255, 255, .7);
  background: linear-gradient(180deg, #ffffff, #e2e5ff);
  color: var(--on-accent); font-weight: 700;
  box-shadow: inset 0 -1px 0 rgba(20, 24, 80, .18), 0 10px 26px -12px rgba(200, 205, 255, .6);
}
.btn-ink:hover { color: var(--on-accent); background: #fff; box-shadow: 0 12px 32px -10px rgba(210, 214, 255, .8), 0 0 22px rgba(160, 166, 255, .3); }
.btn-ink:active { background: #dfe2ff; box-shadow: inset 0 2px 6px rgba(20, 24, 80, .3); }
.btn-danger {
  background: transparent; border-color: var(--err-line); color: var(--err);
  box-shadow: none;
}
.btn-danger:hover { background: var(--err-bg); border-color: #ffb1bd; color: #ffc4cc; box-shadow: none; }
.btn-danger:active { background: rgba(255, 92, 120, .2); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .35); }
.btn-dl::before {                               /* download glyph (currentColor) */
  content: ''; width: 15px; height: 15px; flex: none; background: currentColor;
  -webkit-mask: var(--download) center / contain no-repeat; mask: var(--download) center / contain no-repeat;
}
.btn:disabled, .btn[aria-disabled="true"] {
  cursor: not-allowed; transform: none; filter: none;
  border-color: rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .045);
  color: var(--faint);
  box-shadow: none;
}
.btn[aria-busy="true"]::after {
  content: ''; width: 15px; height: 15px; flex: none; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: gd-spin .8s linear infinite;
}

/* ---------- form controls ---------- */
input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; margin: 0;
  width: 22px; height: 22px; flex: none; border-radius: 7px; cursor: pointer;
  border: 1.5px solid rgba(214, 218, 255, .6);
  background: rgba(255, 255, 255, .06);
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
input[type="checkbox"]:hover { border-color: #d0d3ff; background-color: rgba(124, 132, 255, .18); }
input[type="checkbox"]:checked {
  border-color: rgba(255, 255, 255, .4);
  background: var(--check) center / 15px 15px no-repeat, var(--grad);
  box-shadow: 0 0 0 3px rgba(124, 132, 255, .22), 0 0 14px rgba(124, 132, 255, .55);
}
input[type="checkbox"]:disabled { cursor: not-allowed; opacity: .4; border-style: dashed; background-color: transparent; }
select {
  -webkit-appearance: none; appearance: none;
  height: 36px; padding: 0 34px 0 12px; border-radius: 10px; max-width: 100%;
  border: 1px solid var(--line-2);
  background: rgba(8, 10, 30, .55) var(--chevron) right 10px center / 14px 14px no-repeat;
  color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer;
  transition: border-color .18s;
}
select:hover { border-color: var(--line-3); }
select option { background: #161936; color: var(--ink); }

/* ---------- state cards (WebStates) ---------- */
.states { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); align-items: start; gap: 16px; }
.states:empty { display: none; }
.state {
  border-radius: var(--r-lg);
  padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
  animation: gd-pop .25s ease-out;
}
.state-title {
  display: flex; align-items: center; gap: 9px;
  font-size: 14px; font-weight: 700; color: var(--accent-ink);
}
.state-title::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.state-body { font-size: 15px; line-height: 1.6; color: var(--ink); }
.state .small { color: var(--muted); }
.state.err {
  border-color: var(--err-line);
  background-image: linear-gradient(180deg, rgba(255, 110, 135, .16), rgba(255, 110, 135, .06));
}
.state.err .state-title { color: var(--err); }
.state.warn {
  border-color: var(--warn-line);
  background-image: linear-gradient(180deg, rgba(255, 190, 90, .14), rgba(255, 190, 90, .05));
}
.state.warn .state-title { color: var(--warn); }
.state .row { gap: 10px 12px; margin-top: 4px; }
.state > .btn { margin-top: 4px; }
.state details { font-size: 14px; }
.state ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
/* disclosure toggles (자세히 / 빠진 파일 보기): small pills, never bare links */
.state details > summary, .prefab details > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  min-height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, .06);
  color: var(--ink-2); font-size: 13px; font-weight: 600;
  transition: background-color .18s, border-color .18s;
}
.state details > summary:hover, .prefab details > summary:hover { background: rgba(255, 255, 255, .11); border-color: var(--line-3); }
.state details > summary::-webkit-details-marker, .prefab details > summary::-webkit-details-marker { display: none; }
.state details > summary::before, .prefab details > summary::before {
  content: ''; width: 6px; height: 6px; flex: none; margin-top: -2px;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg); transition: transform .2s;
}
.state details[open] > summary::before, .prefab details[open] > summary::before { transform: rotate(-135deg); margin-top: 3px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; cursor: pointer; line-height: 1.55; }
.check input { margin-top: 1px; }

/* ---------- login / link panels ---------- */
.panel {
  border-radius: var(--r-xl);
  padding: 32px 28px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start;
}
.panel h2 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.devlogin {
  width: 100%; border-top: 1px dashed var(--line-2); padding-top: 16px; margin-top: 4px;
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px;
}
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); min-width: 0; flex: 1 1 220px; }
.field input {
  height: 44px; padding: 0 14px; width: 100%;
  border: 1px solid var(--line-2); border-radius: 12px;
  background: rgba(8, 10, 30, .55); color: var(--ink); font-size: 15px;
  transition: border-color .18s, box-shadow .18s;
}
.field input::placeholder { color: #9297be; }
.field input:hover { border-color: var(--line-3); }
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 132, 255, .3); }
.form-msg {
  width: 100%; padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--err-bg); border: 1px solid var(--err-line); color: var(--err); font-size: 13px;
}
.link-confirm { gap: 14px; }
.link-code {
  font-size: 48px; font-weight: 800; line-height: 1.1; letter-spacing: .1em;
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-variant-numeric: tabular-nums; overflow-wrap: normal; white-space: nowrap;
  color: #fff;
  background: linear-gradient(90deg, #ffffff 0%, #ccd0ff 50%, #95e2ff 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px rgba(124, 132, 255, .45));
}
.facts {
  display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 20px; margin: 0; width: 100%;
  padding: 16px 18px; border-radius: var(--r-md); background: var(--glass-in); border: 1px solid var(--line-soft);
  font-size: 14px;
}
.facts dt { color: var(--muted-2); }
.facts dd { margin: 0; min-width: 0; color: var(--ink); }
.link-warn {
  width: 100%; display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: var(--r-md);
  background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn); font-weight: 600;
}
.link-warn::before {
  content: '!'; flex: none; width: 22px; height: 22px; border-radius: 50%; margin-top: 1px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--warn); color: #2a1a00; font-size: 14px; font-weight: 800; line-height: 1;
}

/* ---------- upload ---------- */
.drop {
  position: relative;
  border: 1.5px dashed rgba(170, 176, 255, .55); border-radius: var(--r-xl);
  padding: 64px 24px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.drop.over {
  border-style: solid; border-color: var(--accent);
  background-image: linear-gradient(180deg, rgba(124, 132, 255, .26), rgba(124, 132, 255, .1));
  box-shadow: inset 0 1px 0 var(--highlight), 0 0 0 6px rgba(124, 132, 255, .16), 0 0 70px -10px rgba(124, 132, 255, .75);
  transform: scale(1.006);
}
.drop-icon {
  width: 72px; height: 72px; border-radius: 22px; color: #fff;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 30% 22%, rgba(255, 255, 255, .45), transparent 48%), var(--grad);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 14px 36px -10px rgba(124, 132, 255, .9), 0 0 0 8px rgba(124, 132, 255, .1);
  animation: gd-float 6s ease-in-out infinite;
}
.drop-icon svg { filter: drop-shadow(0 1px 1px rgba(20, 16, 70, .45)); }
.drop-title { font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.drop .btn-primary { min-height: 48px; padding: 0 26px; border-radius: 14px; font-size: 15px; }
.box {
  border-radius: var(--r-lg);
  padding: 22px; display: flex; flex-direction: column; gap: 14px;
}
.box-title { font-size: 16px; font-weight: 700; }
.files { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.file {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 260px) 160px; gap: 8px 16px;
  align-items: center; font-size: 14px;
  padding: 14px 16px; border-radius: var(--r-md);
  background: var(--glass-in); border: 1px solid var(--line-soft);
  transition: border-color .2s, background-color .2s;
}
.file:has(.file-info.err) { border-color: var(--err-line); background: rgba(255, 92, 120, .07); }
.file:has(.file-info.ok) { border-color: rgba(116, 232, 181, .22); }
.file-name { min-width: 0; font-weight: 600; }
.file-info { color: var(--muted-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.file-info.err { color: var(--err); }
.file-info.ok { color: var(--ok); }
.file-act { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }
.bar {                                          /* dark track + light edge: fill 5:1 on the track, edge 3:1 on the row */
  position: relative; height: 10px; border-radius: 999px; overflow: hidden;
  background: rgba(4, 5, 20, .55); border: 1px solid var(--line-2); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .45);
}
.bar-fill {
  position: relative; height: 100%; width: 0; border-radius: inherit; overflow: hidden;
  background: var(--grad-bar); box-shadow: 0 0 12px rgba(124, 132, 255, .7);
  transition: width .25s ease;
}
.bar.live .bar-fill::after {                    /* moving sheen while bytes are going up */
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent);
  animation: gd-shimmer 1.6s ease-in-out infinite;
}
.bar.done .bar-fill { background: linear-gradient(90deg, #3fd59a, #74e8b5); box-shadow: 0 0 10px rgba(116, 232, 181, .5); }
.bar.err .bar-fill { background: linear-gradient(90deg, #ff6b84, #ffa1ad); box-shadow: none; }

/* ---------- pick ---------- */
.product { display: flex; flex-direction: column; gap: 14px; }
.product h2 { font-size: 19px; font-weight: 800; }
.product h2 .small { font-weight: 500; margin-left: 10px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; }   /* 6 per row at 1132px */
.prefab {
  border-radius: var(--r-lg);
  -webkit-backdrop-filter: var(--blur-sm); backdrop-filter: var(--blur-sm);
  padding: 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0;
  transition: transform .2s ease, border-color .2s, box-shadow .2s;
}
.prefab:not(.off):hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, .26);
  box-shadow: inset 0 1px 0 var(--highlight), 0 28px 56px -22px rgba(0, 0, 0, .85), 0 0 0 1px rgba(124, 132, 255, .18);
}
.prefab.on, .prefab.on:hover {
  border-color: rgba(160, 166, 255, .95);
  background-image: linear-gradient(180deg, rgba(124, 132, 255, .24), rgba(124, 132, 255, .08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 0 0 1px rgba(160, 166, 255, .9), 0 20px 50px -16px rgba(124, 132, 255, .7);
}
.prefab.warned:not(.on) { border-color: var(--warn-line); }
.prefab > label { display: flex; flex-direction: column; gap: 12px; cursor: pointer; }
.prefab.off { border-style: dashed; background-image: none; box-shadow: none; }
.prefab.off > label { cursor: not-allowed; }
.prefab.off .thumb, .prefab.off .pick-name { opacity: .5; }
.prefab .off-text { font-size: 13px; color: var(--muted); }
.thumb {
  position: relative; overflow: hidden;
  height: 168px; border-radius: var(--r-md); border: 1px solid rgba(255, 255, 255, .09);
  display: flex; flex-direction: column; align-items: center; justify-content: center; justify-content: safe center; gap: 2px;
  font-size: 13px; color: rgba(240, 241, 255, .9); text-align: center; padding: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
.thumb::before {                                /* a few still stars in every thumbnail */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 14% 22%, rgba(255, 255, 255, .8) 0 .8px, transparent 1.6px),
    radial-gradient(circle at 82% 16%, rgba(255, 255, 255, .7) 0 .8px, transparent 1.6px),
    radial-gradient(circle at 70% 84%, rgba(255, 255, 255, .6) 0 .7px, transparent 1.5px),
    radial-gradient(circle at 28% 78%, rgba(255, 255, 255, .55) 0 .7px, transparent 1.5px),
    radial-gradient(circle at 92% 58%, rgba(255, 255, 255, .5) 0 .6px, transparent 1.4px);
}
.thumb > * { position: relative; max-width: 100%; }
.thumb > span:not(.thumb-name) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* the folder: one line */
.thumb-name {                                   /* long BOOTH names: two lines at most, never cut at the box edge */
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  font-size: 28px; font-weight: 800; color: #fff; line-height: 1.2; letter-spacing: -.01em;
  text-shadow: 0 2px 18px rgba(8, 8, 40, .65);
}
.tint-0 { background: radial-gradient(110% 90% at 18% 12%, rgba(160, 123, 255, .5), transparent 62%), radial-gradient(90% 80% at 88% 92%, rgba(111, 220, 255, .24), transparent 60%), #16183c; }
.tint-1 { background: radial-gradient(110% 90% at 82% 14%, rgba(80, 190, 255, .4), transparent 62%), radial-gradient(90% 80% at 14% 90%, rgba(124, 132, 255, .34), transparent 60%), #111a3a; }
.tint-2 { background: radial-gradient(110% 90% at 20% 86%, rgba(242, 127, 214, .36), transparent 62%), radial-gradient(90% 80% at 86% 12%, rgba(124, 132, 255, .36), transparent 60%), #1a1638; }
.tint-3 { background: radial-gradient(110% 90% at 50% 0%, rgba(124, 132, 255, .44), transparent 62%), radial-gradient(90% 70% at 50% 110%, rgba(160, 123, 255, .3), transparent 60%), #121636; }
.tint-4 { background: radial-gradient(110% 90% at 85% 80%, rgba(111, 220, 255, .3), transparent 62%), radial-gradient(90% 80% at 12% 15%, rgba(242, 127, 214, .28), transparent 60%), #15183a; }
.pick-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pick-name { font-size: 16px; font-weight: 700; min-width: 0; }
.pick-meta { font-size: 12px; color: var(--muted-2); white-space: nowrap; margin-left: auto; font-variant-numeric: tabular-nums; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags:empty { display: none; }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; line-height: 1.45; padding: 3px 10px; border-radius: 11px;
  background: rgba(255, 255, 255, .07); border: 1px solid var(--line); color: var(--ink-2);
}
.tag.ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.tag.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.tag.busy { background: rgba(124, 132, 255, .16); border-color: rgba(160, 166, 255, .48); color: #d0d3ff; }
.tag.busy::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; flex: none; align-self: center;
  background: #a9afff; box-shadow: 0 0 8px #a9afff;
  animation: gd-pulse 1.6s ease-in-out infinite;
}
.prefab details { font-size: 12px; color: var(--muted-2); }
.prefab details > summary { color: var(--warn); border-color: rgba(255, 204, 128, .7); background: var(--warn-bg); min-height: 30px; font-size: 12px; }
.prefab details > summary:hover { border-color: #ffd9a0; background: rgba(255, 184, 77, .18); }
.prefab ul { margin: 6px 0 0; padding-left: 16px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.toolbar > .btn { min-height: 46px; border-radius: 14px; padding: 0 20px; }
.toolbar > .btn:disabled { background-image: none; }
.selectbox {
  display: flex; align-items: center; gap: 10px; padding: 0 6px 0 16px; min-height: 46px;
  border-radius: 14px; font-size: 14px;
}
.selectbox label { color: var(--muted); font-weight: 600; }
.summary {
  border-radius: var(--r-xl);
  border-color: rgba(160, 166, 255, .34);
  background-image: linear-gradient(115deg, rgba(124, 132, 255, .2), rgba(255, 255, 255, .05) 55%, rgba(111, 220, 255, .1));
  padding: 20px 22px 20px 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px;
}
.summary-text { flex: 1 1 320px; font-size: 15px; color: var(--ink-2); line-height: 1.65; }
.summary-text b { font-weight: 800; color: #fff; }
.notes { margin: 0; padding-left: 18px; font-size: 13px; color: var(--muted-2); }

/* ---------- done ---------- */
.card {
  border-radius: var(--r-xl);
  padding: 28px; display: flex; flex-direction: column; gap: 20px;
}
.card h1 { font-size: 30px; font-weight: 800; letter-spacing: -.015em; }
.card .muted { color: var(--ink-2); }
.card .muted .btn { vertical-align: middle; }
.steps { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none; }
.step {
  position: relative; overflow: hidden;
  flex: 1 1 220px; padding: 18px 16px 16px; border-radius: var(--r-md); font-size: 14px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line-soft);
}
.step::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: rgba(255, 255, 255, .08); }
.step-title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; }
.step-n {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, .08); border: 1px solid var(--line-2); color: var(--ink-2);
}
.step-text { margin-top: 8px; color: var(--muted-2); }
.step.done { border-color: rgba(116, 232, 181, .3); background: rgba(64, 214, 150, .07); }
.step.done::before { background: linear-gradient(90deg, #3fd59a, #74e8b5); }
.step.done .step-n {                            /* the number turns into a check (still in the text) */
  color: transparent; border-color: transparent;
  background: var(--check) center / 15px 15px no-repeat, linear-gradient(135deg, #3fd59a, #74e8b5);
  box-shadow: 0 0 14px rgba(116, 232, 181, .45);
}
.step.done .step-text { color: var(--ok); }
.step.active { border-color: rgba(160, 166, 255, .5); background: rgba(124, 132, 255, .11); box-shadow: 0 0 34px -12px rgba(124, 132, 255, .7); }
.step.active::before { background: var(--grad-bar); }
.step.active::after {
  content: ''; position: absolute; left: 0; top: 0; width: 40%; height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .9), transparent);
  animation: gd-sweep 2.4s ease-in-out infinite;
}
.step.active .step-n { background: var(--grad); color: var(--on-accent); border-color: rgba(255, 255, 255, .3); box-shadow: 0 0 14px rgba(124, 132, 255, .6); }
.step.active .step-text { color: var(--accent-ink); }
.step.fail { border-color: var(--err-line); background: var(--err-bg); }
.step.fail::before { background: linear-gradient(90deg, #ff6b84, #ffa1ad); }
.step.fail .step-n { background: rgba(255, 110, 135, .25); border-color: var(--err-line); color: var(--err); }
.step.fail .step-text { color: var(--err); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.section-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.table-box { border-radius: var(--r-lg); overflow: hidden; }
.table-box > .empty .btn { margin-left: 8px; vertical-align: middle; }
.lib { width: 100%; border-collapse: collapse; table-layout: fixed; }
.lib th {
  text-align: left; font-weight: 600; font-size: 13px; color: var(--muted-2);
  padding: 14px 20px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .03);
}
.lib td { padding: 14px 20px; font-size: 15px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.lib tbody tr { transition: background-color .15s; }
.lib tbody tr:hover { background: rgba(255, 255, 255, .04); }
.lib tr:last-child td { border-bottom: 0; }
/* fixed columns for 종류 / 받은 날 / the action, the name takes the rest (the date never runs under the button) */
.lib .c-name { font-weight: 600; }
.lib th:nth-child(2) { width: 128px; }
.lib th.date { width: 148px; }
.lib .c-act { width: 300px; }
.lib td.sub { color: var(--muted); overflow-wrap: normal; font-weight: 400; }
.lib td.date, .lib th.date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.lib .prod { display: block; font-size: 12px; font-weight: 400; color: var(--muted-2); }
.lib .reason { font-size: 13px; color: var(--muted); }
.lib .dl-msg { display: block; font-size: 12px; color: var(--muted-2); margin-top: 6px; font-variant-numeric: tabular-nums; }
.lib .dl-msg.err { color: var(--err); }
.lib tr.fresh { background: linear-gradient(90deg, rgba(124, 132, 255, .16), transparent 65%); }
.lib tr.fresh td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.empty { padding: 22px 20px; color: var(--muted); font-size: 15px; }
.plan {
  border-radius: var(--r-xl); padding: 26px 28px;
  border-color: rgba(196, 176, 255, .38);
  background-image:
    radial-gradient(120% 160% at 0% 0%, rgba(160, 123, 255, .3), transparent 55%),
    radial-gradient(120% 160% at 100% 100%, rgba(242, 127, 214, .2), transparent 55%),
    var(--glass-sheen);
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px;
}
.plan-text { flex: 1 1 320px; display: flex; flex-direction: column; gap: 6px; }
.plan-title { font-size: 20px; font-weight: 800; color: #fff; }
.plan-sub { font-size: 14px; color: #d8daf3; }
.plan .btn-light { min-height: 48px; padding: 0 26px; border-radius: 14px; font-size: 15px; }

/* ---------- dialog ---------- */
.dlg {
  border: 1px solid var(--line-2); border-radius: var(--r-xl); padding: 0;
  width: min(480px, calc(100vw - 32px)); color: var(--ink);
  background-color: rgba(20, 23, 54, .8);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .04));
  -webkit-backdrop-filter: blur(28px) saturate(150%); backdrop-filter: blur(28px) saturate(150%);
  box-shadow: inset 0 1px 0 var(--highlight), var(--shadow-lg);
}
.dlg[open] { animation: gd-pop .22s ease-out; }
.dlg::backdrop { background: rgba(3, 4, 14, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.dlg-in { padding: 26px; display: flex; flex-direction: column; gap: 18px; }
.dlg-title { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.dlg-body { display: flex; flex-direction: column; gap: 10px; }
.dlg-body .state, .dlg-body .panel {
  border: 0; padding: 0; background: none; box-shadow: none; animation: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.dlg-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.dlg-fallback { position: fixed; inset: 0; z-index: 50; margin: auto; height: fit-content; }
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .dlg { background-color: rgba(20, 23, 54, .98); }
}

/* ---------- footer: the 배경 움직임 switch (app.js renderFooter) ---------- */
.foot { padding: 0 24px 28px; }
.foot-inner {
  max-width: 1132px; margin: 0 auto; padding-top: 18px; border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  font-size: 13px; color: var(--muted-2);
}
.switch { gap: 10px; }
.switch-track {                                 /* a small on/off track inside the button; the state is aria-pressed */
  position: relative; flex: none; width: 32px; height: 18px; border-radius: 999px;
  background: rgba(4, 5, 20, .6); border: 1px solid var(--line-2);
  transition: background-color .18s, border-color .18s;
}
.switch-track::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%;
  background: #c9ccec; transition: transform .18s;
}
.switch[aria-pressed="true"] .switch-track { background: var(--grad); border-color: rgba(255, 255, 255, .45); }
.switch[aria-pressed="true"] .switch-track::after { transform: translateX(14px); background: #fff; }

/* ---------- touch, narrow screens, motion ---------- */
@media (pointer: coarse) {
  .btn, .btn-sm, .top nav a { min-height: 44px; }
  .state details > summary, .prefab details > summary { min-height: 40px; }
}

/* header in two lines when one does not fit (tablets, half-width windows, phones):
   line 1: brand … 구독하기 / login + avatar; line 2: connection badge, page links, free count */
@media (max-width: 900px) {
  .top-inner > .spacer { display: none; }
  .top-inner > .btn, .top-inner > .account { order: 1; }
  .top-inner > .btn, .top-inner > .account { margin-left: auto; }
  .top-inner > .btn + .account { margin-left: 0; }
  .top-inner::after { content: ''; order: 1; flex-basis: 100%; height: 0; }
  .top-inner > .badge, .top-inner > nav, .top-inner > .quota { order: 2; }
}

/* 내 의상함: a narrower action column on tablets, one block per row below that */
@media (max-width: 960px) {
  .lib th, .lib td { padding-left: 14px; padding-right: 14px; }
  .lib th:nth-child(2) { width: 112px; }
  .lib th.date { width: 128px; }
  .lib .c-act { width: 196px; }
}
@media (max-width: 720px) {
  .lib, .lib tbody, .lib tr, .lib td { display: block; width: auto; }
  .lib thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .lib tr { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
  .lib tr:last-child { border-bottom: 0; }
  .lib td, .lib th, .lib td.c-name, .lib td.c-act { padding: 2px 0; border: 0; font-size: 14px; width: auto; }
  .lib td.c-name { font-size: 15px; }
  .lib td.c-act { margin-top: 8px; }
  .lib td.sub { display: inline-block; margin-right: 12px; }
  .lib tr.fresh td:first-child { box-shadow: none; }
  .lib tr.fresh { box-shadow: inset 3px 0 0 var(--accent); }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .top { padding: 12px 12px 0; }
  .top-inner { padding: 8px 10px 8px 14px; gap: 8px; border-radius: 18px; min-height: 0; }
  .brand { font-size: 17px; }
  .top nav { gap: 6px; }
  .top nav a { padding: 0 12px; }
  .btn { white-space: normal; text-align: center; }
  .wrap, .wrap.tight { padding: 28px 16px 48px; gap: 20px; }
  .head h1, .wrap.tight .head h1 { font-size: 27px; }
  .lead { font-size: 15px; }
  .drop { padding: 40px 16px; }
  .box { padding: 16px; }
  .file { grid-template-columns: minmax(0, 1fr) 96px; padding: 12px; }
  .file-name { grid-column: 1 / -1; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .prefab { padding: 12px; }
  .thumb { height: 108px; }
  .thumb-name { font-size: 22px; }
  .toolbar > .btn, .selectbox { flex: 1 1 auto; }
  .summary { padding: 18px; }
  .summary .btn-lg, .end.btn-lg { width: 100%; }
  .end { align-self: stretch; }
  .card { padding: 20px; }
  .card h1 { font-size: 23px; }
  .panel { padding: 24px 18px; }
  .plan { padding: 20px; }
  .plan .btn-light { width: 100%; }
  .link-code { font-size: 34px; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .facts dd { margin-bottom: 8px; }
  .link-confirm .btn-lg { width: 100%; }
  .foot { padding: 0 16px 22px; }
}

/* sky motion: html[data-motion] comes from app.js (the footer switch, else the system setting; a slow frame rate turns
   it off). Without it (no script) the system setting alone decides. Paused keeps the layers where they are. */
html[data-motion="off"] .sky > div { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="on"]) .sky > div { animation: none !important; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  html[data-motion="on"] .sky > div { animation: var(--drift) !important; }   /* the viewer turned it on */
  .prefab:not(.off):hover, .drop.over { transform: none; }
}

@media (forced-colors: active) {
  .sky { display: none; }
  .brand, .link-code { background: none; -webkit-text-fill-color: currentColor; filter: none; }
  .btn, .top nav a, .tag, .badge, .bar, .switch-track { border: 1px solid ButtonText; }
  .switch-track::after { background: ButtonText; }
  .switch[aria-pressed="true"] .switch-track { background: Highlight; }
  .switch[aria-pressed="true"] .switch-track::after { background: HighlightText; }
}

/* ---------- billing: consent line, footer links, pay.html and the policy pages ---------- */
.consent a { white-space: nowrap; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }
.draft-banner {
  padding: 10px 14px; border-radius: var(--r-md); font-size: 14px; font-weight: 700;
  color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-line);
}
.legal { max-width: 860px; gap: 18px; }
.legal section { display: flex; flex-direction: column; gap: 8px; }
.legal h2 { font-size: 19px; font-weight: 800; margin-top: 6px; }
.legal p, .legal li, .legal td, .legal th { font-size: 15px; line-height: 1.75; color: var(--ink-2); }
.legal ul, .legal ol { margin: 0; padding-left: 22px; }
.legal mark { color: var(--warn); background: var(--warn-bg); border-radius: 4px; padding: 0 4px; }
.legal table { width: 100%; border-collapse: collapse; }
.legal th, .legal td { padding: 8px 10px; text-align: left; vertical-align: top; border: 1px solid var(--line); }
.legal th { color: var(--ink); font-weight: 700; }
.legal tbody th { white-space: nowrap; }
.legal .foot-links { justify-content: flex-start; }

/* ---------- Steam app sign-in: the waiting card (views/login.js) and the Steam app's page (steam-app.html) ---------- */
.login-area, .login-start, .login-wait { width: 100%; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.login-wait .state-title { font-size: 16px; }
.login-wait.ok .state-title, .login-wait.ok .login-status { color: var(--ok); }
.login-wait.warn .state-title, .login-wait.warn .login-status { color: var(--warn); }
.login-wait.err .state-title, .login-wait.err .login-status { color: var(--err); }
.login-code-box { display: flex; flex-direction: column; gap: 6px; }
.login-code {
  font-size: 40px; font-weight: 800; line-height: 1.1; letter-spacing: .12em;
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-variant-numeric: tabular-nums; white-space: nowrap; color: #fff;
}
.login-status { font-size: 15px; line-height: 1.6; color: var(--ink); }
.login-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.login-fallback { color: var(--accent-ink); }
.steam-app-main { max-width: 560px; margin: 0 auto; }
.steam-app h1 { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.steam-app-warn { width: 100%; font-size: 14px; line-height: 1.6; color: var(--warn); }
@media (max-width: 640px) { .login-code { font-size: 32px; } }
