/* Hamle's own controls in the "Çıkartma" style (see hamle-ui.js). Loaded after every other stylesheet. */
:root{--hm-ink:var(--sticker-ink,#1b2559);--hm-blue:var(--sticker-blue,#3554d1);--hm-sun:var(--sticker-sun,#ffc93c);--hm-sky:var(--sticker-sky,#e8ecff);--hm-cream:var(--sticker-cream,#fff4d2);--hm-red:#c63a3a;--hm-muted:#4a5275;accent-color:var(--hm-blue);scrollbar-color:#b9c0dc transparent}

/* Text selection, focus ring, autofill */
::selection{background:var(--hm-sun);color:var(--hm-ink)}
:where(button,a,input,select,textarea,summary,[tabindex]:not([tabindex="-1"])):focus-visible{outline:3px solid var(--hm-blue);outline-offset:2px}
.main :is(input,textarea):focus-visible,.hm-select:focus-visible{outline:3px solid var(--hm-sun);outline-offset:0;box-shadow:0 0 0 5px var(--hm-ink)}
input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,textarea:-webkit-autofill{-webkit-text-fill-color:var(--hm-ink);-webkit-box-shadow:0 0 0 40px var(--hm-cream) inset;caret-color:var(--hm-ink);transition:background-color 9999s}
input::placeholder,textarea::placeholder{color:#7a819c;opacity:1}

/* Scrollbars */
*{scrollbar-width:thin}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:#c3c9e2;border-radius:999px;border:2px solid transparent;background-clip:padding-box}
::-webkit-scrollbar-thumb:hover{background:#9aa3c9;background-clip:padding-box;border:2px solid transparent}
::-webkit-scrollbar-corner{background:transparent}

/* Search field: drop the browser's clear button and decorations */
input[type=search]{-webkit-appearance:none;appearance:none}
input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-results-button{-webkit-appearance:none;display:none}

/* Select: the native element stays for forms and listeners, the sticker button is what people see */
select.hm-native{position:absolute!important;width:1px!important;height:1px!important;min-height:0!important;padding:0!important;margin:-1px!important;border:0!important;opacity:0!important;pointer-events:none!important;clip-path:inset(50%)!important;overflow:hidden!important}
button.hm-select{display:inline-flex;align-items:center;justify-content:space-between;gap:10px;box-sizing:border-box;min-height:44px;min-width:9rem;max-width:100%;padding:9px 12px 9px 14px;border:2px solid var(--hm-ink);border-radius:12px;background:#fff;color:var(--hm-ink);font:inherit;font-size:14px;font-weight:650;line-height:1.25;text-align:left;cursor:pointer;box-shadow:2px 2px 0 var(--hm-ink);transition:box-shadow .12s,transform .12s,background-color .12s}
button.hm-select:hover:not(:disabled){box-shadow:3px 3px 0 var(--hm-ink);transform:translate(-1px,-1px)}
button.hm-select:active:not(:disabled){box-shadow:0 0 0 var(--hm-ink);transform:translate(2px,2px)}
button.hm-select[aria-expanded=true]{background:var(--hm-sky)}
button.hm-select:disabled{opacity:.5;cursor:not-allowed;box-shadow:none}
button.hm-select[aria-invalid=true]{border-color:var(--hm-red);box-shadow:2px 2px 0 var(--hm-red)}
.hm-select-value{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hm-select-chevron{flex:none;width:16px;height:16px;transition:transform .15s}
button.hm-select[aria-expanded=true] .hm-select-chevron{transform:rotate(180deg)}
button.hm-select.compact{min-height:40px;font-size:13px}
/* Fill the column where the select used to be a full-width field */
label>button.hm-select,.filters button.hm-select,.personal-filters button.hm-select,.profile-form button.hm-select,.account-dialog button.hm-select,.feedback-dialog button.hm-select,.piece-comfort-form button.hm-select{width:100%;min-width:0}
.toolbar-select>button.hm-select,.session-actions button.hm-select{width:auto;min-width:10rem}
.review-form-footer label>button.hm-select{margin-top:6px;min-width:130px}
.filters{min-width:0}

.hm-select-pop{position:fixed;z-index:1000;display:flex;flex-direction:column;box-sizing:border-box;max-width:min(420px,calc(100vw - 24px));padding:6px;border:2px solid var(--hm-ink);border-radius:14px;background:#fff;color:var(--hm-ink);box-shadow:4px 4px 0 var(--hm-ink);opacity:0;transform:translateY(-4px);transition:opacity .12s,transform .12s;font-family:Manrope,system-ui,sans-serif}
.hm-select-pop[data-side=up]{transform:translateY(4px)}
.hm-select-pop.in{opacity:1;transform:none}
.hm-options{overflow-y:auto;overscroll-behavior:contain;min-height:0;flex:1;outline:none}
.hm-option{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:40px;padding:8px 10px;border-radius:9px;font-size:14px;font-weight:600;line-height:1.3;cursor:pointer;user-select:none}
.hm-option>span{min-width:0;overflow-wrap:anywhere}
.hm-option.active{background:var(--hm-sky)}
.hm-option[aria-selected=true]{background:var(--hm-sun);font-weight:800}
.hm-option[aria-selected=true].active{box-shadow:inset 0 0 0 2px var(--hm-ink)}
.hm-option[aria-disabled=true]{opacity:.45;cursor:not-allowed}
.hm-option-check{flex:none;width:16px;height:16px}
.hm-option-empty{padding:12px 10px;color:var(--hm-muted);font-size:13px}
.hm-filter{display:flex;align-items:center;gap:8px;margin:0 0 6px;padding:0 10px;border:2px solid var(--hm-ink);border-radius:10px;background:var(--hm-cream)}
.hm-filter svg{flex:none;width:16px;height:16px;color:var(--hm-ink)}
.hm-filter input{flex:1;min-width:0;min-height:38px;border:0!important;padding:0!important;background:transparent!important;box-shadow:none!important;color:var(--hm-ink);font:inherit;font-size:16px;font-weight:600;outline:none}
.hm-filter:focus-within{outline:3px solid var(--hm-blue);outline-offset:2px}

/* Phones: a bottom sheet instead of a floating menu */
.hm-sheet-backdrop{position:fixed;inset:0;z-index:999;background:#141b3a66;animation:hm-fade .15s}
.hm-select-pop.sheet{left:0!important;right:0;bottom:0;top:auto;min-width:0!important;width:100%;max-width:none;max-height:min(75dvh,560px);padding:8px 12px calc(14px + env(safe-area-inset-bottom,0px));border-width:2px 0 0;border-radius:22px 22px 0 0;box-shadow:0 -4px 0 var(--hm-ink);transform:translateY(24px)}
.hm-select-pop.sheet.in{transform:none}
.hm-select-pop.sheet .hm-option{min-height:48px;font-size:16px;padding:10px 12px}
.hm-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 2px 10px}
.hm-sheet-head b{font-size:17px;font-weight:800}
.hm-sheet-close{display:grid;place-items:center;width:44px;height:44px;border:2px solid var(--hm-ink);border-radius:999px;background:#fff;color:var(--hm-ink);cursor:pointer}
.hm-sheet-close svg{width:16px;height:16px}

/* Checkbox and radio */
input[type=checkbox],input[type=radio]{-webkit-appearance:none;appearance:none;flex:none;display:inline-grid;place-content:center;width:22px;height:22px;margin:0 8px 0 0;border:2px solid var(--hm-ink);border-radius:7px;background:#fff;vertical-align:-5px;cursor:pointer;box-shadow:2px 2px 0 var(--hm-ink);transition:background-color .12s,box-shadow .12s}
input[type=radio]{border-radius:999px}
input[type=checkbox]::after{content:'';width:12px;height:12px;background:var(--hm-ink);clip-path:polygon(14% 52%,0 66%,38% 100%,100% 22%,86% 8%,38% 72%);transform:scale(0);transition:transform .12s}
input[type=radio]::after{content:'';width:10px;height:10px;border-radius:999px;background:var(--hm-ink);transform:scale(0);transition:transform .12s}
input[type=checkbox]:checked,input[type=radio]:checked{background:var(--hm-sun)}
input[type=checkbox]:checked::after,input[type=radio]:checked::after{transform:scale(1)}
input[type=checkbox]:disabled,input[type=radio]:disabled{opacity:.5;cursor:not-allowed;box-shadow:none}

/* Range */
input[type=range]{-webkit-appearance:none;appearance:none;width:100%;height:28px;margin:6px 0;background:transparent;cursor:pointer;border:0!important;box-shadow:none!important;min-height:0!important;padding:0!important}
input[type=range]::-webkit-slider-runnable-track{height:10px;border:2px solid var(--hm-ink);border-radius:999px;background:linear-gradient(90deg,var(--hm-blue) var(--hm-fill,50%),#fff var(--hm-fill,50%))}
input[type=range]::-moz-range-track{height:6px;border:2px solid var(--hm-ink);border-radius:999px;background:#fff}
input[type=range]::-moz-range-progress{height:6px;border:2px solid var(--hm-ink);border-radius:999px;background:var(--hm-blue)}
input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:26px;height:26px;margin-top:-10px;border:2px solid var(--hm-ink);border-radius:999px;background:var(--hm-sun);box-shadow:2px 2px 0 var(--hm-ink)}
input[type=range]::-moz-range-thumb{width:22px;height:22px;border:2px solid var(--hm-ink);border-radius:999px;background:var(--hm-sun);box-shadow:2px 2px 0 var(--hm-ink)}
input[type=range]:focus-visible{outline:none}
input[type=range]:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 3px var(--hm-blue)}
input[type=range]:focus-visible::-moz-range-thumb{box-shadow:0 0 0 3px var(--hm-blue)}

/* Progress */
progress{-webkit-appearance:none;appearance:none;height:12px;border:2px solid var(--hm-ink);border-radius:999px;background:#fff;color:var(--hm-blue);overflow:hidden}
progress::-webkit-progress-bar{background:#fff;border-radius:999px}
progress::-webkit-progress-value{background:var(--hm-blue);border-radius:999px}
progress::-moz-progress-bar{background:var(--hm-blue);border-radius:999px}

/* Disclosure: a Hamle chevron instead of the browser triangle */
summary{list-style:none}
summary::-webkit-details-marker{display:none}
details:not(.review-moment):not(.nav-more)>summary{position:relative;padding-right:28px;cursor:pointer}
details:not(.review-moment):not(.nav-more)>summary::after{content:'';position:absolute;right:4px;top:50%;width:8px;height:8px;border-right:2.5px solid currentColor;border-bottom:2.5px solid currentColor;transform:translateY(-70%) rotate(45deg);transition:transform .15s}
details:not(.review-moment):not(.nav-more)[open]>summary::after{transform:translateY(-30%) rotate(-135deg)}

/* Inline validation (replaces the browser bubble) */
.hm-field-error{display:flex;align-items:center;gap:6px;margin:6px 0 0;color:var(--hm-red);font-size:13px;font-weight:700;line-height:1.4}
.hm-field-error::before{content:'!';display:grid;place-items:center;flex:none;width:18px;height:18px;border-radius:999px;background:var(--hm-red);color:#fff;font-size:12px;font-weight:900}
.main :is(input,textarea)[aria-invalid=true],dialog :is(input,textarea)[aria-invalid=true]{border-color:var(--hm-red)!important}

/* Tooltip */
.hm-tip{position:fixed;z-index:1001;max-width:min(320px,calc(100vw - 16px));padding:7px 10px;border:2px solid var(--hm-ink);border-radius:10px;background:var(--hm-ink);color:#fff;font:700 12px/1.4 Manrope,system-ui,sans-serif;pointer-events:none;opacity:0;transition:opacity .1s}
.hm-tip.in{opacity:1}

/* Confirm dialog and every app dialog share the sticker frame */
dialog.hm-confirm{width:min(440px,calc(100% - 32px));padding:26px;border:2px solid var(--hm-ink);border-radius:22px;background:#fff;color:var(--hm-ink);box-shadow:6px 6px 0 var(--hm-ink)}
dialog.hm-confirm h2{margin:0 0 8px;font:800 22px/1.25 Manrope,system-ui,sans-serif}
dialog.hm-confirm p{margin:0;color:var(--hm-muted);line-height:1.6}
.hm-confirm-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:12px;margin-top:24px}
.hm-confirm-actions .button{min-height:44px}
dialog.hm-confirm.danger{border-color:var(--hm-ink)}
dialog.hm-confirm.danger h2::before{content:'!';display:inline-grid;place-items:center;width:28px;height:28px;margin-right:10px;border:2px solid var(--hm-ink);border-radius:999px;background:var(--hm-red);color:#fff;font-size:16px;vertical-align:2px}
dialog::backdrop{background:#141b3a66}
dialog.account-dialog,dialog.feedback-dialog,dialog.coach-dialog{border:2px solid var(--hm-ink);box-shadow:6px 6px 0 var(--hm-ink)}
@media(max-width:560px){dialog.hm-confirm{padding:22px}.hm-confirm-actions{flex-direction:column-reverse}.hm-confirm-actions .button{width:100%;min-height:48px}}

/* Toast */
#toast{background:var(--hm-ink);color:#fff;border:2px solid var(--hm-ink);border-radius:14px;box-shadow:4px 4px 0 var(--hm-sun);font-weight:700}

@keyframes hm-fade{from{opacity:0}}
@media(prefers-reduced-motion:reduce){.hm-select-pop,.hm-tip,button.hm-select,.hm-select-chevron,input[type=checkbox]::after,input[type=radio]::after{transition:none!important}.hm-sheet-backdrop{animation:none}}
@media(max-width:560px){.filters{grid-template-columns:repeat(2,minmax(0,1fr))!important}.filters>button.hm-select:last-child{grid-column:1/-1}.filters button.hm-select{font-size:14px;padding-left:12px}}
/* Wrong puzzle move: the refuting line plays on the board, this card says what is happening and why. */
.refute-note{margin:14px 0 4px;padding:12px 14px 12px 16px;border:2px solid #1B2559;border-left:8px solid #d6453d;border-radius:12px;background:#fff;box-shadow:3px 3px 0 #1B2559;color:#1B2559;font-size:14px;line-height:1.5;scroll-margin:96px}.refute-note b{display:block;font-size:11px;letter-spacing:1.2px;text-transform:uppercase;color:#b2372f;margin-bottom:2px}.refute-note span{font-weight:650}.refute-note.done span{font-weight:600}.refute-note small{display:block;margin-top:6px;font-size:12px;color:#51576a}
