/* Dibuja y Adivina — game styles (mobile first; uses the tokens from /css/common.css).
   Same look as the Parqués: the coral→orange hero gradient of the promo video, cream surfaces, navy panels, white cards with soft layered shadows. */
:root {
  --pic-hero: linear-gradient(145deg, #FF6B4A 0%, #FF9A3C 100%);
  --pic-navy: radial-gradient(circle at 30% 18%, #3A3D5C 0%, #1F2137 78%);
  --pic-brand: #F0502F;
  --pic-brand-2: #FF7A5C;
  --pic-brand-ink: #C23A1B;          /* coral that reads on white (small bold text) */
  --pic-purple: #A855F7;
  --pic-ink: #2B2D42;
  --pic-ok: #16A34A;
  --pic-ok-fg: #0E7435;
  --pic-close: #A94F00;
  --pic-edge: rgba(43, 45, 66, .08);
  --pic-lift: 0 14px 26px -20px rgba(43, 45, 66, .55), 0 3px 8px -4px rgba(43, 45, 66, .16);
  --pic-hi: inset 0 1px 0 rgba(255, 255, 255, .85);
  --pic-glow: 0 18px 30px -14px rgba(255, 107, 74, .8), inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -3px 0 rgba(190, 55, 20, .18);
  --pic-emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --pic-ok-fg: #4ADE80; --pic-close: #FFA94D; --pic-brand-ink: #FF9A7C;
    --pic-edge: rgba(255, 255, 255, .1); --pic-lift: 0 14px 26px -18px rgba(0, 0, 0, .75); --pic-hi: inset 0 1px 0 rgba(255, 255, 255, .07);
  }
}
:root[data-theme="dark"] {
  --pic-ok-fg: #4ADE80; --pic-close: #FFA94D; --pic-brand-ink: #FF9A7C;
  --pic-edge: rgba(255, 255, 255, .1); --pic-lift: 0 14px 26px -18px rgba(0, 0, 0, .75); --pic-hi: inset 0 1px 0 rgba(255, 255, 255, .07);
}

.pic-ic { width: 22px; height: 22px; flex: none; }
.pic-say__e, .pic-reveal__e, .pic-msg__rx, .pic-coach__e { font-family: var(--pic-emoji); font-style: normal; font-weight: 400; }

/* ------------------------------------------------------------ topbar extras */
.pic-tb { display: inline-flex; gap: 6px; flex: none; }
.pic-tb .ndj-topbar__btn { flex: none; }
.pic-invite-btn { gap: 6px; }
.pic-invite-btn .ndj-ic, .pic-help-btn .pic-ic { width: 20px; height: 20px; }
@media (max-width: 520px) { .pic-invite-btn__txt { display: none; } }

/* ------------------------------------------------------------ connecting */
.pic-connecting { display: flex; flex-direction: column; align-items: center; gap: 22px; padding-top: 12vh; }

/* ------------------------------------------------------------ lobby */
.pic-settings .ndj-section-title { margin-bottom: 14px; }
.pic-setting { display: grid; gap: 8px; }
.pic-setting + .pic-setting { margin-top: 16px; }
.pic-setting__label { font: 600 .98rem var(--font-display); color: var(--fg-2); }
.pic-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pic-seg__opt {
  min-height: 50px; padding: 6px 6px; border-radius: 14px; border: 2px solid var(--line); background: var(--card-2); cursor: pointer;
  font: 600 1.02rem/1.15 var(--font-display); color: var(--fg); text-align: center; overflow-wrap: anywhere;
  transition: background .15s, border-color .15s, color .15s, transform .12s, box-shadow .15s;
}
.pic-seg__opt:active:not(:disabled) { transform: scale(.97); }
.pic-seg__opt.is-on { background: var(--pic-hero); border-color: transparent; color: #fff; text-shadow: 0 1px 2px rgba(160, 40, 10, .35); box-shadow: 0 8px 16px -8px rgba(240, 80, 47, .65), inset 0 1px 0 rgba(255, 255, 255, .4); }
.pic-seg__opt:disabled { cursor: default; }
.pic-seg__opt:disabled:not(.is-on) { opacity: .6; }
.pic-setting__note { margin-top: 10px; color: var(--fg-2); font-size: .92rem; line-height: 1.35; }
.pic-setting__note[hidden] { display: none; }
.pic-setting__host { margin-top: 6px; color: var(--fg-2); font-size: .88rem; font-style: italic; }
.pic-start { font-size: 1.2rem; min-height: 60px; }

.pic-lobby__cta.is-sticky {
  position: sticky; z-index: 6; bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  padding: 8px; margin: 0 -8px; border-radius: 24px;
  background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}

.pic-alone {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 20px;
  background: color-mix(in srgb, var(--pic-brand-2) 11%, var(--card));
  border: 1.5px dashed color-mix(in srgb, var(--pic-brand-2) 60%, transparent);
}
.pic-alone strong { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; }
.pic-alone p { color: var(--fg-2); font-size: .94rem; margin-top: 2px; line-height: 1.35; }
.pic-alone__art { position: relative; flex: none; width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center;
  background: var(--pic-hero); color: #fff; box-shadow: 0 10px 16px -10px rgba(240, 80, 47, .8), inset 0 1px 0 rgba(255, 255, 255, .4); }
.pic-alone__art .pic-ic { width: 28px; height: 28px; }
.pic-alone__art .ndj-ic { position: absolute; right: -8px; bottom: -8px; width: 30px; height: 30px; padding: 5px; border-radius: 50%;
  background: var(--card); color: var(--pic-brand-ink); box-shadow: var(--pic-lift); }

/* helpers (easy mode, funny comments): one compact row that opens */
.pic-more { border-radius: 20px; background: var(--card); border: 1px solid var(--pic-edge); box-shadow: var(--pic-lift), var(--pic-hi); }
.pic-more__sum { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 8px 16px; cursor: pointer; list-style: none; }
.pic-more__sum::-webkit-details-marker { display: none; }
.pic-more__sum .pic-ic { color: var(--pic-brand-ink); }
.pic-more__t { font: 700 1.05rem var(--font-display); }
.pic-more__v { flex: 1; min-width: 0; text-align: right; color: var(--fg-2); font-size: .88rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pic-more__chev { width: 20px; height: 20px; flex: none; color: var(--fg-2); transition: transform .2s; }
.pic-more[open] .pic-more__chev { transform: rotate(180deg); }
.pic-more__body { display: grid; gap: 8px; padding: 0 12px 14px; }
.pic-howbtn { min-height: 54px; font-size: 1.05rem; }
.pic-howbtn .pic-ic { color: var(--pic-brand-ink); }

.pic-switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 60px; padding: 8px 14px; border-radius: 14px; border: 1px solid var(--pic-edge); background: var(--card-2); color: var(--fg); text-align: left; cursor: pointer; }
.pic-switch__txt { display: flex; flex-direction: column; min-width: 0; }
.pic-switch__t { font: 600 1rem var(--font-display); }
.pic-switch__h { font-size: .84rem; line-height: 1.28; color: var(--fg-2); }
.pic-switch__sw { position: relative; flex: none; width: 48px; height: 28px; border-radius: 999px; background: color-mix(in srgb, var(--fg) 22%, var(--card)); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .18); transition: background .2s; }
.pic-switch__sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: transform .2s; }
.pic-switch.is-on .pic-switch__sw { background: linear-gradient(180deg, var(--pic-brand-2), var(--pic-brand)); }
.pic-switch.is-on .pic-switch__sw::after { transform: translateX(20px); }

/* ------------------------------------------------------------ help panel + first-time guide */
.pic-modal__box { width: min(520px, 100%); max-height: calc(100dvh - 32px); overflow: auto; border-radius: 26px; }
.pic-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.pic-modal__head .ndj-modal__title { margin: 0; }
.pic-modal__x { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--pic-edge); background: var(--card-2); color: var(--fg); cursor: pointer; flex: none; }
.pic-modal__x .pic-ic { width: 18px; height: 18px; }
.pic-modal__actions { margin-top: 16px; }
.pic-guide__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pic-guide__step { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--pic-edge); }
.pic-guide__n { position: absolute; left: -4px; top: -4px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; background: var(--pic-brand); font: 800 .8rem var(--font-display); box-shadow: 0 2px 5px rgba(0, 0, 0, .25); }
.pic-guide__ic { flex: none; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 17px; color: #fff; background: var(--pic-hero); box-shadow: 0 10px 16px -10px rgba(240, 80, 47, .8), inset 0 1px 0 rgba(255, 255, 255, .4); }
.pic-guide__ic .pic-ic { width: 30px; height: 30px; }
.pic-guide__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pic-guide__txt strong { font: 700 1.1rem/1.15 var(--font-display); }
.pic-guide__txt span { font-size: .95rem; line-height: 1.3; color: var(--fg-2); }
.pic-help__more { margin: 18px 0 8px; font: 700 1.05rem var(--font-display); }
.pic-helpers { display: grid; gap: 8px; }
.pic-guide__ok { width: 100%; }

/* ------------------------------------------------------------ toolbar */
.pic-tools { display: grid; gap: 8px; padding: 10px 8px; border-radius: 20px; background: var(--card); border: 1px solid var(--pic-edge); box-shadow: var(--pic-lift), var(--pic-hi); transition: opacity .25s; }
.pic-tools.is-off { opacity: .62; }
.pic-tools__colors { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px 6px; }
.pic-tools__ctl { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; padding-top: 8px; border-top: 1px solid var(--line); }
.pic-swatch { min-height: 42px; min-width: 0; padding: 0; border: 0; border-radius: 12px; cursor: pointer; display: grid; place-items: center; background: transparent; transition: transform .12s; }
.pic-swatch:disabled { cursor: default; }
.pic-swatch > span {
  position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--sw);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .16), inset 0 2px 0 rgba(255, 255, 255, .28), 0 3px 6px -2px rgba(0, 0, 0, .3), 0 0 0 2px var(--card);
  transition: transform .15s ease, box-shadow .15s ease;
}
.pic-swatch__ck { width: 18px; height: 18px; color: #fff; opacity: 0; transform: scale(.4); transition: opacity .15s, transform .15s; filter: drop-shadow(0 0 1.5px rgba(0, 0, 0, .75)); }
.pic-swatch.is-on > span { transform: scale(1.1); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .16), inset 0 2px 0 rgba(255, 255, 255, .28), 0 0 0 3px var(--card), 0 0 0 5px var(--fg); }
.pic-swatch.is-on .pic-swatch__ck { opacity: 1; transform: none; }
.pic-swatch:active:not(:disabled) { transform: scale(.92); }
.pic-tool {
  min-height: 48px; min-width: 0; padding: 0 2px; border: 1px solid var(--pic-edge); border-radius: 14px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; background: var(--card-2); color: var(--fg); box-shadow: var(--pic-hi);
  transition: background .15s, color .15s, transform .12s, box-shadow .15s;
}
.pic-tool .pic-ic { width: 24px; height: 24px; }
.pic-tool:hover:not(:disabled) { background: color-mix(in srgb, var(--fg) 7%, var(--card-2)); }
.pic-tool:active:not(:disabled) { transform: scale(.93); }
.pic-tool:disabled { opacity: .45; cursor: default; }
.pic-tools.is-off .pic-tool:disabled { opacity: 1; }
.pic-tool.is-on { background: color-mix(in srgb, var(--pic-brand-2) 18%, var(--card)); color: var(--pic-brand-ink); border-color: var(--pic-brand); box-shadow: 0 6px 12px -8px var(--pic-brand), inset 0 0 0 1.5px var(--pic-brand); }
.pic-tool--danger { color: #D93A40; }
.pic-tool__lbl { display: none; max-width: 100%; font: 800 .66rem/1.1 var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0; }
#app[data-easy="1"] .pic-tool__lbl { display: block; }
#app[data-easy="1"] .pic-tool { min-height: 58px; }
.pic-size__dot { width: var(--d, 10px); height: var(--d, 10px); border-radius: 50%; background: var(--dot, var(--fg)); box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .2); }
.pic-size--0 { --d: 7px; }
.pic-size--1 { --d: 14px; }
.pic-size--2 { --d: 22px; }
.pic-size .pic-size__dot { margin-block: 1px; }
.pic-tools.is-eraser .pic-size__dot { box-shadow: 0 0 0 1.5px var(--fg-2); }

/* ------------------------------------------------------------ board: a sheet of paper resting on the table */
.pic-board {
  position: relative; width: 100%; max-width: 640px; margin-inline: auto; aspect-ratio: 1 / 1;
  border-radius: 22px; overflow: hidden; background: #fff;
  box-shadow: 0 26px 40px -28px rgba(43, 45, 66, .6), 0 2px 6px rgba(43, 45, 66, .06), 0 0 0 1px rgba(43, 45, 66, .1);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.pic-board::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .9), inset 0 8px 14px -12px rgba(43, 45, 66, .25); }
.pic-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pic-board.is-drawable, .pic-board.is-drawable .pic-canvas { touch-action: none; cursor: crosshair; }
.pic-board.is-drawable { box-shadow: 0 26px 40px -28px rgba(240, 80, 47, .6), 0 0 0 3px var(--pic-brand-2), 0 0 0 8px color-mix(in srgb, var(--pic-brand-2) 18%, transparent); }

.pic-overlay {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 14px 22px 14px 14px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: ndj-fade .25s ease both;
}
.pic-overlay.is-reveal { place-items: end center; padding: 12px; background: linear-gradient(to top, rgba(31, 33, 55, .6), rgba(31, 33, 55, .08) 62%); -webkit-backdrop-filter: none; backdrop-filter: none; }
.pic-overlay.is-loading, .pic-overlay.is-restore { background: color-mix(in srgb, var(--card) 55%, transparent); }

/* choosing a word (drawer): three big friendly cards */
.pic-pick { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 10px; }
.pic-pick__title { text-align: center; font-size: 1.4rem; line-height: 1.1; }
.pic-pick__bar { height: 7px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.pic-pick__bar i { display: block; height: 100%; border-radius: inherit; background: var(--pic-hero); transform-origin: left; animation: pic-drain linear forwards; }
.pic-pick__cards { display: grid; gap: 10px; }
.pic-card {
  --lvl: #1FA855;
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: stretch; gap: 3px; width: 100%; min-height: 78px;
  padding: 10px 14px 10px 22px; border: 1px solid var(--pic-edge); border-radius: 18px;
  background: var(--card); color: var(--fg); text-align: left; cursor: pointer;
  box-shadow: 0 12px 20px -16px rgba(43, 45, 66, .55), inset 0 1px 0 rgba(255, 255, 255, .8);
  animation: pic-rise .35s ease both; transition: transform .14s ease, border-color .2s, box-shadow .2s;
}
.pic-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--lvl); }
.pic-card:nth-child(2) { animation-delay: .06s; }
.pic-card:nth-child(3) { animation-delay: .12s; }
.pic-card.is-d2 { --lvl: #F59E0B; }
.pic-card.is-d3 { --lvl: #E5484D; }
.pic-card:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--lvl); }
.pic-card:active:not(:disabled) { transform: scale(.98); }
.pic-card:disabled { cursor: default; opacity: .45; }
.pic-card.is-picked { opacity: 1; border-color: var(--lvl); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lvl) 32%, transparent); }
.pic-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pic-card__cat { font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); }
.pic-card__lvl { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 800; color: var(--fg-2); }
.pic-card__word { font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; line-height: 1.1; letter-spacing: .02em; overflow-wrap: anywhere; }
.pic-dots { display: inline-flex; gap: 3px; }
.pic-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.pic-card .pic-dots i:nth-child(1), .pic-card.is-d2 .pic-dots i:nth-child(2), .pic-card.is-d3 .pic-dots i { background: var(--lvl); }

/* someone else is choosing */
.pic-choosing { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; max-width: 300px; }
.pic-choosing__art { position: relative; display: grid; place-items: center; }
.pic-choosing__art .ndj-avatar { width: 76px; height: 76px; font-size: 2rem; box-shadow: var(--pic-lift), inset 0 -4px 0 rgba(0, 0, 0, .15); animation: ndj-float 3s ease-in-out infinite; }
.pic-choosing__squiggle { width: 150px; height: 46px; color: var(--pic-brand-2); margin-top: 2px; }
.pic-squiggle { stroke-dasharray: 260; stroke-dashoffset: 260; animation: pic-scribble 2.4s ease-in-out infinite; }
.pic-choosing__text { font-size: 1.15rem; font-weight: 700; }
.pic-choosing__text strong { font-family: var(--font-display); font-weight: 600; }
.pic-choosing__tip { color: var(--fg-2); font-size: .92rem; }

/* loading / restoring */
.pic-loading { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; background: var(--card); box-shadow: var(--pic-lift); font-weight: 800; }
.pic-spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--pic-brand); animation: pic-spin .8s linear infinite; }

/* reveal */
.pic-reveal {
  width: 100%; max-width: 400px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  padding: 14px 14px 12px; border-radius: 22px; background: color-mix(in srgb, var(--card) 97%, transparent); border: 1px solid var(--pic-edge);
  box-shadow: 0 24px 40px -22px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .8);
  animation: pic-rise .4s cubic-bezier(.2, 1.3, .4, 1) both;
}
.pic-reveal__why { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; line-height: 1.25; }
.pic-reveal__e { display: inline-block; margin-right: 8px; font-size: 1.6rem; line-height: 1; vertical-align: -.1em; animation: pic-pop .55s cubic-bezier(.2, 1.8, .4, 1) both; }
.pic-reveal__gains { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pic-gain { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--pic-edge); font-size: .9rem; font-weight: 800; animation: pic-rise .35s ease both; }
.pic-gain.is-me { background: color-mix(in srgb, var(--green) 18%, var(--card)); }
.pic-gain__name { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pic-gain__ic { width: 15px; height: 15px; color: var(--orange); }
.pic-gain__pts { font-family: var(--font-display); font-weight: 600; color: var(--pic-ok-fg); }
.pic-reveal__next { width: 100%; display: grid; gap: 5px; margin-top: 8px; color: var(--fg-2); font-size: .86rem; font-weight: 800; }
.pic-reveal__bar { height: 6px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.pic-reveal__bar i { display: block; height: 100%; background: var(--pic-hero); transform-origin: left; animation: pic-drain linear forwards; }
.pic-reveal__wait { display: grid; gap: 8px; justify-items: center; margin-top: 10px; color: var(--fg-2); font-weight: 800; }

/* a correct guess of mine */
.pic-yay {
  position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: 4px; pointer-events: none; text-align: center;
  background: radial-gradient(circle at 50% 50%, rgba(34, 197, 94, .28), rgba(34, 197, 94, 0) 70%);
  animation: pic-yay 1.9s ease forwards;
}
.pic-yay__badge { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #34D77E, #12A15E); box-shadow: 0 12px 30px rgba(18, 161, 94, .45); animation: pic-pop .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.pic-yay__badge .ndj-ic { width: 46px; height: 46px; }
.pic-yay strong { font-family: var(--font-display); font-weight: 700; font-size: 2.1rem; color: #12813C; text-shadow: 0 2px 0 #fff, 0 0 18px #fff; }
.pic-yay span:last-child { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--pic-ink); background: #fff; padding: 2px 12px; border-radius: 999px; box-shadow: var(--pic-lift); }

/* funny captions: a pill on the top edge of the drawing; they never catch taps */
.pic-say {
  position: absolute; left: 0; right: 0; top: 10px; margin-inline: auto; width: max-content; z-index: 4; max-width: calc(100% - 20px); display: flex; align-items: center; gap: 8px;
  padding: 7px 16px 7px 10px; border-radius: 999px; pointer-events: none; color: #fff; background: var(--pic-hero);
  box-shadow: 0 14px 24px -12px rgba(150, 50, 20, .8), inset 0 1px 0 rgba(255, 255, 255, .45);
  font: 800 clamp(1rem, 4.4vw, 1.2rem)/1.15 var(--font-display); text-shadow: 0 1px 2px rgba(160, 40, 10, .4);
  animation: pic-say var(--ms, 2.6s) ease both;
}
.pic-say__e { font-size: 1.55rem; line-height: 1; animation: pic-pop .6s cubic-bezier(.2, 1.8, .4, 1) both; }
.pic-say__t { min-width: 0; overflow-wrap: anywhere; }
/* easy mode: a tip on the empty canvas */
.pic-coach {
  position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; justify-items: center; gap: 4px; pointer-events: none; text-align: center; padding: 20px;
  color: color-mix(in srgb, var(--pic-ink) 62%, #fff); font: 700 1.25rem/1.2 var(--font-display);
}
.pic-coach__sq { width: 160px; height: 52px; color: var(--pic-brand-2); opacity: .85; }

/* ------------------------------------------------------------ game screen */
.pic-game { display: flex; flex-direction: column; gap: 10px; }
.ndj-app.pic-app-wide { padding-top: 12px; padding-bottom: 24px; padding-inline: 12px; }

/* the one instruction */
.pic-banner {
  --tm-track: rgba(43, 45, 66, .12); --tm-bar: var(--pic-purple); --tm-num: var(--fg);
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 74px; padding: 10px 12px; border-radius: 22px;
  background: var(--card); color: var(--fg); border: 1px solid var(--pic-edge); border-left: 8px solid var(--pic-purple);
  box-shadow: var(--pic-lift), var(--pic-hi); transition: background .3s;
}
.role-draw .pic-banner, .role-guess .pic-banner {
  --tm-track: rgba(255, 255, 255, .32); --tm-bar: #fff; --tm-num: #fff;
  color: #fff; background: var(--pic-hero); border: 0; box-shadow: var(--pic-glow); text-shadow: 0 1px 2px rgba(160, 40, 10, .38);
}
.role-done .pic-banner { --tm-bar: #1FA855; background: color-mix(in srgb, #22C55E 15%, var(--card)); border-left-color: #1FA855; }
.role-reveal .pic-banner { --tm-track: rgba(255, 255, 255, .22); --tm-bar: #FFE66D; --tm-num: #fff; color: #fff; background: var(--pic-navy); border: 0; box-shadow: 0 18px 30px -16px rgba(31, 33, 55, .8), inset 0 1px 0 rgba(255, 255, 255, .12); }
.pic-banner__icon { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--pic-brand-ink); background: color-mix(in srgb, var(--pic-purple) 16%, var(--card)); }
.role-draw .pic-banner__icon, .role-guess .pic-banner__icon { color: #fff; background: rgba(255, 255, 255, .26); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); }
.role-done .pic-banner__icon { color: #fff; background: #1FA855; }
.role-reveal .pic-banner__icon { color: #FFE66D; background: rgba(255, 255, 255, .14); }
.pic-banner__icon .pic-ic, .pic-banner__icon .ndj-ic { width: 26px; height: 26px; }
.pic-banner__text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.pic-banner__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.28rem, 6vw, 1.65rem); line-height: 1.1; overflow-wrap: anywhere; }
.pic-banner__word { display: inline-block; margin-left: .3em; padding: 0 .4em; border-radius: 10px; background: #fff; color: var(--pic-brand-ink); text-shadow: none; box-shadow: 0 6px 10px -6px rgba(120, 30, 10, .6); letter-spacing: .03em; }
.pic-banner__sub { max-width: 100%; font-size: .82rem; font-weight: 700; line-height: 1.25; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-draw .pic-banner__sub, .role-guess .pic-banner__sub, .role-reveal .pic-banner__sub { padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: var(--pic-ink); text-shadow: none; }
.role-done .pic-banner__sub { color: var(--pic-ok-fg); }

.pic-timer { position: relative; flex: none; width: 58px; height: 58px; display: grid; place-items: center; }
.pic-timer[hidden] { display: none; }
.pic-timer__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.pic-timer__ring circle { fill: none; stroke-width: 5; }
.pic-timer__track { stroke: var(--tm-track); }
.pic-timer__bar { stroke: var(--tm-bar); stroke-linecap: round; stroke-dasharray: 138.23; transition: stroke-dashoffset .25s linear, stroke .3s; }
.pic-timer__num { position: relative; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; font-variant-numeric: tabular-nums; color: var(--tm-num); }
.pic-timer.is-low .pic-timer__bar { stroke: #FFE66D; }
.role-wait .pic-timer.is-low .pic-timer__bar, .role-done .pic-timer.is-low .pic-timer__bar { stroke: var(--pic-brand); }
.pic-timer.is-low .pic-timer__num { color: #FFE66D; animation: pic-beat 1s ease-in-out infinite; }
.role-wait .pic-timer.is-low .pic-timer__num, .role-done .pic-timer.is-low .pic-timer__num { color: var(--pic-brand-ink); }

/* word / hint strip */
.pic-word {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 76px; padding: 10px 12px;
  border-radius: 20px; background: var(--card); border: 1px solid var(--pic-edge); box-shadow: var(--pic-lift), var(--pic-hi); text-align: center;
}
.pic-word[hidden] { display: none; }
.pic-word__wait { color: var(--fg-2); font-weight: 800; font-size: .95rem; }
.pic-word__label { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); }
.pic-word__label .ndj-ic { width: 16px; height: 16px; color: var(--pic-ok-fg); }
.pic-word__text { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.55rem, 7vw, 2rem); line-height: 1.1; letter-spacing: .05em; overflow-wrap: anywhere; }
.pic-word__alt { font-size: .8rem; font-weight: 700; color: var(--fg-2); }
.pic-word.is-done { background: color-mix(in srgb, var(--green) 14%, var(--card)); border-color: color-mix(in srgb, var(--green) 45%, transparent); }
.pic-word.is-done .pic-word__text { color: var(--pic-ok-fg); }
.pic-word.is-reveal { background: color-mix(in srgb, var(--orange) 12%, var(--card)); }

.pic-hint { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; max-width: 100%; padding-top: 2px; }
.pic-hint__w { display: flex; gap: 5px; max-width: 100%; min-width: 0; }
.pic-tile {
  flex: 0 1 auto; width: 31px; min-width: 12px; height: 42px; display: grid; place-items: center; padding-top: 2px;
  border-radius: 10px 10px 5px 5px; background: var(--card-2); border: 1px solid var(--pic-edge);
  border-bottom: 4px solid var(--pic-brand-2); box-shadow: 0 6px 10px -8px rgba(43, 45, 66, .5), inset 0 1px 0 rgba(255, 255, 255, .7);
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; line-height: 1; color: var(--fg);
}
.pic-tile.is-shown { color: #fff; background: var(--pic-hero); border-color: transparent; border-bottom-color: #C23A1B; text-shadow: 0 1px 2px rgba(160, 40, 10, .35); animation: pic-pop .45s cubic-bezier(.2, 1.6, .4, 1) both; }
.pic-tile.is-sym { border-color: transparent; background: transparent; box-shadow: none; color: var(--fg-2); }
.pic-word__meta { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 4px 10px; font-size: .84rem; font-weight: 800; color: var(--fg-2); }
.pic-word__clue { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px 1px 5px; border-radius: 999px; background: color-mix(in srgb, var(--yellow) 55%, var(--card)); color: #6B4E00; }
.pic-word__clue .pic-ic { width: 15px; height: 15px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pic-word__clue { background: color-mix(in srgb, var(--yellow) 22%, var(--card)); color: var(--yellow); } }
:root[data-theme="dark"] .pic-word__clue { background: color-mix(in srgb, var(--yellow) 22%, var(--card)); color: var(--yellow); }

/* guess feed */
.pic-chat { display: flex; flex-direction: column; min-height: 0; border-radius: 20px; background: var(--card); border: 1px solid var(--pic-edge); box-shadow: var(--pic-lift), var(--pic-hi); }
.pic-chat__title { padding: 12px 16px 0; font-family: var(--font-body); font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); }
.pic-chat__list {
  list-style: none; margin: 0; padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 6px;
  height: clamp(120px, 20vh, 210px); overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12px); mask-image: linear-gradient(to bottom, transparent 0, #000 12px);
}
.pic-msg { display: flex; align-items: flex-end; gap: 7px; max-width: 100%; animation: pic-msg-in .25s ease both; }
.pic-msg .ndj-avatar { width: 30px; height: 30px; font-size: .85rem; }
.pic-msg__bubble { display: flex; flex-direction: column; min-width: 0; max-width: 82%; padding: 7px 12px 8px; border-radius: 16px 16px 16px 5px; background: var(--bg-2); overflow-wrap: anywhere; line-height: 1.3; box-shadow: 0 1px 0 rgba(43, 45, 66, .06); }
.pic-msg__name { font-size: .76rem; font-weight: 800; }
.pic-msg__text { font-weight: 700; font-size: 1.02rem; }
.pic-msg__rx { flex: none; align-self: center; font-size: 1.3rem; line-height: 1; animation: pic-pop .5s cubic-bezier(.2, 1.8, .4, 1) both; }
.pic-msg.is-me { justify-content: flex-end; }
.pic-msg.is-me .pic-msg__bubble { border-radius: 16px 16px 5px 16px; background: color-mix(in srgb, var(--pic-brand-2) 18%, var(--card)); }
.pic-msg.is-pending .pic-msg__bubble { opacity: .6; }
.pic-msg.is-close .pic-msg__bubble { background: color-mix(in srgb, var(--orange) 20%, var(--card)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--orange) 70%, transparent); animation: ndj-shake .4s ease; }
.pic-msg__close { font-size: .82rem; font-weight: 800; color: var(--pic-close); }
.pic-msg--sys { align-self: center; justify-content: center; max-width: 92%; padding: 3px 12px; border-radius: 999px; background: var(--bg-2); color: var(--fg-2); font-size: .82rem; font-weight: 700; text-align: center; }
.pic-msg--ok {
  align-self: stretch; align-items: center; justify-content: center; gap: 8px; padding: 7px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--green) 16%, var(--card)); border: 1px solid color-mix(in srgb, var(--green) 50%, transparent);
  font-weight: 800; animation: pic-pop .4s cubic-bezier(.2, 1.5, .4, 1) both;
}
.pic-msg--ok.is-me { justify-content: center; }
.pic-msg__okic { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--pic-ok); color: #fff; }
.pic-msg__okic .ndj-ic { width: 14px; height: 14px; }
.pic-msg__oktxt { min-width: 0; overflow-wrap: anywhere; }
.pic-msg__pts { font-family: var(--font-display); font-weight: 600; color: var(--pic-ok-fg); }

/* guess box: big field, big send button */
.pic-guess {
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 22px;
  background: var(--card); border: 2px solid color-mix(in srgb, var(--pic-brand-2) 55%, var(--line)); box-shadow: var(--pic-lift), inset 0 2px 4px rgba(43, 45, 66, .04);
  transition: border-color .2s, box-shadow .2s;
}
.pic-guess[hidden] { display: none; }
.pic-guess:focus-within { border-color: var(--pic-brand); box-shadow: 0 0 0 4px rgba(240, 80, 47, .18), var(--pic-lift); }
.pic-guess__input { flex: 1; min-width: 0; min-height: 52px; padding: 0 4px; border: 0; background: transparent; color: var(--fg); font: 700 1.2rem var(--font-body); }
.pic-guess__input:focus { outline: none; }
.pic-guess__input::placeholder { color: var(--fg-2); opacity: .85; font-weight: 600; font-size: 1.02rem; }
.pic-guess__send {
  flex: none; position: relative; min-width: 56px; height: 56px; padding: 0 16px; border: 0; border-radius: 17px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; color: #fff;
  background: var(--pic-hero); box-shadow: 0 12px 18px -10px rgba(240, 80, 47, .8), inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -3px 0 rgba(190, 55, 20, .18);
  font: 700 1.1rem var(--font-display); text-shadow: 0 1px 2px rgba(160, 40, 10, .35);
  transition: transform .12s, opacity .2s;
}
.pic-guess__send .pic-ic { width: 26px; height: 26px; }
.pic-guess__lbl { display: none; }
#app[data-easy="1"] .pic-guess__lbl { display: inline; }
.pic-guess__send:active:not(:disabled) { transform: scale(.95); }
.pic-guess:has(.pic-guess__input:disabled) { border-color: var(--line); background: var(--bg-2); box-shadow: none; }
.pic-guess__send:disabled { opacity: .4; cursor: default; box-shadow: none; }
.pic-guess.is-close { animation: ndj-shake .4s ease; border-color: var(--orange); box-shadow: 0 0 0 4px color-mix(in srgb, var(--orange) 28%, transparent); }
.role-done .pic-guess { border-color: color-mix(in srgb, var(--green) 50%, transparent); background: color-mix(in srgb, var(--green) 10%, var(--card)); }

/* scores */
.pic-scores { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pic-chip {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 4px 14px 4px 4px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--pic-edge); box-shadow: 0 8px 14px -10px rgba(43, 45, 66, .5), var(--pic-hi); transition: border-color .25s, background .25s, opacity .25s;
}
.pic-chip__av { position: relative; flex: none; display: inline-flex; }
.pic-chip__av .ndj-avatar { width: 34px; height: 34px; font-size: .95rem; }
.pic-chip__badge { position: absolute; right: -5px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: 0 0 0 2px var(--card); }
.pic-chip__badge .pic-ic, .pic-chip__badge .ndj-ic { width: 11px; height: 11px; }
.pic-chip__badge.is-draw { background: var(--pic-brand); }
.pic-chip__badge.is-ok { background: var(--pic-ok); }
.pic-chip__main { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.pic-chip__name { font-weight: 800; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 11em; }
.pic-chip__pts { font-size: .8rem; font-weight: 700; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.pic-chip__gain { font-family: var(--font-display); font-weight: 600; font-size: .92rem; color: var(--pic-ok-fg); animation: pic-pop .4s ease both; }
.pic-chip.is-drawer { border-color: color-mix(in srgb, var(--pic-brand) 65%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--pic-brand-2) 25%, transparent), 0 8px 14px -10px rgba(43, 45, 66, .5); }
.pic-chip.is-ok { border-color: color-mix(in srgb, var(--green) 55%, transparent); background: color-mix(in srgb, var(--green) 10%, var(--card)); }
.pic-chip.is-away { opacity: .5; }

/* ------------------------------------------------------------ short phones: keep the guess box above the fold */
@media (max-width: 899px) and (max-height: 760px) {
  .pic-game { gap: 8px; }
  .ndj-app.pic-app-wide { padding-top: 8px; }
  .pic-banner { min-height: 60px; padding-block: 6px; }
  .pic-banner__icon { width: 40px; height: 40px; }
  .pic-banner__title { font-size: 1.2rem; }
  .pic-timer { width: 48px; height: 48px; }
  .pic-timer__num { font-size: 1.1rem; }
  .pic-word { min-height: 60px; padding-block: 6px; gap: 3px; }
  .pic-word__text { font-size: 1.5rem; }
  .pic-tile { height: 34px; font-size: 1.3rem; }
  .pic-tools { padding: 6px 8px; gap: 4px; }
  .pic-swatch { min-height: 36px; }
  .pic-swatch > span { width: 30px; height: 30px; }
  .pic-tools__ctl { padding-top: 5px; }
  .pic-tool, #app[data-easy="1"] .pic-tool { min-height: 44px; }
  #app[data-easy="1"] .pic-tool__lbl { display: none; }
  .pic-guess__input { min-height: 46px; }
  .pic-guess__send { height: 48px; }
  .pic-card { min-height: 70px; padding-block: 7px; }
  .pic-card__word { font-size: 1.5rem; }
}

/* ------------------------------------------------------------ desktop: board + side panel of the same height */
@media (min-width: 900px) and (min-height: 561px) {
  .ndj-app.pic-app-wide { max-width: 1260px; }
  .pic-game {
    --board: min(calc(100dvh - 104px), calc(100vw - 560px), 740px);
    display: grid; justify-content: center; align-items: stretch; column-gap: 18px; row-gap: 10px;
    grid-template-columns: var(--board) minmax(300px, 360px);
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    grid-template-areas: "board banner" "board word" "board chat" "board guess" "board scores";
    height: var(--board);
  }
  .pic-game.is-drawer {
    --board: min(calc(100dvh - 104px), calc(100vw - 680px), 740px);
    grid-template-columns: 124px var(--board) minmax(300px, 360px);
    grid-template-areas: "tools board banner" "tools board word" "tools board chat" "tools board guess" "tools board scores";
  }
  .pic-game > .pic-board { width: var(--board); max-width: none; height: var(--board); }
  .pic-game > .pic-tools { align-self: start; }
  .pic-game > .pic-scores { max-height: 30vh; overflow-y: auto; }
  .pic-game .pic-chat__list { height: auto; flex: 1; min-height: 60px; }
  .pic-game > .pic-tools, .pic-practice__stage .pic-tools { width: 124px; padding: 8px; }
  .pic-game > .pic-tools .pic-tools__colors, .pic-practice__stage .pic-tools__colors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pic-game > .pic-tools .pic-tools__ctl, .pic-practice__stage .pic-tools__ctl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pic-practice__stage { display: grid; grid-template-columns: 124px min(calc(100dvh - 300px), 620px); justify-content: center; gap: 18px; align-items: start; }
  .pic-practice__stage .pic-board { order: 2; }
}

/* ------------------------------------------------------------ landscape phones: board on the left, everything else scrolls beside it */
@media (orientation: landscape) and (max-height: 560px) and (min-width: 600px) {
  .ndj-app.pic-app-wide { max-width: 1260px; }
  .pic-game {
    --board: min(calc(100dvh - 92px), 56vw);
    display: grid; align-items: start; column-gap: 16px; row-gap: 8px;
    grid-template-columns: var(--board) minmax(0, 1fr);
    grid-template-areas: "board banner" "board word" "board tools" "board guess" "board chat" "board scores";
  }
  .pic-game > .pic-board { width: var(--board); max-width: none; position: sticky; top: 72px; }
  .pic-banner { min-height: 54px; padding-block: 6px; }
  .pic-word { min-height: 52px; padding-block: 6px; }
  .pic-game .pic-chat__list { height: 112px; }
  .pic-practice__stage { display: grid; grid-template-columns: min(calc(100dvh - 92px), 56vw) minmax(0, 1fr); gap: 16px; align-items: start; }
}
@media (min-width: 900px) and (min-height: 561px), (orientation: landscape) and (max-height: 560px) and (min-width: 600px) {
  .pic-game > .pic-banner { grid-area: banner; }
  .pic-game > .pic-word { grid-area: word; }
  .pic-game > .pic-board { grid-area: board; }
  .pic-game > .pic-tools { grid-area: tools; }
  .pic-game > .pic-chat { grid-area: chat; }
  .pic-game > .pic-guess { grid-area: guess; }
  .pic-game > .pic-scores { grid-area: scores; }
}

/* ------------------------------------------------------------ practice */
.pic-practice { display: flex; flex-direction: column; gap: 12px; }
.pic-practice__head { display: grid; gap: 14px; padding: 16px; }
.pic-practice__title { display: flex; align-items: center; gap: 12px; }
.pic-practice__title h1 { font-size: 1.4rem; }
.pic-practice__title p { font-size: .92rem; }
.pic-practice__badge { flex: none; width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: var(--pic-hero); box-shadow: 0 10px 16px -10px rgba(240, 80, 47, .8), inset 0 1px 0 rgba(255, 255, 255, .4); }
.pic-practice__prompt { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 10px 12px; border-radius: 16px; background: var(--bg-2); }
.pic-practice__label { font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); }
.pic-practice__word { flex: 1; min-width: 6em; font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; letter-spacing: .04em; }
.pic-practice__stage { display: flex; flex-direction: column; gap: 10px; }

/* ------------------------------------------------------------ end screen: the podium in the hero gradient */
.pic-end__hero {
  position: relative; overflow: hidden; border-radius: 28px; padding: 22px 14px 0; color: #fff; text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, .28) 0%, rgba(255, 255, 255, 0) 55%), var(--pic-hero);
  box-shadow: var(--pic-glow);
}
.pic-end__head { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pic-end__trophy { width: 92px; height: 92px; filter: drop-shadow(0 12px 14px rgba(150, 50, 20, .45)); animation: pic-trophy .9s cubic-bezier(.2, 1.5, .4, 1) both; }
.pic-end__title { font-size: clamp(1.9rem, 8.4vw, 2.6rem); font-weight: 700; line-height: 1.05; overflow-wrap: anywhere; text-shadow: 0 2px 3px rgba(160, 40, 10, .4); }
.pic-end__sub { padding: 3px 14px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: var(--pic-ink); font-weight: 800; font-size: .92rem; }
.pic-end__sub:empty { display: none; }
.pic-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 8px; max-width: 460px; width: 100%; margin: 26px auto 0; }
.pic-podium__slot { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; text-align: center; animation: pic-rise .5s ease both; }
.pic-podium__slot.is-p1 { animation-delay: .25s; }
.pic-podium__slot.is-p2 { animation-delay: .1s; }
.pic-podium__slot.is-p3 { animation-delay: .4s; }
.pic-podium__slot .ndj-avatar { box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), 0 10px 18px -8px rgba(120, 30, 10, .6); }
.pic-podium__slot.is-p1 .ndj-avatar { width: 66px; height: 66px; font-size: 1.7rem; box-shadow: 0 0 0 3px #fff, 0 0 0 6px #FFD43B, 0 10px 18px -8px rgba(242, 169, 15, .8); }
.pic-podium__name { max-width: 100%; padding: 2px 10px; border-radius: 999px; background: #fff; color: var(--pic-ink); font-weight: 800; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 6px 12px -8px rgba(120, 30, 10, .6); }
.pic-podium__step { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; padding-top: 8px; border-radius: 16px 16px 0 0; color: #3B2200; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55); }
.pic-podium__rank { font-family: var(--font-display); font-weight: 700; font-size: 2rem; line-height: 1; }
.pic-podium__pts { font-size: .82rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.is-p1 .pic-podium__step { height: 112px; background: linear-gradient(180deg, #FFE066, #FFC21A); }
.is-p2 .pic-podium__step { height: 86px; background: linear-gradient(180deg, #F1F4FA, #C5CEDD); color: #2B2D42; }
.is-p3 .pic-podium__step { height: 68px; background: linear-gradient(180deg, #FFC08E, #E8985F); color: #3A1B06; }
.pic-podium__slot.is-empty { visibility: hidden; }
.pic-podium__slot.is-me .pic-podium__name::after { content: " ★"; color: var(--pic-brand-ink); }
.pic-end__card .ndj-section-title { margin-bottom: 12px; }
.pic-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pic-rank__row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--pic-edge); box-shadow: 0 8px 14px -12px rgba(43, 45, 66, .5), var(--pic-hi); }
.pic-rank__row.is-first { background: color-mix(in srgb, var(--gold) 16%, var(--card)); border-color: color-mix(in srgb, var(--gold) 50%, transparent); }
.pic-rank__row.is-me { box-shadow: 0 8px 14px -12px rgba(43, 45, 66, .5), inset 0 0 0 1.5px color-mix(in srgb, var(--pic-brand) 45%, transparent); }
.pic-rank__n { flex: none; width: 28px; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--fg-2); }
.pic-rank__name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-weight: 800; overflow-wrap: anywhere; }
.pic-rank__row.is-away { opacity: .6; }
.pic-rank__gone { font-size: .75rem; font-weight: 800; color: var(--fg-2); text-transform: uppercase; letter-spacing: .06em; }
.pic-rank__pts { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.pic-awards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.pic-award { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px; background: var(--card); border: 1px solid var(--pic-edge); box-shadow: var(--pic-lift), var(--pic-hi); }
.pic-awards[hidden] { display: none; }
.pic-award > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.pic-award small { font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); }
.pic-award strong { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; overflow-wrap: anywhere; }
.pic-award em { font-style: normal; font-size: .84rem; font-weight: 700; color: var(--fg-2); }
.pic-award__ic { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); }
.pic-award.is-art .pic-award__ic { background: var(--pic-hero); }
.pic-award.is-eye .pic-award__ic { background: linear-gradient(145deg, #B56BFA, #7C5CF0); }
.pic-fam { margin-top: 2px; }
.pic-fam[hidden] { display: none; }

/* dark: the hero becomes the navy panel; the coral stays on the buttons */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pic-end__hero { background: radial-gradient(circle at 50% 0%, rgba(255, 107, 74, .16) 0%, rgba(255, 107, 74, 0) 60%), var(--pic-navy); box-shadow: 0 18px 30px -16px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .1); }
  :root:not([data-theme="light"]) .pic-end__title { text-shadow: 0 3px 5px rgba(0, 0, 0, .5); color: #FFE66D; }
  :root:not([data-theme="light"]) .pic-card, :root:not([data-theme="light"]) .pic-reveal { box-shadow: 0 14px 24px -18px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .05); }
  :root:not([data-theme="light"]) .pic-tool--danger { color: #FF7A80; }
  :root:not([data-theme="light"]) .pic-tile { box-shadow: 0 6px 10px -8px #000, inset 0 1px 0 rgba(255, 255, 255, .05); }
  :root:not([data-theme="light"]) .pic-board::after { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .9), inset 0 8px 14px -12px rgba(43, 45, 66, .25); }
  :root:not([data-theme="light"]) .pic-guess { box-shadow: 0 12px 22px -18px #000; }
  :root:not([data-theme="light"]) .pic-banner { --tm-track: rgba(255, 255, 255, .16); }
  :root:not([data-theme="light"]) .role-draw .pic-banner, :root:not([data-theme="light"]) .role-guess .pic-banner { --tm-track: rgba(255, 255, 255, .32); }
  :root:not([data-theme="light"]) .pic-coach { color: color-mix(in srgb, var(--pic-ink) 70%, #888); }
}
:root[data-theme="dark"] .pic-end__hero { background: radial-gradient(circle at 50% 0%, rgba(255, 107, 74, .16) 0%, rgba(255, 107, 74, 0) 60%), var(--pic-navy); box-shadow: 0 18px 30px -16px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .1); }
:root[data-theme="dark"] .pic-end__title { text-shadow: 0 3px 5px rgba(0, 0, 0, .5); color: #FFE66D; }
:root[data-theme="dark"] .pic-card, :root[data-theme="dark"] .pic-reveal { box-shadow: 0 14px 24px -18px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .05); }
:root[data-theme="dark"] .pic-tool--danger { color: #FF7A80; }
:root[data-theme="dark"] .pic-tile { box-shadow: 0 6px 10px -8px #000, inset 0 1px 0 rgba(255, 255, 255, .05); }
:root[data-theme="dark"] .pic-guess { box-shadow: 0 12px 22px -18px #000; }
:root[data-theme="dark"] .pic-banner { --tm-track: rgba(255, 255, 255, .16); }
:root[data-theme="dark"] .role-draw .pic-banner, :root[data-theme="dark"] .role-guess .pic-banner { --tm-track: rgba(255, 255, 255, .32); }

/* ------------------------------------------------------------ invite modal */
.pic-invite { display: grid; gap: 6px; max-height: calc(100dvh - 32px); overflow-y: auto; }
.pic-invite .ndj-share { padding: 4px 2px; border: 0; box-shadow: none; }

/* ------------------------------------------------------------ animations */
@keyframes pic-pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@keyframes pic-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pic-msg-in { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes pic-drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes pic-spin { to { transform: rotate(360deg); } }
@keyframes pic-beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@keyframes pic-scribble { 0% { stroke-dashoffset: 260; } 55% { stroke-dashoffset: 0; } 80% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes pic-yay { 0% { opacity: 0; } 12% { opacity: 1; } 78% { opacity: 1; } 100% { opacity: 0; } }
@keyframes pic-say { 0% { opacity: 0; transform: translateY(-12px) scale(.9); } 10% { opacity: 1; transform: none; } 86% { opacity: 1; } 100% { opacity: 0; transform: translateY(-6px); } }
@keyframes pic-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pic-trophy { from { opacity: 0; transform: translateY(16px) scale(.6) rotate(-8deg); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .pic-say, .pic-yay { animation-name: pic-fade; }
  .pic-say__e, .pic-reveal__e, .pic-msg__rx, .pic-tile.is-shown, .pic-chip__gain, .pic-yay__badge, .pic-end__trophy,
  .pic-timer.is-low .pic-timer__num, .pic-choosing__art .ndj-avatar, .pic-squiggle { animation: none; }
  .pic-squiggle { stroke-dashoffset: 0; }
  .pic-card, .pic-podium__slot, .pic-gain, .pic-msg, .pic-msg--ok, .pic-reveal { animation-duration: .01s; }
  .pic-switch__sw, .pic-switch__sw::after, .pic-swatch > span, .pic-swatch__ck, .pic-tool, .pic-card, .pic-more__chev { transition: none; }
}

/* the shared reactions tab (reactions.js) rests on the right end of the turn banner (never on the canvas, the colors or the answer box);
   on phones the banner's clock moves a little left to make room for it */
html { --ndj-fxtab-top: 108px; }
@media (max-width: 899px) { .pic-banner { padding-right: 30px; } }
