/* Spelbrett, myntar og rørsle. Felleskomponentane eig UI-flater og fokus. */
.ov-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 280px); gap: clamp(24px, 4vw, 48px); align-items: start; margin-block: 56px 72px; }
.ov-main, .ov-support, .ov-layout .vp-content { min-width: 0; }
.ov-main :is([tabindex="-1"],input,button) { scroll-margin-top: var(--ov-answer-offset, 160px); }
.ov-support { overflow-x: clip; }
.ov-support .vp-accordion { margin-top: 12px; }
.ov-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ov-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ov-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ov-day-heading { display: flex; gap: 18px; align-items: center; margin-block: 28px 20px; }
.ov-day-heading h2, .ov-day-heading p { margin-bottom: 4px; }
.ov-setup-header .ov-day-heading { margin-block: 16px 0; }
.ov-calendar { display: grid; place-items: center; position: relative; flex: 0 0 64px; height: 70px; }
.ov-calendar > span { position: absolute; inset: 3px 0; display: grid; place-items: center; }
.ov-calendar .icon { width: 64px; height: 64px; stroke-width: 1.4; }
.ov-calendar strong { position: relative; padding-top: 16px; font-size: 1.35rem; }
.ov-setup-preview, .ov-progress { display: flex; align-items: center; gap: 8px; }
.ov-setup-preview { justify-content: center; margin-bottom: 24px; }
.ov-step { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border: 2px solid var(--vp-frame); border-radius: 50%; background: var(--vp-paper); font-weight: 750; }
.ov-setup-preview .ov-step { width: 44px; height: 44px; flex-basis: 44px; }
.ov-step[data-state="active"] { background: var(--vp-honey); outline: 2px solid var(--vp-frame); outline-offset: 3px; }
.ov-step[data-state="solved"] { background: var(--vp-success); }
.ov-step[data-state="revealed"] { background: var(--vp-stone); }
.ov-levels { display: block; }
.ov-level-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 24px; }
.ov-level-choice { display: flex; flex-direction: column; align-items: center; position: relative; gap: 4px; padding: 12px; text-align: center; }
.ov-level-choice input { position: absolute; top: 12px; left: 12px; }
.ov-level-choice img { width: 80px; height: 80px; object-fit: contain; }
.ov-setup-state { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 0; }
.ov-status { display: flex; align-items: center; margin-bottom: 24px; }
.ov-shop-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.ov-shop-heading h3 { margin-bottom: 0; }
.ov-wallet { display: flex; align-items: center; gap: 10px; min-width: 152px; padding: 10px 14px; }
.ov-wallet-label { display: block; font-size: .8rem; }
#totalCost { display: block; font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ov-wallet-pile { display: block; position: relative; width: 26px; height: 46px; margin-left: auto; }
.ov-wallet-pile .ov-coin { position: absolute; left: 0; bottom: calc(var(--coin-index) * 3px); }
.ov-coin { display: inline-grid; place-items: center; width: 24px; height: 24px; flex: 0 0 24px; border: 2px solid var(--vp-frame); border-radius: 50%; background: var(--vp-honey); vertical-align: middle; }
.ov-coin .icon { width: 16px; height: 16px; }
.ov-coin--large { width: 40px; height: 40px; flex-basis: 40px; }
.ov-coin--large .icon { width: 28px; height: 28px; }
.ov-price { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.ov-price--unavailable { position: relative; }
.ov-price--unavailable .ov-coin { filter: grayscale(1); opacity: .65; }
.ov-price--unavailable::after { content: ''; position: absolute; width: 28px; top: 50%; left: -2px; border-top: 2px solid var(--vp-ink); transform: rotate(-45deg); }
.ov-letters { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 20px 24px; }
.ov-letter { display: grid; place-items: center; width: 48px; height: 56px; padding: 0; margin: 0; font-size: 1.65rem; line-height: 1; flex: 0 0 48px; }
.ov-letter--new { animation: ov-letter-turn 440ms var(--tile-delay, 0ms) both; }
.ov-choose { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ov-choose button { margin-left: auto; }
.ov-answer-dock { position: sticky; top: 8px; z-index: 10; padding: 12px; margin-bottom: 24px; }
.ov-answer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: end; margin: 0; }
#answer { min-height: 64px; width: 100%; font-size: clamp(1.1rem, 2vw, 1.4rem); }
#guessButton { min-height: 64px; }
.ov-answer .vp-field { margin: 0; }
.ov-answer .vp-help { grid-column: 1 / -1; margin: 0; }
.ov-answer-help { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.ov-answer-help > span { display: inline-flex; align-items: center; gap: 4px; }
.ov-answer-help .ov-coin { width: 20px; height: 20px; flex-basis: 20px; }
.ov-answer-help .ov-coin .icon { width: 13px; height: 13px; }
.ov-hints { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ov-shop-slot { min-width: 0; }
.ov-shop-slot .ov-hint { position: relative; width: 100%; height: 100%; z-index: 1; }
.ov-hint { display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 118px; padding: 12px 6px; }
.ov-hint > .ov-icon .icon { width: 28px; height: 28px; }
.ov-hint-name { font-size: .95rem; }
.ov-paid { display: inline-flex; align-items: center; gap: 3px; font-size: .8rem; }
.ov-paid .icon { width: 16px; height: 16px; }
.ov-hint-list, .ov-results { display: grid; gap: 12px; padding: 0; list-style: none; }
.ov-hint-list { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.ov-hint-list .ov-receipt { padding: 12px; min-width: 0; }
.ov-main .ov-receipt { scroll-margin-top: calc(var(--ov-answer-offset, 160px) + 24px); }
.ov-hint-list li, .ov-results li { padding: 12px 16px; overflow-wrap: anywhere; }
.ov-hint-list p { margin-block: 8px 0; }
.ov-receipt-head { display: flex; align-items: center; gap: 8px; }
.ov-receipt-head strong { min-width: 0; }
.ov-receipt--moving { z-index: 6; transform-origin: top left; }
.ov-buy-again { width: 100%; margin-top: 12px; gap: 4px; }
.ov-purchased { margin-block: 28px; }
.ov-bottom-actions { margin-top: 24px; }
.ov-feedback { display: flex; align-items: center; gap: 8px; margin-block: 16px; font-weight: 750; }
.ov-solution { margin-top: 24px; }
.ov-solution-stamp { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; font-weight: 750; }
.ov-solution .vp-accordion { margin-bottom: 20px; }
.ov-result-totals { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 32px; }
.ov-result-number, .ov-result-cost { display: flex; align-items: center; gap: 12px; font-size: clamp(1.8rem, 4vw, 2.5rem); }
.ov-result-cost .ov-coin { width: 36px; height: 36px; flex-basis: 36px; }
.ov-result-cost .ov-coin .icon { width: 25px; height: 25px; }
.ov-result-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.ov-flying-coin { position: fixed; z-index: 1000; pointer-events: none; }
@keyframes ov-letter-turn { 0% { transform: rotateX(90deg); background: var(--vp-honey); } 65% { transform: rotateX(-12deg); } 100% { transform: none; } }
@media (max-width: 820px) { .ov-layout { grid-template-columns: minmax(0, 1fr); row-gap: 64px; } }
@media (max-width: 600px) {
  .ov-hints, .ov-hint-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ov-receipt-head { flex-direction: column; align-items: start; }
  .ov-shop-slot { min-height: 152px; }
  .ov-progress { gap: 4px; }
  .ov-progress .ov-step { width: 28px; height: 28px; flex-basis: 28px; }
  .ov-wallet { min-width: 0; gap: 6px; padding: 6px 8px; }
  .ov-wallet-label { font-size: .7rem; }
  .ov-wallet > .ov-coin--large { width: 24px; height: 24px; flex-basis: 24px; }
  .ov-wallet > .ov-coin--large .icon { width: 16px; height: 16px; }
  .ov-wallet-pile { display: none; }
  #totalCost { font-size: 1.4rem; }
}
@media (max-width: 440px) {
  .ov-modes { grid-template-columns: minmax(0, 1fr); }
  .ov-answer { gap: 8px; }
  #guessButton { padding-inline: 10px; }
  .ov-letter { width: 44px; height: 50px; flex-basis: 44px; }
  .ov-letters { gap: 6px; }
  .ov-step { width: 32px; height: 32px; flex-basis: 32px; }
  .ov-wallet { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) { .ov-letter--new { animation: none; } }
/* Måla butikkvarer og Vyrde-mynten er spelinnhald, med to sider i same mynt. */
.ov-hint-image { display: block; width: 80px; height: 80px; object-fit: contain; }
.ov-hint { min-height: 166px; }
.ov-hint-name { font-size: clamp(.8rem, 1.5vw, .95rem); }
.ov-receipt-head .ov-hint-image { width: 28px; height: 28px; }
.ov-price-coin { display: inline-block; width: 28px; height: 28px; object-fit: contain; vertical-align: middle; }
.ov-coin { position: relative; border: 0; background: transparent; perspective: 180px; }
.ov-coin-face { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; backface-visibility: hidden; }
.ov-coin-face--back { transform: rotateY(180deg); }
.ov-flying-coin .ov-coin-face--front { animation: ov-coin-front 650ms linear both; }
.ov-flying-coin .ov-coin-face--back { animation: ov-coin-back 650ms linear both; }
.ov-letter { position: relative; }
.ov-letter-position { position: absolute; top: 2px; left: 5px; font-size: .65rem; line-height: 1; }
.ov-choose { align-items: end; }
.ov-choose .vp-field { flex: 1 1 120px; margin-bottom: 0; }
.ov-choose .vp-input { width: 100%; }
.ov-choose .vp-button { flex: 0 0 auto; }
@keyframes ov-coin-front { to { transform: rotateY(720deg); } }
@keyframes ov-coin-back { from { transform: rotateY(180deg); } to { transform: rotateY(900deg); } }
@media (max-width: 600px) {
  .ov-hint-image { width: 68px; height: 68px; }
  .ov-hint { min-height: 152px; }
  .ov-choose { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { .ov-flying-coin .ov-coin-face { animation: none; } }
@media (max-width: 600px) { .ov-wallet-label > span { display: none; } }
.ov-calendar-picker { margin-top: 20px; }
.ov-calendar-nav { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 8px; align-items: center; margin-bottom: 12px; }
.ov-calendar-nav .vp-field { margin: 0; min-width: 0; }
.ov-calendar-nav .vp-input { width: 100%; min-width: 0; padding-inline: 6px; }
.ov-calendar-nav .vp-button { width: 44px; }
.ov-calendar-weekdays, .ov-calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.ov-calendar-weekdays { margin-bottom: 8px; font-size: .8rem; font-weight: 750; }
.ov-calendar-day { position: relative; min-width: 0; min-height: 44px; padding: 4px 0; }
.ov-calendar-day .vp-selection-mark { position: absolute; inset: auto 1px 1px auto; width: 10px; height: 10px; }
.ov-calendar-day .vp-selection-mark .icon { width: 10px; height: 10px; }
.ov-calendar-mark { position: absolute; left: 2px; bottom: 0; display: grid; place-items: center; width: 12px; height: 12px; }
.ov-calendar-mark .icon { width: 12px; height: 12px; }
.ov-calendar-mark { display: flex; gap: 2px; left: 3px; width: auto; bottom: 2px; }
.ov-calendar-mark i { width: 5px; height: 5px; border: 1px solid var(--vp-frame); border-radius: 50%; }
.ov-calendar-mark i[data-state="complete"] { background: var(--vp-success); }
.ov-calendar-mark i[data-state="started"] { background: var(--vp-honey); }
.ov-tutorial-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ov-tutorial-heading > button { margin-left: auto; }
.ov-tutorial-progress { display: inline-flex; gap: 4px; }
.ov-tutorial-progress > span { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--vp-frame); border-radius: 50%; font-size: .8rem; }
.ov-tutorial-progress .icon { width: 14px; height: 14px; }
.ov-tutorial-progress [data-state="active"] { background: var(--vp-honey); }
.ov-tutorial-progress [data-state="done"] { background: var(--vp-success); }
.ov-tutorial-instruction { display: flex; align-items: center; gap: 8px; margin-block: 12px !important; }
.ov-tutorial-instruction img { object-fit: contain; }
.ov-tutorial-target { box-shadow: inset 0 0 0 4px var(--vp-focus); }
@media (max-width: 440px) {
  .ov-answer-dock { padding: 8px; }
  .ov-shop-heading .vp-heading { font-size: 1.2rem; }
  .ov-buy-again { flex-wrap: wrap; }
  .ov-calendar-picker { padding: 8px; }
  .ov-tutorial-heading { gap: 4px; }
  .ov-tutorial-progress > span { width: 16px; height: 16px; font-size: .65rem; }
  .ov-tutorial-progress .icon { width: 12px; height: 12px; }
}
@media (max-width: 430px) { #main .hero h1 { font-size: clamp(1.2rem, 6vw, 1.6rem); } }
/* Kortstakken er sjølve lageret: eitt lag per kort, også mellom orda. */
.ov-hints { gap: 16px; }
.ov-card-stack { position: relative; padding-top: 42px; margin-right: 14px; min-height: 208px; display: grid; }
.ov-stock-card { position: absolute; top: calc(42px - var(--layer) * 6px); left: calc(var(--layer) * 2px); right: calc(var(--layer) * -2px); bottom: calc(var(--layer) * 6px); padding: 0; pointer-events: none; }
.ov-hint { padding-top: 24px; }
.ov-stock-count { position: absolute; right: 6px; top: 6px; padding: 2px 5px; display: inline-flex; align-items: center; gap: 3px; font-size: .85rem; }
.ov-stock-count .icon { width: 14px; height: 14px; }
.ov-stock-empty { position: relative; min-height: 166px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px 6px 12px; font-size: .95rem; text-align: center; }
.ov-stock-empty > .ov-hint-image { filter: grayscale(1); opacity: .3; }
.ov-receipt > .ov-paid { margin-top: 12px; }
.ov-receipt .ov-price { font-size: .8rem; }
.ov-receipt .ov-coin { width: 18px; height: 18px; flex-basis: 18px; }
.ov-level-heading { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.ov-level-heading > img { width: 80px; height: 80px; object-fit: contain; }
.ov-level-copy { display: grid; gap: 10px; min-width: 0; }
.ov-level-copy > h3 { margin: 0; }
.ov-level-action { justify-self: end; }
.ov-mode-progress { display: flex; gap: 4px; }
.ov-mode-progress .ov-step { width: 23px; height: 23px; flex-basis: 23px; font-size: .7rem; border-width: 1px; }
.ov-mode-progress .ov-step .icon { width: 14px; height: 14px; }
.ov-mode-progress .ov-step[data-state="active"] { outline-width: 1px; outline-offset: 1px; }
.ov-mode-totals, .ov-mode-solved { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ov-mode-totals { gap: 8px 16px; font-size: .9rem; }
.ov-history-words { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.ov-word-result { padding: 16px; min-width: 0; overflow-wrap: anywhere; }
.ov-wrong-words { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 12px; }
.ov-wrong-word { display: inline-flex; align-items: center; gap: 3px; padding: 3px 6px; font-size: .85rem; overflow-wrap: anywhere; min-width: 0; }
.ov-wrong-word .icon { width: 16px; height: 16px; }
.ov-wrong-word > span:last-child { min-width: 0; }
.ov-history-hints { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); align-items: start; gap: 16px 24px; margin-top: 16px; }
.ov-history-hint { min-width: 0; }
.ov-history-hint-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: .9rem; }
.ov-history-hint .ov-hint-image { width: 28px; height: 28px; }
.ov-history-hint p { margin-block: 6px 0; font-size: .95rem; }
@media (max-width: 600px) {
  .ov-card-stack { min-height: 194px; }
  .ov-level-heading { grid-template-columns: 64px minmax(0, 1fr); }
  .ov-level-heading > img { width: 64px; height: 64px; }
  .ov-level-action { grid-column: 1 / -1; justify-self: stretch; }
  .ov-word-result { padding: 12px; }
}
/* Heimlenkjene bevarer det felles hero-oppsettet, også i kompakt speltilstand. */
.ov-home-logo { display: grid; place-items: center; align-self: center; }
.ov-home-logo img { display: block; height: 150px; width: 100%; object-fit: contain; }
#main .hero h1 a { text-decoration: none; }
#main .hero p { display: block; }
body[data-vp-game-active] .ov-home-logo img { height: 56px; }
@media (max-width: 740px) { .ov-home-logo img { height: 82px; } }
/* Førstegongstipset brukar felles dialogflate; berre innhaldsoppsettet er lokalt. */
.ov-welcome-steps { list-style: none; padding: 0; margin-block: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ov-welcome-steps li { display: grid; grid-template-rows: 80px auto; align-items: center; justify-items: center; gap: 12px; text-align: center; }
.ov-welcome-steps img { width: 80px; height: 80px; object-fit: contain; }
.ov-welcome-cost { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.ov-welcome-cost > img { width: 24px; height: 24px; object-fit: contain; }
@media (max-width: 480px) {
  .ov-welcome-steps { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ov-welcome-steps li { grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: auto; text-align: left; justify-items: start; }
  .ov-welcome-steps img { width: 64px; height: 64px; }
  .ov-welcome-steps li:last-child { grid-template-columns: minmax(0, 1fr); }
}
