/* Hint first + Check my working (static/board/hints.js; only on the page when TUTOR_HINTS=1 / TUTOR_CHECKWORK=1). */

/* ---- today's page: the top-bar option and the 📝 button next to 📷 */
#hintTab { font: 600 14px var(--ui); padding: 9px 14px; border-radius: 10px; border: 1px solid #374151; background: #1f2937; color: #9ca3af; cursor: pointer; white-space: nowrap; }
#hintTab:hover { border-color: var(--brand); }
#hintTab[aria-pressed="true"] { color: #fff; border-color: #eab308; box-shadow: inset 0 0 0 1px #eab308; }
@media (max-width: 640px) {
  #hintTab { font-size: 16px; height: 38px; min-width: 42px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; }
}
@media (max-width: 420px) {
  #hintTab { min-width: 34px; padding: 0 6px; }
  body.hk-able .top { gap: 5px; }
  body.hk-able .brand { font-size: 13px; letter-spacing: -0.3px; gap: 0; overflow: hidden; }
  body.hk-able .brand .dot { display: none; }
}
html:not(.ui2) #ask .hk-ckbtn { background: #1f2937; border: 1px solid #374151; font-size: 18px; padding: 0 12px; }
html:not(.ui2) #qa #checkWorkBtn2 { background: #fff; border: 1px solid var(--line); font-size: 18px; padding: 0 12px; border-radius: 10px; cursor: pointer; }
@media (max-width: 640px) {
  html:not(.ui2) #ask:has(.hk-ckbtn) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 60px 44px 44px; grid-template-areas: "topic topic topic go go" "level lang fmt photo ck"; }
  html:not(.ui2) #ask .hk-ckbtn { grid-area: ck; padding: 0; height: 40px; font-size: 16px; }
}

/* ---- the gate: "Your turn" bar at the bottom of the board */
.hk-bar {
  position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 7; max-width: 720px; margin: 0 auto;
  background: #fff; border: 2px solid #fde68a; border-radius: 14px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(17, 24, 39, .16);
  font-family: var(--ui); color: var(--ink, #1f2937); animation: hk-in .25s ease-out;
}
@keyframes hk-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hk-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.hk-tag { display: inline-flex; align-items: center; gap: 6px; font: 700 14px var(--ui); color: #b45309; }
.hk-tag .ic { width: 18px; height: 18px; }
.hk-msg { font: 500 15px/1.4 var(--ui); color: #374151; }
.hk-hint { margin: 8px 0 2px; padding: 8px 12px; border-radius: 10px; background: #fffbeb; border: 1px solid #fde68a; font: 600 16px/1.45 var(--ui); color: #78350f; }
.hk-hint[hidden] { display: none; }
.hk-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hk-b { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 10px;
  border: 1px solid #d1d5db; background: #fff; color: #1f2937; font: 600 14px var(--ui); cursor: pointer; }
.hk-b:hover { border-color: #9ca3af; }
.hk-b:disabled { opacity: .5; cursor: default; }
.hk-b[hidden] { display: none; }
.hk-b .ic { width: 18px; height: 18px; }
.hk-b.hk-hintb { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.hk-b.hk-next { background: var(--brand, #2563eb); border-color: var(--brand, #2563eb); color: #fff; }
.hk-b.hk-full { margin-left: auto; }
@media (max-width: 640px) {
  .hk-bar { left: 8px; right: 8px; bottom: 8px; padding: 10px 12px; }
  .hk-msg { font-size: 14px; }
  .hk-btns { gap: 6px; }
  .hk-b { flex: 1 1 auto; padding: 0 10px; }
  .hk-b.hk-full { margin-left: 0; flex-basis: 100%; }
}

/* ---- Check my working: the sheet */
.zoom .hk-card { max-width: 480px; max-height: calc(100dvh - 40px); overflow-y: auto; }
.hk-card .hk-photo, .hk-card .hk-go { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 46px; }
.hk-card .hk-photo .ic, .hk-card .hk-go .ic { width: 18px; height: 18px; }
.zoom .hk-card .hk-or { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; color: #6b7280; font: 500 13px var(--ui); }
.hk-card .hk-or::before, .hk-card .hk-or::after { content: ""; flex: 1; height: 1px; background: #e5e7eb; }
.hk-card .hk-lbl { display: block; font: 600 14px var(--ui); color: #1f2937; margin: 10px 0 4px; }
.hk-card .hk-lbl small { font-weight: 400; color: #6b7280; }
.hk-card .hk-in { display: block; width: 100%; box-sizing: border-box; font: 400 16px/1.4 var(--ui); color: #111827; background: #fff;
  border: 1px solid #d1d5db; border-radius: 10px; padding: 10px 12px; min-height: 44px; }
.hk-card .hk-ta { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; resize: vertical; min-height: 120px; }
.hk-card .hk-in:focus { outline: 2px solid var(--brand, #2563eb); border-color: transparent; }
.zoom .hk-card .hk-go { margin-top: 14px; background: #fff; color: var(--brand, #2563eb); box-shadow: inset 0 0 0 2px var(--brand, #2563eb); }
.zoom .hk-card .hk-msgline { color: #b45309; }
.hk-card .hk-link { border: 0; background: none; padding: 0; font: 600 13px var(--ui); color: var(--brand, #2563eb); text-decoration: underline; cursor: pointer; min-height: 0; }

/* ---- today's footer: the end buttons */
#checkWorkEnd[hidden], #hkPracticeEnd[hidden] { display: none; }

/* ---- the new page: one more chip in the composer on phones; the language chip drops its globe (its name says it) so Level
   and Language keep their words */
@media (max-width: 420px) {
  #u2 #ask:has(.hk-ckchip) #uLangBtn > .ic:first-child { display: none; }
}
