/* Kleinan (kleinan.html), í sama útliti og krossgátusíðan (gata.html): haus, verkfærastika,
   blá vísbendingastika, grind með reitum síðunnar, hægri dálkur. Litir orðanna: skilgreining blá,
   vísir fjólublár, efniviður gulur. Högg: vísbending gul, athugun fjólublá. */
.kleinan-page {
  --el-def: #d6e6ff; --el-def-ink: #0b3d91;
  --el-ind: #e8dcff; --el-ind-ink: #4a1d96;
  --el-fod: #fff0a3; --el-fod-ink: #5c4500;
  --el-check: #c9a8ff; --el-ok: #1f9d55;
}
:root[data-theme="dark"] .kleinan-page { --el-def: #1f3f7a; --el-def-ink: #dbe6ff; --el-ind: #3b2a6b; --el-ind-ink: #e9ddff; --el-fod: #5c4a00; --el-fod-ink: #fff1a8; }

/* upphafssíðan: sama blað og á gátusíðunni, táknið er ein lína af reitum */
.el-intro-icon { display: flex; gap: 3px; padding: 4px; background: #121212; border-radius: 6px; width: fit-content; margin: 0 auto 1.1rem; }
.el-intro-icon i { width: 14px; height: 16px; background: #fff; border-radius: 1px; display: block; }

/* verkfærastikan: par-punktar þar sem tíminn er á gátusíðunni */
.el-partimer { gap: .5rem; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.dots { display: flex; gap: .3rem; }
.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--hair); }
.dot.par { background: transparent; box-shadow: inset 0 0 0 2px var(--ink); }
.dot.hint { background: var(--el-fod); box-shadow: inset 0 0 0 1px var(--el-fod-ink); }
.dot.check { background: var(--el-check); }
.dot.par.hint { box-shadow: inset 0 0 0 2px var(--ink); }
.toolbar .menu button.used { color: var(--muted); text-decoration: line-through; }
.toolbar .menu button.used::after { content: " ✓"; text-decoration: none; }


/* vísbendingastikan: eins og vísbending gátunnar, en með litum orðanna */
.el-cluebar { border-radius: 8px; }
.el-cluebody { cursor: default; font-size: clamp(1.05rem, 2.6vw, 1.25rem); }
.el-cluebody:hover { background: transparent; }
#el-clue .w { border-radius: 4px; transition: background .3s, box-shadow .3s; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
#el-clue .w--def.on, #el-clue .w--def2.on { background: var(--el-def); box-shadow: 0 0 0 .07em var(--el-def); color: var(--el-def-ink); }
#el-clue .w--ind.on { background: var(--el-ind); box-shadow: 0 0 0 .07em var(--el-ind); color: var(--el-ind-ink); }
#el-clue .w--fod.on, #el-clue .w--fod2.on { background: var(--el-fod); box-shadow: 0 0 0 .07em var(--el-fod); color: var(--el-fod-ink); }
#el-clue .n { opacity: .65; font-size: .85em; }

/* grindin: ein röð reita með útliti krossgátunnar */
.el-gridwrap { display: flex; justify-content: center; }
.el-grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 1px; padding: 1px; background: var(--cell-black); border: 3px solid var(--cell-black);
  width: 100%; max-width: min(100%, calc(var(--cols) * 66px)); touch-action: manipulation; user-select: none; }
.el-cell { aspect-ratio: 1; background: var(--cell-bg); color: var(--cell-ink); display: grid; place-items: center; font: 500 clamp(1.4rem, 5vw, 2.1rem)/1 var(--sans); text-transform: uppercase; cursor: text; position: relative; }
.el-cell .cell__num { position: absolute; top: 2px; left: 3px; font-size: .55rem; line-height: 1; font-weight: 600; }
.el-cell.cur { background: var(--cell-selected); color: var(--cell-selected-ink); }
.el-cell.given { background: var(--cell-word); }
.el-cell.t-fod, .el-cell.t-fod2 { background: var(--el-fod); color: var(--el-fod-ink); }
.el-cell.t-def, .el-cell.t-def2 { background: var(--el-def); color: var(--el-def-ink); }
.el-cell.t-ind { background: var(--el-ind); color: var(--el-ind-ink); }
.el-grid.shake { animation: el-shake .4s; }
@keyframes el-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* útskýring vísbendingar */
.el-exp { position: relative; max-width: none; padding-right: 2.6rem; }
.el-exp p { margin: 0; line-height: 1.55; }
.el-exp-x { position: absolute; top: .4rem; right: .5rem; width: 32px; height: 32px; min-height: 32px; border: 0; background: transparent; color: var(--ink); font-size: 1.3rem; line-height: 1; padding: 0; }

/* skjályklaborð, aðeins í síma (á tölvu er skrifað beint) */
.el-keys { display: none; gap: .3rem; justify-items: center; margin-top: .25rem; }
@media (max-width: 760px) { .el-keys { display: grid; } }
.el-keys .el-row { display: flex; gap: .25rem; flex-wrap: nowrap; max-width: 100%; }
.el-keys button { min-width: clamp(26px, 7.2vw, 38px); height: 44px; min-height: 44px; padding: 0 .2rem; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 700 .95rem/1 var(--sans); }
.el-keys button.wide { min-width: clamp(46px, 13vw, 64px); font-size: .78rem; }
.el-keys button:active { background: var(--blue); }

/* hægri dálkur: fleiri gátur og um leikinn, þar sem vísbendingalistinn er á gátusíðunni */
.el-side-h { font: 800 1.2rem/1.2 var(--display); margin: 0 0 .6rem; }
.el-side-h + .el-list { margin-bottom: 1.4rem; }
.el-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.el-list li button { width: 100%; text-align: left; display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .6rem; padding: .6rem .8rem; border-radius: 8px; border: 1px solid var(--hair); background: var(--surface); color: var(--ink); font-weight: 400; }
.el-list li button:hover { border-color: var(--stand); }
.el-list li button[aria-current="true"] { border-color: var(--stand); background: var(--cluebar); }
.el-list .d { font-weight: 700; font-size: .9rem; }
.el-list .c { flex: 1 1 100%; color: var(--soft); font-size: .9rem; }
.el-list .s { margin-inline-start: auto; font-size: .72rem; font-weight: 700; padding: .1rem .55rem; border-radius: 999px; background: var(--bar); }
.el-list .s.ok { background: var(--el-ok); color: #fff; }
.el-about { line-height: 1.55; }
.el-link { border: 0; background: transparent; color: var(--blue-ink); font: inherit; font-weight: 600; text-decoration: underline; padding: 0; min-height: 0; }

/* lokaglugginn, eins og „Til hamingju“-glugginn á gátusíðunni */
.el-score { display: grid; justify-items: center; gap: .4rem; margin: .5rem 0; }
.el-score p { margin: 0; font: 800 1.3rem/1 var(--display); }
.el-timechoice { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .25rem 0 .75rem; }
.el-timechoice .button--quiet { min-height: 36px; padding: .25rem .8rem; }
.el-done-h { font: 800 1.1rem/1.2 var(--display); margin: .75rem 0 .35rem; display: flex; gap: .5rem; align-items: baseline; }
.el-done-h .hint { font: 400 .85rem/1 var(--sans); }
.el-steps { margin: 0 0 .75rem; padding-inline-start: 1.3rem; display: grid; gap: .35rem; line-height: 1.5; }
.el-k { padding: 0 .3em; border-radius: 5px; font-weight: 600; }
.el-k--def, .el-k--def2 { background: var(--el-def); color: var(--el-def-ink); }
.el-k--ind { background: var(--el-ind); color: var(--el-ind-ink); }
.el-k--fod, .el-k--fod2 { background: var(--el-fod); color: var(--el-fod-ink); }

/* kennsla */
.el-dialog { max-width: min(96vw, 40rem); }
.el-help p, .el-help li { line-height: 1.55; }
.el-help h3 { font: 800 1.15rem/1.2 var(--display); margin: 1rem 0 .4rem; }
.el-help ul { padding-inline-start: 1.2rem; display: grid; gap: .3rem; }
.el-ex { font-size: 1.15rem; text-align: center; padding: .6rem; border-radius: 10px; background: var(--bar); }
@media (prefers-reduced-motion: reduce) { .el-grid.shake { animation: none; } }

/* ein miðjuð súla: vísbending og reitir í miðju, eldri gátur fyrir neðan */
.el-layout { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 2.2rem; }
.el-layout > .board { width: min(100%, 36rem); }
.el-cluebar { width: 100%; }
.el-cluebody { justify-content: center; text-align: center; }
.el-grid { max-width: min(100%, calc(var(--cols) * 72px)); }
.el-exp { width: 100%; }
.el-side { width: min(100%, 36rem); position: static; }
.el-side-h { text-align: center; }
.el-about { text-align: center; }
.el-layout .status:empty { display: none; }
.el-layout .status { text-align: center; }

/* hnappar undir grindinni */
.el-actions { display: flex; justify-content: center; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: .25rem; }
.el-pill { border: 2px solid #121212; border-radius: 999px; min-height: 44px; padding: .6rem 1.5rem; font: 700 1rem/1 var(--sans); background: #121212; color: #ffffff; }
.el-pill:hover { background: #2a2a2a; }
.el-pill:disabled { background: transparent; color: var(--muted); border-color: var(--hair); }
.el-pill--quiet, summary.el-pill--quiet { background: transparent; color: var(--ink); }
.el-pill--quiet:hover, summary.el-pill--quiet:hover { background: var(--bar); }
.el-menu { position: relative; }
.el-menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.el-menu summary::-webkit-details-marker { display: none; }
.el-menu .menu { position: absolute; top: calc(100% + .4rem); left: 50%; transform: translateX(-50%); z-index: 5; min-width: 14rem; margin: 0; padding: .35rem; list-style: none; background: var(--surface); border: 1px solid var(--hair); border-radius: 10px; box-shadow: 0 12px 30px rgb(0 0 0 / .15); }
.el-menu .menu button { width: 100%; text-align: left; border: 0; background: transparent; color: var(--ink); padding: .6rem .8rem; border-radius: 6px; font: 500 1rem/1.2 var(--sans); }
.el-menu .menu button:hover { background: var(--bar); }
.el-menu .menu button.used { color: var(--muted); text-decoration: line-through; }
.el-menu .menu button.used::after { content: " ✓"; text-decoration: none; }

/* meira loft: gátan fær plássið, eldri gátur eru skýrt aðskildar fyrir neðan */
.el-layout { gap: 0; }
.el-layout > .board { gap: 1rem; padding-block: 1.5rem .5rem; }
.el-cluebar { min-height: 4.2rem; }
.el-cluebody { font-size: clamp(1.15rem, 2.8vw, 1.4rem); }
.el-actions { margin-top: .75rem; }
.el-side { margin-top: 4rem; padding-top: 2.2rem; border-top: 1px solid var(--hair); }
.el-side-h { margin-bottom: 1rem; }
@media (max-width: 760px) { .el-side { margin-top: 2.5rem; padding-top: 1.6rem; } }
.el-gone { margin: -.6rem 0 1.4rem; font-size: .9rem; }
