/* Painted islands and host-led stories/results, scoped to Corn Lands. */
.curtain { isolation: isolate; gap: 14px; padding: 24px; background: #111b1c; }
.curtain-land { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.curtain::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(#10151b70, #10151bc9 55%, #10151be8); }
.curtain-brand { margin: 0; font-size: 16px; letter-spacing: .16em; text-transform: uppercase; color: #f4d79e; }
.curtain .curtain-title { max-width: 600px; font-size: clamp(30px, 7vw, 54px); letter-spacing: .06em; text-shadow: 0 3px 18px #000; }
.curtain .curtain-line { text-align: center; color: #e9e0cf; }
.curtain .curtain-bar { height: 5px; margin-top: 14px; }
.door { display: grid; grid-template-areas: 'host' 'copy'; grid-template-columns: minmax(0, 1fr); align-content: safe center; justify-items: center; gap: 8px; padding: calc(var(--corner-height, 48px) + 24px + var(--safe-t)) calc(20px + var(--edge-r)) calc(100px + var(--safe-b)) calc(20px + var(--edge-l)); }
.door .door-col { box-sizing: border-box; grid-area: copy; width: min(460px, 100%); margin: 0; padding: 20px; border: 1px solid #f0cd8059; border-radius: 24px; background: linear-gradient(145deg, #17261bd9, #191325df); box-shadow: 0 20px 60px #0006; }
.door-host { grid-area: host; width: min(350px, 80vw); height: 200px; margin: 0; pointer-events: none; }
.door-host img { width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .6s ease; filter: drop-shadow(0 12px 20px #000b); }
.door-host img.is-loaded { opacity: 1; }
.door .door-title { font-size: clamp(42px, 8vw, 68px); }
.door .door-title span { background: none; color: #ffe2a1; filter: drop-shadow(0 3px 8px #0008); }
.door .door-title span:first-child { color: #f9f1dd; }
.door .door-isle { background: #111a1e88; border-color: #dfc58f3b; }
.door .btn-play { font-size: 20px; letter-spacing: .05em; width: 100%; min-height: 56px; border-radius: 14px; background: linear-gradient(115deg, #f0d089, #cb9a45); color: #241a0f; border-color: #ffe4a1; box-shadow: 0 6px 18px #0005; }
.door .door-paint::after { background: linear-gradient(#10151b26, #10151b55); }
.door .door-row { width: 100%; }
.door .door-row button { flex: 1; min-height: 48px; font-size: 16px; }
html[data-side='horde'] .door .door-col { border-color: #c58dde66; background: linear-gradient(145deg, #2c1a36e8, #181126e8); }
html[data-side='horde'] .door .btn-play { background: linear-gradient(115deg, #dcc1f1, #ac82cc); border-color: #e9d0ff; color: #22132d; }
@media (min-aspect-ratio: 5/4) {
  .door { grid-template-areas: 'copy host'; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4vw; padding-left: calc(max(24px, 6vw) + var(--edge-l)); padding-right: calc(max(24px, 5vw) + var(--edge-r)); }
  .door .door-col { justify-self: start; align-items: flex-start; text-align: left; }
  .door-host { width: 100%; max-width: 550px; height: min(70vh, 680px); align-self: stretch; }
  .door .door-paint::after { background: linear-gradient(90deg, #0b111a80, #0b111a26 65%); }
}
@media (max-aspect-ratio: 5/4) {
  .door { top: calc(var(--corner-height, 48px) + 24px + var(--safe-t)); bottom: calc(110px + var(--safe-b)); padding-top: 0; padding-bottom: 12px; }
  .door-host { height: var(--door-host-height, 140px); }
  .door .door-kicker { letter-spacing: .12em; }
  .door .door-isle__line { display: none; }
  .door .door-col { gap: 10px; }
}
@media (max-height: 720px) and (max-aspect-ratio: 5/4) {
  .door { align-content: start; }
  .door-host { height: var(--door-host-height, 130px); }
  .door .door-title { font-size: 40px; }
  .door .door-sub { font-size: 16px; }
}
@media (max-width: 500px) and (max-aspect-ratio: 5/4) {
  .door .door-col { gap: 8px; padding: 16px; }
  .door .door-title { font-size: 42px; }
  .door .door-sub { font-size: 16px; }
  .door .door-isle { padding: 8px 12px; }
}
@media (max-height: 500px) and (min-aspect-ratio: 5/4) {
  .corner { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .door { padding-top: calc(var(--corner-height, 48px) + 24px + var(--safe-t)); padding-bottom: calc(16px + var(--safe-b)); align-content: start; gap: 24px; }
  .door .door-col { gap: 6px; padding: 12px; }
  .door .door-title { font-size: 30px; }
  .door .door-title span:first-child { font-size: 1em; }
  .door .door-isle { padding: 6px 10px; }
  .door-host { height: min(76vh, 340px); }
  .door .btn-play { min-height: 48px; padding: 8px; font-size: 20px; }
}
.cl-isle__art { aspect-ratio: 1; }
.cl-isle__art img { object-position: center; }
.cl-intro .cl-intro-scene { grid-template-columns: minmax(160px, 40%) minmax(0, 1fr); gap: 24px; }
.cl-host-portrait { position: relative; height: 380px; overflow: hidden; border-radius: 20px; border: 1px solid #e8c67c66; background: #1c2928; isolation: isolate; }
.cl-host-land { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .46; }
.cl-host-portrait::after { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 50% 65%, #dfad5344, #19162e); }
.cl-host-character { position: relative; display: block; width: 100%; height: 100%; padding: 10px; object-fit: contain; filter: drop-shadow(0 8px 14px #0009); }
.cl-host-story { min-width: 0; }
.cl-host-story .cl-h { font-size: clamp(24px, 3vw, 32px); line-height: 1.15; color: #ffe1a0; margin: 10px 0 16px; }
.cl-host-story .rui-p { font-size: 18px; line-height: 1.55; }
.cl-host-story .cl-guide-kicker { font-size: 16px; line-height: 1.45; color: #d6eecf; }
.cl-host-progress { margin: 18px 0 0; font-size: 16px; line-height: 1.4; color: #c7b9d7; }
.cl-intro .cl-guide-nav { justify-content: flex-end; flex-wrap: wrap; margin-bottom: 0; }
.cl-intro .cl-guide-nav button { min-height: 48px; }

.rb.cl-result { background: #080d12b8; transition: opacity .4s ease; }
.rb.cl-result .rb-box { width: min(1160px, 100%); height: min(850px, 100%); border: 1px solid #d5b16a99; background: linear-gradient(145deg, #20372d, #171d26 60%, #151020); box-shadow: 0 24px 70px #000b; transform: none; animation: none; }
.rb.cl-result.rb--horde .rb-box { background: linear-gradient(145deg, #34203f, #22192d 60%, #140d24); border-color: #be8edc99; }
.rb.cl-result .rb-head { display: block; padding: 16px 24px 12px; text-align: left; background: transparent; }
.rb.cl-result .rb-title { font-size: clamp(26px, 4vw, 38px); line-height: 1.15; margin: 4px 0; }
.rb.cl-result .rb-rays, .rb.cl-result .rb-ribbon { display: none; }
.rb.cl-result .rb-kicker { font-size: 16px; color: #d6c39b; }
.rb.cl-result .rb-score { justify-content: flex-start; margin: 4px 0; }
.rb.cl-result .rb-big { font-size: 20px; }
.rb.cl-result .rb-line { font-size: 18px; line-height: 1.4; }
.rb.cl-result .rb-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; padding: 12px 24px 18px; }
.rb.cl-result .rb-main { min-width: 0; gap: 14px; }
.rb.cl-result .rb-foot-slot { border-top: 1px solid #d6c39b33; background: #10131cbf; }
.rb.cl-result .rb-notes { font-size: 18px; line-height: 1.45; }
.cl-win-hero { position: relative; margin: 0; height: var(--cl-hero-height, 330px); min-height: 0; min-width: 0; overflow: hidden; align-self: start; border: 1px solid #ebcb8955; border-radius: 18px; background: radial-gradient(ellipse at 30% 30%, #6b623d, #172725 75%); }
.rb--horde .cl-win-hero { background: radial-gradient(ellipse at 30% 30%, #63446f, #201627 75%); }
.cl-win-land { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.cl-win-host { position: absolute; right: 1%; bottom: 80px; width: 63%; height: calc(100% - 88px); object-fit: contain; object-position: right bottom; filter: drop-shadow(0 12px 14px #000a); }
.cl-win-caption { position: absolute; bottom: 0; left: 0; right: 0; display: grid; gap: 5px; padding: 28px 16px 16px; color: #fff0d8; background: linear-gradient(transparent, #100d19ed 24%); font-size: 18px; line-height: 1.35; }
.cl-win-name { color: #ffe0a0; font-size: 22px; font-weight: bold; }
.cl-win-land, .cl-win-host, .cl-win-caption { opacity: 0; transition: opacity .85s ease; }
.cl-win-host { transition-delay: .2s; }
.cl-win-caption { transition-delay: .3s; }
.cl-result[data-scene="ready"] .cl-win-land.is-loaded, .cl-result[data-scene="ready"] .cl-win-host.is-loaded, .cl-result[data-scene="ready"] .cl-win-caption { opacity: 1; }
.cl-result--calm .cl-win-land, .cl-result--calm .cl-win-host, .cl-result--calm .cl-win-caption { transition: none; }
@media (max-width: 679px) {
  .rb.cl-result .rb-body { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 10px 14px 18px; }
  .rb.cl-result .rb-head { padding: 12px 16px 8px; }
  .cl-win-hero { min-height: 0; height: min(320px, var(--cl-hero-height, 320px)); }
  .cl-intro .cl-intro-scene { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .cl-host-portrait { height: 250px; }
}
@media (max-height: 500px) and (min-width: 600px) {
  .cl-host-portrait { height: 210px; }
  .rb.cl-result .rb-head { padding: 6px 16px; }
  .rb.cl-result .rb-title { font-size: 26px; }
  .rb.cl-result .rb-kicker { display: none; }
  .rb.cl-result .rb-score { display: inline-flex; margin-right: 12px; }
  .rb.cl-result .rb-line { display: inline; }
  .rb.cl-result .rb-body { padding: 8px 14px; gap: 16px; }
  .cl-win-caption span:last-child { display: none; }
  .cl-win-caption { padding: 14px; }
  .cl-win-host { bottom: 48px; height: calc(100% - 56px); }
}
@media (prefers-reduced-motion: reduce) {
  .rb.cl-result, .cl-win-land, .cl-win-host, .cl-win-caption, .door-host img { transition: none; }
}

.rb.cl-result.rb--horde { --rb-accent: #d4abea; --rb-accent-2: #b782d8; --rb-glow: #a56bcb55; }
.rb.cl-result.rb--horde .rb-title-words { background-image: linear-gradient(#f3e3ff, #d4abea 55%, #a274c3); }
.rb.cl-result.rb--horde .rb-btn--primary { border-color: #ead2ff; background: linear-gradient(#f0dfff, #c69ae5 55%, #9b72bd); }
.rb.cl-result .rb-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 48px; gap: 8px; padding: 10px 14px; }
.rb.cl-result .rb-foot .rb-btn { width: 100%; min-width: 0; min-height: 48px; padding: 8px; font-size: 18px; line-height: 1.2; }
.rb.cl-result .rb-foot .rb-btn--teal { width: 48px; height: 48px; padding: 12px; border-radius: 50%; }
.rb.cl-result .rb-foot .rb-btn--teal svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* A lost round's result picture: the player's own character sulks in its lower left (Goliath, 2026-10-20) */
.cl-win-sulk { position: absolute; left: 2%; bottom: 82px; width: 34%; height: calc(56% - 40px); object-fit: contain; object-position: left bottom; filter: drop-shadow(0 8px 10px #000a); opacity: 0; transition: opacity .85s ease .45s; }
.cl-result[data-scene="ready"] .cl-win-sulk.is-loaded { opacity: 1; }
.cl-win-hero.is-loss .cl-win-host { width: 60%; }
.cl-result--calm .cl-win-sulk { transition: none; }
@media (max-height: 500px) and (min-width: 600px) { .cl-win-sulk { bottom: 50px; height: calc(60% - 30px); } }

/* THE GAME OVER: HERD WINS / HORDE WINS over the whole screen before the result board (corn-lands-presentation.js) */
.cl-over { position: fixed; inset: 0; z-index: 65; display: flex; flex-direction: column; align-items: center; box-sizing: border-box; gap: 8px;
  padding: calc(14px + var(--safe-t, 0px)) calc(16px + var(--edge-r, 0px)) calc(14px + var(--safe-b, 0px)) calc(16px + var(--edge-l, 0px));
  background: radial-gradient(ellipse at 50% 40%, #3b6a3ff5, #0b1410fd 70%); opacity: 0; transition: opacity .35s ease; cursor: pointer; }
.cl-over.is-horde { background: radial-gradient(ellipse at 50% 40%, #5a2c7af5, #120a1cfd 70%); }
.cl-over.is-on { opacity: 1; }
.cl-over__head { flex: none; text-align: center; max-width: 900px; }
.cl-over__kick { margin: 0; font-size: 18px; font-weight: bold; letter-spacing: .14em; text-transform: uppercase; color: #ffe2a1; }
.cl-over.is-loss .cl-over__kick { color: #ff9aa8; font-size: 22px; }
.cl-over__title { margin: 2px 0; font: bold clamp(40px, 11vw, 112px)/1 var(--title-font, Georgia, serif); letter-spacing: .04em; color: #fff3cf; text-shadow: 0 4px 0 #6b3a12, 0 8px 28px #000c; white-space: nowrap; }
.cl-over.is-horde .cl-over__title { color: #f1dcff; text-shadow: 0 4px 0 #3c1758, 0 8px 28px #000c; }
.cl-over__title span { display: inline-block; transform: scale(2.4) rotate(-8deg); opacity: 0; }
.cl-over.is-on .cl-over__title span { animation: stamp .42s cubic-bezier(.2, 1.6, .4, 1) forwards; animation-delay: calc(var(--i) * 45ms + 120ms); }
@keyframes stamp { to { transform: none; opacity: 1; } }
.cl-over__line { margin: 6px 0 0; font-size: 18px; line-height: 1.35; color: #f3ead8; }
.cl-over__stage { position: relative; flex: 1 1 auto; width: min(100%, 1000px); min-height: 0; margin-bottom: 10px; }
/* the cackle rocks the host on its feet (transform-origin at the base), and the stage keeps 18 px over Continue for the rock */
.cl-over__star { position: absolute; right: 4%; bottom: 0; height: 100%; max-width: 70%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 14px 22px #000c); transform-origin: 50% 100%;
  transform: translateX(60%) scale(.9); opacity: 0; }
.cl-over.is-win .cl-over__star { right: 50%; transform: translate(50%, 30%) scale(.8); }
.cl-over__star.is-in { animation: star-in .7s cubic-bezier(.2, 1.4, .4, 1) .25s forwards; }
.cl-over.is-win .cl-over__star.is-in { animation-name: star-up; }
@keyframes star-in { to { transform: none; opacity: 1; } }
@keyframes star-up { 60% { transform: translate(50%, -6%) scale(1.04); opacity: 1; } to { transform: translate(50%, 0) scale(1); opacity: 1; } }
.cl-over.is-loss .cl-over__star.is-in { animation: star-in .7s cubic-bezier(.2, 1.4, .4, 1) .25s forwards, cackle .5s ease-in-out 1s 4 alternate; }
@keyframes cackle { from { rotate: -2deg; } to { rotate: 3deg; } }
.cl-over__sulk { position: absolute; left: 0; bottom: 0; height: 60%; max-width: 34%; object-fit: contain; object-position: left bottom; filter: drop-shadow(0 8px 12px #000b) saturate(.85);
  transform: translateX(-60%); opacity: 0; }
/* the scowl slides in from the side, never from below, so it never crosses the Continue button under the stage */
.cl-over__sulk.is-in { animation: sulk .6s ease-out .6s forwards; }
@keyframes sulk { to { transform: none; opacity: 1; } }
.cl-over__foot { position: relative; z-index: 2; flex: none; display: flex; justify-content: center; width: 100%; }
.cl-over__star, .cl-over__sulk { pointer-events: none; }
.cl-over__go { min-width: 200px; min-height: 52px; padding: 10px 28px; border-radius: 16px; font-family: inherit; font-size: 20px; font-weight: bold; line-height: 1.2; cursor: pointer; color: #241a0f;
  border: 2px solid #ffe4a1; background: linear-gradient(115deg, #f0d089, #cb9a45); box-shadow: 0 6px 18px #0007; }
.cl-over.is-horde .cl-over__go { color: #22132d; border-color: #e9d0ff; background: linear-gradient(115deg, #dcc1f1, #ac82cc); }
.cl-over.is-calm, .cl-over.is-calm * { animation: none !important; transition: none !important; }
.cl-over.is-calm .cl-over__title span, .cl-over.is-calm .cl-over__star.is-in, .cl-over.is-calm .cl-over__sulk.is-in { opacity: 1; transform: none; }
.cl-over.is-calm.is-win .cl-over__star.is-in { transform: translateX(50%); }
@media (max-height: 500px) { .cl-over__line { font-size: 16px; } .cl-over__title { font-size: clamp(34px, 9vh, 64px); } .cl-over__kick { font-size: 16px; } .cl-over__sulk { height: 92%; max-width: 30%; } }
@media (prefers-reduced-motion: reduce) { .cl-over, .cl-over * { animation: none !important; transition: none !important; } }
