/* Dark Mage of Mossfen — the choosing screen and the Druid's colours (v0.17).
   Same world as the HUD: moss-black glass, tarnished-brass edges, bone-coloured type. */

/* ---- the Druid's spells in the HUD ------------------------------------------- */
:root { --wood: #9dff4a; --poison: #d59bff; }
#log .tone-wood { color: #b4f07a; }
#log .tone-poison { color: var(--poison); }
#log .tone-heal { color: #a6ff8e; }
.dmg-wood { color: #c8ff7a; }
.dmg-poison { color: #dca8ff; font-size: 17px; }               /* a tick of poison: smaller than a hit */
.dmg-note.note-wood { color: var(--wood); }
.dmg-note.note-poison { color: var(--poison); }
.elem.is-weak[data-el="wood"], #tg-ice.is-weak[data-el="wood"] { color: var(--wood); }
.elem.is-weak[data-el="poison"], #tg-ice.is-weak[data-el="poison"] { color: var(--poison); }
.elem.is-weak[data-el="fire"] { color: var(--fire); }

/* green flash when the roots break the ground, violet when the nightshade bursts */
.screen-flash.root-flash {
  background: radial-gradient(circle at 50% 58%, rgba(240, 255, 210, 0.85), rgba(141, 255, 58, 0.4) 45%, rgba(30, 90, 20, 0.2));
}
.screen-flash.shade-flash {
  background: radial-gradient(circle at 50% 58%, rgba(245, 225, 255, 0.8), rgba(176, 90, 255, 0.4) 45%, rgba(60, 20, 110, 0.22));
}
/* sunrise when Dawnpetal opened (v0.69–v0.71); unused since v0.72 (its light kept as low as Frost Nova's) */
.screen-flash.dawn-flash {
  background: radial-gradient(circle at 50% 60%, rgba(255, 251, 236, 0.9), rgba(255, 206, 120, 0.45) 40%, rgba(255, 140, 170, 0.22) 75%, rgba(120, 70, 140, 0.12));
}

/* a heal: green digits with a warm glow round them; the first, strongest wave of Dawnpetal is bigger */
.dmg-heal.heal-dawn {
  color: #8dff6a;
  text-shadow: 2px 0 0 #1b140f, -2px 0 0 #1b140f, 0 2px 0 #1b140f, 0 -2px 0 #1b140f,
               1px 1px 0 #1b140f, -1px -1px 0 #1b140f, 1px -1px 0 #1b140f, -1px 1px 0 #1b140f,
               0 0 10px rgba(255, 210, 120, 0.85);
}
.dmg-heal.heal-dawn.heal-big { font-size: 28px; color: #a8ff5c; }
/* Heal (v0.96): warm green digits in a glow of yellow-white light */
.dmg-heal.heal-light {
  color: #b8ff8a;
  text-shadow: 2px 0 0 #1b140f, -2px 0 0 #1b140f, 0 2px 0 #1b140f, 0 -2px 0 #1b140f,
               1px 1px 0 #1b140f, -1px -1px 0 #1b140f, 1px -1px 0 #1b140f, -1px 1px 0 #1b140f,
               0 0 12px rgba(255, 236, 170, 0.95);
}
.dmg-heal.heal-light.heal-big { font-size: 27px; }

/* ---- the choosing screen -------------------------------------------------------- */
#select {
  position: absolute; inset: 0; z-index: 40;
  display: grid; grid-template-rows: auto auto auto; justify-items: center; gap: 18px;
  align-content: start; align-content: safe center;      /* centred when it fits, from the top (and scrollable) when it doesn't */
  padding: 28px 16px 22px;
  overflow-y: auto;
  background:
    radial-gradient(ellipse 70% 55% at 50% 38%, rgba(64, 104, 58, 0.34), transparent 70%),
    radial-gradient(ellipse 120% 90% at 50% 110%, rgba(8, 12, 9, 0.9), transparent 60%),
    linear-gradient(#131c16, #0b100d);
}
#select > header { display: grid; justify-items: center; gap: 4px; text-align: center; }
.select-kicker { margin: 0; font: 700 14px/1 var(--f-display); letter-spacing: 0.22em; text-transform: uppercase; color: var(--edge-strong); }
#select h1 { margin: 0; font: 700 clamp(28px, 4.4vw, 44px)/1.05 var(--f-display); letter-spacing: 0.03em; color: var(--ink); text-wrap: balance; }
.select-note { margin: 2px 0 0; font-size: 15px; color: var(--ink-dim); }
.select-keys { margin: 0; font-size: 13px; color: var(--ink-faint); }
.select-keys kbd {
  display: inline-block; min-width: 22px; padding: 2px 5px; border: 1px solid var(--edge); border-radius: 4px;
  font: 700 12px/1.2 var(--f-display); color: var(--ink-dim); background: rgba(0, 0, 0, 0.3); text-align: center;
}
.select-loading {
  display: none; position: absolute; inset: 0; margin: 0; place-items: center;
  font: 500 18px var(--f-display); letter-spacing: 0.06em; color: var(--ink-dim);
}
#select.is-leaving > header, #select.is-leaving .pick-list, #select.is-leaving .select-keys { opacity: 0; pointer-events: none; transition: opacity 0.18s ease-out; }
#select.is-leaving .select-loading { display: grid; }

/* fireflies drifting up behind the cards */
.select-sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.select-sky i {
  position: absolute; bottom: -12px; width: 5px; height: 5px; border-radius: 50%;
  background: #d9ff9a; box-shadow: 0 0 10px 3px rgba(157, 255, 74, 0.55);
  opacity: 0; animation: select-rise 11s linear infinite;
}
.select-sky i:nth-child(1) { left: 8%;  animation-delay: -1s; }
.select-sky i:nth-child(2) { left: 21%; animation-delay: -6s; animation-duration: 14s; }
.select-sky i:nth-child(3) { left: 36%; animation-delay: -3s; background: #e6ceff; box-shadow: 0 0 10px 3px rgba(185, 140, 255, 0.55); }
.select-sky i:nth-child(4) { left: 52%; animation-delay: -9s; animation-duration: 13s; }
.select-sky i:nth-child(5) { left: 64%; animation-delay: -4.5s; background: #e6ceff; box-shadow: 0 0 10px 3px rgba(185, 140, 255, 0.55); }
.select-sky i:nth-child(6) { left: 77%; animation-delay: -7.5s; animation-duration: 15s; }
.select-sky i:nth-child(7) { left: 88%; animation-delay: -2s; }
.select-sky i:nth-child(8) { left: 95%; animation-delay: -10s; animation-duration: 12s; background: #e6ceff; box-shadow: 0 0 10px 3px rgba(185, 140, 255, 0.55); }
@keyframes select-rise {
  0% { transform: translate(0, 0); opacity: 0; }
  12% { opacity: 0.9; }
  50% { transform: translate(26px, -52vh); opacity: 0.6; }
  88% { opacity: 0.8; }
  100% { transform: translate(-14px, -108vh); opacity: 0; }
}

.pick-list {
  position: relative;
  display: grid; grid-template-columns: repeat(4, minmax(0, 310px)); gap: 18px;       /* four classes (v1.00) */
  align-items: stretch; justify-content: center; width: 100%; max-width: 1320px;
}
.pick {
  --pick: var(--edge-strong);
  position: relative; display: grid; grid-template-rows: auto auto auto auto 1fr auto auto auto auto; gap: 8px;
  padding: 0 18px 16px; cursor: pointer; text-align: center;
  background: linear-gradient(rgba(24, 33, 27, 0.92), rgba(14, 20, 16, 0.94));
  border: 1px solid var(--edge); border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.06), 0 14px 34px rgba(0, 0, 0, 0.5);
  transition: transform 0.16s ease-out, border-color 0.16s, box-shadow 0.16s;
  outline: none;
}
.pick:hover, .pick:focus-visible, .pick.is-hot {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--pick) 70%, #000);
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.08), 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px color-mix(in srgb, var(--pick) 55%, transparent), 0 0 34px color-mix(in srgb, var(--pick) 26%, transparent);
}
.pick:focus-visible { outline: 2px solid color-mix(in srgb, var(--pick) 70%, #fff); outline-offset: 3px; }

/* the portrait stands in a pool of its own light */
.pick-stage {
  position: relative; height: 230px; margin: 0 -18px; overflow: hidden; border-radius: 10px 10px 0 0;
  background:
    radial-gradient(ellipse 46% 15% at 50% 88%, rgba(0, 0, 0, 0.55), transparent 70%),
    radial-gradient(ellipse 62% 70% at 50% 58%, color-mix(in srgb, var(--pick) 34%, transparent), transparent 72%),
    linear-gradient(rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0));
  border-bottom: 1px solid var(--edge);
}
.pick-stage canvas {
  position: absolute; left: 50%; bottom: 4px; width: 216px; height: 216px; transform: translateX(-50%);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55));
}
.pick h2 { margin: 6px 0 0; font: 700 28px/1 var(--f-display); letter-spacing: 0.04em; color: var(--ink); }
.pick-role { margin: 0; font: 700 13px/1.2 var(--f-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--pick); }
.pick-pitch { margin: 2px 0 0; font-size: 15px; line-height: 1.4; color: var(--ink-dim); text-wrap: pretty; }

.pick-ratings { display: grid; gap: 5px; margin: 6px auto 0; width: min(100%, 250px); }
.pick-ratings div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pick-ratings dt { font: 500 13px/1 var(--f-display); letter-spacing: 0.06em; color: var(--ink-dim); }
.pick-ratings dd { margin: 0; display: flex; gap: 4px; }
.pick-ratings i { width: 20px; height: 8px; border-radius: 2px; background: #080b09; border: 1px solid #000; }
.pick-ratings i.on { background: linear-gradient(#fff5 0 40%, transparent 40%), var(--pick); }

.pick-spells { display: flex; justify-content: center; gap: 14px; margin: 8px 0 0; padding: 10px 0 0; list-style: none; border-top: 1px solid var(--edge); }
.pick-spells li { display: grid; justify-items: center; gap: 5px; width: 82px; }
.pick-spells img { width: 44px; height: 44px; border: 1px solid #000; border-radius: 5px; box-shadow: 0 0 0 1px var(--edge); }
.pick-spells span { font: 500 12px/1.15 var(--f-display); letter-spacing: 0.04em; color: var(--ink-dim); }

.pick-save { margin: 4px 0 0; font-size: 14px; color: var(--ink-dim); min-height: 20px; }
.pick-save b { color: var(--exp); font: 700 15px/1 var(--f-display); letter-spacing: 0.04em; }
.pick-save em {
  margin-left: 8px; padding: 1px 7px; border: 1px solid var(--edge); border-radius: 9px;
  font: 500 11px/1.4 var(--f-display); letter-spacing: 0.08em; text-transform: uppercase; font-style: normal; color: var(--ink-faint);
}
.pick-actions { display: grid; justify-items: center; gap: 6px; min-height: 72px; align-content: start; }   /* room for Delete under Continue */
/* face colours under the portrait (v0.88): round swatches and the picked one's name */
.pick-faces { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 7px; min-height: 24px; margin-top: 2px; }
.pick-face {
  width: 20px; height: 20px; padding: 0; border-radius: 50%; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.55) 0 16%, transparent 42%), var(--face);
  border: 2px solid rgba(0, 0, 0, 0.6); box-shadow: 0 0 0 1px rgba(255, 240, 200, 0.16);
  transition: transform 0.12s, box-shadow 0.12s;
}
.pick-face:hover { transform: scale(1.12); }
.pick-face[aria-pressed="true"] { transform: scale(1.18); box-shadow: 0 0 0 2px var(--ink), 0 0 10px color-mix(in srgb, var(--face) 70%, transparent); }
.pick-face:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.pick-face-name { min-width: 54px; text-align: left; font: 700 12px/1 var(--f-display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); }

.pick-go {
  min-width: 170px; padding: 10px 20px; border-radius: 5px; cursor: pointer;
  font: 700 17px/1 var(--f-display); letter-spacing: 0.06em;
  color: #1b140f; background: linear-gradient(#f3d68a, #c99d45); border: 1px solid #000;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
}
.pick-go:hover { background: linear-gradient(#ffe6a3, #d9ae55); }
.pick-go:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* places offline (v1.05): the character cards and the New character card of the game server's screen (account.css) */
.pick-list.is-places { display: block; max-width: 1320px; }
.acct-list .pick.is-local { grid-template-rows: auto auto auto auto auto 1fr; }   /* its face swatches under the portrait */
.pick-more { display: flex; align-items: center; justify-content: center; gap: 14px; }
.pick-more .link-btn { margin: 0; }
.acct-char.is-renaming .pick-actions { display: none; }
.pick-renamer { display: grid; gap: 8px; align-content: start; text-align: left; }
.pick-renamer[hidden] { display: none; }
.pick-renamer div { display: flex; align-items: center; gap: 12px; }
.pick-renamer .pick-go { min-width: 0; padding: 8px 16px; font-size: 15px; }
.pick-renamer .link-btn { margin: 0; }
.pick-del {                                      /* Delete (v1.04): forgets that character, after a second click */
  padding: 6px 14px; border-radius: 5px; cursor: pointer;
  font: 700 13px/1 var(--f-display); letter-spacing: 0.06em;
  color: #f0a594; background: rgba(156, 47, 34, 0.16); border: 1px solid rgba(240, 101, 82, 0.42);
}
.pick-del:hover { color: #fff; background: rgba(156, 47, 34, 0.45); }
.pick-del:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.pick-del.is-confirming { color: #fff; background: #9c2f22; border-color: #000; }

@media (max-height: 860px) and (min-width: 721px) {
  #select { gap: 12px; padding: 16px 16px 14px; }
  .pick-stage { height: 196px; }
  .pick-stage canvas { width: 186px; height: 186px; }
  .pick { gap: 6px; padding-bottom: 12px; }
  .pick-pitch { font-size: 14px; }
  .pick-actions { min-height: 72px; }
}
@media (max-width: 1060px) and (min-width: 721px) {
  .pick-list { grid-template-columns: repeat(2, minmax(0, 340px)); }                /* two by two on a narrow screen */
}
@media (max-width: 720px) {
  #select { align-content: start; padding-top: 18px; gap: 12px; }
  .pick-list { grid-template-columns: minmax(0, 420px); gap: 14px; }
  .pick-stage { height: 180px; }
  .pick-stage canvas { width: 168px; height: 168px; }
  .select-keys { display: none; }
  .pick h2 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .select-sky i { animation: none; opacity: 0.5; bottom: auto; top: 30%; }
  .pick { transition: none; }
  .pick:hover, .pick:focus-visible, .pick.is-hot { transform: none; }
}

/* Stinky Rafflesia (v0.79): "Reeking!", and a poison tick a reek made 10% harder (olive edge on the violet) */
.dmg-holy { color: #fff3c4; }                                     /* Holy (v0.97): warm white */
.dmg-dark { color: #c4a6ff; text-shadow: 0 0 3px #1a0a2e, 1px 1px 0 #12081c, -1px -1px 0 #12081c; }   /* Shadow Bolt (v1.84): violet on the dark */
.dmg-crit.dmg-dark { --burst: #4a2390; --burst-core: #a77bff; }
#log .tone-dark { color: #b996ff; }
.elem.is-weak[data-el="dark"] { color: #b996ff; }
.dmg-phys { color: #e2e7ec; }                                     /* Ice Spear's blow (v1.01): physical, steel white; its crit the steel burst */
.dmg.dmg-knife { font-size: 17px; color: #d6f6ff; }                /* a Frozen Knife's hit (v1.14): smaller than a spell's, pale ice */
.dmg-crit.dmg-holy { --burst: #c99a2a; --burst-core: #ffe58a; }
.dmg-note.note-holy { color: #fff1c8; text-shadow: 0 0 3px #6a4a10, 1px 1px 0 #2a1d08, -1px -1px 0 #2a1d08; }
.dmg-note.note-blessing { color: #ffc861; text-shadow: 0 0 3px #6a3a10, 1px 1px 0 #2a1408, -1px -1px 0 #2a1408; }   /* Ruvael's Blessing (v1.45) */
.dmg-note.note-veil { color: #ffe0a0; text-shadow: 0 0 3px #6a4a10, 1px 1px 0 #2a1d08, -1px -1px 0 #2a1d08; }   /* Veil of Grace (v1.63) */
.dmg-note.note-revive { color: #ffd88a; font-size: 1.15em; text-shadow: 0 0 4px #7a3e14, 1px 1px 0 #2a1408, -1px -1px 0 #2a1408; }   /* Revive (v1.65) */
.dmg-note.note-reek { color: #d2d25a; text-shadow: 0 0 2px #2a1a08, 1px 1px 0 #3a1a0e, -1px -1px 0 #3a1a0e; }
.dmg-poison.dmg-reek { color: #ecd0ff; font-size: 18px; text-shadow: 0 0 3px #8a9a20, 1px 1px 0 #3a3a08, -1px 1px 0 #3a3a08; }
#log .tone-reek { color: #c8c84a; }
