/* bookle.dad-look.com - the word is always BOOK */
body { margin: 0; background: #121213; }
[hidden] { display: none !important; }
a { color: #6aaa64; }
a:hover { color: #9fd59a; }
button:focus-visible, a:focus-visible { outline: 3px solid #6e9cf4; outline-offset: 2px; }

.bk-page { box-sizing: border-box; min-height: 100vh; color: #ffffff; font-family: Helvetica, Arial, sans-serif; padding: 16px 16px 48px; }
.bk-wrap { max-width: 500px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 18px; position: relative; }
.bk-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; }

/* Header */
.bk-header { width: 100%; text-align: center; padding-bottom: 12px; border-bottom: 1px solid #3a3a3c; }
.bk-header h1 { margin: 0; font-size: 38px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.bk-sub { margin: 4px 0 0; font-size: 14px; color: #b5b5b5; }

/* Toast */
.bk-toast { position: absolute; top: 92px; left: 50%; z-index: 5; margin: 0; transform: translateX(-50%); background: #ffffff; color: #121213; font-weight: 800; font-size: 15px; padding: 12px 16px; border-radius: 6px; opacity: 0; pointer-events: none; white-space: nowrap; }
.bk-toast.is-shown { animation: bk-toast 1.6s ease both; }

/* Board */
.bk-board { display: grid; grid-template-rows: repeat(6, 1fr); gap: 6px; margin-top: 8px; }
.bk-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.bk-tile { width: 64px; height: 64px; box-sizing: border-box; border: 2px solid #3a3a3c; display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 800; text-transform: uppercase; }
.bk-tile.is-filled { border-color: #565758; }
.bk-tile[data-state="correct"] { background: #538d4e; border-color: #538d4e; }
.bk-tile[data-state="present"] { background: #b59f3b; border-color: #b59f3b; }
.bk-tile[data-state="absent"] { background: #3a3a3c; border-color: #3a3a3c; }

/* Keyboard */
.bk-keyboard { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.bk-keys { display: flex; justify-content: center; gap: 6px; }
.bk-key { flex: 1 1 0; max-width: 44px; height: 56px; padding: 0; border: 0; border-radius: 4px; background: #818384; color: #ffffff; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; touch-action: manipulation; }
.bk-key-wide { flex: 1.5 1 0; max-width: 68px; font-size: 12px; text-transform: uppercase; }
.bk-key[data-key="Backspace"] { font-size: 20px; }
.bk-key[data-state="correct"] { background: #538d4e; }
.bk-key[data-state="present"] { background: #b59f3b; }
.bk-key[data-state="absent"] { background: #3a3a3c; }
.bk-keyboard.is-done { opacity: 0.5; }

/* Hint */
.bk-hint { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; min-height: 24px; font-size: 14px; color: #b5b5b5; text-align: center; }
.bk-link { background: none; border: 0; padding: 4px; font: inherit; color: #ffffff; text-decoration: underline; cursor: pointer; }

/* End of game */
.bk-end { width: 100%; box-sizing: border-box; background: #1c1c1e; border: 1px solid #3a3a3c; border-radius: 12px; padding: 22px; display: flex; flex-direction: column; gap: 18px; text-align: center; scroll-margin-top: 16px; }
.bk-end h2 { margin: 0; font-size: 30px; font-weight: 800; }
.bk-reveal { margin: 0; font-size: 18px; color: #d0d0d0; }
.bk-reveal strong { color: #6aaa64; letter-spacing: 0.08em; }
.bk-share { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.bk-share-preview { margin: 0; padding: 12px 18px; background: #121213; border-radius: 8px; font-family: inherit; font-size: 16px; line-height: 1.35; text-align: left; white-space: pre; }
.bk-button { background: #538d4e; color: #ffffff; border: 0; border-radius: 999px; font: inherit; font-size: 17px; font-weight: 800; padding: 14px 28px; min-height: 50px; cursor: pointer; }
.bk-button:hover { background: #63a35d; }
.bk-share-status { margin: 0; min-height: 1.2em; font-size: 14px; font-weight: 700; color: #9fd59a; }
.bk-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.bk-stat { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: #b5b5b5; }
.bk-stat-value { font-size: 30px; font-weight: 800; color: #ffffff; }
.bk-global { display: flex; flex-direction: column; gap: 8px; }
.bk-global h3 { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #b5b5b5; }
.bk-global-line { margin: 0; font-size: 16px; font-weight: 700; }
.bk-distribution { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.bk-distribution li { display: grid; grid-template-columns: 16px 1fr 40px; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.bk-dist-bar { height: 20px; }
.bk-dist-bar span { display: block; height: 100%; width: 4%; background: #3a3a3c; border-radius: 2px; transition: width 0.8s ease; }
.bk-distribution li.is-yours .bk-dist-bar span { background: #538d4e; }
.bk-dist-count { text-align: right; }
.bk-next { margin: 0; font-size: 15px; color: #d0d0d0; }
.bk-next strong { font-variant-numeric: tabular-nums; color: #ffffff; }

/* Call to action */
.bk-cta { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid #3a3a3c; }
.bk-cta p { margin: 0; font-size: 16px; font-weight: 700; }
.bk-cta-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; box-sizing: border-box; width: 100%; min-height: 72px; padding: 18px 24px; border-radius: 8px; background: #ffffff; color: #121213; font-size: 22px; font-weight: 800; text-transform: uppercase; text-decoration: none; }
.bk-cta-button:hover { background: #6aaa64; color: #121213; }
.bk-cta-arrow { display: inline-block; }

/* Footer */
.bk-page .more { width: 100%; }
.bk-footer { width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; color: #b5b5b5; }
.bk-footer small { color: #8c8c8c; }

@media (max-width: 380px) {
	.bk-tile { width: 56px; height: 56px; font-size: 30px; }
	.bk-key { height: 50px; font-size: 13px; }
}

/* Animations - only when the visitor allows motion */
@media (prefers-reduced-motion: no-preference) {
	.js .bk-header { animation: bk-drop 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
	.bk-tile.is-popping { animation: bk-pop 0.12s ease; }
	.bk-tile.is-flipping { animation: bk-flip 0.5s ease; }
	.bk-row.is-shaking { animation: bk-shake 0.45s ease; }
	.bk-row.is-winning .bk-tile { animation: bk-bounce 0.9s ease; }
	.bk-row.is-winning .bk-tile:nth-child(2) { animation-delay: 0.1s; }
	.bk-row.is-winning .bk-tile:nth-child(3) { animation-delay: 0.2s; }
	.bk-row.is-winning .bk-tile:nth-child(4) { animation-delay: 0.3s; }
	.bk-end:not([hidden]) { animation: bk-rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
	.bk-reveal strong { display: inline-block; animation: bk-wiggle 0.6s 0.6s ease both; }
	.bk-key { transition: transform 0.1s ease, background-color 0.3s ease; }
	.bk-key:active { transform: scale(0.94); }
	.bk-cta-button { animation: bk-glow 2.2s ease-in-out infinite; transition: transform 0.15s ease; }
	.bk-cta-button:hover { transform: scale(1.02); }
	.bk-cta-arrow { animation: bk-nudge 1.1s ease-in-out infinite; }
}

@keyframes bk-toast { 0% { opacity: 0; transform: translate(-50%, -8px); } 12%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 0); } }
@keyframes bk-drop { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes bk-pop { 50% { transform: scale(1.12); } }
@keyframes bk-flip { 0% { transform: rotateX(0); } 50% { transform: rotateX(-90deg); } 100% { transform: rotateX(0); } }
@keyframes bk-shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }
@keyframes bk-bounce { 0%, 20% { transform: translateY(0); } 40% { transform: translateY(-24px); } 50% { transform: translateY(4px); } 60% { transform: translateY(-12px); } 80% { transform: translateY(2px); } 100% { transform: translateY(0); } }
@keyframes bk-rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes bk-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
@keyframes bk-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(106, 170, 100, 0.5); } 50% { box-shadow: 0 0 0 10px rgba(106, 170, 100, 0); } }
@keyframes bk-nudge { 0%, 100% { transform: none; } 50% { transform: translateX(8px); } }
