/* History of English. All rules scoped under .hoe-* (the app inlines only this file). */

/* 0. one prayer, back in time */
.hoe-time { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 34px; padding: 0 4px 40px; }
.hoe-card { min-height: 190px; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 22px 20px; border-radius: 20px; background: linear-gradient(160deg, #2a2440, #1a1730); border: 1px solid rgba(169,155,255,.25); box-shadow: 0 10px 30px rgba(0,0,0,.35); transition: border-color .5s, box-shadow .5s; }
.hoe-src { font: 800 13px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.hoe-line { margin: 0; font: 600 26px/1.3 var(--serif); color: var(--text); }
.hoe-line.hoe-in { animation: hoeLine .4s ease-out both; }
@keyframes hoeLine { from { opacity: 0; transform: translateY(6px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
.hoe-time[data-stop="3"] .hoe-line { color: var(--gold); }
.hoe-time.hoe-done .hoe-card { border-color: var(--gold); box-shadow: 0 0 28px rgba(252,192,80,.35); }
.hoe-track { position: relative; height: 92px; margin: 0 26px; touch-action: none; cursor: grab; }
.hoe-rail, .hoe-fill { position: absolute; top: 20px; height: 6px; border-radius: 3px; }
.hoe-rail { left: 0; right: 0; background: rgba(169,155,255,.25); }
.hoe-fill { right: 0; background: linear-gradient(90deg, var(--gold), var(--violet-bright)); }
.hoe-knob { position: absolute; top: 23px; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 6px rgba(252,192,80,.25), 0 4px 12px rgba(0,0,0,.5); pointer-events: none; }
.hoe-year { all: unset; position: absolute; top: 40px; width: 64px; height: 48px; margin-left: -32px; display: flex; align-items: center; justify-content: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hoe-year span { font: 800 16px var(--sans); color: var(--dim); transition: color .3s, transform .3s; }
.hoe-year.hoe-cur span { color: var(--gold); transform: scale(1.15); }
.hoe-year[data-i="0"] { left: 100%; }
.hoe-year[data-i="1"] { left: 66.667%; }
.hoe-year[data-i="2"] { left: 33.333%; }
.hoe-year[data-i="3"] { left: 0; }
.hoe-year:focus { outline: none; }

/* the island */
.hoe-isle { position: relative; width: 100%; aspect-ratio: 400 / 290; margin: auto 0; overflow: hidden; border-radius: 18px; }
.hoe-svg { display: block; width: 100%; height: 100%; }
.hoe-wave { fill: none; stroke: rgba(234,227,215,.45); stroke-width: 1.5; }
.hoe-rock { fill: #1a1424; }
.hoe-hill { fill: #3f6b3a; }
.hoe-topsoil { fill: #4f3a2a; }
.hoe-layer { opacity: 0; transform: translateY(-120px); transition: transform .9s cubic-bezier(.5,0,.3,1.15), opacity .4s; }
.hoe-layer.hoe-in { opacity: 1; transform: none; }
.hoe-layer rect { stroke: rgba(10,14,26,.6); stroke-width: 1; }
.hoe-oe rect { fill: #8a5a3c; }
.hoe-no rect { fill: #3d5a80; }
.hoe-fr rect { fill: #7a4a7e; }
.hoe-lname { font: 800 16px var(--sans); letter-spacing: .06em; text-transform: uppercase; fill: rgba(234,227,215,.75); }
.hoe-lwords { font: 700 17px var(--serif); fill: var(--text); text-anchor: middle; }
.hoe-isle.hoe-lit .hoe-oe .hoe-lwords, .hoe-isle.hoe-lit .hoe-fr .hoe-lwords { fill: var(--gold); }
/* Boats start off the canvas and cross the whole sea strip to the shore. */
.hoe-boat { position: absolute; left: 118%; top: 38%; width: 24%; transform: translate(-50%, -82%) scaleX(-1); pointer-events: none; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); transition: left 2.2s cubic-bezier(.4,0,.3,1); animation: hoeBob 1.6s ease-in-out 4 alternate; }
.hoe-boat.hoe-long { width: 28%; }
/* The farmers' boat rows into view and waits at sea for the tap. */
.hoe-boat.hoe-wait { left: 93%; animation: hoeIn 1.4s ease-out backwards, hoeBob 1.6s ease-in-out 1.4s 4 alternate; }
.hoe-boat.hoe-landed { left: 72%; }
@keyframes hoeIn { from { left: 118%; } }
@keyframes hoeBob { to { margin-top: -4px; } }
.hoe-hit { all: unset; position: absolute; left: 93%; top: 38%; width: 64px; height: 56px; transform: translate(-50%, -70%); border-radius: 40%; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hoe-hit:focus { outline: none; }

/* 7. pairs */
.hoe-pairs { display: flex; flex-direction: column; gap: 8px; }
.hoe-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hoe-pw { all: unset; box-sizing: border-box; min-height: 50px; display: flex; align-items: center; justify-content: center; border-radius: 14px; background: var(--surface); border: 2px solid rgba(169,155,255,.3); font: 700 19px var(--serif); color: var(--text); cursor: pointer; transition: border-color .3s, background .3s, opacity .3s; -webkit-tap-highlight-color: transparent; }
.hoe-pair.hoe-chosen .hoe-pw { pointer-events: none; opacity: .55; }
.hoe-pair.hoe-chosen .hoe-pw.hoe-mine { opacity: 1; border-color: var(--text); }
.hoe-pw.hoe-fr { background: rgba(122,74,126,.55); }
.hoe-pw.hoe-oe { background: rgba(138,90,60,.5); }

/* 9. one sentence */
.hoe-sent { flex: 1; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 10px 8px; padding: 0 4px 40px; }
.hoe-sw { all: unset; box-sizing: border-box; min-width: 48px; min-height: 64px; padding: 6px 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 14px; background: var(--surface); border: 2px solid rgba(169,155,255,.3); cursor: pointer; transition: background .4s, border-color .3s, opacity .3s; -webkit-tap-highlight-color: transparent; }
.hoe-sw span { font: 700 28px/1 var(--serif); color: var(--text); }
.hoe-sw small { min-height: 14px; font: 700 12px var(--sans); color: rgba(234,227,215,.8); }
.hoe-sw.hoe-kno { background: #3d5a80; border-color: #6f8fbd; }
.hoe-sw.hoe-kfr { background: #7a4a7e; border-color: #b07db4; }
.hoe-sw.hoe-koe { background: #8a5a3c; border-color: #b9845f; }
.hoe-sw.wrong { border-color: var(--red); }
.hoe-sw.off { opacity: .45; }
.hoe-sw.right { border-color: var(--gold); box-shadow: 0 0 16px rgba(252,192,80,.5); }
.hoe-sw:focus { outline: none; }

@media (max-height: 700px) {
  .hoe-card { min-height: 160px; padding: 16px; }
  .hoe-line { font-size: 23px; }
  .hoe-time { gap: 20px; }
  .hoe-sw span { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) { .hoe-boat, .hoe-line.hoe-in { animation: none; } .hoe-layer, .hoe-boat { transition: none; } }
