.dq-page { --dq-ink: #22372d; --dq-muted: #495d52; --dq-line: #d4e1d5; --dq-teal: #225743; --dq-tint: #e9f3eb; --dq-paper: #fff; color: var(--dq-ink); min-width: 0; }
.dq-page [hidden] { display: none !important; }
.dq-page :is(section, h2)[id] { scroll-margin-top: 1.5rem; }
.dq-panel { margin: 1.5rem 0; padding: clamp(1rem, 3vw, 1.6rem); border: 1px solid var(--dq-line); border-radius: 14px; background: var(--dq-paper); }
.dq-panel h2 { color: var(--dq-ink); font-size: clamp(1.35rem, 2.8vw, 1.85rem); line-height: 1.4; font-weight: 750; margin: 0 0 .5rem; }
.dq-panel h3 { color: var(--dq-ink); font-size: 1.17rem; line-height: 1.45; font-weight: 700; margin: .9rem 0 .35rem; }
.dq-panel p { margin: 0 0 .72rem; line-height: 1.66; overflow-wrap: anywhere; }
.dq-guide > h3 { margin-top: 1.25rem; }
.dq-page .dq-meta { font-size: .88rem; color: var(--dq-muted); }
.dq-label { color: var(--dq-teal); font-size: .88rem; font-weight: 750; }
.dq-meta:empty, .dq-puzzle p:empty { display: none; }
.dq-heading { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: flex-start; gap: .65rem; }
.dq-daily { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; background: var(--dq-tint); }
.dq-jump, .dq-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .52rem; margin: .6rem 0; }
.dq-page :is(button, .dq-jump a) { display: inline-flex; align-items: center; justify-content: center; width: auto; max-width: 100%; min-height: 44px; padding: .5rem .8rem; border: 1px solid var(--dq-line); background: var(--dq-paper); color: var(--dq-ink); border-radius: 8px; line-height: 1.4; white-space: normal; font-size: .92rem; font-weight: 730; letter-spacing: normal; text-decoration: none; box-shadow: none; cursor: pointer; }
.dq-page :is(button, .dq-jump a):hover { background: var(--dq-tint); }
.dq-page button.dq-primary { background: var(--dq-teal); color: #fff; border-color: var(--dq-teal); }
.dq-page button.dq-primary:hover { background: #174735; }
.dq-page button:disabled { opacity: .58; cursor: default; }
.dq-page button[aria-pressed="true"] { background: var(--dq-tint); border-color: var(--dq-teal); color: var(--dq-teal); }
.dq-page :is(a, button, summary, input, select, textarea):focus-visible { outline: 3px solid #08796c; outline-offset: 2px; }
.dq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin: .6rem 0; }
.dq-enable { border: 0; padding: 0; margin: 0; min-width: 0; }
.dq-page label { color: var(--dq-ink); margin: 0; font-weight: 650; font-size: .92rem; }
.dq-page :is(select, input:not([type=checkbox]), textarea) { min-width: 0; width: 100%; min-height: 44px; padding: .4rem .5rem; background: var(--dq-paper); color: var(--dq-ink); border: 1px solid var(--dq-line); border-radius: 8px; font-size: 1rem; font-weight: 550; }
.dq-page select { appearance: auto; }
.dq-checks label { display: inline-flex; align-items: center; gap: .38rem; min-height: 44px; }
.dq-page input[type=checkbox] { appearance: auto; position: static; opacity: 1; width: 1.1rem; height: 1.1rem; accent-color: var(--dq-teal); }
.dq-input input { flex: 1 1 11rem; }
.dq-page progress { display: block; width: 100%; height: .65rem; accent-color: var(--dq-teal); margin: .35rem 0 .6rem; }
.dq-clock { padding: .1rem .6rem; border-radius: 20px; background: var(--dq-tint); color: var(--dq-teal); font-weight: 750; font-variant-numeric: tabular-nums; }
.dq-puzzle { margin: .55rem 0; padding: clamp(.8rem, 3vw, 1.4rem); border-radius: 12px 12px 12px 3px; background: var(--dq-tint); }
.dq-puzzle h2 { overflow-wrap: anywhere; }
.dq-puzzle h2.dq-emoji { font-size: clamp(1.6rem, 6vw, 3rem); }
#dq-choices button { justify-content: flex-start; text-align: left; overflow-wrap: anywhere; }
.dq-feedback { margin: .7rem 0; padding: .75rem .9rem; border-left: 4px solid #b54337; background: #fff1ec; color: #602821; }
.dq-feedback[data-state="correct"] { border-color: #0c7664; background: #edf8f0; color: #134536; }
.dq-feedback[data-state="reveal"], .dq-feedback[data-state="skip"] { border-color: #4b6c85; background: #edf4fa; color: var(--dq-ink); }
.dq-feedback h3 { color: inherit; margin-top: .15rem; }
.dq-feedback:not([hidden]) { animation: dq-enter .16s ease-out; }
@keyframes dq-enter { from { opacity: .5; } to { opacity: 1; } }
.dq-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: .6rem 0; }
.dq-stats div, .dq-entry { padding: .65rem .8rem; border: 1px solid var(--dq-line); border-radius: 9px; overflow-wrap: anywhere; }
.dq-stats dt { color: var(--dq-muted); font-size: .87rem; }
.dq-stats dd { font-weight: 750; margin: .1rem 0 0; }
.dq-entry { margin: .6rem 0; }
.dq-entry .dq-meta { margin-bottom: .2rem; }
.dq-entry h3 { margin-top: 0; }
.dq-page summary { padding: .5rem .08rem; cursor: pointer; font-weight: 660; color: var(--dq-ink); }
.dq-guide details { border-bottom: 1px solid var(--dq-line); }
.dq-guide ol, #dq-full-result, #dq-print-preview, #dq-category-result { padding-left: 1.6em; }
.dq-static-list { columns: 2; column-gap: 2rem; }
.dq-static-list > li { break-inside: avoid; }
.dq-static-list p { color: var(--dq-muted); font-size: .92rem; }
#dq-sheet { display: none; }
@media (max-width: 475px) {
  .dq-grid, .dq-static-list { grid-template-columns: minmax(0, 1fr); columns: 1; }
  .dq-page .dq-jump a { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .dq-page *, .dq-page *::before, .dq-page *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  body:has(#dq-sheet ol) #page-wrapper, body:has(#dq-sheet ol) #navButton, body:has(#dq-sheet ol) #navPanel { display: none !important; }
  body:has(#dq-sheet ol) { background: #fff; color: #111; }
  #dq-sheet:has(ol) { display: block; margin: 0; font: 11pt/1.45 sans-serif; }
  #dq-sheet h1, #dq-sheet h2 { color: #111; font-size: 19pt; margin: 0 0 12pt; }
  #dq-sheet ol { list-style: decimal; padding-left: 22pt; }
  #dq-sheet > ol > li { break-inside: avoid; margin-bottom: 8pt; }
  #dq-sheet > ol ol { margin: 2pt 0 0; list-style: upper-alpha; }
  #dq-sheet p { margin: 2pt 0 5pt; }
  #dq-sheet footer { border-top: 1px solid #bbb; margin-top: 12pt; padding-top: 5pt; font-size: 9pt; }
  .dq-print-break { break-before: page; }
  @page { size: A4; margin: 14mm; }
}
.dq-kicker { font-size: .88rem; font-weight: 750; color: var(--dq-teal); }
.dq-specimen, .dq-thumbnail { display: grid; place-items: center; border-radius: 10px; background: #f0ecdc; min-height: 7.4rem; overflow: hidden; }
.dq-specimen { min-height: 11rem; }
.dq-specimen img, .dq-thumbnail img, .dq-feedback img { display: block; width: 100%; max-width: 380px; height: 10rem; object-fit: contain; padding: .75rem; filter: invert(23%) sepia(19%) saturate(1220%) hue-rotate(95deg); }
.dq-specimen.dq-shadow img { filter: brightness(0); }
.dq-thumbnail { min-height: 5.5rem; }
.dq-thumbnail img { height: 6rem; padding: .45rem; }
.dq-thumbnail.dq-locked { background: #edf0eb; color: #5e7268; }
.dq-thumbnail.dq-locked img { filter: grayscale(1); opacity: .32; }
.dq-placeholder { color: var(--dq-muted); font-size: .84rem; text-align: center; padding: .35rem; }
.dq-cards, .dq-timeline-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .55rem; }
.dq-entry { min-width: 0; }
.dq-entry h3 { overflow-wrap: anywhere; }
.dq-entry .dq-actions { gap: .35rem; }
.dq-entry .dq-actions button { flex: 1 1 auto; padding-left: .45rem; padding-right: .45rem; }
.dq-timeline-grid h3 { margin: .5rem 0; }
.dq-page button.dq-picture-option { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: .5rem; background: #f2f2e8; }
.dq-picture-option img { display: block; width: 100%; height: 6.5rem; object-fit: contain; }
.dq-ruler { max-width: 35rem; background: repeating-linear-gradient(90deg, #e8eee7 0%, #e8eee7 1px, #f5f8f3 1px, #f5f8f3 10%); margin: .22rem 0 .7rem; border-bottom: 1px solid #95aa96; overflow: hidden; }
.dq-scale-bar { min-height: 1rem; max-width: 100%; display: flex; align-items: flex-end; border-bottom: 4px solid var(--dq-teal); }
.dq-scale-bar img { width: 100%; height: auto; display: block; }
.dq-scale-bar span { width: 100%; height: 12px; background: #557d65; }
.dq-dialog { width: min(720px, 94vw); max-height: 90vh; max-width: 94vw; padding: 1.05rem; border: 1px solid var(--dq-line); border-radius: 10px; color: var(--dq-ink); background: var(--dq-paper); }
.dq-dialog::backdrop { background: rgb(16 30 22 / .72); }
.dq-dialog h2 { font-weight: 750; font-size: 1.55rem; }
.dq-dialog dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .4rem; }
.dq-dialog dt { color: var(--dq-muted); font-size: .87rem; }
.dq-dialog dd { margin: 0 0 .45rem; overflow-wrap: anywhere; }
#dq-board { display: grid; grid-template-columns: repeat(var(--dq-columns,4),minmax(0,1fr)); gap: .36rem; }
.dq-page #dq-board button { display: flex; width: 100%; padding: .28rem; height: clamp(54px,11vw,98px); background: #3e7254; color: #fff; overflow-wrap: anywhere; transition: background .16s, transform .13s; }
.dq-page #dq-board button[data-open="true"] { background: #edeedb; color: #213526; }
.dq-page #dq-board button:disabled { opacity: .72; }
#dq-board img { display: block; width: 100%; height: 100%; object-fit: contain; }
#dq-hint-image img { max-height: 5rem; width: 100%; object-fit: contain; }
@media(max-width: 740px) { .dq-cards { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width: 430px) { .dq-timeline-grid { grid-template-columns: minmax(0,1fr); } #dq-board strong { font-size: .66rem; line-height: 1.2; } }
@media print {
  #dq-sheet img { display: block; width: 128px; height: 58px; object-fit: contain; }
  #dq-sheet .dq-print-matching { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); list-style: none; padding: 0; }
  #dq-sheet .dq-print-matching img { width: 100%; }
  #dq-sheet a, #dq-sheet li { overflow-wrap: anywhere; }
}
