/* Views tab: side panel extras, viewport legend, and the practice sheet. */
.views-object .field{margin-top:0}
.views-label{font-weight:650}
.views-about{margin:6px 0 0}
/* Inches / millimeters: a two-option segmented control (radio buttons underneath). */
.views-units{border:0;margin:12px 0 0;padding:0;min-width:0;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.views-units legend{float:left;font-size:.875rem;font-weight:650;padding:0}
.views-units-options{display:inline-flex;border:1px solid #cbd4d5;border-radius:8px;overflow:hidden}
.views-units-options label{position:relative;display:flex;cursor:pointer}
.views-units-options input{position:absolute;opacity:0;inset:0;margin:0;cursor:pointer}
.views-units-options span{padding:6px 12px;font-size:.85rem;font-weight:600;color:#26383e;background:#fff;min-height:34px;display:flex;align-items:center}
.views-units-options label+label span{border-left:1px solid #cbd4d5}
.views-units-options input:checked+span{background:#d4efb7;color:#24381b}
.views-units-options input:focus-visible+span{outline:3px solid var(--focus);outline-offset:-3px}
.views-units-options input:disabled+span{opacity:.5;cursor:default}
.views-units-note{margin:6px 0 0!important}
.views-prompt{font-size:.82rem!important;margin:10px 0 0!important}
.views-modes{border:0;margin:0 0 10px;padding:0;min-width:0}
.views-modes .check{margin:6px 0}
.views-missing{margin:6px 0 4px 26px}
.views-practice .primary{width:100%}
.views-words dl{margin:0;font-size:.82rem;line-height:1.45;color:var(--muted)}
.views-words dt{font-weight:650;color:var(--ink);margin-top:8px}
.views-words dt:first-child{margin-top:0}
.views-words dd{margin:1px 0 0}

/* Line-style legend on the dark viewport. */
.views-legend{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center;background:#0f2a22cc;border-radius:8px;padding:6px 10px}
.views-key{display:inline-flex;align-items:center;gap:6px;color:#dce8e4}
.views-key svg{width:28px;height:10px;display:block;color:#e8f2ef}
.views-help{background:#0f2a22cc;border-radius:8px;padding:6px 10px}
.views-bottom-end{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px}
/* The way into practice, always on the 3D view. */
.views-go{background:var(--accent);border-color:#a7d867;color:var(--accent-ink);font-weight:700}
.views-go:hover{background:#d3f7a8}

/* Shown over the viewport while the 3D object is hidden (missing-view practice). */
.views-hidden{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:24px;text-align:center}
.views-hidden p{max-width:22rem;margin:0;font-size:.95rem;line-height:1.45;color:#e6f0ec;background:#0f2a22d9;padding:10px 14px;border-radius:10px}

/* Practice sheet. Stacked by default: header, tools, paper, feedback. */
.sheet{display:flex;flex-direction:column;gap:8px;height:100%;min-height:0;padding:10px 12px 12px}
.sheet-head{display:flex;align-items:center;gap:6px 12px}
.sheet-task{flex:1;min-width:0;margin:0;font-size:.8rem;line-height:1.35;color:var(--muted)}
.sheet-head button{flex-shrink:0;font-size:.8rem;padding:6px 10px}
.sheet-tools{display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center}
.sheet-group{display:flex;flex-wrap:wrap;gap:4px}
.sheet-tools button{padding:5px 8px;font-size:.78rem;min-height:36px}
.sheet-tools .line-type{display:inline-flex;align-items:center;gap:5px}
.sheet-tools .line-type svg{width:20px;height:10px;display:block}
.sheet-paper{position:relative;flex:1 1 auto;min-height:220px;border:1px solid #cfdcdf;border-radius:8px;overflow:hidden;background:#fff}
.sheet-paper canvas{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none;cursor:crosshair}
.sheet-paper:has(canvas:focus-visible){outline:3px solid var(--focus);outline-offset:2px}
.sheet-paper canvas:focus-visible{outline:none}
.sheet-kbd{margin:0;font-size:.8rem;line-height:1.4;color:#1d5e8c;font-weight:600}
.sheet-status{font-size:.82rem;line-height:1.45;color:#33454b;flex-shrink:0}
.sheet-status p{margin:0}
.sheet-status .sheet-pass{color:#2f5d16;font-weight:650;background:#eef6e5;border-radius:6px;padding:6px 9px}
.sheet-status .sheet-summary{font-weight:600}
/* Feedback grouped by view: the view's name in bold, then what to fix there. */
.sheet-messages{margin:6px 0 0;padding:0;list-style:none}
.sheet-messages>li{margin:6px 0 0}
.sheet-messages b{color:var(--ink)}
.sheet-messages .sheet-view-ok b{color:#2f5d16}
.sheet-messages ul{margin:2px 0 0;padding-left:18px}
.sheet-messages ul li{margin:1px 0}
.sheet-key{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:4px 14px;font-size:.78rem;color:#4d6067}
.sheet-key li{display:inline-flex;align-items:center;gap:6px}
.sheet-key .key-line{display:inline-block;width:24px;height:0;border-top:3px solid}
.key-answer .key-line{border-color:#1663c799}
.key-extra .key-line{border-top-style:dashed;border-color:#e06a12}
.key-dot{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:50%;border:2px solid #e06a12;background:#fff4d6;color:#8a3b00;font-weight:800;font-size:.7rem}

/* Side by side with the 3D view (same query as style.css): the paper takes the
   full height and the tools and feedback stand in a column beside it, so
   Check never shrinks the drawing and long feedback scrolls in place. */
@media(min-width:901px) and (min-height:520px){
  .sheet{display:grid;grid-template-columns:minmax(0,1fr) clamp(220px,36%,268px);grid-template-rows:auto auto auto minmax(0,1fr);
    grid-template-areas:"head head" "paper tools" "paper kbd" "paper status";gap:8px 14px}
  .sheet-head{grid-area:head}
  .sheet-tools{grid-area:tools;gap:8px;align-content:flex-start}
  .sheet-tools button{padding:5px 7px}
  .sheet-paper{grid-area:paper;min-height:0}
  .sheet-kbd{grid-area:kbd}
  .sheet-status{grid-area:status;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding-right:2px;
    /* A soft shade at the top or bottom edge says there is more feedback to scroll to. The white
       covers move with the text and hide the shade once the end is reached. */
    background:linear-gradient(#fff 40%,#fff0) top/100% 26px no-repeat local,linear-gradient(#fff0,#fff 60%) bottom/100% 26px no-repeat local,
      radial-gradient(farthest-side at 50% 0,#1f303738,#1f303700) top/100% 12px no-repeat scroll,
      radial-gradient(farthest-side at 50% 100%,#1f303738,#1f303700) bottom/100% 12px no-repeat scroll}
}
@media(max-width:900px),(max-height:519px){
  .sheet-paper{flex:none}
}
