/* Greek mythology lesson. All rules scoped under .grm-* */
.grm-sc { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }

/* the contest */
.grm-fw { flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; padding: 0 12px 8px; box-sizing: border-box; }
.grm-ct { position: relative; width: 100%; max-width: 340px; aspect-ratio: 340 / 270; }
.grm-ct > img { position: absolute; bottom: 8%; height: 84%; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0,0,0,.45)); transition: opacity .4s, filter .4s; }
.grm-pos { left: -2%; }
.grm-ath { right: 0; }
.grm-ctsvg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.grm-rock { fill: #8C8478; stroke: #B5AC9E; stroke-width: 1.5; }
.grm-jet { fill: none; stroke: #7FD3F2; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 120; stroke-dashoffset: 120; filter: drop-shadow(0 0 4px rgba(127,211,242,.7)); }
.grm-pool { fill: rgba(127,211,242,.55); opacity: 0; transition: opacity .4s; }
.grm-spring.on .grm-pool { opacity: 1; }
.grm-trunk { fill: none; stroke: #8A6438; stroke-width: 6; stroke-linecap: round; }
.grm-leaf { fill: #6FA35A; stroke: #8FC277; stroke-width: 1; }
.grm-olv { fill: #3E4A2A; }
.grm-gift { all: unset; box-sizing: border-box; position: absolute; top: 30%; width: 26%; height: 66%; display: flex; align-items: flex-end; justify-content: center; border-radius: 14px; cursor: pointer; }
.grm-gift.s { left: 24%; }
.grm-gift.t { left: 52%; }
.grm-gift span { font: 700 12.5px var(--sans); color: var(--text); background: rgba(10,14,26,.78); border: 1px solid var(--line-strong); padding: 3px 8px; border-radius: 999px; margin-bottom: -2px; opacity: 0; transition: opacity .3s; white-space: nowrap; }
.grm-ct.tap .grm-gift span, .grm-ct.won .grm-gift span { opacity: 1; }
.grm-gift.picked span { border-color: var(--gold); color: var(--gold); }
.grm-ct.chose .grm-gift { pointer-events: none; }
.grm-ct.won .grm-pos, .grm-ct.won .grm-spring { opacity: .3; }
.grm-ct.won .grm-gift.s span { opacity: .35; }
.grm-ct.won .grm-gift { pointer-events: none; }
.grm-city { position: absolute; left: 50%; top: 4%; transform: translateX(-50%); font: 700 22px var(--serif); color: var(--gold); opacity: 0; transition: opacity .5s; letter-spacing: .04em; }
.grm-city.on { opacity: 1; }

/* the map: a real outline, pins and labels in percent */
.grm-map { position: relative; width: 100%; max-width: 320px; border-radius: 14px; overflow: hidden; }
.grm-map img { display: block; width: 100%; filter: saturate(.8) brightness(.92); }
.grm-sea { fill: #13305A; }
.grm-land { fill: #CBB98F; stroke: #E6D7AE; stroke-width: 1; }
.grm-ml { position: absolute; font: 700 13px var(--sans); color: #2B2618; white-space: nowrap; pointer-events: none; }
.grm-ml.ath { transform: translate(8px, -50%); color: #6B6350; font-weight: 600; }
.grm-ml.crete { transform: translate(-50%, -50%); color: #6B6350; }
.grm-ml.pin.r { transform: translate(14px, -30px); }
.grm-ml.pin.u { transform: translate(-50%, -62px); }
.grm-ath-dot { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #6B6350; }
.grm-pin { all: unset; box-sizing: border-box; position: absolute; width: 44px; height: 44px; margin: -40px 0 0 -22px; display: flex; align-items: flex-end; justify-content: center; cursor: pointer; }
.grm-pin i { display: block; width: 18px; height: 18px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--violet); border: 2px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,.4); margin-bottom: 4px; transition: background .2s; }
.grm-pin.done i { background: var(--gold); }

/* the sea */
.grm-hl { width: 100%; max-width: 340px; }
.grm-hsvg { width: 100%; display: block; }
.grm-wall { fill: #CBB98F; stroke: #6E5B3A; stroke-width: 1; }
.grm-hull { fill: #8A5A2E; stroke: #C99A62; stroke-width: 1; }
.grm-mast { fill: rgba(234,227,215,.85); stroke: #8A5A2E; stroke-width: 2; }
.grm-sail2 { fill: rgba(234,227,215,.8); }
.grm-hi { transition: opacity .9s; }
.grm-cloud { opacity: 0; transition: opacity .9s; }
.grm-cloud circle { fill: rgba(240,240,255,.92); }
.grm-hl.phantom .grm-hi { opacity: 0; }
.grm-hl.phantom .grm-cloud { opacity: 1; }
.grm-hit { fill: transparent; cursor: pointer; }
.grm-real { opacity: 0; transition: opacity .8s; }
.grm-hn { fill: #FFF4D6; font: 700 13px var(--sans); text-anchor: middle; paint-order: stroke; stroke: rgba(10,14,26,.75); stroke-width: 3px; }
.grm-hl.phantom .grm-ship .grm-hn { opacity: 0; transition: opacity .6s; }
.grm-hl.egypt .grm-real { opacity: 1; }
.grm-war { fill: #FFB4A0; font: 700 14px var(--sans); text-anchor: middle; opacity: 0; transition: opacity .5s; }
.grm-hl.war .grm-war { opacity: 1; }
.grm-hl.still * { transition: none !important; }

/* Disney's card */
.grm-card { position: relative; width: 210px; max-width: 62vw; aspect-ratio: 3 / 4; perspective: 900px; }
.grm-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; padding: 10px; box-sizing: border-box; border-radius: 16px; background: linear-gradient(180deg, #232B4A, #151B30); border: 1px solid var(--line-strong); backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .8s cubic-bezier(.4,.1,.2,1); text-align: center; }
.grm-face img { flex: 1; min-height: 0; width: 100%; object-fit: contain; }
.grm-face b { font: 700 13.5px var(--sans); color: var(--gold); }
.grm-face span { font: 600 12.5px/1.3 var(--sans); color: var(--text); }
.grm-face.b { transform: rotateY(180deg); }
.grm-card.flip .grm-face.a { transform: rotateY(-180deg); }
.grm-card.flip .grm-face.b { transform: rotateY(0); }

@media (max-height: 700px) {
  .grm-map { max-width: 262px; }
  .grm-ct { max-width: 290px; }
  .grm-card { width: 170px; }
}

/* the two tellings, answered in the scene */
.grm-sc .choices.grm-tells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 340px; }
.grm-tells .choice { min-height: 150px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; text-align: center; }
.grm-tells .choice img { height: 92px; width: auto; max-width: 100%; object-fit: contain; }
.grm-tells .choice img.egy { filter: drop-shadow(0 0 6px rgba(252,192,80,.7)); }
.grm-tells .choice b { font: 700 14px var(--sans); }
.grm-tells .choice span { font: 500 12.5px/1.25 var(--sans); color: var(--dim); }
@media (max-height: 700px) {
  .grm-tells .choice { min-height: 124px; }
  .grm-tells .choice img { height: 70px; }
}
