@font-face {
  font-family: Nunito;
  src: url("../ghiceste-proverbul/assets/nunito-latin.woff2;cerino-fresh") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: Nunito;
  src: url("../ghiceste-proverbul/assets/nunito-latin-ext.woff2;cerino-fresh") format("woff2");
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0100-02BA;
}
:root {
  --ink: #173d35; --teal: #18574a; --paper: #fff9e9; --muted: #536757; --gold: #c09045;
  color: var(--ink); font: 100%/1.5 Nunito, system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; min-height: 100vh;
  background-color: #f6f0df;
  background-image: radial-gradient(ellipse at 10% 40%, #e2eadc88, transparent 55%),
    repeating-linear-gradient(0deg, transparent 0 3px, #8d724507 3px 4px);
}
button, a { font: inherit; -webkit-tap-highlight-color: transparent; }
button {
  cursor: pointer; min-height: 44px; border-radius: 9px; border: 1px solid #b5b9a3;
  color: var(--ink); background: #fffaf0; padding: .55rem .9rem; font-weight: 800;
}
button:hover { background-color: #f0ead6; }
:focus-visible { outline: 3px solid #9b430a; outline-offset: 3px; }
header { background: var(--ink); color: #fff8e8; border-bottom: 3px double #d4b574; }
.bar { max-width: 1100px; margin: auto; padding: .6rem clamp(1rem,4vw,3rem); display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: .9rem; text-decoration: none; color: inherit; font-weight: 800; }
.brand span { border-left: 1px solid #dbcca573; padding-left: .9rem; }
.brand img { width: 96px; height: 38px; object-fit: contain; background: #fff9e9; padding: 3px 8px; border-radius: 5px; }
.quiet { color: #fff9eb; font-size: .94rem; background: transparent; border-color: #cfcca455; border-radius: 24px; }
.quiet b { border: 1px solid; border-radius: 50%; display: inline-block; line-height: 1rem; width: 1.1rem; margin-right: .3rem; }
.quiet:hover { background: #34584d; }
main { width: min(1030px, 100%); padding: clamp(.8rem,2.4vw,2rem) clamp(1rem,4vw,2.5rem) 2rem; margin: auto; }
.mast { display: flex; align-items: center; justify-content: center; gap: .75rem; color: #967132; }
.compass { font: 1.6rem/1 Georgia,serif; }
.rule { width: 3.6rem; height: 1px; background: #b49a65; }
h1,h2 { font-family: Georgia,"Times New Roman",serif; font-weight: 500; }
h1 { text-align: center; font-size: clamp(2rem,4.7vw,4.2rem); margin: .2rem 0 clamp(1rem,2vw,1.8rem); line-height: 1.04; letter-spacing: -.055em; }
h1 em { color: #386650; }
.spread { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); align-items: center; gap: clamp(1.5rem,5vw,4rem); }
.frame {
  padding: clamp(.48rem,1.3vw,.85rem) clamp(.48rem,1.3vw,.85rem) 0;
  background: #1e4940; color: #f6e5b7; border: 1px solid #13372c; border-radius: 5px;
  box-shadow: 0 3px 0 #a78e62, 0 5px 0 #ede2cd, 0 16px 36px -15px #403a245c;
}
.picture { position: relative; aspect-ratio: 1; background: #183b35; border: 1px solid #c7ab6b; }
.picture img,#board { display: block; width: 100%; height: 100%; }
.caption { display: flex; align-items: center; justify-content: space-between; gap: .3rem; padding: .47rem 0; font-size: .76rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.caption span:nth-child(2) { color: #e6c476; font-size: 1.2rem; line-height: 1; }
.kicker { font-size: .81rem; font-weight: 900; text-transform: uppercase; letter-spacing: .13em; color: #806122; }
.spark { margin-right: .25em; }
h2 { margin: .55rem 0 .8rem; font-size: clamp(2.25rem,3.8vw,3.55rem); line-height: 1.03; letter-spacing: -.045em; text-wrap: balance; }
.notes p { margin: 0 0 1.25rem; }
.primary { background: var(--teal); color: #fff9e5; border: 1px solid var(--ink); box-shadow: 0 3px 0 #0c3c32; padding: .68rem 1.4rem; border-radius: 24px; }
.primary:hover { background: #236958; }
#collection { margin-top: 1.8rem; border-top: 1px solid #c8c3a9; }
h3 { font-size: 1rem; margin: .9rem 0 .65rem; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
#collected { color: var(--muted); font-size: .81rem; font-weight: 700; }
.plates { display: flex; flex-wrap: wrap; gap: .6rem; }
.plate { width: clamp(62px,6.5vw,80px); aspect-ratio: 1; padding: 3px; border: 1px solid #bbb69f; border-radius: 5px; position: relative; }
.plate img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }
.plate[aria-pressed=true] { outline: 2px solid var(--teal); outline-offset: 1px; }
.plate .stamp { position: absolute; bottom: 4px; right: 4px; border-radius: 50%; background: var(--teal); color: white; width: 1.35rem; }
#board { display: grid; grid-template: repeat(var(--size),1fr) / repeat(var(--size),1fr); }
.tile {
  position: relative; border: 0; border-radius: 0; padding: 0; min-height: 0; min-width: 0;
  background-size: calc(var(--size) * 100%) calc(var(--size) * 100%); background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px #fff6d8b5; touch-action: manipulation;
}
.tile[aria-disabled=true] { cursor: default; box-shadow: inset 0 0 0 1px #173d3540; }
.tile[aria-disabled=true]::after { content: "✓"; position: absolute; right: 0; top: 0; background: #164b3ecc; color: white; padding: 0 .2em; font-size: .78rem; }
.tile[aria-pressed=true]::before,.tile:focus-visible::before { content: ""; position: absolute; inset: 1px; border: 4px solid #ffe098; box-shadow: inset 0 0 0 2px #623c14; }
.tile:focus-visible { z-index: 1; outline: 3px dashed #fff; outline-offset: -4px; }
.tile span { position: absolute; left: 3px; bottom: 3px; background: #153d35; color: white; padding: 0 .35rem; border-radius: 3px; }
.count { font-weight: 800; }
progress { display: block; width: 100%; height: .65rem; accent-color: #287960; margin: .4rem 0 1rem; border: 0; border-radius: 8px; overflow: hidden; background: #d7d9c4; }
progress::-webkit-progress-bar { background: #d7d9c4; }
progress::-webkit-progress-value { background: #287960; }
.actions,#answers { display: flex; gap: .45rem; flex-wrap: wrap; }
#numbers[aria-pressed=true] { background: var(--teal); color: white; }
.text-button { border: 0; background: transparent; text-decoration: underline; padding-left: 0; }
.notes .feedback { font-size: .94rem; font-weight: 800; margin: .65rem 0 0; }
.feedback:empty { margin: 0; }
dialog { color: var(--ink); background: #fff9e9; border: 2px solid var(--teal); border-radius: 14px; padding: 1.4rem; width: min(440px,92vw); max-height: 90dvh; }
dialog::backdrop { background: #10251ed9; }
dialog h2 { font-size: 2rem; }
dialog img { width: min(100%,60dvh); display: block; margin: 1rem auto; }
dialog form { margin-top: 1rem; }
@media(max-width: 700px) {
  main { max-width: 480px; }
  .spread { grid-template-columns: 1fr; gap: 1.15rem; }
  .mast .compass { font-size: 1.1rem; }
  .notes h2 { font-size: 2rem; margin: .25rem 0 .5rem; }
  #collection { margin-top: 1.3rem; }
  .notes p { margin-bottom: .75rem; }
  .caption { padding: .32rem .2rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .tile.fitted::after { animation: mark-fit .32s ease-out; transform-origin: top right; }
  @keyframes mark-fit { from { transform: scale(1.75); background: #a65a19; } }
  #victory:not([hidden]) { animation: reveal-ending .35s ease-out; }
  @keyframes reveal-ending { from { opacity: 0; transform: translateY(6px); } }
  .plate,.primary { transition: transform .15s ease; }
  .plate:hover,.primary:hover { transform: translateY(-2px); }
}
