/* 學生資訊作品展示 v3 — 前台樣式 (全部以 .fsw 為範圍，避免影響佈景) */
.fsw {
  --fsw-accent: #4f46e5;
  --fsw-accent-strong: #3730a3;
  --fsw-accent-soft: #eef2ff;
  --fsw-ink: #1f2937;
  --fsw-ink-2: #4b5563;
  --fsw-ink-3: #6b7280;
  --fsw-line: #e5e7eb;
  --fsw-surface: #ffffff;
  --fsw-surface-2: #f8fafc;
  --fsw-radius: 14px;
  --fsw-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --fsw-shadow-lg: 0 12px 28px -8px rgba(15, 23, 42, .25);
  color: var(--fsw-ink);
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 24px;
}
.fsw *, .fsw *::before, .fsw *::after { box-sizing: border-box; }
.fsw a { color: var(--fsw-accent); }
.fsw h1, .fsw h2, .fsw h3 { margin: 0; line-height: 1.3; color: var(--fsw-ink); }
.fsw p { margin: 0; }
.fsw .fsw-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fsw :focus-visible { outline: 3px solid var(--fsw-accent); outline-offset: 2px; }

/* ---------- 按鈕 ---------- */
.fsw .fsw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 14px; line-height: 1.2;
  cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.fsw .fsw-btn-primary { background: var(--fsw-accent); color: #fff !important; }
.fsw .fsw-btn-primary:hover { background: var(--fsw-accent-strong); }
.fsw .fsw-btn-ghost { background: var(--fsw-surface); color: var(--fsw-ink) !important; border-color: var(--fsw-line); }
.fsw .fsw-btn-ghost:hover { background: var(--fsw-surface-2); border-color: #cbd5e1; }
.fsw .fsw-btn-danger { background: #dc2626; color: #fff !important; }
.fsw .fsw-btn-danger:hover { background: #b91c1c; }
.fsw .fsw-btn-success { background: #15803d; color: #fff !important; }
.fsw .fsw-btn-success:hover { background: #166534; }
.fsw .fsw-btn-sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.fsw .fsw-btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- 頁首 ---------- */
.fsw-hero {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 4px 0 16px; margin-bottom: 16px; border-bottom: 2px solid var(--fsw-line);
}
.fsw-title { font-size: 26px; font-weight: 800; letter-spacing: .01em; }
.fsw-title .fa { color: var(--fsw-accent); margin-right: 8px; }
.fsw-sub { margin-top: 6px !important; color: var(--fsw-ink-2); font-size: 15px; }
.fsw-sub strong { color: var(--fsw-accent-strong); }
.fsw-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- 篩選列 ---------- */
.fsw-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  background: var(--fsw-surface); border: 1px solid var(--fsw-line); border-radius: var(--fsw-radius);
  padding: 12px 14px; margin-bottom: 12px; box-shadow: var(--fsw-shadow);
}
.fsw-field { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--fsw-ink-2); font-weight: 600; }
.fsw select, .fsw input[type=search], .fsw input[type=text], .fsw input[type=number], .fsw input[type=url], .fsw textarea {
  font: inherit; font-size: 14px; color: var(--fsw-ink); background: #fff;
  border: 1px solid #cbd5e1; border-radius: 9px; padding: 7px 10px; min-height: 36px; max-width: 100%;
}
.fsw select:focus, .fsw input:focus, .fsw textarea:focus { border-color: var(--fsw-accent); box-shadow: 0 0 0 3px rgba(79, 70, 229, .15); outline: none; }
.fsw-year-select { font-weight: 700; color: var(--fsw-accent-strong) !important; border-color: #a5b4fc !important; background: var(--fsw-accent-soft) !important; }
.fsw-seg { display: inline-flex; border: 1px solid #cbd5e1; border-radius: 9px; overflow: hidden; }
.fsw-seg a { padding: 7px 12px; font-size: 14px; color: var(--fsw-ink-2); text-decoration: none; border-left: 1px solid #cbd5e1; background: #fff; }
.fsw-seg a:first-child { border-left: 0; }
.fsw-seg a:hover { background: var(--fsw-surface-2); }
.fsw-seg a.is-active { background: var(--fsw-accent); color: #fff; font-weight: 700; }
.fsw-search { display: inline-flex; gap: 6px; margin-left: auto; flex: 1 1 220px; max-width: 360px; }
.fsw-search input { flex: 1; min-width: 0; }

.fsw-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; }
.fsw-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px;
  background: #fff; border: 1px solid var(--fsw-line); color: var(--fsw-ink-2) !important; font-size: 14px; font-weight: 600;
  text-decoration: none !important;
}
.fsw-chip:hover { border-color: #a5b4fc; color: var(--fsw-accent-strong) !important; }
.fsw-chip.is-active { background: var(--fsw-accent-soft); border-color: #a5b4fc; color: var(--fsw-accent-strong) !important; }
.fsw-chip .fsw-count { font-weight: 500; color: var(--fsw-ink-3); font-size: 12px; }

/* ---------- 作品格 ---------- */
.fsw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.fsw-card {
  position: relative; display: flex; flex-direction: column; background: var(--fsw-surface);
  border: 1px solid var(--fsw-line); border-radius: var(--fsw-radius); overflow: hidden; box-shadow: var(--fsw-shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
}
.fsw-card:hover { transform: translateY(-3px); box-shadow: var(--fsw-shadow-lg); }
.fsw-card-link { display: flex; flex-direction: column; flex: 1; color: inherit !important; text-decoration: none !important; }
.fsw-thumb { position: relative; aspect-ratio: 4 / 3; background: #f1f5f9; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.fsw-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fsw-thumb > .fa { font-size: 54px; opacity: .55; }
.fsw-thumb .fsw-play {
  position: absolute; inset: auto 10px 10px auto; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(17, 24, 39, .72); color: #fff; display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(.9); transition: opacity .18s, transform .18s;
}
.fsw-card:hover .fsw-play, .fsw-card-link:focus-visible .fsw-play { opacity: 1; transform: scale(1); }
.fsw-badge {
  position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 7px; font-size: 12px; font-weight: 700; background: #fff; border: 1px solid;
}
.fsw-ribbon { position: absolute; top: 8px; left: 8px; padding: 3px 9px; border-radius: 7px; font-size: 12px; font-weight: 700; background: #f59e0b; color: #fff; }
.fsw-hidden-tag { position: absolute; inset: 0; background: rgba(255, 255, 255, .72); display: flex; align-items: center; justify-content: center; }
.fsw-hidden-tag span { background: #111827; color: #fff; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }

/* 類型配色 */
.fsw-t-scratch { background: #fff4e6; color: #c2410c; }   .fsw-t-scratch .fsw-badge { color: #9a3412; border-color: #fdba74; background: #fff7ed; }
.fsw-t-image   { background: #e7f5ff; color: #1d4ed8; }   .fsw-t-image   .fsw-badge { color: #1e40af; border-color: #93c5fd; background: #eff6ff; }
.fsw-t-audio   { background: #f3e8ff; color: #7e22ce; }   .fsw-t-audio   .fsw-badge { color: #6b21a8; border-color: #d8b4fe; background: #faf5ff; }
.fsw-t-video   { background: #ffe4e6; color: #be123c; }   .fsw-t-video   .fsw-badge { color: #9f1239; border-color: #fda4af; background: #fff1f2; }
.fsw-t-html    { background: #ccfbf1; color: #0f766e; }   .fsw-t-html    .fsw-badge { color: #115e59; border-color: #5eead4; background: #f0fdfa; }
.fsw-t-pdf     { background: #fee2e2; color: #b91c1c; }   .fsw-t-pdf     .fsw-badge { color: #991b1b; border-color: #fca5a5; background: #fef2f2; }
.fsw-t-link    { background: #e0f2fe; color: #0369a1; }   .fsw-t-link    .fsw-badge { color: #075985; border-color: #7dd3fc; background: #f0f9ff; }
.fsw-t-document{ background: #f1f5f9; color: #475569; }   .fsw-t-document .fsw-badge { color: #334155; border-color: #cbd5e1; background: #f8fafc; }

.fsw-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.fsw-card-title { font-size: 16px !important; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fsw-author { font-size: 13.5px; color: var(--fsw-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fsw-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: auto; padding-top: 8px; font-size: 12.5px; color: var(--fsw-ink-3); }
.fsw-meta .fa { margin-right: 3px; }
.fsw-tag { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 6px; font-weight: 700; font-size: 11.5px; border: 1px solid; }
.fsw-tag-ai { color: #86198f; background: #fdf4ff; border-color: #f0abfc; }
.fsw-tag-star { color: #854d0e; background: #fefce8; border-color: #fde047; }
.fsw-card-tools { display: flex; gap: 6px; padding: 0 14px 12px; }
.fsw-card-tools .fsw-btn { flex: 1; }

/* 批次管理 */
.fsw-check { position: absolute; z-index: 3; top: 8px; left: 8px; display: none; width: 28px; height: 28px; background: #fff; border-radius: 8px; box-shadow: var(--fsw-shadow); align-items: center; justify-content: center; }
.fsw-check input { width: 18px; height: 18px; margin: 0; cursor: pointer; }
.fsw.is-batch .fsw-check { display: flex; }
.fsw.is-batch .fsw-card-tools { display: none; }
.fsw.is-batch .fsw-card.is-selected { border-color: #dc2626; box-shadow: 0 0 0 2px #fecaca; }
.fsw-batchbar {
  display: none; position: sticky; top: 8px; z-index: 20; align-items: center; flex-wrap: wrap; gap: 8px 12px;
  background: #1f2937; color: #fff; padding: 10px 14px; border-radius: 12px; margin-bottom: 14px; box-shadow: var(--fsw-shadow-lg);
}
.fsw.is-batch .fsw-batchbar { display: flex; }
.fsw-batchbar .fsw-spacer { flex: 1; }
.fsw-batchbar label { color: #fff; display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }

/* 空狀態 */
.fsw-empty { text-align: center; padding: 48px 20px; background: var(--fsw-surface); border: 1px dashed #cbd5e1; border-radius: var(--fsw-radius); }
.fsw-empty .fa { font-size: 46px; color: #94a3b8; margin-bottom: 10px; }
.fsw-empty h3 { font-size: 18px; margin-bottom: 6px; }
.fsw-empty p { color: var(--fsw-ink-2); }
.fsw-empty .fsw-chips { justify-content: center; margin: 16px 0 0; }

.fsw-pagenav { margin-top: 22px; text-align: center; }

/* ---------- 預覽視窗 ---------- */
dialog.fsw-dialog {
  width: min(1040px, 96vw); max-height: 94vh; padding: 0; border: 0; border-radius: 16px;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, .45); color: var(--fsw-ink); background: #fff; overflow: hidden;
}
dialog.fsw-dialog[open] { display: flex; flex-direction: column; }
dialog.fsw-dialog::backdrop { background: rgba(15, 23, 42, .72); }
.fsw-d-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--fsw-line); background: var(--fsw-surface-2); }
.fsw-d-title { font-size: 20px !important; font-weight: 800; }
.fsw-d-sub { color: var(--fsw-ink-2); font-size: 14px; margin-top: 2px !important; }
.fsw-d-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.fsw-d-close { width: 38px; height: 38px; padding: 0 !important; border-radius: 50% !important; font-size: 18px !important; }
.fsw-d-scroll { overflow-y: auto; flex: 1; }
.fsw-d-body { background: #0f172a0d; padding: 16px; }
.fsw-d-info { padding: 14px 18px 18px; display: grid; gap: 10px; }

/* 共用：作品資訊區 */
.fsw-info-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--fsw-ink-3); font-size: 13.5px; }
.fsw-info-meta .fa { margin-right: 4px; }
.fsw-info-box { border-radius: 12px; padding: 12px 14px; border: 1px solid var(--fsw-line); background: #fff; }
.fsw-info-box h4 { margin: 0 0 4px; font-size: 14px; font-weight: 800; color: var(--fsw-ink); }
.fsw-info-box .fsw-pre { white-space: pre-wrap; word-break: break-word; }
.fsw-info-ai { background: #fdf4ff; border-color: #f5d0fe; color: #701a75; }
.fsw-info-ai h4 { color: #701a75; }
.fsw-info-comment { background: #fefce8; border-color: #fde68a; color: #713f12; }
.fsw-info-comment h4 { color: #854d0e; }

/* ---------- 播放器 ---------- */
.fsw-player { width: 100%; }
.fsw-stage-wrap { width: 100%; max-width: min(100%, calc(64vh * 4 / 3)); margin: 0 auto; }
.fsw-stage {
  position: relative; width: 100%; aspect-ratio: 4 / 3; background: #fff; border-radius: 10px; overflow: hidden;
  border: 1px solid #cbd5e1; outline: none;
}
.fsw-stage:fullscreen { border-radius: 0; border: 0; background: #000; }
.fsw-stage .sc-root { position: absolute; inset: 0; }
.fsw-stage-overlay {
  position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .55); color: var(--fsw-ink); font-weight: 700; text-align: center; padding: 16px;
}
.fsw-stage-overlay.is-dark { background: rgba(15, 23, 42, .35); }
.fsw-flag-big {
  width: 92px; height: 92px; border-radius: 50%; border: 0; cursor: pointer; background: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25); display: flex; align-items: center; justify-content: center;
  transition: transform .15s;
}
.fsw-flag-big:hover { transform: scale(1.06); }
.fsw-flag-big svg { width: 50px; height: 50px; }
.fsw-spinner { width: 42px; height: 42px; border-radius: 50%; border: 5px solid #c7d2fe; border-top-color: var(--fsw-accent); animation: fsw-spin 1s linear infinite; }
@keyframes fsw-spin { to { transform: rotate(360deg); } }
.fsw-stage-bar { display: flex; align-items: center; gap: 6px; padding: 8px 2px 0; }
.fsw-stage-bar .fsw-spacer { flex: 1; }
.fsw-icon-btn {
  width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--fsw-line); background: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; color: var(--fsw-ink-2);
}
.fsw-icon-btn:hover { background: var(--fsw-surface-2); }
.fsw-icon-btn svg { width: 22px; height: 22px; }
.fsw-icon-btn.is-running { background: #dcfce7; border-color: #86efac; }
.fsw-hint { font-size: 12.5px; color: var(--fsw-ink-3); }
.fsw-fallback { background: #fff7ed; border: 1px solid #fdba74; color: #7c2d12; border-radius: 10px; padding: 14px; margin-top: 10px; }
.fsw-fallback .fsw-btn { margin: 8px 6px 0 0; }

.fsw-frame { width: 100%; height: min(70vh, 640px); border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; display: block; }
.fsw-frame-169 { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 10px; background: #000; display: block; }
.fsw-scratch-embed { width: 100%; max-width: 640px; aspect-ratio: 485 / 402; height: auto; border: 0; display: block; margin: 0 auto; border-radius: 10px; background: #fff; }
.fsw-img-wrap { position: relative; height: min(68vh, 640px); overflow: auto; background: #e2e8f0; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.fsw-img-wrap img { max-width: 100%; max-height: 100%; transition: transform .15s; transform-origin: center center; }
.fsw-img-wrap.is-zoomed { display: block; }
.fsw-img-wrap.is-zoomed img { max-width: none; max-height: none; }
.fsw-zoom { position: absolute; top: 10px; right: 10px; z-index: 3; display: flex; gap: 4px; background: rgba(255, 255, 255, .92); padding: 4px; border-radius: 10px; box-shadow: var(--fsw-shadow); }
.fsw-zoom-sticky { position: sticky; float: right; }
.fsw-audio { max-width: 520px; margin: 18px auto; background: #fff; border-radius: 14px; padding: 26px; text-align: center; border: 1px solid var(--fsw-line); }
.fsw-audio .fa { font-size: 48px; color: #7e22ce; margin-bottom: 12px; display: block; }
.fsw-audio audio { width: 100%; }
.fsw-video { width: 100%; max-height: 66vh; border-radius: 10px; background: #000; display: block; }
.fsw-doc { text-align: center; padding: 40px 16px; }
.fsw-doc .fa { font-size: 64px; color: #64748b; margin-bottom: 12px; }
.fsw-frame-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }

/* ---------- 單一作品頁 ---------- */
.fsw-crumb { font-size: 14px; color: var(--fsw-ink-3); margin-bottom: 10px; }
.fsw-crumb a { text-decoration: none; }
.fsw-view-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.fsw-view-title { font-size: 26px !important; font-weight: 800; }
.fsw-view-player { background: var(--fsw-surface-2); border: 1px solid var(--fsw-line); border-radius: var(--fsw-radius); padding: 16px; margin-bottom: 16px; }
.fsw-view-info { display: grid; gap: 12px; }
.fsw-related { margin-top: 28px; }
.fsw-related h2 { font-size: 18px; margin-bottom: 12px; }

/* ---------- 上傳表單 ---------- */
.fsw-form { display: grid; gap: 16px; }
.fsw-panel { background: #fff; border: 1px solid var(--fsw-line); border-radius: var(--fsw-radius); box-shadow: var(--fsw-shadow); }
.fsw-panel-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--fsw-line); }
.fsw-panel-head h2 { font-size: 17px !important; font-weight: 800; }
.fsw-step { width: 26px; height: 26px; border-radius: 50%; background: var(--fsw-accent); color: #fff; font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.fsw-panel-body { padding: 16px 18px; display: grid; gap: 14px; }
.fsw-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.fsw-label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 5px; color: var(--fsw-ink); }
.fsw-label small, .fsw-help { font-weight: 400; color: var(--fsw-ink-3); font-size: 13px; }
.fsw-help { display: block; margin-top: 4px; }
.fsw-input-full { width: 100%; }
.fsw-req { color: #dc2626; }

.fsw-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.fsw-tab {
  flex: 1 1 160px; display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px;
  border: 2px solid var(--fsw-line); background: #fff; cursor: pointer; font: inherit; text-align: left; color: var(--fsw-ink);
}
.fsw-tab .fa { font-size: 22px; width: 26px; text-align: center; color: var(--fsw-ink-3); }
.fsw-tab b { display: block; font-size: 14.5px; }
.fsw-tab span { font-size: 12.5px; color: var(--fsw-ink-3); }
.fsw-tab[aria-selected=true] { border-color: var(--fsw-accent); background: var(--fsw-accent-soft); }
.fsw-tab[aria-selected=true] .fa { color: var(--fsw-accent); }

.fsw-drop {
  position: relative; border: 2px dashed #a5b4fc; background: var(--fsw-accent-soft); border-radius: 14px;
  padding: 26px 16px; text-align: center; transition: background .15s, border-color .15s; cursor: pointer;
}
.fsw-drop:hover, .fsw-drop.is-over { background: #e0e7ff; border-color: var(--fsw-accent); }
.fsw-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.fsw-drop .fa { font-size: 38px; color: var(--fsw-accent); }
.fsw-drop-title { font-size: 16px; font-weight: 800; color: var(--fsw-accent-strong); margin-top: 6px !important; }
.fsw-drop-sub { font-size: 13px; color: var(--fsw-ink-2); margin-top: 4px !important; }

.fsw-filecard { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--fsw-line); border-radius: 12px; background: var(--fsw-surface-2); }
.fsw-filecard-thumb { width: 84px; height: 63px; border-radius: 8px; background: #e2e8f0; flex: none; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.fsw-filecard-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fsw-filecard-thumb .fa { font-size: 26px; color: #64748b; }
.fsw-filecard-info { flex: 1; min-width: 0; }
.fsw-filecard-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fsw-filecard-meta { font-size: 13px; color: var(--fsw-ink-3); }
.fsw-ok { color: #15803d; font-weight: 700; }
.fsw-warn { color: #b45309; font-weight: 700; }
.fsw-bad { color: #b91c1c; font-weight: 700; }

.fsw-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.fsw-checks label {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--fsw-line); border-radius: 999px;
  cursor: pointer; font-size: 14px; background: #fff; user-select: none;
}
.fsw-checks input { margin: 0; }
.fsw-checks label:has(input:checked) { background: var(--fsw-accent-soft); border-color: #a5b4fc; color: var(--fsw-accent-strong); font-weight: 700; }

.fsw-authors { display: grid; gap: 8px; }
.fsw-author-row { display: grid; grid-template-columns: 110px 80px minmax(120px, 1fr) 38px; gap: 8px; align-items: center; }
.fsw-author-row input { width: 100%; }
.fsw-author-head { font-size: 12.5px; color: var(--fsw-ink-3); font-weight: 700; }
.fsw-link-btn { background: none; border: 0; padding: 0; color: var(--fsw-accent); font: inherit; font-weight: 700; cursor: pointer; font-size: 14px; }
.fsw-link-btn:hover { text-decoration: underline; }
.fsw-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.fsw-suggest button { font: inherit; font-size: 12.5px; padding: 3px 9px; border-radius: 999px; border: 1px solid #f0abfc; background: #fdf4ff; color: #86198f; cursor: pointer; }

details.fsw-more > summary { cursor: pointer; padding: 14px 18px; font-weight: 800; font-size: 16px; list-style: none; display: flex; align-items: center; gap: 10px; }
details.fsw-more > summary::-webkit-details-marker { display: none; }
details.fsw-more > summary::after { content: '\f107'; font-family: FontAwesome; margin-left: auto; color: var(--fsw-ink-3); }
details.fsw-more[open] > summary { border-bottom: 1px solid var(--fsw-line); }
details.fsw-more[open] > summary::after { content: '\f106'; }

.fsw-batch-table { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.fsw-batch-table th { text-align: left; font-size: 12.5px; color: var(--fsw-ink-3); padding: 0 6px; font-weight: 700; }
.fsw-batch-table td { padding: 6px; background: var(--fsw-surface-2); vertical-align: middle; }
.fsw-batch-table td:first-child { border-radius: 10px 0 0 10px; }
.fsw-batch-table td:last-child { border-radius: 0 10px 10px 0; }
.fsw-batch-table input { width: 100%; }
.fsw-batch-file { font-size: 13px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fsw-table-scroll { overflow-x: auto; }

.fsw-actions { position: sticky; bottom: 0; z-index: 10; display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; padding: 12px 18px; background: rgba(255, 255, 255, .96); border: 1px solid var(--fsw-line); border-radius: var(--fsw-radius); box-shadow: 0 -4px 16px -8px rgba(15, 23, 42, .2); }
.fsw-actions .fsw-spacer { flex: 1; }
.fsw-alert { padding: 12px 14px; border-radius: 12px; border: 1px solid #fecaca; background: #fef2f2; color: #991b1b; }
.fsw-alert ul { margin: 6px 0 0 18px; padding: 0; }
.fsw-progress { height: 8px; background: #e0e7ff; border-radius: 99px; overflow: hidden; width: 200px; display: none; }
.fsw-progress > i { display: block; height: 100%; width: 0; background: var(--fsw-accent); transition: width .2s; }
.is-uploading .fsw-progress { display: block; }
.fsw-cover-preview { width: 160px; aspect-ratio: 4 / 3; border-radius: 10px; border: 1px solid var(--fsw-line); background: #f1f5f9 center / cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--fsw-ink-3); font-size: 13px; }
.fsw-hidden { display: none !important; }

/* ---------- 區塊 ---------- */
.fsw-block-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fsw-block-list li a { display: flex; gap: 10px; align-items: center; text-decoration: none; color: inherit; }
.fsw-block-thumb { width: 64px; height: 48px; flex: none; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.fsw-block-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fsw-block-text { min-width: 0; font-size: 14px; line-height: 1.35; }
.fsw-block-text b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fsw-block-text small { color: #6b7280; }

@media (max-width: 640px) {
  .fsw-title { font-size: 22px; }
  .fsw-search { max-width: none; margin-left: 0; flex-basis: 100%; }
  .fsw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .fsw-card-body { padding: 10px; }
  .fsw-card-title { font-size: 15px !important; }
  .fsw-author-row { grid-template-columns: 1fr 64px 38px; }
  .fsw-author-row .fsw-author-name { grid-column: 1 / 3; grid-row: 2; }
  .fsw-d-head { flex-direction: column; }
  .fsw-d-actions { justify-content: flex-start; }
  dialog.fsw-dialog { width: 100vw; max-width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .fsw-card, .fsw-play, .fsw-flag-big { transition: none; }
  .fsw-spinner { animation-duration: 3s; }
}
