@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Fraunces:ital,opsz,wght@0,9..144,700;0,9..144,900;1,9..144,700&display=swap');

:root { color-scheme: light; font-family: "DM Sans", sans-serif; color: #242a24; background: #f6f1e7; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #d88945; outline-offset: 3px; }
.page { max-width: 1160px; margin: auto; padding: 0 42px; }
.topbar { height: 90px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #d9d4c9; }
.brand { color: #242a24; font-family: "Fraunces", Georgia, serif; font-weight: 900; font-size: 30px; letter-spacing: -1.7px; text-decoration: none; }
.brand span:first-child { color: #e8774e; }
.brand-dot { color: #6d8d68; }
.text-button { color: #303d31; background: none; border: 0; font-weight: 700; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.intro { padding: 65px 0 47px; max-width: 760px; }
.eyebrow, .section-label { font-size: 10px; font-weight: 800; letter-spacing: 1.6px; color: #6b7766; }
.eyebrow { display: flex; align-items: center; gap: 12px; }
.eyebrow time { color: #788073; letter-spacing: .5px; text-transform: uppercase; }
.caganer { display: block; flex: none; }
.caganer-small { width: 30px; height: 30px; }
.caganer-note { width: 46px; height: 46px; }
.intro-line { width: 30px; height: 1px; background: #b7c0b0; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: "Fraunces", Georgia, serif; }
h1 { margin-top: 21px; font-size: clamp(45px, 6vw, 75px); line-height: 1.04; letter-spacing: -3px; }
h1 em { color: #d97753; font-weight: 700; }
.intro > p { max-width: 510px; margin-top: 19px; color: #6a6d60; line-height: 1.65; font-size: 15px; }
.layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 22px; align-items: stretch; }
.game-card, .discovery-card { border: 1px solid #ded9cc; border-radius: 20px; padding: 30px; }
.game-card { background: #fffdf8; box-shadow: 0 9px 30px #3f4b3010; }
.discovery-card { background: #e9eee2; display: flex; flex-direction: column; }
.card-heading, .discovery-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
h2 { font-size: 26px; letter-spacing: -.8px; margin-top: 7px; }
.daily-badge { background: #f7e6d9; color: #bf6849; border-radius: 50%; width: 64px; height: 64px; display: grid; place-content: center; text-align: center; font-size: 9px; font-weight: 800; line-height: 1.4; transform: rotate(9deg); }
.hint { color: #703b2a; background: #faeee4; border-left: 4px solid #a84b2f; border-radius: 6px; font-size: 13px; line-height: 1.5; margin-top: 14px; padding: 10px 12px; }
.hint strong { color: #a13e25; }
.hint p + p { margin-top: 6px; }
#word-form { text-align: center; }
#word-input { width: 100%; margin-top: 26px; background: transparent; border: 0; border-bottom: 2px solid #d9decf; padding: 12px 8px; text-align: center; color: #27382b; font-family: "Fraunces", Georgia, serif; font-size: 25px; letter-spacing: 1px; }
#word-input::placeholder { color: #c1c5b8; font-size: 19px; font-style: italic; letter-spacing: 0; }
.feedback { min-height: 36px; padding: 10px 0 3px; color: #a45638; font-size: 12px; line-height: 1.4; }
.letters { position: relative; width: min(100%, 300px); aspect-ratio: 1; margin: 14px auto 23px; background: url("./icons/sardana.svg") center / 80% no-repeat; }
.letter { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); width: min(66px, 25%); aspect-ratio: 1; border: 1px solid #c9d2c2; border-radius: 42% 52% 46% 50%; background: #edf2e8; color: #354b37; font-family: "Fraunces", Georgia, serif; font-weight: 900; font-size: 23px; box-shadow: 0 4px 0 #d9e0d2; }
.letter:nth-child(1) { --x: 50%; --y: 50%; }
.letter:nth-child(2) { --x: 36.4%; --y: 26.8%; }
.letter:nth-child(3) { --x: 63.6%; --y: 26.8%; }
.letter:nth-child(4) { --x: 76.8%; --y: 50%; }
.letter:nth-child(5) { --x: 63.6%; --y: 73.2%; }
.letter:nth-child(6) { --x: 36.4%; --y: 73.2%; }
.letter:nth-child(7) { --x: 23.2%; --y: 50%; }
.letter:hover { background: #dce8d9; }
.letter:active { transform: translate(-50%, calc(-50% + 3px)); box-shadow: 0 1px 0 #d9e0d2; }
.center-letter, .center-letter:hover { background: #a84b2f; color: white; border-color: #a84b2f; box-shadow: 0 4px 0 #803821; }
.center-letter:active { box-shadow: 0 1px 0 #803821; }
.actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.actions button { padding-left: 14px; padding-right: 14px; }
.primary-button, .secondary-button, .share-button { border-radius: 10px; padding: 13px 22px; font-size: 13px; font-weight: 800; }
.primary-button { background: #365743; color: white; border: 1px solid #365743; }
.primary-button:hover { background: #263f30; }
.primary-button span { margin-left: 12px; }
.secondary-button { background: transparent; color: #526553; border: 1px solid #d0d8c9; }
.hint-area { text-align: center; margin-top: 20px; }
.hint-area button { margin: 0 3px 8px; }
.hint-result { background: #f7eee2; border-radius: 10px; padding: 14px; color: #526553; text-align: left; font-size: 13px; line-height: 1.5; }
.hint-result strong { color: #a45638; }
button:disabled { opacity: .5; cursor: default; }
.count { font-family: "Fraunces", Georgia, serif; font-size: 23px; font-weight: 700; color: #49694b; white-space: nowrap; }
.progress-track { height: 7px; background: #d4dfce; border-radius: 10px; margin-top: 30px; overflow: hidden; }
#progress-fill { background: #759b72; height: 100%; width: 0; transition: width .2s; }
.progress-caption { color: #70816d; font-size: 11px; margin-top: 9px; }
.discoveries { flex: 1; padding: 10px 0; }
.empty-state { min-height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; color: #7c8b78; text-align: center; font-size: 12px; }
.empty-face { font-size: 42px; line-height: 1; color: #9eb69a; margin-bottom: 8px; }
.empty-state strong { color: #526a54; font-size: 14px; }
.word-item { padding: 14px 0; border-bottom: 1px solid #d3ddce; }
.word-item h3 { font-family: "Fraunces", Georgia, serif; font-size: 18px; color: #3b6042; }
.word-item p { color: #68796a; line-height: 1.5; font-size: 12px; margin-top: 5px; }
.share-button { width: 100%; background: transparent; border: 1px solid #aebfaa; color: #4a694d; }
.share-button:hover { background: #dfe9db; }
.storage-notice { margin-top: 20px; color: #8a402f; font-size: 13px; }
.bottom-note { margin: 42px 0; display: flex; gap: 15px; align-items: center; color: #777d6f; font-size: 12px; line-height: 1.7; }
.bottom-note strong { color: #495c48; font-size: 13px; }
footer { border-top: 1px solid #d9d4c9; min-height: 74px; display: flex; justify-content: space-between; align-items: center; gap: 15px; color: #9a9e90; font-size: 9px; font-weight: 800; letter-spacing: 1px; }
dialog { max-width: 480px; width: calc(100% - 32px); border: 0; border-radius: 18px; padding: 30px; color: #303d31; background: #fffdf8; box-shadow: 0 20px 70px #0003; }
dialog::backdrop { background: #23332799; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; }
.dialog-heading h2 { margin: 0; }
.close-button { border: 0; background: none; font-size: 28px; color: #526553; line-height: 1; }
dialog ul { padding-left: 20px; }
dialog li, dialog p { color: #626b5d; font-size: 14px; line-height: 1.65; margin: 10px 0; }
dialog .primary-button { margin-top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 700px) {
  .page { padding: 0 20px; }
  .topbar { height: 72px; }
  .brand { font-size: 26px; }
  .intro { padding: 44px 0 32px; }
  h1 { letter-spacing: -2px; }
  .intro > p { font-size: 14px; }
  .layout { grid-template-columns: 1fr; gap: 16px; }
  .game-card, .discovery-card { padding: 23px; }
  .bottom-note { margin: 30px 0; }
}
