/* Weekly drawing game: the player site and the canvas editor.
   Builds on /static/style.css (tokens, buttons, inputs, modal, toasts), but
   the game is not the dashboard — the panel is a tool, this is a table people
   sit down at once a week. Everything below the tokens is here to make it feel
   like one: deeper night background, soft lavender and mint accents, cards with
   weight, and a phase rail instead of a wall of panels. Dark only, like the
   panel: it lives next to Discord. */

.art-body {
  /* The game's own palette. Scoped to the body so the dashboard keeps its
     cooler, flatter look — and so the editor inherits the same tokens. */
  --art-accent: #b6a0ff;
  --art-accent-2: #8fdac5;
  --art-accent-soft: #b6a0ff2b;
  --art-gold: #cabaee;
  --art-ok: #8fdac5;
  --art-money: #b7abdf;

  --bg: #14131b;
  --surface: #201e2b;
  --surface-2: #282535;
  --surface-3: #353044;
  --border: #3c374c;
  --border-soft: #302b3e;
  --text: #f2eef9;
  --muted: #afa7c0;
  --faint: #938aa5;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px -28px #000;
  --art-lift: 0 18px 40px -26px #000;
  --art-inset: inset 0 1px 0 #ffffff0f;
  --art-header-h: 56px;

  color: var(--text);
  background:
    radial-gradient(1100px 560px at 10% -12%, #b6a0ff1c, transparent 62%),
    radial-gradient(900px 520px at 92% -6%, #8fdac516, transparent 58%),
    radial-gradient(760px 520px at 50% 112%, #2a6cff12, transparent 62%),
    var(--bg);
  background-attachment: fixed;
}

/* A whisper of grain so the flat panels stop looking like a web form. */
.art-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}
.art-shell { position: relative; z-index: 1; }

/* ---------- login ---------- */

.art-login-card { max-width: 520px; text-align: left; }
.art-login-card h1, .art-login-card > p { text-align: center; }
.art-login-card .art-logo { background: linear-gradient(140deg, var(--art-accent), var(--art-accent-2)); box-shadow: 0 14px 34px -14px var(--art-accent); }
.art-steps { margin: 18px 0 22px; padding-left: 20px; color: var(--muted); font-size: 14px; }
.art-steps li { margin-bottom: 8px; }
.art-steps strong { color: var(--text); }
.art-login-button { display: flex; justify-content: center; }

/* ---------- buttons, inputs ---------- */

.art-body .button, .art-body button.button {
  border-radius: 11px;
  background: linear-gradient(180deg, var(--surface-3), var(--surface-2));
  border-color: #39405400;
  box-shadow: var(--art-inset);
  font-weight: 550;
  transition: transform 0.1s, filter 0.12s, box-shadow 0.12s, background 0.12s;
}
.art-body .button:hover { filter: brightness(1.14); background: linear-gradient(180deg, var(--surface-3), var(--surface-2)); }
.art-body .button:active { transform: translateY(1px); }
.art-body .button.primary {
  background: linear-gradient(180deg, #ffa257, #ef6f21);
  border-color: #ffab6d55;
  color: #1c0e03;
  font-weight: 700;
  box-shadow: 0 12px 26px -14px var(--art-accent), inset 0 1px 0 #ffffff66;
}
.art-body .button.primary:hover { background: linear-gradient(180deg, #ffb174, #fb7d2c); }
.art-body .button.big { padding: 12px 20px; font-size: 15px; border-radius: 13px; }
.art-body .button:disabled { filter: none; transform: none; }

.art-body input[type="text"], .art-body input[type="number"], .art-body select, .art-body textarea {
  background: #191721;
  border-radius: 10px;
}

/* ---------- shell ---------- */

.art-shell { min-height: 100vh; display: flex; flex-direction: column; }

.art-header {
  display: flex; align-items: center; gap: 18px;
  padding: 9px 22px;
  min-height: 68px;
  background: linear-gradient(180deg, #161923f2, #11131bdc);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.art-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, #b6a0ff55 25%, #8fdac544 65%, transparent);
}
.art-brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; white-space: nowrap; letter-spacing: -0.01em; }
.art-brand:hover { text-decoration: none; }
.art-brand-mark {
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center; font-size: 18px;
  background: linear-gradient(140deg, var(--art-accent), var(--art-accent-2));
  box-shadow: 0 10px 24px -10px var(--art-accent), var(--art-inset);
  transition: transform 0.16s;
}
.art-brand:hover .art-brand-mark { transform: rotate(-8deg) scale(1.06); }

.art-nav { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: #19172180; border: 1px solid var(--border-soft); }
.art-nav a {
  padding: 6px 12px; border-radius: 9px; color: var(--muted); font-size: 13.5px; font-weight: 550;
  transition: color 0.12s, background 0.12s;
}
.art-nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.art-nav a.active {
  color: #1c0e03;
  background: linear-gradient(180deg, #ffa257, #ef6f21);
  box-shadow: 0 8px 18px -12px var(--art-accent), inset 0 1px 0 #ffffff55;
}
.art-nav-test { color: var(--art-gold) !important; }
.art-nav-test.active { color: #1c0e03 !important; }

.art-header-status { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: 13px; color: var(--muted); }
.art-balance {
  padding: 6px 13px; border-radius: 99px; color: var(--art-gold); font-weight: 700; font-size: 13.5px; white-space: nowrap;
  background: linear-gradient(180deg, #2a2415, #1b1811);
  border: 1px solid #cabaee44;
  box-shadow: 0 10px 22px -16px var(--art-gold), var(--art-inset);
}
.art-balance:hover { text-decoration: none; filter: brightness(1.15); }

.art-user { position: relative; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 6px; border-radius: 10px; }
.art-user:hover { background: var(--surface-2); }
.art-user img { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border); }
.art-user-name { font-size: 13.5px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-user-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px); min-width: 190px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 6px; z-index: 30;
}
.art-user:hover .art-user-menu, .art-user:focus-within .art-user-menu { display: block; }
.art-user-menu a, .art-user-menu button {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 6px;
  background: none; border: none; color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer;
}
.art-user-menu a:hover, .art-user-menu button:hover { background: var(--surface-3); text-decoration: none; }

.art-main { flex: 1; width: 100%; }
.art-page { max-width: 1120px; margin: 0 auto; padding: 24px 22px 80px; display: grid; gap: 18px; }
/* Sections that live inside one phase still need air between them. */
.art-stack { display: grid; gap: 18px; }
.art-muted { color: var(--muted); }
.art-kicker { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--art-accent); font-weight: 700; margin-bottom: 4px; }
.art-back { display: inline-block; color: var(--muted); font-size: 13.5px; }
.art-back:hover { color: var(--text); }

.art-card, .art-theme, .art-hero, .art-howto {
  position: relative;
  background: linear-gradient(180deg, #252131, #201e2b);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--art-lift), var(--art-inset);
}
.art-card-slim { padding: 14px 18px; }
.art-card h2, .art-theme h2 { font-size: 18px; margin-bottom: 8px; }
.art-section-head { margin-bottom: 14px; }
.art-section-head p { margin: 4px 0 0; font-size: 14px; }
.art-side-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.art-side-row + .art-side-row { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-soft); }

.art-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px;
  background: var(--surface-3); color: var(--muted); font-size: 12.5px; white-space: nowrap;
  border: 1px solid var(--border-soft);
}
.art-chip-theme { background: #faa81a22; color: #ffcc70; border-color: #faa81a44; }
.art-chip-drawing { background: #8fdac522; color: #8ff0b5; border-color: #8fdac544; }
.art-chip-voting { background: #7c8cff2b; color: #c3caff; border-color: #7c8cff55; }
.art-chip-finished { background: #b6a0ff2b; color: #ffbb8a; border-color: #b6a0ff55; }
.art-chip-cancelled { background: #ed424522; color: #ff8b8d; border-color: #ed424544; }
.art-chip-ok { background: #8fdac522; color: #8ff0b5; border-color: #8fdac544; }
.art-chip-test { background: #faa81a22; color: #ffcc70; border-color: #faa81a44; }
.art-countdown { font-variant-numeric: tabular-nums; color: var(--text); font-weight: 650; }
.art-countdown.soon { color: var(--art-gold); text-shadow: 0 0 14px #cabaee55; }
.art-countdown.compact { font-size: 13px; }

.art-note { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; border: 1px solid var(--border); background: var(--surface-2); }
.art-note.ok { border-color: #8fdac555; background: #8fdac514; }
.art-note.warn { border-color: #faa81a55; background: #faa81a14; }
.art-note.info { border-color: #7c8cff55; background: #7c8cff14; }

/* ---------- game head ---------- */

.art-game-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.art-game-head h1 {
  font-size: 30px; line-height: 1.15; letter-spacing: -0.025em;
  background: linear-gradient(100deg, #ffffff 25%, #ffc89a 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.art-game-head-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }

.art-hero { padding: 30px; }
.art-hero h1 { font-size: 28px; margin-bottom: 8px; }
.art-hero p { color: var(--muted); margin-bottom: 16px; }

/* ---------- the phase rail: four steps of one game ---------- */

.art-rail {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  padding: 8px; border-radius: var(--radius);
  background: linear-gradient(180deg, #171a26, #12141c);
  border: 1px solid var(--border);
  box-shadow: var(--art-lift);
}
.art-rail-step {
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 10px 12px; border-radius: 12px;
  border: 1px solid transparent; background: #191721a6; color: var(--text);
  font: inherit; cursor: pointer; min-width: 0;
  transition: border-color 0.14s, background 0.14s, transform 0.12s, box-shadow 0.14s;
}
.art-rail-step:hover:not(:disabled) { transform: translateY(-2px); border-color: #3d455c; }
.art-rail-icon { font-size: 20px; line-height: 1; flex: none; filter: saturate(1.1); }
.art-rail-text { display: grid; min-width: 0; }
.art-rail-text strong { font-size: 14.5px; letter-spacing: -0.01em; }
.art-rail-step-no { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); }
.art-rail-note, .art-rail-step .art-countdown { font-size: 12px; color: var(--muted); font-weight: 500; }
.art-rail-check { margin-left: auto; color: var(--art-ok); font-weight: 700; }

.art-rail-step.done { opacity: 0.8; }
.art-rail-step.done .art-rail-step-no { color: var(--art-ok); }
.art-rail-step.live {
  border-color: #b6a0ff77;
  background: linear-gradient(180deg, #2a1c12, #1a1622);
  box-shadow: 0 0 0 1px #b6a0ff33, 0 16px 34px -22px var(--art-accent);
}
.art-rail-step.live .art-rail-step-no { color: var(--art-accent); }
.art-rail-step.live .art-rail-icon { animation: art-breathe 2.6s ease-in-out infinite; }
.art-rail-step.locked { opacity: 0.42; cursor: not-allowed; }
/* A step that is waiting on this player: the phase moved on, they did not. */
.art-rail-step.todo {
  border-color: #cabaee77;
  background: linear-gradient(180deg, #2a2415, #1a1622);
  box-shadow: 0 0 0 1px #cabaee33, 0 16px 34px -22px var(--art-gold);
}
.art-rail-step.todo .art-rail-step-no, .art-rail-step.todo .art-rail-note { color: var(--art-gold); }
.art-rail-step.todo .art-rail-icon { animation: art-breathe 2.6s ease-in-out infinite; }
.art-rail-step.open { border-color: #ffffff3d; background: #1c2130; box-shadow: inset 0 0 0 1px #ffffff14, var(--art-lift); }
.art-rail-step.live.open { border-color: var(--art-accent); box-shadow: 0 0 0 1px #b6a0ff55, 0 16px 34px -20px var(--art-accent); }

@keyframes art-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.14); }
}

/* «Как идёт игра», folded away under the phase itself. */
.art-rules { border: 1px solid var(--border-soft); border-radius: var(--radius); background: #12141ca6; }
.art-rules > summary { cursor: pointer; padding: 12px 18px; color: var(--muted); font-size: 13.5px; list-style: none; }
.art-rules > summary::before { content: "▸ "; color: var(--art-accent); }
.art-rules[open] > summary::before { content: "▾ "; }
.art-rules > summary:hover { color: var(--text); }
.art-rules .art-howto { border: none; background: none; box-shadow: none; padding: 0 18px 18px; }

/* ---------- how it works ---------- */

.art-howto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.art-howto-step { background: #191721a6; border: 1px solid var(--border-soft); border-radius: 12px; padding: 14px; }
.art-howto-step p { color: var(--muted); font-size: 13.5px; margin: 6px 0 0; }
.art-howto-icon { font-size: 22px; margin-bottom: 6px; }

/* ---------- theme ---------- */

.art-theme-title h2 { font-size: 22px; }
.art-theme-body { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; margin-top: 10px; }
.art-theme.compact .art-theme-body { grid-template-columns: 1fr auto; }
.art-theme-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.art-theme-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.art-theme-emoji { width: 24px; text-align: center; flex: none; font-size: 17px; }
.art-theme-author { color: var(--faint); font-size: 12.5px; }
.art-theme-thumb { display: block; margin-top: 6px; padding: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: none; cursor: zoom-in; }
.art-theme-thumb img { display: block; max-width: 220px; max-height: 160px; }
.art-reference {
  display: grid; gap: 6px; justify-items: center; background: #191721; border: 1px solid var(--border);
  border-radius: 12px; padding: 8px; cursor: zoom-in; color: var(--muted); font: inherit; font-size: 12px;
  max-width: 260px;
}
.art-reference img { display: block; max-width: 240px; max-height: 200px; border-radius: 8px; }

.art-question .art-question-text { font-size: 16px; margin: 4px 0 14px; }

.art-theme-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 6px; }
.art-theme-chips .art-kicker { margin-right: 2px; }
.art-theme-chip { background: #191721; border: 1px solid var(--border-soft); font-size: 12px; }
button.art-theme-chip { cursor: zoom-in; color: inherit; font: inherit; font-size: 12px; }

/* three cards: take one, the other two travel to other players */
.art-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 16px 0 4px; }
.art-card-pick {
  position: relative; overflow: hidden;
  display: grid; gap: 4px; justify-items: center; text-align: center;
  padding: 20px 14px 16px; border-radius: 16px; border: 1px solid #343b4f;
  background: linear-gradient(168deg, #262b3c, #171a25 65%);
  color: var(--text); font: inherit; cursor: pointer; min-height: 168px; align-content: center;
  box-shadow: var(--art-lift), var(--art-inset);
  transition: border-color 0.14s, transform 0.14s, box-shadow 0.14s;
}
/* A card catches the light when you reach for it. */
.art-card-pick::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, transparent 32%, #ffffff14 46%, transparent 62%);
  opacity: 0; transition: opacity 0.18s;
}
.art-card-pick:hover::before { opacity: 1; }
.art-card-pick:hover { border-color: var(--art-accent); transform: translateY(-4px); box-shadow: 0 22px 44px -24px var(--art-accent), var(--art-inset); }
.art-card-pick.taken {
  border-color: var(--art-accent);
  background: linear-gradient(168deg, #3a2716, #1d1723 70%);
  box-shadow: 0 0 0 1px #b6a0ff55, 0 22px 44px -26px var(--art-accent);
}
.art-card-pick.taken::after {
  content: "✓"; position: absolute; top: 8px; right: 12px; color: var(--art-accent); font-weight: 700;
}
.art-card-emoji { font-size: 30px; line-height: 1; }
.art-card-label { color: var(--faint); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; }
.art-card-text { font-size: 16.5px; line-height: 1.3; }
.art-card-hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
.art-card-pick.taken .art-card-hint { color: var(--art-accent); font-weight: 650; }
.art-card-pick.waiting { opacity: 0.5; }
.art-card-pick.blank { cursor: default; border-style: dashed; border-color: #3b4353; gap: 8px; background: #141722; }
.art-card-pick.blank:hover { transform: none; box-shadow: var(--art-inset); border-color: #4a5468; }
.art-card-pick.blank::before { display: none; }
.art-card-image { width: 100%; max-height: 110px; object-fit: cover; border-radius: 10px; margin-bottom: 2px; }
.art-card-own { font-size: 11px; color: var(--art-accent); text-transform: uppercase; letter-spacing: 0.08em; }
.art-card-fill { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; justify-content: center; }
.art-card-fill input[type="text"] { flex: 1; min-width: 140px; font-size: 13px; }
.art-card-fill input[type="file"] { flex: 1; min-width: 140px; font-size: 11.5px; }

.art-upload { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-soft); display: grid; gap: 10px; }

.art-avatars { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.art-avatars img { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #191721; box-shadow: 0 0 0 1px var(--border); }
.art-avatars img.dim { opacity: 0.3; filter: grayscale(1); }
.art-avatars-more { color: var(--muted); font-size: 13px; }

/* ---------- canvas card ---------- */

.art-canvas-preview { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start; }
.art-preview-frame {
  display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border); background: repeating-conic-gradient(#cfd4dc 0% 25%, #f4f6f9 0% 50%) 50% / 16px 16px;
  cursor: zoom-in; padding: 0; box-shadow: var(--art-lift);
}
.art-preview-frame img { max-width: 100%; max-height: 100%; display: block; }
.art-canvas-meta { display: grid; gap: 8px; align-content: start; justify-items: start; }
.art-participation { display: grid; gap: 8px; margin-top: 6px; width: 100%; }
.art-participation input[type="text"] { max-width: 320px; }
.art-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }

/* ---------- voting ---------- */

.art-progress { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.art-progress-pair { display: grid; gap: 8px; margin: 12px 0 4px; }
.art-progress-bar { flex: 1; height: 9px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--border-soft); overflow: hidden; }
.art-progress-fill { height: 100%; background: linear-gradient(90deg, var(--art-accent), var(--art-accent-2)); transition: width 0.3s; }

/* The three criteria and their weight this game: pinned, never scrolled away. */
.art-criteria {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: 14px;
  background: linear-gradient(180deg, #1b1f2bf2, #201e2bee);
  border: 1px solid var(--border);
  box-shadow: var(--art-lift);
}
.art-criteria .art-kicker { margin: 0; }
.art-criteria.sticky {
  position: sticky;
  top: calc(var(--sait, 0px) + var(--art-header-h) + 8px);
  z-index: 12;
  backdrop-filter: blur(10px);
}
.art-criteria-list { display: flex; flex-wrap: wrap; gap: 8px; }
.art-criterion {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px;
  background: #191721; border: 1px solid var(--border-soft); font-size: 13px; color: var(--muted);
}
.art-criterion-stars { color: var(--art-gold); letter-spacing: -1px; font-size: 12px; }
.art-importance-3 { color: var(--text); border-color: #cabaee55; background: #cabaee1a; }
.art-importance-2 { color: var(--text); }
.art-importance-1 { color: var(--muted); }
.art-importance-1 .art-criterion-stars { color: #a08f5e; }

.art-guess-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.art-guess { flex: 1; min-width: 160px; }
.art-weight { margin-left: 6px; color: var(--art-gold); font-size: 11px; letter-spacing: -1px; }
.art-weight-1 { color: var(--faint); }
.art-weight-2 { color: #d8b34a; }

.art-works { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.art-work {
  background: linear-gradient(180deg, #252131, #201e2b);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: grid;
  box-shadow: var(--art-lift), var(--art-inset);
  transition: border-color 0.14s, transform 0.14s;
}
.art-work:hover { transform: translateY(-2px); }
.art-work.voted { border-color: #8fdac544; }
.art-work-image {
  display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: none; cursor: zoom-in;
  background: repeating-conic-gradient(#cfd4dc 0% 25%, #f4f6f9 0% 50%) 50% / 16px 16px;
}
.art-work-image img { max-width: 100%; max-height: 100%; display: block; }
/* Your own picture sits in a full-width card: it must not become a poster. */
.art-card > .art-work-image { max-width: 420px; border-radius: 12px; border: 1px solid var(--border); }
.art-work-body { padding: 14px 16px 16px; display: grid; gap: 9px; }
.art-work-title { font-size: 14.5px; }
.art-work-body textarea { min-height: 54px; font-size: 13px; }
.art-work-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.art-vote-status { font-size: 12.5px; color: var(--muted); }
.art-vote-warning { font-size: 12px; color: var(--faint); margin: 0; }
.art-vote-warning::before { content: "⚠ "; }
.art-vote-final { display: grid; gap: 2px; opacity: 0.92; }
.art-vote-comment { margin: 0; font-size: 13.5px; color: var(--muted); font-style: italic; }

/* The moment a vote is confirmed: the sum it just put on the picture. */
.art-price-card {
  display: grid; gap: 4px; justify-items: center; text-align: center;
  padding: 14px; border-radius: 14px;
  background: radial-gradient(130% 130% at 50% 0%, #17362a, #101720);
  border: 1px solid #8fdac544;
}
.art-price-card .art-kicker { color: var(--art-money); margin: 0; }
.art-price-card .art-price { font-size: 27px; text-shadow: 0 0 22px #8fdac555; }
.art-price-card span.art-muted { font-size: 12px; }
.art-price-card.reveal { animation: art-pop 0.5s cubic-bezier(0.18, 1.2, 0.4, 1); }

@keyframes art-pop {
  0% { transform: scale(0.9); opacity: 0; }
  60% { transform: scale(1.03); opacity: 1; }
  100% { transform: scale(1); }
}

.art-vote-recap { display: grid; gap: 10px; }
.art-vote-recap-item {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px; background: #191721; border: 1px solid var(--border-soft);
}
.art-vote-recap-item .art-price { font-size: 17px; }

.art-star-row { display: grid; grid-template-columns: 1fr auto 44px; align-items: center; gap: 8px; font-size: 13.5px; }
.art-star-label { color: var(--muted); }
.art-stars { display: flex; gap: 2px; }
.art-star {
  background: none; border: none; padding: 0 1px; font-size: 24px; line-height: 1; color: #39405a; cursor: pointer;
  transition: color 0.1s, transform 0.12s, text-shadow 0.12s;
}
.art-star:hover:not(:disabled) { transform: scale(1.2) rotate(-6deg); }
.art-star.on { color: var(--art-gold); text-shadow: 0 0 14px #cabaee66; }
.art-star.preview { color: #ffe08a; }
.art-star:disabled { cursor: default; }
.art-star-value { color: var(--muted); font-size: 12.5px; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- results ---------- */

.art-podium { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.art-podium-item {
  background: linear-gradient(180deg, #1d2130, #201e2b);
  border: 1px solid var(--border); border-radius: 14px; padding: 16px; display: grid; gap: 6px;
  justify-items: center; text-align: center; box-shadow: var(--art-lift);
}
.art-podium-item.place-1 { border-color: #cabaee77; box-shadow: 0 0 0 1px #cabaee33, 0 24px 50px -30px var(--art-gold); order: 0; }
.art-podium-item.place-2 { order: 1; }
.art-podium-item.place-3 { order: 2; }
.art-podium-rank { font-size: 34px; filter: drop-shadow(0 6px 14px #0008); }
.art-podium-item .art-work-image { border-radius: 10px; }
.art-score { font-size: 21px; font-weight: 700; }
.art-reward { color: var(--art-gold); font-weight: 700; }
/* The window that greets a player with the results of a finished game. */
.art-results-pop { gap: 14px; }
.art-results-pop .art-podium { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.art-results-pop .art-podium-item { padding: 12px; gap: 4px; }
.art-results-pop .art-podium-rank { font-size: 26px; }
.art-results-pop .art-card { padding: 14px; }
.art-pop-thumb { width: 100%; max-height: 84px; object-fit: cover; border-radius: 10px; display: block; }
/* On a phone the podium must not push «Твоя статистика» below the fold. */
@media (max-width: 620px) {
  .art-results-pop .art-podium { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .art-results-pop .art-podium-item.place-1 { grid-column: span 2; }
  .art-pop-thumb { max-height: 62px; }
  .art-results-pop .art-score { font-size: 17px; }
}
.art-pop-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.art-pop-stat {
  background: #191721; border: 1px solid var(--border-soft); border-radius: 12px;
  padding: 10px 12px; display: grid; gap: 2px; align-content: start;
}
.art-pop-stat strong { font-size: 17px; }
.art-pop-stat .art-muted { font-size: 12px; }
.art-pop-me { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.art-pop-me img { width: 30px; height: 30px; border-radius: 50%; flex: none; }

.art-table-wrap { overflow-x: auto; }
.art-results td, .art-results th { white-space: nowrap; }
.art-results tr.mine td { background: var(--art-accent-soft); }
.art-thumb-button { background: none; border: none; padding: 0; cursor: zoom-in; }
.art-thumb-button img { height: 46px; border-radius: 6px; display: block; }
.art-comments { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 6px; }
.art-price { font-size: 18px; font-weight: 700; color: var(--art-money); font-variant-numeric: tabular-nums; }
.art-log { display: grid; gap: 6px; margin-top: 10px; }
.art-log-item { background: #191721; border: 1px solid var(--border-soft); border-radius: 12px; padding: 10px 12px; }
.art-log-item summary { cursor: pointer; font-size: 14px; }
.art-log-item ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13.5px; color: var(--muted); }

/* ---------- gallery ---------- */

.art-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.art-gallery-item {
  background: linear-gradient(180deg, #252131, #201e2b); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; display: grid; gap: 8px; align-content: start; box-shadow: var(--art-lift);
}
.art-gallery-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.art-gallery-theme { font-size: 15px; }
.art-gallery-podium { display: flex; gap: 8px; }
.art-gallery-thumb { position: relative; padding: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #0a0d12; cursor: zoom-in; width: 84px; height: 64px; }
.art-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-gallery-thumb span { position: absolute; left: 4px; bottom: 2px; font-size: 14px; }
.art-history-title { font-size: 18px; font-weight: 700; color: var(--text); }
.art-history-winners { display: grid; gap: 10px; margin: 6px 0; }
.art-history-winner { display: flex; align-items: center; gap: 12px; min-width: 0; }
.art-history-winner > div:last-child { min-width: 0; overflow-wrap: anywhere; }
.art-history-winner .art-gallery-thumb { flex: none; }
.art-history-winner .art-gallery-thumb img { object-fit: contain; }
.art-history-placeholder { width: 84px; height: 64px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--surface-2); color: var(--art-accent); font-size: 26px; }

/* ---------- shop ---------- */

.art-shop-summary { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.art-shop-balance { font-size: 26px; font-weight: 700; color: var(--art-gold); }
.art-shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.art-tool { background: #191721; border: 1px solid var(--border-soft); border-radius: 12px; padding: 14px; display: grid; gap: 8px; align-content: start; transition: border-color 0.14s, transform 0.12s; }
.art-tool:hover { transform: translateY(-2px); border-color: var(--border); }
.art-tool.owned { border-color: #8fdac555; }
.art-tool-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.art-tool-price { color: var(--art-gold); font-weight: 700; white-space: nowrap; }
.art-tool p { font-size: 13.5px; margin: 0; }

/* ---------- lightbox ---------- */

.art-lightbox { position: fixed; inset: 0; background: #04060ae8; z-index: 60; display: grid; place-items: center; padding: 24px; cursor: zoom-out; backdrop-filter: blur(4px); }
.art-lightbox img { max-width: 96vw; max-height: 88vh; border-radius: 8px; box-shadow: var(--shadow); background: repeating-conic-gradient(#cfd4dc 0% 25%, #f4f6f9 0% 50%) 50% / 16px 16px; }
.art-lightbox-caption { position: fixed; left: 0; right: 0; bottom: 18px; text-align: center; color: var(--muted); font-size: 14px; }
.art-lightbox-close { position: fixed; top: 16px; right: 18px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: 18px; cursor: pointer; }

/* Motion is decoration here: none of it carries meaning on its own. */
@media (prefers-reduced-motion: reduce) {
  .art-body *, .art-body *::before, .art-body *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* =====================================================================
   Editor
   ===================================================================== */

body.art-editing .art-header { display: none; }
body.art-editing .art-main { display: flex; }
.art-editor-host { flex: 1; display: flex; min-width: 0; min-height: 100vh; }
.art-editor { flex: 1; display: grid; grid-template-rows: auto 1fr auto; height: 100vh; min-width: 0; min-height: 0; background: #0b0e14; }

.art-ed-top {
  display: flex; align-items: center; gap: 14px; padding: 8px 12px;
  background: var(--surface); border-bottom: 1px solid var(--border); min-height: 52px;
}
.art-ed-back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.art-ed-back:hover { color: var(--text); text-decoration: none; }
.art-ed-title { min-width: 0; line-height: 1.2; }
.art-ed-title .art-kicker { margin-bottom: 1px; font-size: 11px; }
.art-ed-title strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 360px; }
.art-ed-top-status { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: 12.5px; color: var(--muted); }
.art-ed-save { padding: 3px 9px; border-radius: 99px; background: var(--surface-3); font-size: 12px; }
.art-ed-save.busy { color: #b4bbff; }
.art-ed-save.err { color: #ff8b8d; background: #ed424522; }
.art-ed-top-actions { display: flex; align-items: center; gap: 4px; }

.art-icon-button {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer;
}
.art-icon-button:hover { background: var(--surface-2); color: var(--text); }
.art-icon-button:disabled { opacity: 0.35; cursor: not-allowed; background: none; }

.art-ed-body { display: grid; grid-template-columns: 58px minmax(0, 1fr) 292px; min-height: 0; min-width: 0; }

.art-ed-tools {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px;
  background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto; overflow-x: hidden; scrollbar-width: thin;
}
.art-tool-button {
  position: relative; width: 44px; height: 42px; display: grid; place-items: center; border-radius: 9px;
  border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer;
}
.art-tool-button:hover { background: var(--surface-2); color: var(--text); }
.art-tool-button.active { background: var(--art-accent-soft); border-color: #b6a0ff66; color: var(--text); }
.art-tool-button.locked { opacity: 0.45; }
.art-tool-lock { position: absolute; right: 2px; bottom: 2px; }
.art-tool-lock svg { width: 11px; height: 11px; }
.art-tool-key { position: absolute; left: 4px; top: 2px; font-size: 9px; color: var(--faint); }
.art-tool-sep { width: 30px; height: 1px; background: var(--border); margin: 3px 0; }

.art-ed-stage { position: relative; min-height: 0; overflow: hidden; background: #0b0e14; }
.art-ed-canvas { display: block; touch-action: none; user-select: none; -webkit-user-select: none; }
.art-ed-banner {
  display: none; position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  align-items: center; gap: 10px; padding: 9px 14px; border-radius: var(--radius-sm);
  background: var(--surface-3); border: 1px solid #faa81a66; color: var(--text); font-size: 13.5px; box-shadow: var(--shadow); z-index: 3;
  max-width: calc(100% - 24px);
}
.art-ed-banner.on { display: flex; }
.art-ed-theme {
  display: none; position: absolute; top: 12px; left: 12px; width: min(380px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); z-index: 4;
}
.art-ed-theme.on { display: block; }
.art-ed-theme .art-theme { padding: 0; border: none; background: none; }
.art-ed-theme .art-theme-body { grid-template-columns: 1fr; }
.art-ed-theme-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }

/* The finished theme opens below its phase tab, without moving the canvas. */
.art-theme-drawer {
  position: fixed; z-index: 45; width: min(410px, calc(100vw - 16px));
  display: flex; flex-direction: column; overflow: hidden; color: var(--text);
  background: #251e30; border: 1px solid #79628e; border-radius: 0 16px 16px 16px;
  box-shadow: 0 16px 44px #08050ca6; animation: art-theme-slide .2s ease-out;
}
.art-theme-drawer[hidden] { display: none; }
.art-theme-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 18px; background: #34283f; border-bottom: 1px solid #51405f; }
.art-theme-drawer-head h2 { margin: 0; font-size: 15px; }
.art-theme-drawer-content { overflow-y: auto; overscroll-behavior: contain; padding: 16px 18px; min-height: 0; }
.art-theme-drawer .art-theme { padding: 0; border: 0; background: none; box-shadow: none; }
.art-theme-drawer .art-theme h2 { font-size: 19px; overflow-wrap: anywhere; }
.art-theme-drawer .art-theme-body { grid-template-columns: minmax(0, 1fr); }
.art-theme-drawer .art-theme-list { gap: 16px; }
.art-theme-drawer .art-theme-list li > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.art-theme-drawer .art-theme-author { display: block; margin-top: 3px; }
.art-theme-drawer .art-theme-thumb img { max-width: 100%; max-height: 120px; }
.art-theme-chevron { display: inline-block; margin-left: 5px; font-size: 12px; color: #c9b1e5; transition: transform .2s; }
.art-rail-step[aria-expanded="true"] { background: #342a45; border-color: #9272b3; }
.art-rail-step[aria-expanded="true"] .art-theme-chevron { transform: rotate(180deg); }
@keyframes art-theme-slide { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .art-theme-drawer { animation: none; }
  .art-theme-chevron { transition: none; }
}

.art-ed-side { background: var(--surface); border-left: 1px solid var(--border); overflow-y: auto; min-height: 0; display: flex; flex-direction: column; }
.art-ed-section { padding: 12px 14px; border-bottom: 1px solid var(--border-soft); }
.art-ed-section h3 { font-size: 11px; margin-bottom: 10px; }
.art-ed-section-layers { flex: 1; }

.art-opt-tool { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 14px; }
.art-opt-field { display: block; margin-bottom: 10px; }
.art-opt-field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.art-opt-slider { display: grid; grid-template-columns: 1fr 58px auto; align-items: center; gap: 6px; }
.art-opt-number { padding: 4px 6px !important; font-size: 12.5px !important; }
.art-opt-unit { font-size: 11px; color: var(--faint); min-width: 16px; }
.art-opt-toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 8px; cursor: pointer; }
.art-opt-title { font-size: 12px; color: var(--muted); margin: 6px 0 6px; }
.art-opt-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.art-opt-hint { font-size: 12px; color: var(--faint); margin: 6px 0 0; }
.art-locked-note { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #ffcc70; margin: 6px 0 10px; }
.art-locked-note svg { width: 14px; height: 14px; flex: none; }
.art-locked-note:hover { text-decoration: none; color: #ffe0a3; }

.art-color-chips { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.art-color-chip { width: 30px; height: 30px; border-radius: 8px; border: 2px solid var(--border); cursor: pointer; box-shadow: inset 0 0 0 1px #0006; }
.art-color-chip.primary { width: 36px; height: 36px; }
.art-color-picker { display: grid; gap: 8px; }
.art-color-square-wrap { position: relative; }
.art-color-square { display: block; width: 100%; height: 140px; border-radius: 8px; cursor: crosshair; touch-action: none; }
.art-color-marker { position: absolute; width: 12px; height: 12px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #000a; transform: translate(-50%, -50%); pointer-events: none; }
.art-color-hue-wrap { position: relative; }
.art-color-hue { display: block; width: 100%; height: 14px; border-radius: 7px; cursor: ew-resize; touch-action: none; }
.art-color-hue-marker { position: absolute; top: -2px; width: 6px; height: 18px; border: 2px solid #fff; border-radius: 3px; box-shadow: 0 0 0 1px #000a; transform: translateX(-50%); pointer-events: none; }
.art-color-row { display: grid; grid-template-columns: 34px 1fr 96px; gap: 8px; align-items: center; }
.art-color-preview { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: repeating-conic-gradient(#cfd4dc 0% 25%, #f4f6f9 0% 50%) 50% / 8px 8px; }
.art-color-hex { font-family: var(--mono); font-size: 13px !important; padding: 7px 9px !important; }
.art-color-alpha-label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.art-color-alpha { width: 100%; }
.art-swatch-title { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }
.art-swatches { display: flex; flex-wrap: wrap; gap: 5px; min-height: 18px; }
.art-swatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid #0008; cursor: pointer; padding: 0; box-shadow: inset 0 0 0 1px #fff2; }
.art-swatch:hover { transform: scale(1.12); }
.art-swatch.add { background: var(--surface-3); color: var(--muted); font-size: 14px; line-height: 1; }
.art-color-picker.no-custom .art-custom-title, .art-color-picker.no-custom .art-swatches.custom { display: none; }

.art-layer-toolbar { display: flex; gap: 2px; margin-bottom: 8px; flex-wrap: wrap; }
.art-layer-toolbar .art-icon-button { width: 30px; height: 30px; }
.art-layer-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.art-layer {
  display: grid; grid-template-columns: 26px 52px 1fr 24px; align-items: center; gap: 6px;
  padding: 5px 6px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; font-size: 13px;
}
.art-layer:hover { background: var(--surface-2); }
.art-layer.active { background: var(--art-accent-soft); border-color: #b6a0ff66; }
.art-layer.hidden .art-layer-name, .art-layer.hidden .art-layer-thumb { opacity: 0.4; }
.art-layer-thumb { border-radius: 3px; border: 1px solid var(--border); background: #fff; display: block; width: 52px; }
.art-layer-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-layer-eye, .art-layer-lock { background: none; border: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; padding: 2px; border-radius: 6px; }
.art-layer-eye:hover, .art-layer-lock:hover { color: var(--text); background: var(--surface-3); }
.art-layer-lock { opacity: 0.4; }
.art-layer-lock.on { opacity: 1; color: #ffcc70; }
.art-layer-eye svg, .art-layer-lock svg { width: 16px; height: 16px; }
.art-layer-props { display: grid; gap: 4px; }

.art-ed-bottom {
  display: flex; align-items: center; gap: 16px; padding: 5px 14px; font-size: 12px; color: var(--muted);
  background: var(--surface); border-top: 1px solid var(--border); font-variant-numeric: tabular-nums;
}
.art-ed-zoom { min-width: 44px; }
.art-ed-coords { min-width: 90px; }
.art-ed-hint { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-ed-mobile-toggle { display: none; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 5px 10px; font: inherit; font-size: 12.5px; cursor: pointer; }

.art-ed-menu {
  position: fixed; z-index: 70; min-width: 220px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 6px; display: grid; gap: 2px;
}
.art-ed-menu a, .art-ed-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 6px;
  background: none; border: none; color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer;
}
.art-ed-menu a:hover, .art-ed-menu button:hover { background: var(--surface-3); text-decoration: none; }
.art-ed-menu .danger { color: var(--danger); }
.art-help td { padding: 6px 10px; border-top: 1px solid var(--border-soft); font-size: 13.5px; }

.art-new-canvas { position: absolute; inset: 0; overflow-y: auto; padding: 34px; max-width: 760px; margin: 0 auto; display: grid; gap: 14px; align-content: start; }
.art-new-canvas h2 { font-size: 22px; }
.art-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.art-preset { display: grid; gap: 4px; justify-items: center; padding: 12px 8px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.art-preset:hover { border-color: var(--art-accent); }
.art-preset.locked { opacity: 0.45; }
.art-preset-shape { display: block; width: 56px; max-height: 56px; background: var(--surface-3); border: 1px solid var(--border); border-radius: 4px; }
.art-new-size { display: flex; align-items: center; gap: 12px; }
.art-new-size label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.art-new-size input { width: 120px; }

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  /* The header wraps its status onto a second line, so anything pinned under
     it has to move down by the same amount. */
  .art-body { --art-header-h: 92px; }
  .art-header { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
  .art-header-status { margin-left: 0; order: 5; width: 100%; }
  .art-page { padding: 18px 14px 60px; }
  .art-theme-body, .art-theme.compact .art-theme-body { grid-template-columns: 1fr; }
  .art-canvas-preview { grid-template-columns: 1fr; }
  .art-rail { grid-template-columns: repeat(2, 1fr); }
  .art-game-head h1 { font-size: 25px; }

  .art-ed-body { grid-template-columns: 52px minmax(0, 1fr); }
  .art-ed-side {
    position: fixed; right: 0; top: 52px; bottom: 34px; width: min(320px, 92vw); transform: translateX(100%);
    transition: transform 0.18s ease-out; z-index: 25; box-shadow: var(--shadow);
  }
  .side-open .art-ed-side { transform: translateX(0); }
  .art-ed-mobile-toggle { display: inline-flex; }
  .art-ed-title strong { max-width: 160px; }
  .art-ed-top-status .art-countdown { display: none; }
  .art-ed-top-actions .art-icon-button:nth-child(3), .art-ed-top-actions .art-icon-button:nth-child(4), .art-ed-top-actions .art-icon-button:nth-child(5) { display: none; }
}

@media (max-width: 640px) {
  .art-ed-top { flex-wrap: wrap; gap: 8px; padding: 8px; }
  .art-ed-title { flex: 1; }
  .art-ed-title strong { max-width: 150px; }
  .art-ed-top-status .art-chip { display: none; }
  .art-ed-top-actions { width: 100%; justify-content: center; }
  .art-ed-side { top: 91px; }
  .art-nav a { padding: 6px 9px; font-size: 13px; }
  .art-user-name { display: none; }
  .art-rail { gap: 6px; padding: 6px; }
  .art-rail-step { padding: 8px 9px; gap: 8px; }
  .art-rail-step-no { display: none; }
  .art-rail-icon { font-size: 17px; }
  .art-criteria { gap: 8px; padding: 9px 12px; }
  .art-criterion { padding: 5px 10px; font-size: 12.5px; }
  .art-cards { grid-template-columns: 1fr; }
  .art-ed-back span { display: none; }
  .art-ed-tools { padding: 6px 3px; }
  .art-tool-button { width: 40px; height: 38px; }
  .art-tool-key { display: none; }
  .art-ed-coords { display: none; }
}

/* =====================================================================
   Discord Activity: safe areas, splash screens, admin tools
   ===================================================================== */

:root {
  /* Discord sets these inside the mobile Activity container; env() covers iOS
     and plain browsers. */
  --sait: var(--discord-safe-area-inset-top, env(safe-area-inset-top, 0px));
  --saib: var(--discord-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --sail: var(--discord-safe-area-inset-left, env(safe-area-inset-left, 0px));
  --sair: var(--discord-safe-area-inset-right, env(safe-area-inset-right, 0px));
}

body.art-activity {
  padding: var(--sait) var(--sair) var(--saib) var(--sail);
  /* Discord's own surface is darker than a browser page. */
  background: #111318;
}
body.art-activity .art-shell { min-height: calc(100vh - var(--sait) - var(--saib)); }
body.art-activity .art-editor { height: calc(100vh - var(--sait) - var(--saib)); }
body.art-activity .art-header { top: var(--sait); }

.art-splash {
  min-height: 60vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 32px 20px;
  text-align: center;
}
.art-splash h2 { font-size: 20px; }
.art-splash p { max-width: 460px; margin: 0; }
.art-splash-mark {
  width: 64px; height: 64px; border-radius: 18px;
  display: grid; place-items: center; font-size: 30px;
  background: linear-gradient(140deg, var(--art-accent), var(--art-accent-2));
  box-shadow: 0 14px 34px -10px var(--art-accent);
}
.art-splash .spinner { width: 22px; height: 22px; border-width: 3px; }

.art-status-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.art-status-list li.ok { color: #9ae6b4; }
.art-status-list li.bad { color: #ffb3b4; }
.art-status-list code, .art-card code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); padding: 1px 6px; border-radius: 5px; }
.art-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.art-admin-stats { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 13.5px; margin: 8px 0; }
.art-admin-count { width: 84px !important; }

/* Narrow Activity panes (the in-call view on desktop is small). */
@media (max-width: 720px) {
  .art-brand-name { display: none; }
  .art-header { padding: 8px 10px; gap: 8px; }
  .art-balance { padding: 5px 9px; font-size: 12.5px; }
}
/* Short panes (the in-call Activity) have no room for a pinned bar. */
@media (max-height: 600px) {
  .art-criteria.sticky { position: static; }
}
@media (max-height: 520px) {
  .art-page { padding-top: 12px; gap: 12px; }
  .art-stack { gap: 12px; }
  .art-card, .art-theme, .art-hero, .art-howto { padding: 14px; }
  .art-cards { grid-template-columns: 1fr; }
  .art-card-pick { min-height: 0; padding: 14px; }
  .art-game-head h1 { font-size: 22px; }
}

/* =====================================================================
   The artist's room: matte surfaces, ink outlines and one active task.
   Shared editor geometry stays above; these rules style the player screens.
   ===================================================================== */
.art-body {
  --accent: var(--art-accent);
  --accent-soft: var(--art-accent-soft);
  --art-gold: #d0bcfa;
  --art-lift: 0 5px 0 #100f17;
  --art-inset: none;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background: radial-gradient(circle, #82729420 1px, transparent 1px) 0 0 / 26px 26px, #16141e;
}
.art-body::before { display: none; }
.art-body [hidden] { display: none !important; }
.art-body :is(button, a, input, select, textarea, summary):focus-visible { outline: 3px solid var(--art-accent); outline-offset: 4px; }
.art-body h1, .art-body h2 { font-weight: 800; letter-spacing: -.035em; }
.art-body svg { flex: none; vertical-align: middle; }
.art-body .button, .art-body button.button {
  border: 1px solid #4c435e; border-bottom-width: 3px; border-radius: 12px;
  background: #332d42; box-shadow: none; font-weight: 700; gap: 8px;
}
.art-body .button:hover { background: #41384f; filter: none; }
.art-body .button.primary { background: #b7a0f7; border-color: #8970c6; color: #241939; box-shadow: none; }
.art-body .button.primary:hover { background: #c8b5ff; }
.art-body .button:active { transform: translateY(2px); }
.art-body .button:disabled { opacity: .5; cursor: not-allowed; }
.art-body input[type="text"], .art-body input[type="number"], .art-body select, .art-body textarea { background: #191620; border: 1px solid #494055; }
.art-header { padding: 12px 28px; gap: 24px; background: #1e1b27; border-bottom: 2px solid #100e17; backdrop-filter: none; }
.art-header::after { display: none; }
.art-brand { gap: 10px; }
.art-brand-name { font-size: 17px; line-height: 1.12; letter-spacing: -.04em; }
.art-brand-name small { display: block; font-size: 12px; font-weight: 600; color: #b5a4ce; letter-spacing: .02em; }
.art-brand-mark { width: 39px; height: 41px; border: 2px solid #b9a4f5; border-radius: 13px 11px 15px 9px; background: #30283f; box-shadow: 0 3px 0 #100e17; transform: rotate(-6deg); color: #d4c5fa; }
.art-brand-mark svg { width: 25px; height: 25px; }
.art-nav { border: none; background: none; gap: 6px; padding: 0; }
.art-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; font-size: 14px; border: 1px solid transparent; }
.art-nav a svg { width: 18px; height: 18px; }
.art-nav a.active { background: #393048; color: #e0d0ff; box-shadow: none; border-color: #625075; }
.art-nav-test, .art-nav-test.active { color: #c8b6ee !important; }
.art-header-status { display: none; }
.art-balance { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; color: #d2c2ed; border: 1px solid #50435f; border-radius: 12px; background: #2b2537; box-shadow: none; }
.art-user { padding: 0; }
.art-user img { border-radius: 11px; }
.art-user-name { max-width: 110px; }
.art-page { max-width: 1280px; padding: 25px 32px 64px; gap: 24px; min-width: 0; }
.art-page > *, .art-stack > * { min-width: 0; }
.art-card, .art-theme, .art-hero, .art-howto, .art-work, .art-gallery-item, .art-podium-item { background: #231f2e; box-shadow: 0 4px 0 #110f19; border-color: #3b334a; }
.art-game-head { align-items: center; gap: 12px; }
.art-game-head h1 { font-size: clamp(25px, 2.6vw, 36px); line-height: 1.2; color: #f4edff; background: none; }
.art-game-head-status { font-size: 12px; justify-content: flex-end; }
.art-game-head-status > .art-chip:not(.art-chip-test) { display: none; }
.art-phase-prompt { margin: 7px 0 0; font-size: 14px; color: var(--muted); }
.art-kicker { color: #bcabd7; letter-spacing: .13em; font-size: 10px; margin-bottom: 8px; }
.art-rail { background: none; border: none; border-bottom: 1px solid #383043; padding: 0 0 17px; border-radius: 0; box-shadow: none; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.art-rail-step { padding: 8px 12px; background: transparent; border: 1px solid transparent; border-radius: 12px; gap: 10px; }
.art-rail-step:hover:not(:disabled) { transform: none; background: #282231; }
.art-rail-icon { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #50445e; border-radius: 10px; background: #272130; color: #cdbfdf; }
.art-rail-icon svg { width: 19px; height: 19px; }
.art-rail-step-no, .art-rail-note, .art-rail-step .art-countdown, .art-rail-check { display: none; }
.art-rail-text strong { font-size: 13px; font-weight: 600; }
.art-rail-step.live, .art-rail-step.live.open, .art-rail-step.open, .art-rail-step.todo { background: #342a45; border-color: #685280; box-shadow: none; }
.art-rail-step.live .art-rail-icon, .art-rail-step.todo .art-rail-icon { animation: none; background: #b7a0f7; border-color: #cbb5fc; color: #211530; }
.art-rail-step.done { opacity: 1; color: #b2a4c5; }
.art-rail-step.locked { opacity: .48; }
.art-criteria { background: #201b29; border: 1px dashed #53405f; box-shadow: none; border-radius: 12px; padding: 10px 16px; }
.art-criterion { border: 0; background: none; }
.art-importance-3 { background: #392d49; }
.art-criterion-stars, .art-weight, .art-weight-2 { color: #b4a1cf; }
.art-question { background: #231e2e; text-align: center; padding: 28px; }
.art-question-text { max-width: 660px; margin: 8px auto 24px; }
.art-card-pick { border: 2px solid #58496b; border-radius: 20px 17px 19px 15px; background: #2c2439; box-shadow: 0 6px 0 #100e18; min-height: 220px; padding: 24px; }
.art-card-pick:nth-child(1) { transform: rotate(-2deg); }
.art-card-pick:nth-child(3) { transform: rotate(2deg); }
.art-card-pick::before { display: none; }
.art-card-pick:hover { transform: translateY(-6px) rotate(0); box-shadow: 0 10px 0 #100e18; }
.art-card-pick.taken { background: #3b2d4f; border-color: #b7a0f7; box-shadow: 0 6px 0 #100e18; }
.art-card-label { color: #baabce; }
.art-card-text { color: #f1e8fc; font-size: 20px; }
.art-card-emoji { font-size: 38px; }
.art-card-pick.blank { background: #282132; }
.art-card-pick.blank:hover { transform: none; }
.art-howto-step, .art-rules { background: #211c2b; }
.art-canvas-card { border-color: #685280; }
.art-price, .art-price-card .art-price { color: #c8bbdd; text-shadow: none; }
.art-price-card { background: #292334; border-color: #554662; }
.art-star.on { color: #cbb2ff; text-shadow: none; }
.art-star.preview { color: #e6d8ff; }
.art-podium-item.place-1 { border-color: #baa1ee; box-shadow: 0 5px 0 #110f19; }
.art-countdown.soon { color: #e8b6bc; text-shadow: none; }
.art-login-card .art-logo, .art-splash-mark { background: #3e3054; color: #e0ceff; box-shadow: 0 5px 0 #100e18; }
.art-body .modal { background: #282132; border: 2px solid #5d4d70; border-radius: 20px; }

/* The judging table */
.art-judging { display: grid; gap: 14px; scroll-margin-top: calc(var(--art-header-h) + 18px); }
.art-page:has(.art-judging) { gap: 15px; }
.art-page:has(.art-judging) .art-rail { padding-bottom: 12px; }
.art-judging-progress { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.art-judging-count { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.art-judging-count > svg { color: #bba3e4; width: 17px; }
.art-judging-count .art-muted { margin-left: 6px; }
.art-judging-meter { width: 160px; height: 7px; border-radius: 8px; background: #352c42; overflow: hidden; }
.art-judging-meter > span { display: block; height: 100%; background: #b49ce9; border-radius: inherit; transition: width .2s; }
.art-vote-receipt { display: flex; align-items: center; gap: 8px; color: #a9ddce; font-size: 13px; }
.art-price-reveal { position: fixed; inset: 0; z-index: 90; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 16px; background: #100c18a6; animation: art-price-shade 1.6s both; }
.art-price-ticket { position: relative; width: min(380px, 100%); box-sizing: border-box; display: grid; gap: 8px; padding: 27px 28px 25px 44px; background: #c2e6d7; color: #233e35; clip-path: polygon(22px 0, 100% 0, 100% 100%, 22px 100%, 0 50%); transform-origin: 14px 50%; animation: art-price-tag 1.6s both; }
.art-price-ticket::before { content: ""; position: absolute; left: 12px; top: calc(50% - 5px); width: 10px; height: 10px; border-radius: 50%; background: #253329; box-shadow: inset 0 1px 2px #0007; }
.art-price-saved { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: #476d5f; }
.art-price-saved svg { width: 16px; height: 16px; }
.art-price-title { margin: 2px 0 5px; font-size: 15px; font-weight: 700; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.art-price-caption { font-size: 11px; color: #476d5f; }
.art-price-amount { font-size: clamp(30px, 7vw, 48px); line-height: 1.15; letter-spacing: -.04em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.art-price-next { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; margin-top: 6px; border-top: 1px dashed #628c7970; font-size: 11px; color: #476d5f; }
.art-price-next svg { width: 17px; height: 17px; flex: none; }
@keyframes art-price-tag { 0% { opacity: 0; transform: translateY(-14px) rotate(-7deg) scale(.94); } 22% { opacity: 1; transform: translateY(2px) rotate(2deg) scale(1.02); } 36%, 86% { opacity: 1; transform: translateY(0) rotate(-1deg) scale(1); } 100% { opacity: 0; transform: translateY(-5px) rotate(-1deg) scale(.98); } }
@keyframes art-price-shade { 0%, 100% { opacity: 0; } 16%, 86% { opacity: 1; } }
.art-judge-card { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, 1fr); background: #231e2d; border: 2px solid #42354f; border-radius: 22px; box-shadow: 0 6px 0 #100d18; overflow: hidden; animation: art-arrive .2s ease-out; }
.art-judge-artwork { min-width: 0; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.art-judge-title { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.art-judge-title h2 { font-size: 23px; line-height: 1.25; overflow-wrap: anywhere; }
.art-judge-title .art-kicker { margin-bottom: 5px; }
.art-anonymous { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #aca0ba; flex-shrink: 0; }
.art-anonymous svg { width: 15px; }
.art-judge-frame { flex: 1; min-height: 230px; display: grid; place-items: center; padding: 18px; background: #18131f; border: 1px solid #403249; border-radius: 13px; }
.art-judge-frame .art-work-image { aspect-ratio: auto; height: clamp(240px, 40vh, 470px); border: none; background: none; }
.art-judge-frame .art-work-image img { width: auto; height: auto; max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; border: 6px solid #e3dce8; border-radius: 3px; box-shadow: 0 5px 16px #0004; }
.art-judge-theme { display: grid; gap: 14px; }
.art-judge-theme .art-theme-chips { margin: 0; }
.art-judge-theme .art-judge-hint { display: flex; align-items: center; gap: 6px; }
.art-judge-theme .art-judge-hint svg { width: 14px; height: 14px; }
.art-theme-chip { background: #312738; border: 1px solid #4d3c58; color: #d4c6e1; border-radius: 8px; }
.art-judge-panel { padding: 22px; background: #2b2336; border-left: 1px solid #493954; }
.art-judge-fields { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 12px; }
.art-judge-section-title { display: flex; align-items: center; gap: 9px; }
.art-judge-section-title > span { display: grid; place-items: center; font-size: 10px; width: 23px; height: 23px; background: #42304f; color: #c8aeea; border: 1px solid #604575; border-radius: 7px; }
.art-judge-section-title h3 { color: #f1e7fb; text-transform: none; font-size: 16px; letter-spacing: -.02em; font-weight: 700; }
.art-judge-hint { font-size: 11px; color: #b8aac7; line-height: 1.6; margin: 0; }
.art-judge-fields > .art-judge-hint:first-of-type { margin-top: -8px; }
.art-judge-scores { display: grid; gap: 10px; margin: 0 0 5px; }
.art-judge-scores .art-star-row { grid-template-columns: 1fr auto; gap: 6px; }
.art-judge-scores .art-star-label { grid-column: 1 / -1; font-size: 12px; color: #d5c7e4; }
.art-judge-scores .art-weight { margin-left: 8px; font-size: 9px; letter-spacing: 1px; }
.art-judge-scores .art-stars { gap: 7px; }
.art-judge-scores .art-star { display: grid; place-items: center; font-size: 26px; height: 35px; width: 39px; background: #201927; border: 1px solid #503c5e; border-radius: 8px; color: #796487; }
.art-judge-scores .art-star.on { color: #dfc9ff; background: #594073; border-color: #8965a9; }
.art-judge-scores .art-star.preview { background: #684786; color: #f4e7ff; }
.art-judge-scores .art-star:hover:not(:disabled) { transform: translateY(-2px); }
.art-judge-fields .art-guess { width: 100%; min-width: 0; font-size: 13px; border-radius: 10px; min-height: 43px; }
.art-judge-comment { border-top: 1px solid #46364f; padding-top: 13px; }
.art-judge-comment summary { color: #c0acca; font-size: 12px; cursor: pointer; }
.art-judge-comment textarea { margin-top: 10px; width: 100%; min-height: 75px; resize: vertical; }
.art-body .art-judge-submit { width: 100%; justify-content: space-between; padding: 12px 15px; font-size: 14px; }
.art-judge-status { font-size: 11px; color: #baacc9; text-align: center; margin: -6px 0 0; }
.art-gallery-complete { display: flex; align-items: center; gap: 18px; padding: 23px; border: 1px solid #456758; border-radius: 18px; background: #202c2a; }
.art-gallery-complete h2 { font-size: 23px; }
.art-gallery-complete p { margin: 5px 0 0; font-size: 13px; }
.art-complete-icon { width: 47px; height: 47px; border-radius: 15px; background: #355344; display: grid; place-items: center; color: #baebd7; flex: none; transform: rotate(-6deg); }
.art-phase-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 22px; }
.art-phase-gallery .art-work { align-content: start; }
.art-phase-gallery .art-work-image { background: #e3dde9; }
.art-phase-gallery .art-work-image img { width: 100%; height: 100%; object-fit: contain; }
.art-gallery-verdict { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid #403449; font-size: 13px; }
.art-gallery-verdict strong { color: #d3bbee; }
.art-gallery-guess { display: grid; gap: 7px; font-size: 12px; color: #bba7cd; }
.art-gallery-author { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.art-gallery-author img { width: 24px; height: 24px; border-radius: 8px; }

/* A shop full of small drawing objects */
.art-shop-page { gap: 22px; }
.art-shop-hero { display: grid; grid-template-columns: minmax(0, 1fr) 230px 180px; gap: 25px; align-items: center; padding: 18px 0 12px; }
.art-shop-intro h1 { font-size: clamp(28px, 3vw, 41px); line-height: 1.12; }
.art-shop-intro h1 > span { color: #c8afea; }
.art-shop-intro > p { font-size: 13px; max-width: 450px; color: #b5a8c2; margin: 15px 0; line-height: 1.65; }
.art-shop-owned-count { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: #a9d3c3; }
.art-shop-owned-count svg { width: 16px; }
.art-shop-doodle { height: 195px; position: relative; }
.art-doodle-tool { position: absolute; display: grid; place-items: center; width: 108px; height: 120px; border: 2px solid #765c92; border-radius: 25px 20px 26px 18px; background: #352843; box-shadow: 0 7px 0 #100d16; }
.art-doodle-tool svg { width: 60px; height: 60px; stroke-width: 1.3; }
.art-doodle-tool.one { top: 30px; left: 10px; transform: rotate(-14deg); color: #d4bbf2; }
.art-doodle-tool.two { top: 65px; left: 90px; transform: rotate(12deg); background: #29433d; color: #a4dcc8; border-color: #608775; }
.art-doodle-star { position: absolute; font-size: 35px; color: #c4acdf; top: 0; left: 130px; transform: rotate(10deg); }
.art-doodle-spark { position: absolute; bottom: 0; left: 18px; color: #b294d3; font-size: 25px; }
.art-shop-wallet { border: 1px dashed #6c567e; padding: 19px; border-radius: 17px; transform: rotate(2deg); background: #27202f; }
.art-shop-wallet > span { font-size: 12px; }
.art-shop-wallet strong { display: flex; align-items: center; gap: 10px; font-size: 38px; color: #e2cff9; line-height: 1.5; }
.art-shop-wallet strong svg { width: 30px; height: 30px; }
.art-shop-wallet p { font-size: 11px; color: #b8a8c7; margin: 6px 0 0; }
.art-shop-base { display: flex; align-items: center; gap: 16px; border: 1px solid #3d3648; background: #221d2c; border-radius: 14px; padding: 15px 20px; }
.art-shop-base > svg { color: #bda6db; width: 26px; height: 26px; }
.art-shop-base > div { display: grid; gap: 3px; }
.art-shop-base strong { font-size: 13px; }
.art-shop-base span { color: #afa1bd; font-size: 12px; }
.art-shop-back { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; margin-left: auto; font-size: 13px; color: #d3b7f7; }
.art-shop-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.art-shop-filter { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #483b56; background: #241e2e; color: #bcb0c9; border-radius: 11px; padding: 9px 15px; cursor: pointer; font: inherit; font-size: 12px; }
.art-shop-filter svg { width: 16px; height: 16px; }
.art-shop-filter:hover { background: #332a40; }
.art-shop-filter.selected { background: #b8a0ef; color: #261735; border-color: #c1a7f7; font-weight: 700; }
.art-collection-filter { margin-left: auto; }
.art-shop-list-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 11px; margin-bottom: -10px; }
.art-shop-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.art-tool { --tool-ink: #ceaff2; --tool-bg: #34263e; display: flex; flex-direction: column; padding: 0; border: 1px solid #51405f; border-radius: 17px; overflow: hidden; box-shadow: 0 4px 0 #100d17; background: #241e2d; }
.art-tool-pink { --tool-ink: #e8b4ce; --tool-bg: #3d2939; }
.art-tool-mint { --tool-ink: #a7d8c4; --tool-bg: #243b36; }
.art-tool-peach { --tool-ink: #e4c3a7; --tool-bg: #3a2f29; }
.art-tool:hover { transform: translateY(-4px); border-color: var(--tool-ink); }
.art-tool.owned { border-color: #608473; }
.art-tool-visual { height: 150px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--tool-bg); color: var(--tool-ink); border-bottom: 1px solid #ffffff0a; overflow: hidden; }
.art-tool-visual::before { content: ""; position: absolute; width: 110px; height: 110px; border: 1px dashed currentColor; opacity: .17; border-radius: 50%; transform: rotate(-18deg) scaleX(1.3); }
.art-tool-symbol { transform: rotate(-9deg); transition: transform .18s; }
.art-tool-symbol svg { width: 59px; height: 59px; stroke-width: 1.3; }
.art-tool:hover .art-tool-symbol { transform: rotate(5deg) scale(1.08); }
.art-tool-category { position: absolute; top: 10px; left: 12px; font-size: 9px; text-transform: uppercase; letter-spacing: .1em; opacity: .85; }
.art-tool-caption { position: absolute; bottom: 11px; left: 8px; right: 8px; text-align: center; font-size: 10px; }
.art-tool-owned { position: absolute; right: 10px; top: 10px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #acd5be; color: #23372c; }
.art-tool-owned svg { width: 15px; height: 15px; }
.art-tool-info { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 17px; }
.art-tool-info h2 { font-size: 16px; line-height: 1.3; letter-spacing: -.025em; }
.art-tool-info > p { font-size: 12px; line-height: 1.65; margin-bottom: 6px; }
.art-tool-footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 9px; }
.art-tool-price { display: inline-flex; align-items: center; gap: 5px; font-size: 18px; color: #d2bee8; }
.art-tool-price svg { width: 19px; height: 19px; }
.art-tool.owned .art-tool-price { font-size: 11px; color: #acd8be; }
.art-tool.owned .art-tool-price svg { width: 14px; }
.art-tool-available { font-size: 10px; color: #a8baa8; }
.art-tool-footer .button { font-size: 11px; padding: 7px 10px; }
.art-tool-footer .button svg { width: 13px; height: 13px; }
.art-tool-shortage { color: #bd9fba; font-size: 10px; }
.art-shop-empty { grid-column: 1 / -1; padding: 40px 20px; text-align: center; border: 1px dashed #5a486b; border-radius: 16px; }
.art-shop-empty > svg { width: 36px; height: 36px; color: var(--art-accent); margin-bottom: 15px; }
.art-shop-empty h2 { margin-bottom: 8px; }
@keyframes art-arrive { from { opacity: .4; transform: translateY(5px); } to { opacity: 1; transform: none; } }

@media (max-width: 1100px) {
  .art-header { gap: 14px; }
  .art-user-name { display: none; }
  .art-shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .art-shop-hero { grid-template-columns: 1fr 180px; }
  .art-shop-doodle { display: none; }
  .art-judge-card { grid-template-columns: minmax(0, 1.2fr) minmax(310px, 1fr); }
  .art-judge-artwork, .art-judge-panel { padding: 19px; }
  .art-judge-title { flex-wrap: wrap; gap: 8px; }
}
@media (max-width: 760px) {
  .art-header { flex-wrap: wrap; padding: 10px 15px; gap: 12px; }
  .art-header .art-brand-name { display: block; }
  .art-header .art-nav { order: 5; width: 100%; justify-content: center; flex-wrap: wrap; gap: 3px; }
  .art-nav a { font-size: 12px; padding: 7px 10px; gap: 5px; }
  .art-nav a svg { width: 16px; }
  .art-page { padding: 18px 16px 45px; gap: 18px; }
  .art-rail { gap: 5px; padding-bottom: 12px; }
  .art-rail-step { justify-content: center; flex-direction: column; gap: 5px; padding: 7px 4px; }
  .art-rail-text strong { font-size: 11px; }
  .art-rail-icon { width: 25px; height: 25px; border-radius: 7px; }
  .art-rail-icon svg { width: 16px; height: 16px; }
  .art-judge-card { grid-template-columns: 1fr; }
  .art-judge-artwork { padding: 17px; gap: 14px; }
  .art-judge-title { flex-wrap: nowrap; }
  .art-judge-title h2 { font-size: 19px; }
  .art-judge-panel { border-left: 0; border-top: 1px solid #493954; padding: 20px; }
  .art-judge-frame { min-height: 0; padding: 12px; }
  .art-judge-frame .art-work-image { height: clamp(210px, 36vh, 360px); }
  .art-judging-count .art-muted { display: none; }
  .art-judging-meter { width: 90px; }
  .art-judge-scores .art-star-row { grid-template-columns: minmax(0, 1fr) auto 34px; }
  .art-judge-scores .art-star-label { grid-column: auto; }
  .art-judge-scores .art-stars { gap: 4px; }
  .art-judge-scores .art-star { width: 30px; height: 34px; font-size: 23px; }
  .art-judge-scores .art-weight { display: block; margin-left: 0; }
  .art-shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .art-shop-base { padding: 13px; gap: 10px; }
  .art-shop-base > svg { display: none; }
  .art-shop-wallet { padding: 15px; }
  .art-shop-hero { grid-template-columns: 1fr 145px; gap: 15px; }
  .art-shop-intro h1 { font-size: 29px; }
  .art-collection-filter { margin-left: 0; }
  .art-tool-info { padding: 14px; }
  .art-cards { padding: 5px; gap: 20px; }
  .art-card-pick:nth-child(1), .art-card-pick:nth-child(3) { transform: none; }
}
@media (max-width: 460px) {
  .art-shop-hero { grid-template-columns: 1fr; }
  .art-shop-wallet { display: flex; align-items: center; gap: 15px; transform: none; padding: 10px 15px; }
  .art-shop-wallet strong { font-size: 24px; margin-left: auto; }
  .art-shop-wallet strong svg { width: 23px; }
  .art-shop-wallet p { display: none; }
  .art-shop-grid { grid-template-columns: 1fr; }
  .art-tool { display: grid; grid-template-columns: 100px minmax(0, 1fr); }
  .art-tool-visual { height: 100%; min-height: 175px; border-bottom: 0; }
  .art-tool-caption { font-size: 9px; }
  .art-tool-symbol svg { width: 47px; height: 47px; }
  .art-tool-category { font-size: 8px; left: 9px; }
  .art-tool-info > p { font-size: 11px; }
  .art-tool-info h2 { font-size: 15px; }
  .art-tool-info { padding: 14px 12px; }
  .art-tool-available { display: none; }
  .art-tool-owned { top: 28px; right: 8px; }
  .art-shop-filter { font-size: 11px; padding: 8px 11px; }
  .art-shop-list-title > span:last-child { display: none; }
  .art-shop-base > div span { font-size: 11px; }
  .art-judge-scores .art-star-row { grid-template-columns: 1fr auto; }
  .art-judge-scores .art-star-label { grid-column: 1 / -1; }
  .art-judge-scores .art-weight { display: inline; margin-left: 8px; }
  .art-judge-scores .art-star { width: 39px; height: 36px; }
  .art-anonymous { font-size: 10px; }
  .art-judge-title { align-items: flex-start; flex-direction: column; }
  .art-gallery-complete { align-items: flex-start; padding: 18px; }
  .art-gallery-complete h2 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .art-body *, .art-body *::before, .art-body *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}


/* The original coin, and the bot's mascot beside the game's brush. */
.art-coin { display: inline-block; flex: none; font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif; font-size: 1.2em; line-height: 1; filter: drop-shadow(0 1px 1px #0005); }
.art-brand-mark.art-mascot-mark { position: relative; width: 48px; height: 46px; border: 0; border-radius: 0; background: none; box-shadow: none; transform: none; }
.art-mascot-mark > img { width: 100%; height: 100%; object-fit: contain; }
.art-mascot-brush { position: absolute; right: -4px; bottom: -2px; width: 22px; height: 22px; display: grid; place-items: center; background: #493651; border: 1px solid #cbb5ed; border-radius: 8px; transform: rotate(-12deg); }
.art-mascot-brush svg { width: 16px; height: 16px; }
.art-login-mascot { position: relative; width: 108px; margin: 0 auto 12px; }
.art-login-mascot img { display: block; width: 96px; height: 96px; }
.art-login-mascot > span { position: absolute; right: 0; bottom: 0; font-size: 32px; }

/* Ten stars stay on one line, including on small phones. */
.art-judge-scores .art-star-label { grid-column: 1; grid-row: 1; min-width: 0; }
.art-judge-scores .art-star-value { grid-column: 2; grid-row: 1; min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.art-star-value.preview { color: #f4ddff; }
.art-judge-scores .art-stars { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; }
.art-judge-scores .art-star { width: 100%; min-width: 0; height: 34px; padding: 0; font-size: clamp(19px, 2vw, 26px); border-radius: 6px; }
.art-judge-scores .art-star:focus-visible { outline: 2px solid #f2d3ff; outline-offset: 2px; }

/* Drawing occupies the viewport again. Phases and weights share a slim strip. */
body.art-editing .art-main > div { width: 100%; min-width: 0; }
.art-drawing-page { max-width: none; padding: 0; gap: 0; }
.art-editor-embedded { min-height: 0; position: relative; }
.art-editor-embedded .art-editor { height: 100dvh; min-height: 360px; }
.art-editor-with-phases { grid-template-rows: auto auto minmax(0, 1fr) auto; }
.art-body .art-ed-name { padding: 4px 8px; font: inherit; font-size: 13px; width: clamp(130px, 20vw, 270px); max-width: 100%; border-radius: 7px; color: var(--text); }
.art-ed-title { flex-shrink: 1; }
.art-editor-embedded .art-ed-top { min-height: 52px; padding: 4px 12px; gap: 12px; }
.art-studio-menu { position: relative; z-index: 35; flex: none; }
.art-studio-menu > summary { display: flex; gap: 8px; align-items: center; cursor: pointer; list-style: none; border-radius: 8px; }
.art-studio-menu > summary::-webkit-details-marker { display: none; }
.art-studio-menu > summary > svg { width: 15px; height: 15px; color: #c7b1da; }
.art-studio-menu .art-mascot-mark { width: 42px; height: 40px; }
.art-studio-menu > nav { position: absolute; top: calc(100% + 10px); left: 0; width: 225px; padding: 12px; border: 1px solid #655074; border-radius: 12px; background: #2a2234; box-shadow: 0 8px 24px #0008; display: grid; gap: 6px; }
.art-studio-menu nav strong { font-size: 12px; padding: 7px; color: #c9b6d8; }
.art-studio-menu nav a { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 7px; color: #ece2f5; font-size: 13px; }
.art-studio-menu nav a:hover { background: #463251; text-decoration: none; }
.art-studio-bar { display: flex; align-items: center; gap: 14px; justify-content: space-between; background: #211b29; border-bottom: 1px solid #493854; padding: 4px 12px; min-width: 0; }
.art-studio-bar .art-rail { flex: 0 0 auto; display: flex; width: auto; gap: 4px; margin: 0; padding: 0; border: 0; background: none; }
.art-studio-bar .art-rail-step { flex: none; padding: 4px 9px; border-radius: 7px; gap: 6px; border: 1px solid transparent; box-shadow: none; }
.art-studio-bar .art-rail-step:hover:not(:disabled) { transform: none; }
.art-studio-bar .art-rail-icon { width: 20px; height: 20px; border: 0; border-radius: 5px; }
.art-studio-bar .art-rail-icon svg { width: 14px; height: 14px; }
.art-studio-bar .art-rail-text { display: block; }
.art-studio-bar .art-rail-text > strong { font-size: 12px; }
.art-studio-bar .art-rail-note, .art-studio-bar .art-rail-step-no, .art-studio-bar .art-countdown { display: none; }
.art-studio-bar .art-criteria { flex: none; gap: 8px; border: 0; background: none; border-radius: 0; padding: 0; margin: 0; }
.art-studio-bar .art-criteria > .art-kicker { font-size: 9px; }
.art-studio-bar .art-criteria-list { flex-wrap: nowrap; gap: 6px; }
.art-studio-bar .art-criterion { font-size: 11px; padding: 3px 5px; gap: 5px; white-space: nowrap; }
.art-studio-bar .art-criterion-stars { font-size: 8px; }
.art-editor-embedded .art-ed-body { position: relative; overflow: hidden; }
@media (max-width: 1000px) {
  .art-studio-bar { flex-wrap: wrap; gap: 4px; }
  .art-studio-bar .art-criteria > .art-kicker { display: none; }
  .art-editor-embedded .art-ed-side { position: absolute; top: 0; bottom: 0; }
  .art-editor-embedded .art-ed-top-status .art-chip { display: none; }
}
@media (max-width: 640px) {
  .art-editor-embedded .art-ed-top { padding: 4px 8px; gap: 4px 8px; }
  .art-editor-embedded .art-ed-title .art-kicker { display: none; }
  .art-editor-embedded .art-ed-top-status { flex-direction: column; gap: 3px; }
  .art-editor-embedded .art-ed-top-actions { gap: 1px; }
  .art-body .art-ed-name { width: 100%; }
  .art-studio-menu .art-mascot-mark { width: 34px; height: 34px; }
  .art-studio-menu > summary > svg { display: none; }
  .art-studio-bar { padding: 4px 8px; }
  .art-studio-bar .art-rail { width: 100%; }
  .art-studio-bar .art-rail-step { flex: 1; justify-content: center; padding: 3px 4px; }
  .art-studio-bar .art-rail-icon { display: none; }
  .art-studio-bar .art-criteria { width: 100%; }
  .art-studio-bar .art-criteria-list { width: 100%; justify-content: space-between; gap: 3px; }
  .art-studio-bar .art-criterion { font-size: 10px; padding: 3px 6px; gap: 5px; }
  .art-studio-bar .art-criterion-stars { font-size: 9px; }
}
