/* r206: scoped table-edition controls, inheriting the selected student theme. */
/* Keep the moving identity watermark visible above every student-side dialog. */
body.student-page .app-watermark { z-index:2147483646 !important; }
.student-edition-tools { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:6px; padding:4px 0 10px; font-size:12px; }
.student-edition-tabs { display:flex; min-width:0; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:none; white-space:nowrap; touch-action:pan-y; }
.student-edition-tabs::-webkit-scrollbar { display:none; }
.student-edition-tools button { min-height:44px; padding:8px 9px; border:0; border-radius:12px; font:inherit; color:var(--theme-muted,#847969); background:transparent; }
.student-edition-tab { flex:0 0 auto; min-width:44px; position:relative; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; cursor:grab; transition:transform .16s ease,background-color .16s ease,color .16s ease,opacity .16s ease; }
.student-edition-tab[aria-selected="true"] { color:var(--theme-accent-strong,#8a5600); background:var(--theme-accent-soft,#fff0cd); }
.student-edition-tab.is-pressing { transform:scale(.98); }
.student-edition-tab.is-dragging { opacity:.24; cursor:grabbing; }
.student-edition-tools.is-reordering,.student-edition-tools.is-reordering * { cursor:grabbing; }
.student-edition-tools .student-edition-create { color:var(--theme-accent-strong,#8a5600); font-weight:700; white-space:nowrap; }
.student-edition-tools button:focus-visible { outline:2px solid var(--theme-accent,#e9a22d); outline-offset:2px; }
.student-edition-drag-ghost { position:fixed; z-index:18010; display:grid; place-items:center; min-height:44px; margin:0; border:0; border-radius:12px; padding:8px 9px; pointer-events:none; color:var(--theme-muted,#847969); background:var(--theme-surface,#fffefb); box-shadow:0 10px 28px rgba(28,20,11,.24); font:inherit; font-size:12px; font-weight:inherit; white-space:nowrap; will-change:transform; }
.student-edition-drag-ghost[aria-selected="true"] { color:var(--theme-accent-strong,#8a5600); background:var(--theme-accent-soft,#fff0cd); }
.student-edition-sr-only { position:absolute !important; width:1px !important; height:1px !important; overflow:hidden !important; clip:rect(0 0 0 0) !important; clip-path:inset(50%) !important; white-space:nowrap !important; }
.student-edition-study-panel { min-width:0; }
.student-edition-study-state { display:grid; gap:7px; min-height:180px; place-content:center; margin:0; border:1px dashed var(--theme-border,#eadcc7); border-radius:20px; padding:28px 22px; color:var(--theme-muted,#847969); background:var(--theme-surface-soft,#fffaf0); text-align:center; }
.student-edition-study-state strong { color:var(--theme-text,#3d3326); font-size:17px; }
.student-edition-study-state span { max-width:25em; line-height:1.7; }
.student-edition-overlay { position:fixed; inset:0; z-index:18000; color:var(--theme-text,#3d3326); font-size:15px; }
.student-edition-backdrop { position:absolute; inset:0; background:rgba(20,17,13,.4); }
.student-edition-sheet { position:absolute; bottom:0; left:50%; transform:translateX(-50%); width:min(100%,760px); max-height:92vh; max-height:92dvh; display:flex; flex-direction:column; overflow:hidden; background:var(--theme-surface,#fffefb); border-radius:26px 26px 0 0; box-shadow:0 -10px 50px #0002; }
.student-edition-sheet * { box-sizing:border-box; }
.student-edition-sheet header { display:flex; justify-content:space-between; gap:16px; padding:20px 20px 12px; flex-shrink:0; border-bottom:1px solid var(--theme-border,#eadcc7); }
.student-edition-sheet h2 { font-size:20px; margin:0; color:inherit; }
.student-edition-sheet header p { margin:6px 0 0; font-size:12px; line-height:1.5; color:var(--theme-muted,#847969); }
.student-edition-sheet button { min-height:44px; min-width:44px; border:1px solid var(--theme-border,#eadcc7); background:var(--theme-surface-raised,#fffaf0); border-radius:12px; padding:9px 13px; color:inherit; font:inherit; cursor:pointer; }
.student-edition-sheet button:disabled { opacity:.4; cursor:default; }
.student-edition-sheet button:focus-visible,.student-edition-sheet input:focus-visible,.student-edition-sheet textarea:focus-visible,.student-edition-sheet summary:focus-visible { outline:2px solid var(--theme-accent,#e9a22d); outline-offset:2px; }
.student-edition-sheet .student-edition-close { background:transparent; border:0; font-size:26px; align-self:flex-start; }
.student-edition-content { padding:18px 20px; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; min-height:0; }
.student-edition-message { padding:0 20px; color:var(--theme-accent-strong,#8a5600); font-size:13px; line-height:1.6; flex-shrink:0; }
.student-edition-message:not(:empty) { padding-top:10px; padding-bottom:10px; background:var(--theme-accent-soft,#fff0cd); }
.student-edition-choices,.student-edition-shared-list { display:grid; gap:12px; }
.student-edition-choices button,.student-edition-shared-list button { text-align:left; padding:18px; display:grid; gap:7px; }
.student-edition-choices span,.student-edition-shared-list span,.student-edition-hint { font-size:12px; color:var(--theme-muted,#847969); line-height:1.6; }
.student-edition-field { display:grid; gap:8px; margin-bottom:18px; font-weight:600; }
.student-edition-sheet input:not([type=radio]),.student-edition-sheet textarea { width:100%; min-height:44px; border:1px solid var(--theme-border,#eadcc7); border-radius:10px; padding:11px; background:var(--theme-surface,#fffefb); color:inherit; font:inherit; line-height:1.6; resize:vertical; }
.student-edition-paste { margin:0 0 18px; border:1px dashed var(--theme-border,#eadcc7); border-radius:14px; padding:0 12px 12px; background:var(--theme-surface-soft,#fff0cd); }
.student-edition-paste summary { cursor:pointer; min-height:48px; padding:14px 0; font-size:14px; font-weight:600; }
.student-edition-paste textarea { margin-bottom:10px; }
.student-edition-row { border:1px solid var(--theme-border,#eadcc7); border-radius:16px; padding:12px; margin-bottom:12px; }
.student-edition-row-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; color:var(--theme-muted,#847969); font-size:12px; }
.student-edition-row-heading>div { display:flex; gap:4px; }
.student-edition-row-heading button { background:transparent; border:0; padding:6px 8px; }
.student-edition-row-fields { display:grid; grid-template-columns:minmax(100px,1fr) minmax(0,2.5fr); gap:12px; }
.student-edition-row-fields label { display:grid; align-content:start; gap:6px; font-size:13px; }
.student-edition-sheet .student-edition-add { width:100%; border-style:dashed; margin-bottom:20px; background:transparent; }
.student-edition-visibility { padding:14px; border:1px solid var(--theme-border,#eadcc7); border-radius:14px; margin:0; }
.student-edition-visibility legend { font-weight:600; font-size:14px; }
.student-edition-visibility label { display:inline-flex; align-items:center; gap:8px; min-height:44px; margin-right:18px; }
.student-edition-visibility input { width:18px; height:18px; accent-color:var(--theme-accent,#e9a22d); }
.student-edition-visibility p { margin:6px 0 0; font-size:12px; line-height:1.6; color:var(--theme-muted,#847969); }
.student-edition-sheet footer { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-shrink:0; border-top:1px solid var(--theme-border,#eadcc7); padding:12px 20px max(14px,env(safe-area-inset-bottom)); background:var(--theme-surface,#fffefb); }
.student-edition-sheet .student-edition-primary { background:var(--theme-accent,#e9a22d); color:var(--theme-on-accent,#3a2508); border-color:transparent; font-weight:700; }
.student-edition-sheet .student-edition-danger { color:var(--theme-muted,#847969); background:transparent; }
.student-edition-empty { padding:24px 0; line-height:1.8; }
.student-edition-readonly { margin-top:16px; border:1px solid var(--theme-border,#eadcc7); border-radius:14px; overflow:hidden; }
.student-edition-readonly table { border-collapse:collapse; width:100%; table-layout:fixed; }
.student-edition-readonly th,.student-edition-readonly td { padding:16px 12px; text-align:left; vertical-align:top; border-bottom:1px solid var(--theme-border,#eadcc7); overflow-wrap:anywhere; white-space:pre-wrap; line-height:1.7; }
.student-edition-readonly th { width:28%; background:var(--theme-surface-soft,#fff0cd); }
.student-edition-readonly tr:last-child>* { border-bottom:0; }
.student-edition-source { white-space:pre-wrap; overflow-wrap:anywhere; font-size:13px; line-height:1.7; }
.student-edition-decision { position:fixed; inset:0; z-index:4; display:grid; place-items:center; padding:24px; }
.student-edition-decision,.student-edition-decision * { box-sizing:border-box; }
.student-edition-decision-backdrop { position:absolute; inset:0; background:rgba(20,17,13,.28); backdrop-filter:blur(3px); -webkit-backdrop-filter:blur(3px); }
.student-edition-decision-card { position:relative; width:min(100%,400px); padding:30px 24px 22px; border:1px solid color-mix(in srgb,var(--theme-border,#eadcc7) 78%,transparent); border-radius:24px; background:var(--theme-surface,#fffefb); box-shadow:0 24px 70px rgba(28,20,11,.24); text-align:center; animation:student-edition-decision-in .18s ease-out; }
.student-edition-decision-card h3 { margin:0; color:var(--theme-text,#3d3326); font-size:20px; line-height:1.35; letter-spacing:.01em; }
.student-edition-decision-card p { margin:10px auto 22px; max-width:31em; color:var(--theme-muted,#847969); font-size:14px; line-height:1.7; }
.student-edition-decision-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.student-edition-decision-actions button { min-height:48px; border:1px solid var(--theme-border,#eadcc7); border-radius:14px; padding:10px 14px; color:var(--theme-text,#3d3326); background:var(--theme-surface-raised,#fffaf0); font:inherit; font-weight:700; cursor:pointer; }
.student-edition-decision-actions button:focus-visible { outline:2px solid var(--theme-accent,#e9a22d); outline-offset:2px; }
.student-edition-decision-actions .student-edition-decision-confirm { border-color:transparent; color:var(--theme-on-accent,#3a2508); background:var(--theme-accent,#e9a22d); }
.student-edition-decision.is-danger .student-edition-decision-confirm { color:#fff; background:#a94a43; }
@keyframes student-edition-decision-in { from { opacity:0; transform:translateY(8px) scale(.98); } to { opacity:1; transform:none; } }
@media(prefers-reduced-motion:reduce) { .student-edition-decision-card { animation:none; } .student-edition-tab { transition:none; } .student-edition-drag-ghost { transition:none; } }
@media(max-width:480px) { .student-edition-content { padding:14px; } .student-edition-sheet header { padding:16px 14px 10px; } .student-edition-sheet footer { padding-left:14px; padding-right:14px; } .student-edition-row-fields { grid-template-columns:minmax(80px,1fr) minmax(0,2fr); gap:8px; } .student-edition-sheet input:not([type=radio]),.student-edition-sheet textarea { font-size:16px; padding:9px; } .student-edition-decision { align-items:end; padding:16px 14px max(16px,env(safe-area-inset-bottom)); } .student-edition-decision-card { width:100%; padding:24px 18px 18px; border-radius:24px; } }
