:root {
  /* Brand blue — buttons / links only */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #fff;
  --primary-muted: #f5f5f5;
  --primary-border: #ddd;

  /* Teal — icons & sidebar accents (AUN original) */
  --teal: #00897b;
  --teal-dark: #00695c;
  --teal-light: #e0f2f1;
  --blue: var(--primary);
  --orange: var(--primary);
  --orange-dark: var(--primary-dark);
  --pink: var(--primary);
  --pink-badge: var(--primary);

  --icon-muted: #78909c;
  --icon-strong: #37474f;

  /* Annotation markers on canvas */
  --marker: #2563eb;
  --marker-dark: #1d4ed8;
  --marker-bg: rgba(37, 99, 235, 0.08);
  --marker-bg-active: rgba(37, 99, 235, 0.16);

  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --bg-page: #fff;
  --header-h: 52px;
  --sidebar-w: 220px;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font); color: var(--text); background: var(--bg-page); min-height: 100vh; }

/* Logo */
.logo-brand {
  font-size: 28px; font-weight: 900; letter-spacing: -1px; line-height: 1;
  background: linear-gradient(135deg, #1d4ed8, #2563eb, #3b82f6);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.logo-sub { font-size: 9px; color: var(--primary); font-weight: normal; display: block; margin-top: 2px; }

.logo-wrap a { text-decoration: none; display: flex; flex-direction: column; }
.logo-wrap a:hover .logo-brand { opacity: .85; }

/* Icons */
.ico { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; color: var(--icon-strong); flex-shrink: 0; }
.ico svg { width: 100%; height: 100%; display: block; stroke-width: 2; }
.ico.sm { width: 14px; height: 14px; }
.ico.lg { width: 22px; height: 22px; }
.ico.gray { color: var(--icon-muted); }
.ico.white { color: #fff; }
.hicon .ico { width: 20px; height: 20px; color: var(--icon-strong); }
.act-icon .ico { width: 16px; height: 16px; color: var(--icon-strong); }
.act-icon:hover .ico { color: var(--teal-dark); }
.sb-item .ico { color: var(--teal); }
.breadcrumb .ico { width: 14px; height: 14px; vertical-align: -2px; }
.breadcrumb a { display: inline-flex; align-items: center; gap: 4px; }
.status-icon .ico { width: 14px; height: 14px; }
.status-icon.on .ico { color: var(--primary); }
.status-icon.ok .ico { color: var(--primary-dark); }
.act-icon.settings-btn .ico { color: var(--blue); width: 18px; height: 18px; }
.panel-head .folder-gear .ico { color: var(--blue); width: 18px; height: 18px; }

/* File settings modal */
.modal-settings { max-width: 520px; }
.modal-head-dark { background: var(--primary-dark); color: #fff; border-radius: 8px 8px 0 0; }
.modal-head-dark .ico { color: #fff; width: 16px; height: 16px; margin-right: 6px; }
.close-x-light { color: #fff !important; }
.modal-foot-center { justify-content: center; }
.fs-row { margin-bottom: 18px; }
.fs-row > label { display: block; font-size: 13px; font-weight: bold; margin-bottom: 8px; color: #333; }
.fs-input { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }
.fs-expire-date { font-size: 18px; font-weight: bold; color: #c0392b; margin-bottom: 10px; }
.fs-period-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.period-btn { padding: 6px 14px; border: 1px solid #ccc; background: #fff; border-radius: 4px; font-size: 12px; cursor: pointer; }
.period-btn.active, .period-btn:hover:not(.disabled) { border-color: var(--blue); color: var(--blue); background: #f0f7ff; }
.period-btn.disabled { opacity: .5; cursor: not-allowed; }
.premium-tag { font-size: 10px; background: var(--blue); color: #fff; padding: 1px 6px; border-radius: 3px; margin-left: 4px; }
.fs-note { font-size: 11px; color: #999; line-height: 1.6; margin-top: 6px; }
.fs-check { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 6px; cursor: pointer; font-weight: normal; }
.fs-help { display: inline-flex; width: 16px; height: 16px; border-radius: 50%; background: #ccc; color: #fff; font-size: 11px; align-items: center; justify-content: center; cursor: help; }

/* Memo actions - no link style */
.memo-actions .ico-btn { border: none; background: none; cursor: pointer; padding: 2px 4px; display: inline-flex; align-items: center; color: var(--icon-muted); }
.memo-actions .ico-btn:hover { color: var(--teal-dark); }
.memo-actions .ico-btn .ico { width: 16px; height: 16px; }
.memo-actions .reply-link { color: #888; text-decoration: none; }
.memo-actions .status-check { text-decoration: none; }
.file-thumb { width: 32px; height: 32px; background: var(--primary-light); border-radius: 3px; overflow: hidden; border: 1px solid var(--primary-border); }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.file-thumb .ico { width: 16px; height: 16px; margin: auto; }
.panel-head .folder-title .gear-btn { border: none; background: none; cursor: pointer; padding: 0; display: inline-flex; }
.panel-head .folder-title .gear-btn .ico { color: var(--teal); }
.th-label { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: #666; }

/* Header */
.aun-header {
  height: var(--header-h); background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 16px; gap: 12px; position: sticky; top: 0; z-index: 100;
}
.aun-header .logo-wrap { display: flex; flex-direction: column; min-width: 80px; }
.aun-header .breadcrumb { flex: 1; min-width: 0; font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; overflow: hidden; }
.aun-header .breadcrumb a, .aun-header .breadcrumb span { color: var(--text-muted); text-decoration: none; cursor: pointer; }
.aun-header .breadcrumb a:hover { color: var(--teal); }
.aun-header .breadcrumb .sep { opacity: .4; }
.aun-header .header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; position: relative; z-index: 2; }
.aun-header .hicon {
  width: 32px; height: 32px; border: 1px solid transparent; background: none; cursor: pointer;
  border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #666;
  flex-shrink: 0; position: relative; z-index: 1;
}
.btn-header-text {
  border: 1px solid var(--primary); background: var(--primary-light); border-radius: 6px;
  padding: 5px 11px; font-size: 12px; font-weight: 700; color: var(--primary-dark);
  cursor: pointer; flex-shrink: 0; white-space: nowrap;
  position: relative; z-index: 3;
}
.btn-header-text:hover { background: var(--primary-muted); color: var(--primary-dark); }
.header-avatar {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid #e2e8f0;
  background: var(--primary); color: #fff; font-size: 14px; font-weight: 700;
  cursor: pointer; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  padding: 0; line-height: 1;
}
.header-avatar:hover { filter: brightness(.93); box-shadow: 0 0 0 2px rgba(37, 99, 235, .2); }
.users-table .user-act { border: none; background: none; color: var(--primary-dark); font-size: 12px; font-weight: 600; cursor: pointer; padding: 0 4px; }
.users-table .user-act:hover { text-decoration: underline; }
.users-table .user-act.danger { color: #b91c1c; }
.user-me-tag { font-size: 10px; color: #64748b; background: #f1f5f9; border-radius: 4px; padding: 1px 5px; margin-left: 4px; }
.aun-header .hicon:hover { background: #f5f5f5; border-color: #e0e0e0; }
.aun-header .hicon.notif { position: relative; }
.aun-header .hicon.notif::after { content: ''; position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; background: var(--primary); border-radius: 50%; }

/* Buttons */
.btn-orange { background: var(--primary); color: #fff; border: none; border-radius: 4px; padding: 8px 20px; font-size: 13px; font-weight: bold; cursor: pointer; }
.btn-orange:hover { background: var(--primary-dark); }
.btn-blue { background: var(--primary-dark); color: #fff; border: none; border-radius: 4px; padding: 8px 20px; font-size: 13px; font-weight: bold; cursor: pointer; }
.btn-blue:hover { filter: brightness(.95); }
.btn-outline { background: #fff; border: 1px solid var(--border); border-radius: 4px; padding: 7px 16px; font-size: 13px; cursor: pointer; color: #334155; font-weight: 600; }
.btn-outline:hover { background: #f8fafc; border-color: #cbd5e1; }
.btn-action-primary {
  background: var(--primary); color: #fff; border: none; border-radius: 6px;
  padding: 8px 16px; font-size: 13px; font-weight: 700; cursor: pointer;
  box-shadow: 0 1px 3px rgba(37, 99, 235, .35);
}
.btn-action-primary:hover { background: var(--primary-dark); box-shadow: 0 2px 6px rgba(37, 99, 235, .4); }
.btn-action-secondary {
  background: #fff; color: var(--primary-dark); border: 2px solid var(--primary); border-radius: 6px;
  padding: 7px 15px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.btn-action-secondary:hover { background: var(--primary-light); }

/* Inquiry tab */
.inquiry-tab {
  position: fixed; left: 0; top: 50%; transform: translateY(-50%) rotate(-90deg);
  transform-origin: left center; background: var(--primary); color: #fff;
  padding: 8px 20px; font-size: 12px; font-weight: bold; border-radius: 0 0 4px 4px;
  cursor: pointer; z-index: 50; letter-spacing: .05em; text-decoration: none;
}
.inquiry-tab:hover { background: var(--primary-dark); color: #fff; }

/* Layout shell */
.aun-shell { display: flex; min-height: calc(100vh - var(--header-h)); }
.aun-sidebar {
  width: var(--sidebar-w); min-width: var(--sidebar-w); background: #fff;
  border-right: 1px solid var(--border); overflow-y: auto; padding: 8px 0;
}
.aun-main { flex: 1; min-width: 0; padding: 16px 20px 24px; overflow: auto; }

/* Sidebar items */
.sb-item:hover { background: #f5f5f5; }
.sb-item.active { background: var(--teal-light); border-left-color: var(--teal); font-weight: 600; color: #222; }
.sb-item .sb-icon { color: var(--teal); font-size: 14px; min-width: 16px; }
.sb-item.depth-1 { padding-left: 28px; }
.sb-item.depth-2 { padding-left: 42px; }
.sb-section { padding: 10px 14px 4px; font-size: 11px; color: var(--teal); font-weight: bold; }
.sb-section-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding-right: 10px;
}
.sb-create-btn {
  display: inline-flex; align-items: center; gap: 3px;
  border: 1px solid var(--primary); background: #fff; color: var(--primary-dark);
  border-radius: 4px; padding: 2px 8px; font-size: 10px; font-weight: 700; cursor: pointer;
}
.sb-create-btn:hover { background: var(--primary-light); }
.sb-create-btn .ico { width: 12px; height: 12px; }
.sb-empty-hint { padding: 6px 14px 10px; font-size: 11px; color: #94a3b8; line-height: 1.4; }

.sb-item {
  padding: 7px 10px 7px 14px; font-size: 12px; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  color: #444; user-select: none; border-left: 3px solid transparent;
  position: relative;
}
.sb-item .sb-label { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; overflow: hidden; }
.sb-item .sb-label-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-item .sb-count {
  font-size: 10px; color: #999; background: #f1f5f9; border-radius: 8px;
  padding: 1px 6px; flex-shrink: 0;
}
.sb-actions {
  display: none; align-items: center; gap: 2px; flex-shrink: 0;
}
.sb-item:hover .sb-actions, .sb-item.active .sb-actions { display: flex; }
.sb-item:hover .sb-count { display: none; }
.sb-act {
  width: 24px; height: 24px; border: none; border-radius: 4px; background: #fff;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 1px #e2e8f0;
}
.sb-act:hover { background: #eff6ff; }
.sb-act.danger:hover { background: #fef2f2; }
.sb-act .ico { width: 13px; height: 13px; color: var(--icon-strong); }
.sb-act.danger .ico { color: #c62828; }

/* Folder toolbar in panel head */
.folder-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ft-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; font-size: 12px; font-weight: 600; border-radius: 6px;
  border: 1px solid #cbd5e1; background: #fff; color: #334155; cursor: pointer;
}
.ft-btn:hover { background: #f8fafc; border-color: #94a3b8; }
.ft-btn .ico { width: 14px; height: 14px; }
.ft-btn.primary { border-color: #ccc; color: #334155; background: #fafafa; }
.ft-btn.primary:hover { background: #f0f0f0; }
.ft-btn.danger { border-color: #fecaca; color: #b91c1c; background: #fff; }
.ft-btn.danger:hover { background: #fef2f2; }
.ft-sep { width: 1px; height: 20px; background: #e2e8f0; margin: 0 2px; }

.panel-head .folder-title { font-size: 15px; font-weight: bold; display: flex; align-items: center; gap: 8px; flex: 0 1 auto; min-width: 0; }
.panel-head { justify-content: space-between; }
.panel-head .panel-tools { margin-left: auto; }
.bulk-select { padding: 6px 10px; border: 1px solid var(--border); border-radius: 4px; font-size: 12px; background: #fff; }

/* File table — horizontal scroll on narrow viewports */
.table-scroll {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.table-scroll::-webkit-scrollbar { height: 8px; }
.table-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.table-scroll::-webkit-scrollbar-track { background: #f1f5f9; }

/* File table */
.aun-table { width: 100%; min-width: 1240px; border-collapse: collapse; font-size: 12px; }
.aun-table th {
  text-align: left; padding: 10px 12px; font-weight: 600; color: #666;
  border-bottom: 2px solid #eee; white-space: nowrap; background: #fafafa;
}
.aun-table th.sortable { cursor: pointer; }
.aun-table th.sortable:hover { color: var(--teal); }
.aun-table td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; white-space: nowrap; }
.aun-table .file-cell { white-space: normal; min-width: 140px; }
.aun-table th:nth-last-child(2),
.aun-table td:nth-last-child(2),
.aun-table th:last-child,
.aun-table td:last-child { min-width: 72px; text-align: center; }
.aun-table tr:hover td { background: #fafafa; }
.aun-table tr { cursor: pointer; }
.file-cell { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.file-thumb { width: 28px; height: 28px; background: #f0f0f0; border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: 14px; color: #aaa; overflow: hidden; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-thumb.video-thumb { background: #eef5f2; }
.file-thumb.video-thumb .ico { color: var(--teal); width: 16px; height: 16px; }
.file-edit-icon { border: none; background: none; cursor: pointer; padding: 0; display: inline-flex; opacity: .55; }
.file-edit-icon:hover { opacity: 1; }
.file-edit-icon .ico { width: 14px; height: 14px; color: var(--teal-dark); }
.status-icons { display: flex; gap: 5px; align-items: center; }
.status-icon {
  width: 20px; height: 20px; border: 1px solid #cfd8dc; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 11px; color: #ccc;
  background: #fff; flex-shrink: 0;
}
.status-icon .ico { width: 11px; height: 11px; color: #546e7a; }
.status-icon.work.on { background: #43a047; }
.status-icon.work.on .ico { color: #fff; }
.status-icon.confirm.on { background: #ffb300; }
.status-icon.confirm.on .ico { color: #fff; }
.status-icon.react.on { background: #42a5f5; }
.status-icon.react.on .ico { color: #fff; }
.status-icon.attach { cursor: pointer; border: 1px solid #cfd8dc; padding: 0; background: #fff; }
.status-icon.attach.on { background: #9e9e9e; }
.status-icon.attach.on .ico { color: #fff; }
.status-icon.attach:hover { filter: brightness(.92); }
.status-cell { cursor: default; }
.status-cell .status-icon:not(.attach) { cursor: default; }
.status-legend { display: flex; gap: 8px; font-size: 10px; color: #999; margin-top: 2px; }
.status-legend span { display: inline-flex; align-items: center; gap: 3px; }
.status-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-legend i.work { background: #43a047; }
.status-legend i.confirm { background: #ffb300; }
.status-legend i.react { background: #42a5f5; }
.status-legend i.attach { background: #9e9e9e; }
.row-share { display: flex; align-items: center; justify-content: center; min-width: 44px; }
.row-actions { display: flex; gap: 8px; align-items: center; }
.toggle-on { width: 36px; height: 20px; background: var(--teal); border-radius: 10px; position: relative; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.toggle-on::after { content: ''; position: absolute; right: 3px; top: 3px; width: 14px; height: 14px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.toggle-off { width: 36px; height: 20px; background: #94a3b8; border-radius: 10px; position: relative; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.toggle-off::after { content: ''; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.share-pw-badge { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 20px; color: var(--primary-dark); background: var(--primary-light); border-radius: 10px; border: 1px solid var(--primary-border); }
.share-pw-badge .ico { width: 16px; height: 16px; }
.share-legend { margin-top: 3px; line-height: 1.3; }
.share-leg-item { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.share-leg-item .ico { width: 11px; height: 11px; }
.mini-toggle-on { display: inline-block; width: 18px; height: 10px; background: var(--teal); border-radius: 5px; position: relative; vertical-align: -1px; }
.mini-toggle-on::after { content: ''; position: absolute; right: 2px; top: 2px; width: 6px; height: 6px; background: #fff; border-radius: 50%; }
.aun-table thead .share-legend { font-size: 10px; color: #888; }
.act-icon {
  color: var(--icon-strong); cursor: pointer; font-size: 15px;
  border: 1px solid #90a4ae; background: #fafafa;
  border-radius: 6px; padding: 0; width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.act-icon .ico { color: var(--icon-strong); }
.act-icon:hover { background: #fff; border-color: var(--teal); }
.act-icon:hover .ico { color: var(--teal-dark); }
.act-icon.settings-btn .ico { color: var(--teal-dark); }

/* Review layout */
.review-shell { display: flex; height: calc(100vh - var(--header-h)); }
.review-sidebar { width: 320px; min-width: 320px; background: #fff; border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; }
.review-sidebar-head {
  background: var(--teal); color: #fff; padding: 10px 14px; font-size: 13px; font-weight: bold;
  display: flex; align-items: center; justify-content: space-between;
}
.review-sidebar-head select {
  background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.4); color: #fff;
  border-radius: 4px; padding: 4px 8px; font-size: 11px; cursor: pointer;
}
.review-sidebar-head select option { color: #333; }
.page-title-bar {
  background: #fff; padding: 5px 10px; font-size: 13px; font-weight: bold;
  border-bottom: 1px solid #eee; color: #333;
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 0;
}
.page-title-bar .page-title-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.comment-scroll { flex: 1; overflow-y: auto; }
.memo-item { border-bottom: 1px solid #eee; border-left: 4px solid transparent; transition: background .15s; }
.memo-item.active { background: #fff9e6 !important; border-left-color: #ffb300; }
.memo-body.editable { cursor: pointer; }
.memo-body.editable:hover { background: rgba(255,255,255,.35); border-radius: 4px; }
.memo-head { padding: 4px 8px; display: flex; gap: 6px; cursor: pointer; align-items: flex-start; }
.memo-head:hover { background: #fafafa; }
.memo-num {
  width: auto; height: 24px; min-width: 24px; border-radius: 12px;
  background: var(--primary); color: #fff;
  font-size: 11px; font-weight: bold;
  display: inline-flex; align-items: center; justify-content: center; gap: 2px;
  cursor: pointer; flex-shrink: 0; padding: 0 7px;
  border: none; line-height: 1;
  transition: transform .1s, box-shadow .15s;
}
.memo-num .jump-num { font-size: 11px; font-weight: 800; line-height: 1; }
.memo-num .jump-arrow { font-size: 7px; opacity: .9; margin-top: 1px; }
.memo-num:hover { background: var(--primary-dark); box-shadow: 0 1px 4px rgba(37,99,235,.35); }
.memo-num:active { transform: scale(.94); }
.memo-num.flash { animation: jumpFlash .6s ease; }
@keyframes jumpFlash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37,99,235,.45); }
  50% { box-shadow: 0 0 0 5px rgba(37,99,235,0); }
}

.jump-hint {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0; margin: 0; font-size: 10px; line-height: 1.2; color: #888;
  background: none; border: none; flex-shrink: 0; font-weight: normal;
}
.jump-hint-icon { display: none; }
.jump-hint-close {
  margin-left: auto; border: none; background: none; color: #aaa; font-size: 14px;
  cursor: pointer; padding: 0 2px; line-height: 1; flex-shrink: 0;
}
.jump-hint-close:hover { color: #333; }
.memo-body { flex: 1; min-width: 0; }
.memo-meta { font-size: 10px; color: #999; margin-bottom: 2px; }
.memo-meta .tag-edited { color: var(--primary-dark); margin-left: 6px; }
.memo-meta .tag-draft { color: var(--primary); margin-left: 6px; }
.memo-text { font-size: 12px; line-height: 1.5; color: #333; word-break: break-word; }
.memo-actions { display: flex; gap: 6px; margin-top: 4px; align-items: center; flex-wrap: wrap; }
.memo-actions .reply-link { font-size: 11px; color: var(--teal); cursor: pointer; display: flex; align-items: center; gap: 4px; border: none; background: none; }
.memo-actions .act { border: none; background: none; color: #bbb; cursor: pointer; font-size: 14px; padding: 2px; }
.memo-actions .act.on { color: var(--primary); }
.memo-actions .act.ok { color: var(--primary-dark); }

.review-canvas-wrap { flex: 1; overflow: auto; background: #c8c8c8; position: relative; display: flex; justify-content: center; }
.review-canvas-inner { position: relative; transform-origin: top center; margin: 20px 0; }
.review-canvas-inner img { display: block; max-width: none; user-select: none; -webkit-user-drag: none; }
.version-banner {
  position: absolute; top: 0; left: 0; right: 0; background: var(--primary-dark); color: #fff;
  text-align: center; padding: 6px; font-size: 12px; font-weight: bold; z-index: 20;
}
.version-banner a { color: #fff; margin-left: 12px; text-decoration: underline; cursor: pointer; }

.zoom-bar {
  position: fixed; top: calc(var(--header-h) + 12px); right: 16px; z-index: 30;
  background: rgba(60,60,60,.85); border-radius: 6px; display: flex; gap: 2px; padding: 4px;
}
.zoom-bar button {
  width: 32px; height: 32px; border: none; background: transparent; color: #fff;
  font-size: 16px; cursor: pointer; border-radius: 4px;
}
.zoom-bar button:hover { background: rgba(255,255,255,.15); }
.zoom-bar .zoom-label { min-width: 52px; font-size: 12px; font-weight: 600; }

/* Pins & boxes on canvas */
.aun-box { position: absolute; border: 2px solid var(--marker); background: var(--marker-bg); z-index: 3; border-radius: 2px; }
.aun-box.active { background: var(--marker-bg-active); border-color: var(--marker-dark); }
.aun-box.done-fix { border-color: #43a047; border-style: dashed; }
.aun-box.done-ok { border-color: var(--primary-muted); opacity: .65; }
.edit-mode .aun-box { cursor: move; }
.edit-mode .box-hover-tip { display: none !important; }

/* Box hover tooltip (AUN style) */
.box-hover-tip {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  z-index: 25; min-width: 180px; max-width: 300px; display: none; pointer-events: auto;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.18));
}
.box-hover-tip.is-fixed {
  position: fixed; bottom: auto; z-index: 150;
}
.aun-box:hover .box-hover-tip,
.box-hover-tip:hover { display: block; }
.box-hover-text {
  background: var(--primary-light); border: 1px solid var(--primary-border); border-radius: 4px 4px 0 0;
  padding: 10px 12px; font-size: 12px; line-height: 1.5; color: #333; word-break: break-word;
}
.box-hover-bar {
  display: flex; align-items: center; gap: 6px; padding: 6px 8px;
  background: #fff; border: 1px solid #ddd; border-top: none; border-radius: 0 0 4px 4px;
}
.box-hact {
  width: 26px; height: 26px; border: 1px solid #cfd8dc; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.box-hact .ico { width: 14px; height: 14px; color: #546e7a; }
.box-hact.work.on { background: #43a047; }
.box-hact.work.on .ico { color: #fff; }
.box-hact.confirm { border-radius: 4px; }
.box-hact.confirm.on { background: #43a047; }
.box-hact.confirm.on .ico { color: #fff; }
.box-hact:hover { filter: brightness(.92); }

.aun-pin {
  position: absolute; width: 28px; height: 28px; border-radius: 50%;
  background: var(--marker); color: #fff; font-size: 13px; font-weight: bold;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transform: translate(-50%, -100%); box-shadow: 0 2px 6px rgba(37, 99, 235, .35); z-index: 5;
}
.aun-pin::after {
  content: ''; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%);
  border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--marker);
}
.aun-pin.active { background: var(--marker-dark); transform: translate(-50%, -100%) scale(1.1); }
.link-line { position: absolute; pointer-events: none; z-index: 2; border-top: 2px dashed var(--marker); transform-origin: left center; }

.resize-h { position: absolute; width: 10px; height: 10px; background: var(--marker); border: 1px solid #fff; z-index: 6; display: none; }
.edit-mode .resize-h { display: block; }
.resize-h.nw { top: -5px; left: -5px; cursor: nw-resize; }
.resize-h.ne { top: -5px; right: -5px; cursor: ne-resize; }
.resize-h.sw { bottom: -5px; left: -5px; cursor: sw-resize; }
.resize-h.se { bottom: -5px; right: -5px; cursor: se-resize; }
.draw-rect { position: absolute; border: 2px dashed var(--marker); background: rgba(37, 99, 235, .1); z-index: 10; pointer-events: none; }
.edit-mode .review-canvas-inner { cursor: crosshair; }

/* Inline memo popup (edit mode) */
.memo-popup {
  position: absolute; z-index: 50; width: 280px; background: #fff; border: 1px solid var(--primary-border);
  border-radius: 6px; box-shadow: 0 4px 20px rgba(37, 99, 235, .15); padding: 10px;
}
.memo-popup .color-row { display: flex; gap: 4px; margin-bottom: 8px; }
.color-row { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.color-swatch { width: 22px; height: 22px; min-width: 22px; border-radius: 3px; cursor: pointer; border: 2px solid transparent; box-sizing: border-box; }
.color-swatch.active { border-color: #333; }
.modal-body .color-row { margin: 0; flex: 1; }
.memo-popup .color-swatch { width: 22px; height: 22px; border-radius: 3px; cursor: pointer; border: 2px solid transparent; }
.memo-popup .color-swatch.active { border-color: #333; }
.memo-popup .fmt-row { display: flex; gap: 4px; margin-bottom: 8px; border-bottom: 1px solid #eee; padding-bottom: 8px; }
.memo-popup .fmt-btn { width: 28px; height: 28px; border: 1px solid #ddd; background: #fff; border-radius: 3px; cursor: pointer; font-size: 12px; font-weight: bold; }
.memo-popup textarea { width: 100%; min-height: 60px; border: 1px solid #ddd; border-radius: 4px; padding: 8px; font-size: 12px; font-family: inherit; resize: vertical; outline: none; }
.memo-popup .attach-btn { display: block; width: 100%; margin: 8px 0; padding: 6px; background: #f5f5f5; border: 1px dashed #ccc; border-radius: 4px; font-size: 11px; cursor: pointer; color: #666; text-align: center; }
.memo-popup .add-memo-btn { width: 100%; padding: 10px; background: var(--primary); color: #fff; border: none; border-radius: 4px; font-weight: bold; font-size: 13px; cursor: pointer; }
.memo-popup .add-memo-btn:hover { background: var(--primary-dark); }

/* Modals */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 200; align-items: center; justify-content: center; }
.modal-overlay.show { display: flex; }
.modal-box { background: #fff; border-radius: 8px; width: 480px; max-width: 92vw; max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 8px 40px rgba(0,0,0,.2); }
.modal-head { padding: 16px 20px; border-bottom: 1px solid #eee; display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: bold; }
.modal-head .close-x { border: none; background: none; font-size: 20px; cursor: pointer; color: #999; }
.modal-body { padding: 16px 20px; }
.modal-body .tool-row { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; align-items: center; }
.modal-body textarea { width: 100%; min-height: 100px; border: 2px solid var(--primary); border-radius: 4px; padding: 10px; font-size: 13px; font-family: inherit; outline: none; resize: vertical; }
.modal-body textarea:focus { border-color: var(--primary-dark); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.drop-zone { border: 2px dashed #cbd5e1; border-radius: 6px; padding: 24px; text-align: center; margin-top: 12px; color: #888; font-size: 12px; }
.drop-zone .pick-btn { display: inline-block; margin-top: 8px; padding: 8px 16px; background: var(--primary); color: #fff; border-radius: 4px; cursor: pointer; font-size: 12px; }
.drop-zone .pick-btn:hover { background: var(--primary-dark); }
.modal-foot { padding: 12px 20px; border-top: 1px solid #eee; display: flex; justify-content: flex-end; gap: 8px; }

/* Context menu */
.ctx-menu { position: fixed; background: #fff; border: 1px solid #ddd; border-radius: 6px; box-shadow: 0 4px 16px rgba(0,0,0,.15); z-index: 300; padding: 4px 0; display: none; min-width: 180px; }
.ctx-menu.show { display: block; }
.ctx-item { padding: 10px 16px; font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.ctx-item:hover { background: #f5f5f5; }
.ctx-item.danger { color: #dc2626; }

/* Share bar in header */
.share-bar { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #666; }
.share-bar .days-badge { background: #f5f5f5; padding: 4px 10px; border-radius: 4px; font-weight: bold; }
.share-bar .url-field { background: #f5f5f5; padding: 4px 10px; border-radius: 4px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.share-bar .copy-btn { border: none; background: none; cursor: pointer; color: var(--teal); font-size: 16px; }

/* Loading */
.loading-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 400; align-items: center; justify-content: center; flex-direction: column; color: #fff; }
.loading-overlay.show { display: flex; }
.spinner { width: 40px; height: 40px; border: 4px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

.replies-block { padding: 0 14px 8px 52px; }
.reply-card { background: #f7f7f7; border-radius: 4px; padding: 8px; margin-bottom: 6px; border-left: 3px solid var(--teal); font-size: 11px; }
.reply-form-inline { padding: 0 14px 10px 52px; }
.reply-form-inline textarea { width: 100%; border: 1px solid #ddd; border-radius: 4px; padding: 8px; font-size: 12px; min-height: 50px; font-family: inherit; }

.sb-item .sb-count { margin-left: auto; font-size: 10px; background: rgba(37, 99, 235, .12); color: var(--primary); padding: 1px 6px; border-radius: 8px; }
.sb-item.active .sb-count { background: rgba(37, 99, 235, .2); color: var(--primary-dark); }
.loc-cell { color: #888; font-size: 11px; max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.page-tabs { display: flex; gap: 4px; padding: 6px 10px; background: #fafafa; border-bottom: 1px solid #eee; flex-wrap: wrap; }
.page-tab { border: 1px solid #ddd; background: #fff; border-radius: 4px; padding: 4px 10px; font-size: 11px; cursor: pointer; }
.page-tab.active { background: var(--teal-light); border-color: var(--teal); color: var(--teal-dark); font-weight: bold; }

.status-check { font-size: 11px; color: #888; cursor: pointer; display: inline-flex; align-items: center; gap: 3px; user-select: none; border: none; background: none; padding: 2px 4px; font-family: inherit; text-decoration: none; }
.status-check:hover { opacity: .85; }
.status-check.fixed.on { color: #43a047; font-weight: 600; }
.status-check.confirmed.on { color: #ffb300; font-weight: 600; }
.status-check.react.on { color: #42a5f5; font-weight: 600; }
.ico-btn.attach-btn.on .ico { color: #757575; }
.memo-actions .attach-btn { margin-left: auto; }
.memo-attach img, .reply-attach img { max-width: 100%; border-radius: 4px; margin-top: 6px; border: 1px solid #eee; }
.reply-attach-btn { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: #888; cursor: pointer; margin-top: 6px; }
.drop-zone.drag { border-color: var(--primary); background: var(--primary-light); }

.sidebar-toggle { display: none; }

/* Hover tooltips */
.app-tip {
  position: fixed; z-index: 500; max-width: 280px; padding: 12px 14px;
  background: #fff; border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.18);
  border: 1px solid #e8e8e8; pointer-events: none; opacity: 0;
  transform: translateY(4px); transition: opacity .15s, transform .15s;
}
.app-tip.show { opacity: 1; transform: translateY(0); }
.app-tip-title { font-size: 13px; font-weight: bold; color: var(--primary); margin-bottom: 4px; }
.app-tip-desc { font-size: 12px; line-height: 1.55; color: #555; }
[data-tip] { cursor: help; }
a[data-tip], button[data-tip], .sb-item[data-tip], .aun-table tr[data-tip], .sortable[data-tip], .act-icon[data-tip], .toggle-on[data-tip], .toggle-off[data-tip] { cursor: pointer; }

@media (max-width: 900px) {
  .sidebar-toggle { display: flex; }
  .aun-sidebar {
    position: fixed; left: 0; top: var(--header-h); bottom: 0; z-index: 90;
    transform: translateX(-100%); transition: transform .2s;
    box-shadow: 2px 0 12px rgba(0,0,0,.12);
  }
  body.sidebar-open .aun-sidebar { transform: translateX(0); }
  .aun-sidebar { width: 180px; min-width: 180px; }
  .review-sidebar { width: 280px; min-width: 280px; }
  .share-bar .url-field { max-width: 120px; }
  .app-tip { max-width: 220px; }
  .loc-cell { max-width: 80px; }
}

/* Share link modal (AUN style) */
.modal-share { max-width: 560px; width: 92vw; overflow: hidden; }
.modal-head-share {
  padding: 14px 18px; font-size: 14px; font-weight: bold; color: #444;
  border-bottom: 1px solid #eee; display: flex; align-items: center; gap: 6px;
}
.modal-head-share .share-head-icon .ico { color: var(--teal); width: 18px; height: 18px; }
.modal-head-share .close-x { margin-left: auto; }
.share-link-panel {
  background: var(--primary-light); padding: 20px 24px 18px; border-bottom: 1px solid var(--primary-border);
}
.share-link-label { font-size: 13px; font-weight: bold; color: var(--primary-dark); margin-bottom: 10px; }
.share-url-input {
  width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 4px;
  font-size: 13px; background: #fff; color: #333; margin-bottom: 10px;
}
.share-short-check {
  display: flex; align-items: center; gap: 6px; font-size: 12px; color: #666;
  margin-bottom: 14px; cursor: pointer; font-weight: normal;
}
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.share-act-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
  background: #fff; border: 1px solid #ccc; border-radius: 4px; font-size: 12px;
  color: #444; cursor: pointer; white-space: nowrap;
}
.share-act-btn:hover { background: #fafafa; border-color: #aaa; }
.share-act-btn .ico { width: 14px; height: 14px; color: #666; }
.share-close-btn { min-width: 120px; }
.attach-item {
  margin-bottom: 12px; padding: 12px; background: #f9f9f9; border-radius: 6px;
  border: 1px solid #eee; font-size: 13px;
}
.attach-item img { max-width: 100%; border-radius: 4px; margin-top: 8px; border: 1px solid #eee; }
.attach-item a { color: var(--blue); word-break: break-all; }

/* ===== Video review (sidebar LEFT) ===== */
.video-review-page { background: var(--bg-page); min-height: 100vh; }

.vid-subbar {
  display: flex; align-items: center; gap: 12px; padding: 8px 16px;
  background: #fff; border-bottom: 1px solid var(--border);
}
.vid-page-tabs { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.vid-page-tab {
  border: 1px solid var(--border); background: #fff; color: #666; border-radius: 4px;
  padding: 4px 12px; font-size: 12px; cursor: pointer;
}
.vid-page-tab.active { background: var(--teal-light); border-color: var(--teal); color: var(--teal-dark); font-weight: bold; }
.vid-version-select {
  background: #fff; border: 1px solid var(--border); color: #333; border-radius: 4px;
  padding: 4px 10px; font-size: 12px;
}

.vid-options-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  padding: 8px 16px; background: #fafafa; color: #666; font-size: 11px;
  border-bottom: 1px solid var(--border);
}
.vid-opt-check, .vid-opt-toggle { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.vid-opt-toggle { margin-left: auto; color: var(--teal-dark); font-weight: bold; }

.vid-shell {
  display: flex; height: calc(100vh - var(--header-h) - 72px); min-height: 400px;
}

/* 左: 修正コメント列 */
.vid-sidebar {
  width: 300px; min-width: 280px; background: #fff; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; order: -1;
}
.vid-sb-head {
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px; font-size: 12px;
  background: var(--teal); color: #fff;
}
.vid-sb-head select {
  flex: 1; padding: 4px 8px; border: 1px solid rgba(255,255,255,.4);
  border-radius: 4px; font-size: 11px; background: rgba(255,255,255,.2); color: #fff;
}
.vid-sb-head select option { color: #333; }
.vid-show-all { display: flex; align-items: center; gap: 4px; white-space: nowrap; font-size: 11px; }
.vid-comment-list { flex: 1; overflow-y: auto; }
.vid-empty { padding: 32px 16px; text-align: center; color: #999; font-size: 12px; line-height: 1.6; }

.vid-cmt-item { border-bottom: 1px solid #eee; padding: 10px 12px; }
.vid-cmt-item.active { background: #fff9e6; }
.vid-cmt-item.done-ok { opacity: .75; }
.vid-cmt-row { display: flex; gap: 10px; }
.vid-cmt-num {
  width: 28px; height: 28px; min-width: 28px; border-radius: 50%;
  color: #fff; font-size: 13px; font-weight: bold;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.vid-cmt-num:hover { filter: brightness(.92); }
.vid-cmt-body { flex: 1; min-width: 0; }
.vid-cmt-meta { font-size: 10px; color: #999; margin-bottom: 4px; }
.vid-cmt-text { font-size: 12px; line-height: 1.5; color: #333; word-break: break-word; }
.vid-cmt-time { font-size: 10px; color: var(--teal); margin-top: 4px; font-weight: bold; }

.vid-sb-actions { padding: 10px 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; background: #fafafa; }
.vid-act-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px; border: 1px solid var(--border); background: #fff; border-radius: 4px;
  font-size: 12px; cursor: pointer; color: #444;
}
.vid-act-btn:hover { background: var(--teal-light); border-color: var(--teal); color: var(--teal-dark); }
.vid-act-btn.primary { background: var(--teal); color: #fff; border-color: var(--teal); }
.vid-act-btn.primary:hover { background: var(--teal-dark); color: #fff; }
.vid-act-btn .ico { width: 14px; height: 14px; }
.vid-act-btn.primary .ico { color: #fff; }

/* 右: 動画エリア */
.vid-main { flex: 1; display: flex; flex-direction: column; position: relative; overflow: hidden; background: #c8c8c8; }
.vid-stage {
  flex: 1; display: flex; flex-direction: column; overflow: auto; padding: 12px 16px 8px;
}
.vid-player-wrap {
  position: relative; margin: 0 auto; max-width: 100%;
  display: flex; justify-content: center;
}
.vid-canvas-inner {
  position: relative; transform-origin: top center; display: inline-block;
  background: #000; border-radius: 4px; overflow: visible;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.vid-canvas-inner video { display: block; max-height: calc(100vh - 360px); max-width: 100%; vertical-align: top; }
.video-review-page.edit-mode .vid-canvas-inner { cursor: crosshair; }
.video-review-page.edit-mode .vid-canvas-inner video { cursor: crosshair; }
.video-review-page .vid-time-tag { color: var(--teal); font-weight: bold; margin-left: 4px; }
.video-review-page .vid-zoom .zoom-label { min-width: 44px; font-size: 11px; border: none; background: transparent; cursor: pointer; color: #555; }
.video-review-page .vid-sidebar .memo-item { border-bottom: 1px solid #eee; }
.video-review-page .vid-sidebar .page-title-bar { font-size: 12px; }

.vid-playbar { display: flex; align-items: center; gap: 10px; padding: 10px 0 6px; color: #555; font-size: 12px; }
.vid-play-btn {
  width: 32px; height: 32px; border: none; border-radius: 50%;
  background: var(--teal); color: #fff; cursor: pointer; font-size: 12px;
}
.vid-timeline-block { margin-bottom: 8px; }
.vid-tl-label { font-size: 11px; color: #666; margin-bottom: 4px; font-weight: bold; }
.vid-timeline {
  position: relative; height: 28px; background: #ddd; border-radius: 4px; cursor: pointer;
  border: 1px solid #ccc;
}
.vid-timeline.range { height: 20px; background: #e8e8e8; }
.vid-tl-playhead {
  position: absolute; top: 0; bottom: 0; width: 2px; background: var(--primary); pointer-events: none; z-index: 3;
}
.vid-tl-mark {
  position: absolute; top: 50%; width: 10px; height: 10px; border-radius: 50%;
  transform: translate(-50%, -50%); cursor: pointer; z-index: 2; border: 1px solid #fff;
  background: var(--primary);
}
.vid-tl-range {
  position: absolute; top: 4px; bottom: 4px; background: rgba(37, 99, 235, .28);
  border-radius: 2px; pointer-events: none;
}
.vid-range-sel {
  position: absolute; top: 2px; bottom: 2px; background: rgba(37, 99, 235, .22);
  border: 1px solid var(--primary); border-radius: 2px;
}
.vid-tl-hint { font-size: 10px; color: #888; margin-top: 4px; }

.vid-zoom {
  position: absolute; bottom: 12px; right: 12px; display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.92); color: #555; padding: 6px 10px; border-radius: 6px;
  font-size: 11px; border: 1px solid var(--border); box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.vid-zoom input[type=range] { width: 80px; accent-color: var(--teal); }

.vid-comment-popup {
  position: fixed; z-index: 100; width: 260px; background: #fff;
  border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,.18); padding: 12px;
  border: 1px solid var(--border);
}
.vid-comment-popup textarea {
  width: 100%; min-height: 70px; border: 1px solid var(--border); border-radius: 4px;
  padding: 8px; font-size: 12px; font-family: inherit; resize: vertical;
}
.vid-popup-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

.file-thumb.video-thumb { background: #eef5f2; }
.file-thumb.video-thumb .ico { color: var(--teal); width: 16px; height: 16px; }

/* Type badge */
.type-badge {
  display: inline-block; font-size: 10px; font-weight: 700; padding: 3px 7px;
  border-radius: 4px; letter-spacing: .02em;
}
.type-badge.type-lp { background: #f5f5f5; color: #555; border: 1px solid #ddd; }
.type-badge.type-video { background: #f0faf5; color: #047857; border: 1px solid #b8e0cc; }

/* Header folder button */
.btn-header-folder {
  display: inline-flex; align-items: center; gap: 5px;
  background: #fff; color: var(--primary-dark); border: 2px solid var(--primary);
  border-radius: 6px; padding: 6px 12px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.btn-header-folder:hover { background: var(--primary-light); }
.btn-header-folder .ico { width: 16px; height: 16px; color: var(--primary); }

/* Video import tabs */
.video-import-tabs { display: flex; gap: 0; margin: 8px 0 12px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.vit-tab {
  flex: 1; padding: 8px 12px; border: none; background: #f8fafc; font-size: 12px;
  font-weight: 600; color: #64748b; cursor: pointer;
}
.vit-tab.active { background: var(--primary); color: #fff; }
.vit-tab + .vit-tab { border-left: 1px solid var(--border); }

/* Video sidebar AI button */
.vid-act-btn.ai-btn {
  border-color: #7c3aed; color: #6d28d9; background: #faf5ff;
}
.vid-act-btn.ai-btn:hover { background: #f3e8ff; }
.vid-act-btn.ai-btn .ico { color: #7c3aed; }

@media (max-width: 900px) {
  .vid-shell { flex-direction: column; height: auto; }
  .vid-sidebar { width: 100%; min-width: 0; max-height: 40vh; order: 0; border-right: none; border-bottom: 1px solid var(--border); }
}
