/* ===== 學習單產生器：左邊設定、右邊預覽 ===== */
.editor { display: grid; grid-template-columns: 360px minmax(0, 1fr); align-items: start; min-height: calc(100vh - 56px); }
.panel {
  position: sticky; top: 56px; max-height: calc(100vh - 56px); overflow: auto;
  background: var(--card); border-right: 2px solid var(--ink); padding: 16px 16px 40px;
}
.panel h2 { font-size: 20px; font-weight: normal; margin: 0 0 4px; }
.panel .lead { font-size: 13px; color: var(--ink-soft); line-height: 1.8; margin: 0 0 12px; }
.panel .actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 14px; }
.panel .weekly-note { font-size: 13px; line-height: 1.7; background: var(--accent-50); border-radius: 10px; padding: 8px 10px; margin-bottom: 14px; }
.panel .weekly-note a { color: var(--accent); }
.f { margin-bottom: 14px; }
.f-label { display: block; font-size: 14px; margin-bottom: 4px; color: var(--ink); }
.f-hint { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.6; }
.f input[type=text], .f input[type=number], .f textarea, .f select, .f-rows input {
  width: 100%; font: inherit; font-size: 15px; border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 8px; background: #fff; color: var(--ink);
}
.f textarea { resize: vertical; line-height: 1.6; }
.f input:focus, .f textarea:focus, .f select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.f-checks { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 15px; }
.f-checks label { display: inline-flex; align-items: center; gap: 4px; }
.f-rows table { width: 100%; border-collapse: collapse; }
.f-rows th { font-size: 12px; font-weight: normal; color: var(--muted); text-align: left; padding: 0 2px 2px; }
.f-rows td { padding: 2px; }
.f-rows input { padding: 4px 6px; font-size: 14px; }
.f-x { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 14px; }
.f-add { margin-top: 4px; border: 1.5px dashed var(--line); background: none; border-radius: 8px; padding: 3px 10px; cursor: pointer; font-size: 13px; }
.editor .sheet-stage { min-height: calc(100vh - 56px); }
.site-nav { display: flex; gap: 14px; font-size: 15px; }
.site-nav a { text-decoration: none; border-bottom: 1.5px solid var(--line); }
.site-nav a:hover, .site-nav a.on { border-color: var(--ink); }
@media (max-width: 900px) {
  .editor { grid-template-columns: 1fr; }
  .panel { position: static; max-height: none; border-right: 0; border-bottom: 2px solid var(--ink); }
}
@media print {
  .panel { display: none !important; }
  .editor { display: block; }
}
