/* Twilight UI skin: targeted fixes on top of candy.js (which recolours every injected stylesheet).
   Revert: remove the candy.css link and the candy.js script from index.html. */
/* Honey buttons and selected pills read best with dark ink text. */
#st-play { color: #2c2640 !important; text-shadow: 0 1px 0 rgba(255, 255, 255, .35) !important; }
#settings button.on, .seg button.on { color: #2c2640 !important; text-shadow: none !important; }
/* FirePass header tabs sit on the dark backdrop: muted light text, full white on hover. */
#firepass .tab:not(.on) { color: rgba(243, 240, 252, .6) !important; }
#firepass .tab:not(.on):hover { color: #f3f0fc !important; }
/* Loading bar stage text: readable over both the honey fill and the dark track. */
.st-stage { color: #fff !important; text-shadow: 0 1px 2px rgba(30, 20, 50, .85) !important; }
/* Disabled FirePass buttons ("Worn"): light lilac text on the slate plate instead of dark-on-dark. */
#firepass .btn[disabled], #firepass .cbtn .btn[disabled] { color: rgba(243, 240, 252, .78) !important; text-shadow: 0 1px 0 rgba(20, 14, 36, .6) !important; }
#firepass .cbtn .btn[disabled] .ic { color: #ffd26a !important; }

/* Main dialog choice (duel "Accept", NPC primary answers): the highlight state paints the label in the accent gold,
   the same gold as the pill behind it. Keep the label dark ink on the pill in every state. */
.dlg .dlg-choice.main span, .dlg-choice.main span,
.dlg .dlg-choice.main.hi span, .dlg .dlg-choice.main:hover span, .dlg .dlg-choice.main:focus-visible span {
  color: #2c2640 !important; font-weight: 800; text-shadow: none !important;
}
.dlg .dlg-choice.main:is(.hi, :hover) span { box-shadow: inset 0 -3px 0 rgba(0,0,0,.2), 0 0 0 2px #fff6dc !important; }

/* ---------- Hodag Isles start screen ----------
   One screen, no scrollbar: the hearth scene is sized from the window height (room kept for the logo and the
   controls) and #start never scrolls. Backdrop: dusk over the Big Lake with the Hodag's fires on the far shore
   (tools/brand/backdrop.py); the Big Stove stands on a grassy island; smoke drifts and fireflies glow. */
#start { overflow: hidden !important; touch-action: none !important;
  background: linear-gradient(180deg, rgba(10, 16, 40, .35) 0%, rgba(10, 16, 40, 0) 30%, rgba(8, 14, 32, .25) 100%),
              url("assets/start/backdrop.webp?v=af2d86687c") center 58% / cover no-repeat, #16223f !important; }
#start::before, #start::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0; }
/* drifting smoke */
#start::before { opacity: .22;
  background:
    radial-gradient(90px 26px at 12% 20%, #cfd3e6 60%, transparent 62%), radial-gradient(60px 20px at 16% 18%, #e6e8f4 58%, transparent 60%),
    radial-gradient(110px 28px at 78% 14%, #c9cde2 60%, transparent 62%), radial-gradient(70px 22px at 83% 12%, #e6e8f4 58%, transparent 60%),
    radial-gradient(90px 24px at 46% 9%, #d6d9ea 60%, transparent 62%);
  background-size: 1400px 100%; animation: st-candy-clouds 110s linear infinite; filter: blur(3px); }
@keyframes st-candy-clouds { from { background-position: 0 0; } to { background-position: 1400px 0; } }
/* fireflies */
#start::after {
  background:
    radial-gradient(3px 3px at 8% 62%, #ffe08a 50%, transparent 51%), radial-gradient(2px 2px at 22% 74%, #ffd36e 50%, transparent 51%),
    radial-gradient(3px 3px at 31% 58%, #fff0b0 50%, transparent 51%), radial-gradient(2px 2px at 66% 66%, #ffe08a 50%, transparent 51%),
    radial-gradient(3px 3px at 88% 60%, #ffd36e 50%, transparent 51%), radial-gradient(2px 2px at 93% 78%, #fff0b0 50%, transparent 51%),
    radial-gradient(2px 2px at 5% 84%, #ffe08a 50%, transparent 51%), radial-gradient(3px 3px at 74% 82%, #ffd36e 50%, transparent 51%);
  animation: st-candy-twinkle 2.6s ease-in-out infinite alternate; }
@keyframes st-candy-twinkle { from { opacity: .25; } to { opacity: 1; } }
#start .st-main { position: relative; z-index: 1; min-height: 0 !important; height: 100%;
  padding-top: max(18px, env(safe-area-inset-top, 0px)) !important; padding-bottom: max(14px, env(safe-area-inset-bottom, 0px)) !important;
  --sw: max(440px, min(100vw + 400px, 200vw, (100 * var(--vh) - 500px) * 3.013, 1800px)) !important; }
/* candy title */
#start .st-title { color: #ffd66e !important; -webkit-text-stroke: 2px #ff5d8f; paint-order: stroke fill;
  text-shadow: 0 4px 0 #b8336b, 0 8px 22px rgba(60, 20, 80, .6) !important; animation: st-candy-bob 3.6s ease-in-out infinite; }
#start .st-hungry { color: #ffe9c4 !important; text-shadow: 0 1px 3px rgba(8, 10, 24, .9); font-weight: 700; }
@keyframes st-candy-bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-5px) rotate(1deg); } }
/* the grassy island under the stove */
#start .st-scene::before { content: ""; position: absolute; left: 50%; top: 50.5%; width: 74%; height: 21%; transform: translateX(-50%);
  border-radius: 50% / 38% 38% 62% 62%;
  background: radial-gradient(70% 55% at 50% 22%, #4f7a48 0 58%, transparent 60%), linear-gradient(180deg, #3f6a3e 0%, #5a4332 45%, #2e2019 100%);
  box-shadow: 0 26px 40px rgba(4, 8, 20, .6), inset 0 -10px 18px rgba(20, 12, 8, .5); }
#start .st-scene::after { content: none; }
@keyframes st-candy-float { 0%, 100% { margin-top: 0; } 50% { margin-top: 6px; } }
#start .st-as, #start .st-tip { color: #fff3dc !important; text-shadow: 0 1px 3px rgba(8, 10, 24, .9); }
@media (max-height: 680px) and (min-aspect-ratio: 5 / 4) {
  #start .st-main { height: 100%; --sw: max(380px, min((100 * var(--vh) - 96px) * 1.7778, 2 * (100vw - 2 * var(--gx) - 400px))) !important; }
}

/* Hodag Isles 3D logo on the start screen (tools/brand/logo.py renders it). */
.st-title.st-haslogo{font-size:0!important;line-height:0;margin:0;text-shadow:none;filter:none}
.st-logo{display:block;margin:0 auto -6px;height:clamp(110px,25vh,250px);width:auto;filter:drop-shadow(0 10px 18px rgba(20,10,30,.45))}
@media (max-width:600px){.st-logo{height:clamp(100px,19vh,170px)}}
