/* 配色・部品は Brave Cockpit に合わせる（ライトテーマ） */
:root {
  --bg: #f2f4f8;
  --surface: #ffffff;
  --sidebar: #f7f8fa;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --text: #171717;
  --muted: #667085;
  --faint: #98a2b3;
  --hover: #e8e8ec;
  --primary: #0d318a;
  --primary-hover: #0b2a78;
  --navy: #0a2670;
  --soft-blue: #e7ecf8;
  --orange: #f9b233;
  --orange-strong: #f39c12;
  --green: #9dcb55;
  --danger-bg: #fdecec; --danger: #c22a1e; --danger-border: #f5c6c2;
  --success-bg: #e8f6ee; --success: #187a49; --success-border: #c6ebd4;
  --info-bg: #eaf1ff; --info: #2059b8; --info-border: #cbdcfb;
  --shadow-xs: 0 1px 2px rgba(4, 16, 36, .06);
  --shadow-md: 0 4px 10px rgba(4, 16, 36, .10), 0 2px 4px rgba(4, 16, 36, .05);
  --shadow-lg: 0 12px 28px rgba(4, 16, 36, .14), 0 4px 10px rgba(4, 16, 36, .06);
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; height: 100%; background: var(--bg); color: var(--text);
  font-family: "Noto Sans JP", "Montserrat", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif; font-size: 14px; line-height: 1.65; }
a { color: var(--navy); }
h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.025em; margin: 0 0 6px; }
h1::after { content: ""; display: block; width: 36px; height: 3px; margin-top: 8px; background: var(--orange); border-radius: 2px; }
h2 { font-size: 15px; color: var(--navy); margin: 22px 0 8px; }
:focus-visible { outline: 2px solid var(--orange-strong); outline-offset: 2px; }

/* ボタン */
button, .btnlink {
  font: inherit; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--navy); cursor: pointer; text-decoration: none; transition: background .15s var(--ease), border-color .15s var(--ease);
}
button:hover, .btnlink:hover { background: var(--sidebar); border-color: var(--orange); }
button:active, .btnlink:active { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: default; }
.primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: var(--shadow-xs); }
.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.danger:hover { background: #fbdcdc; border-color: var(--danger-border); }
.big { width: 100%; min-height: 42px; padding: 0 20px; margin-top: 10px; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.error { color: var(--danger); }
.notice { background: #f3f5fb; border: 1px solid #c3cde6; color: var(--navy); border-radius: 8px; padding: 10px 12px; font-size: 12px; }

input {
  width: 100%; margin-top: 6px; min-height: 38px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: #fff; color: var(--text); font: inherit; font-size: 14px;
}
input:focus { outline: 2px solid #c3cde6; border-color: var(--primary); }
.copyrow { display: flex; gap: 8px; align-items: center; }
.copyrow input { margin: 0; }
.copyrow button { flex-shrink: 0; }

/* ブランド */
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; text-decoration: none; color: var(--text); }
.brand img { width: 34px; height: 34px; }
.brand strong { display: block; font-size: 14px; line-height: 1.2; }
.brand small { display: block; font-size: 11px; color: var(--muted); }

/* カード型の画面（トップ・入室前・設定） */
.home { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-xs); padding: 28px; width: 100%; max-width: 460px; }
.card label { display: block; margin-top: 14px; color: var(--muted); font-size: 12px; font-weight: 600; }
details { margin-top: 14px; }
summary { cursor: pointer; color: var(--muted); font-size: 12px; }
#preview { width: 100%; aspect-ratio: 16 / 9; background: #0b1220; border-radius: 10px; transform: scaleX(-1); object-fit: cover; margin-top: 8px; }

/* 会議画面 */
#meeting { height: 100%; height: 100dvh; display: flex; flex-direction: column; }
#meetingWorkspace { flex: 1; display: flex; min-height: 0; min-width: 0; }
#meetingWorkspace.board-open #grid { flex: 1 1 34%; min-width: 0; }
#whiteboardPanel { flex: 2 1 66%; min-width: 0; margin: 12px 12px 12px 0; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow-y: auto; }
.board-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.board-heading h2 { margin: 0; }
.board-hint { font-size: 12px; color: var(--muted); margin: 6px 0 10px; }
.board-paper { width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; background: #fff; }
#boardCanvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.board-tools { margin: 10px 0; }
.board-tools summary { min-height: 36px; padding: 6px 0; }
.board-tools > div { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; padding: 8px 0; }
.board-tools label { font-size: 12px; color: var(--muted); }
.board-tools select { display: block; width: auto; min-height: 40px; margin: 4px 0 0; }
#meetingWorkspace.board-open #grid[data-n="3"], #meetingWorkspace.board-open #grid[data-n="4"] { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-rows: 1fr; }
#meetingWorkspace.board-open #grid[data-n="2"] .tile.self { min-width: 80px; width: 36%; right: 18px; bottom: 18px; }
#grid { flex: 1; display: grid; gap: 10px; padding: 12px; min-height: 0; position: relative; }
#grid[data-n="1"], #grid[data-n="2"] { grid-template-columns: 1fr; }
#grid[data-n="3"], #grid[data-n="4"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.tile { position: relative; background: #0b1220; border-radius: 14px; overflow: hidden; min-height: 0; box-shadow: var(--shadow-xs); }
.tile video { width: 100%; height: 100%; object-fit: contain; background: #0b1220; display: block; }
.tile.self video.mirror { transform: scaleX(-1); }
/* 1対1（担当者＋顧客）は相手を大きく、自分を右下に小さく */
#grid[data-n="2"] .tile.self {
  position: absolute; right: 24px; bottom: 24px; width: 24%; min-width: 150px; aspect-ratio: 16 / 9; z-index: 2;
  border: 2px solid #fff; box-shadow: var(--shadow-lg);
}
#grid[data-n="2"] .tile.self .label { font-size: 11px; }
.tile .label { position: absolute; left: 10px; bottom: 10px; background: rgba(255, 255, 255, .92); color: var(--text);
  padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  max-width: calc(100% - 20px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .off { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700;
  color: var(--navy); background: var(--soft-blue); }
#bar { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); }
#bar button.offstate { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
/* 録画の状態（社内のみ）: 画面上部中央に常に表示 */
.rec { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 10;
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 999px; font-size: 14px; font-weight: 700;
  box-shadow: var(--shadow-md); white-space: nowrap; }
.rec.on { background: var(--danger); color: #fff; }
.rec.wait { background: #fff; color: var(--muted); border: 1px solid var(--border); font-weight: 600; font-size: 13px; }
.board-open > .rec { left: 17%; }
.rec .dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
/* カメラ・マイクをオンにするボタン（画面中央） */
.previewbox { position: relative; }
.mediaask { position: absolute; inset: 8px 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; }
.mediaask .mediaOn { min-height: 46px; width: min(280px, 100%); font-size: 15px; }
.mediaHelp { margin: 4px 0 0; background: #fff; color: var(--text); border-radius: 10px; padding: 10px 12px; font-size: 12px; line-height: 1.6; max-width: 340px; }
.mediaask.floating { position: fixed; inset: auto; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 20; width: min(360px, calc(100% - 32px));
  background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 22px; }
.mediaask.floating .mediaHelp { background: #f3f5fb; }
.asktitle { margin: 0 0 4px; font-weight: 700; color: var(--navy); text-align: center; }
.linkbtn { border: 0; background: none; color: var(--muted); min-height: 30px; font-weight: 500; }
.linkbtn:hover { background: none; color: var(--navy); text-decoration: underline; }
#toast { position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%); background: var(--surface); color: var(--text);
  border: 1px solid var(--border); box-shadow: var(--shadow-md); padding: 10px 16px; border-radius: 10px; z-index: 10; max-width: calc(100% - 32px); }
/* スマホ: 入力欄が16px未満だとiPhoneが自動で拡大してしまう。ボタンは指で押しやすい大きさに */
@media (pointer: coarse) {
  input { font-size: 16px; }
  #bar button { min-height: 44px; }
}
@media (max-width: 700px) {
  #grid[data-n="3"], #grid[data-n="4"] { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-rows: 1fr; }
  #grid[data-n="2"] .tile.self { width: 34%; min-width: 110px; right: 18px; bottom: 18px; }
  #meetingWorkspace.board-open { flex-direction: column; overflow-y: auto; }
  #meetingWorkspace.board-open #grid { flex: 0 0 24dvh; min-height: 130px; }
  #whiteboardPanel { flex: 1 0 auto; margin: 0 12px 12px; padding: 12px; overflow: visible; }
  .board-tools select { font-size: 16px; }
  .board-open > .rec { left: 50%; }
}

/* 一覧・議事録ページ */
.page { max-width: 880px; margin: 0 auto; padding: 24px 16px 96px; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-xs); padding: 16px; margin-top: 16px; }
.panel h2 { margin-top: 0; }
.filters { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { min-height: 28px; padding: 0 12px; border-radius: 999px; font-size: 12px; background: var(--sidebar); color: var(--muted); border: 1px solid var(--border); }
.tag.active { background: var(--soft-blue); color: var(--primary); border-color: var(--primary); }
span.tag { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; background: var(--soft-blue); color: var(--primary); border-color: #c3cde6; font-weight: 600; }
.row { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-xs);
  padding: 14px 16px; margin-bottom: 10px; color: var(--text); text-decoration: none; transition: box-shadow .15s var(--ease), transform .15s var(--ease); }
.row:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.row .when { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; font-weight: 600; }
.live { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); border-radius: 999px; padding: 0 8px; font-size: 11px; font-weight: 600; }
.ok { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); border-radius: 999px; padding: 0 8px; font-size: 11px; font-weight: 600; }
.sharerow { margin: 12px 0; }
.dayhead { font-size: 13px; color: var(--muted); border: 0; margin: 20px 0 8px; padding: 0; }
.head2 { margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prose { white-space: pre-wrap; line-height: 1.85; }
.transcript p { margin: 0 0 8px; }
.transcript .t { color: var(--faint); font-size: 12px; margin-right: 6px; }
.transcript .who { font-weight: 700; color: var(--navy); margin-right: 6px; }
.yt { position: relative; aspect-ratio: 16 / 9; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 10px; }
.step { margin: 18px 0 4px; font-size: 12px; font-weight: 700; color: var(--orange-strong); letter-spacing: .04em; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 13px; }
.links a { color: var(--muted); text-decoration: none; }
.links a:hover { color: var(--navy); text-decoration: underline; }
.steps { margin: 6px 0 16px; padding-left: 1.4em; }
.steps li { margin: 12px 0; }
.steps li > b { display: block; margin-bottom: 2px; }
.steps .btnlink { margin-top: 4px; }
#minutesBox .notice { margin: 8px 0 4px; }
.pendingyt { margin-top: 16px; }
.badge-warn { background: #fff1ea; color: #b04a24; border: 1px solid #f8d7c5; border-radius: 999px; padding: 0 8px; font-size: 11px; font-weight: 600; }
.arrival { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; padding: 14px; border-radius: 12px; background: #fff4dc; border: 1px solid #f6d58e; color: #6b4500; }
.arrival .btnlink { animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(13, 49, 138, .18); } }
.okmsg { color: var(--success); background: var(--success-bg); border: 1px solid var(--success-border); border-radius: 8px; padding: 8px 10px; }
.small.error { background: var(--danger-bg); border: 1px solid var(--danger-border); border-radius: 8px; padding: 8px 10px; }
.savepanel { margin-top: 24px; }
.savenow { margin: 0 0 4px; }
.tabs { display: flex; gap: 4px; background: var(--sidebar); border: 1px solid var(--border); border-radius: 10px; padding: 4px; margin-bottom: 18px; }
.tabbtn { flex: 1; border: 0; background: transparent; color: var(--muted); min-height: 34px; }
.tabbtn:hover { background: var(--hover); border: 0; }
.tabbtn.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-xs); }
#passwordAuth > summary { margin: 20px 0 12px; color: var(--muted); font-size: 13px; cursor: pointer; }
#googleButton { min-height: 44px; }
.staffrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.staffrow:hover { transform: none; }
progress { width: 100%; height: 8px; accent-color: var(--primary); }

.staffrow { flex-wrap: wrap; }
.staffinfo { flex: 1; min-width: 200px; }
.editform { flex-basis: 100%; border-top: 1px solid var(--border); margin-top: 10px; padding-top: 6px; }
.editform label { display: block; margin-top: 10px; color: var(--muted); font-size: 12px; font-weight: 600; }
.editform select { width: 100%; margin-top: 6px; min-height: 38px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border-strong); font: inherit; font-size: 14px; background: #fff; }
.editactions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.editactions .danger { margin-left: auto; }

/* 使い方 */
.guide .panel p, .guide .panel li { line-height: 1.8; }
.toc ol { margin: 8px 0 0; padding-left: 1.4em; columns: 2; }
@media (max-width: 700px) { .toc ol { columns: 1; } }
.guidetable { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0; }
.guidetable th, .guidetable td { border: 1px solid var(--border); padding: 8px; text-align: left; vertical-align: top; }
.guidetable th { background: var(--sidebar); }
.faq dt { font-weight: 700; color: var(--navy); margin-top: 12px; }
.faq dd { margin: 4px 0 0; line-height: 1.8; }
#phoneNote { margin: 8px 0; }

/* ===== 社内向けの画面: 左メニュー（Brave Cockpit と同じ形） ===== */
/* ログイン中はメニューを付け終わるまで描画しない（開いた瞬間に画面が組み変わる「ちらつき」を防ぐ） */
html.is-staff body:not(.withshell) { visibility: hidden; }
.app { display: flex; min-height: 100vh; min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; width: 236px; flex-shrink: 0; display: flex; flex-direction: column;
  background: var(--sidebar); border-right: 1px solid var(--border); padding: 12px; z-index: 40; }
.sidebar .brand { min-height: 45px; margin: 0 -12px 12px; padding: 0 12px 12px 16px; border-bottom: 1px solid var(--border); }
.sidenav { display: flex; flex-direction: column; gap: 2px; }
.navlabel { margin: 14px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--faint); }
.navitem { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 10px; border-radius: 10px; color: var(--muted);
  font-size: 13px; font-weight: 500; text-decoration: none; }
.navitem svg { width: 18px; height: 18px; color: var(--faint); flex-shrink: 0; }
.navitem:hover { background: var(--hover); color: var(--navy); }
.navitem.active { background: var(--soft-blue); color: var(--primary); font-weight: 600; box-shadow: inset 3px 0 0 var(--orange); }
.navitem.active svg { color: var(--primary); }
.sidefoot { margin-top: auto; border-top: 1px solid var(--border); padding-top: 12px; }
.sidefoot .who { display: flex; align-items: center; gap: 8px; padding: 0 4px; }
.sidefoot .who b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role { flex-shrink: 0; border-radius: 999px; padding: 0 8px; font-size: 11px; font-weight: 600; line-height: 20px; }
.role.admin { background: #fff4dc; color: #8a5a00; border: 1px solid #f6d58e; }
.role.staff { background: var(--soft-blue); color: var(--primary); border: 1px solid #c3cde6; }
.sidefoot small { display: block; padding: 2px 4px 6px; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidefoot .navitem { min-height: 34px; }
.appmain { flex: 1; min-width: 0; background: #fff; }
.appmain.centered { display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; background: var(--bg); }
.appmain .page { padding-top: 28px; }
.withshell .pagehead > a.btnlink { display: none; }
.withshell .pagehead h1 { margin-top: 0; }
.mobilebar, .scrim { display: none; }
/* 縁の開閉ボタン（丸） */
.edgetoggle { position: absolute; top: calc(50% - 14px); right: -14px; z-index: 5; width: 28px; height: 28px; min-height: 28px;
  padding: 0; border-radius: 50%; background: #fff; border: 1px solid var(--border-strong); color: var(--navy); font-size: 16px; line-height: 1; box-shadow: var(--shadow-xs); }
.edgetoggle:hover { border-color: var(--orange); background: #fff; }
.edgetoggle:active { transform: none; }
.app.collapsed .sidebar { width: 64px; padding: 12px 8px; }
.app.collapsed .sidebar .brand span, .app.collapsed .navitem span, .app.collapsed .navlabel, .app.collapsed .sidefoot .who, .app.collapsed .sidefoot small { display: none; }
.app.collapsed .sidebar .brand { padding-left: 14px; }
.app.collapsed .navitem { justify-content: center; padding: 8px 0; }

/* スマホ幅: 上に固定のバー（右上に「メニュー」）。メニューは右から出す */
@media (max-width: 700px) {
  .app { display: block; }
  .mobilebar { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: 0; z-index: 30;
    padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top)); background: #fff; border-bottom: 1px solid var(--border); }
  .mobilebar .brand { margin: 0; }
  .menubtn { min-height: 40px; padding: 0 12px; font-size: 14px; gap: 6px; }
  .sidebar { position: fixed; top: 0; right: 0; left: auto; width: min(300px, 86vw); height: 100dvh; transform: translateX(100%);
    transition: transform .2s var(--ease); box-shadow: var(--shadow-lg); border-right: 0; border-left: 1px solid var(--border); }
  .app.open .sidebar { transform: none; }
  .app.open .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(4, 16, 36, .35); }
  .app.collapsed .sidebar { width: min(300px, 86vw); padding: 12px; }
  .app.collapsed .sidebar .brand span, .app.collapsed .navitem span, .app.collapsed .navlabel, .app.collapsed .sidefoot .who, .app.collapsed .sidefoot small { display: revert; }
  .app.collapsed .sidefoot .who { display: flex; }
  .app.collapsed .navitem { justify-content: flex-start; padding: 8px 10px; }
  .edgetoggle { right: auto; left: -14px; display: none; }
  .app.open .edgetoggle { display: block; }
  .appmain.centered { padding: 20px 12px; }
}

/* 使い方AI（右下） */
.helpfab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 50; border-radius: 999px; min-height: 44px;
  padding: 0 16px; background: var(--primary); color: #fff; border: 0; box-shadow: var(--shadow-lg); }
.helpfab:hover { background: var(--primary-hover); }
.helppanel { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 50; width: min(380px, calc(100vw - 32px));
  height: min(520px, calc(100dvh - 100px)); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.helppanel[hidden] { display: none !important; }
.helppanel header { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--navy); }
.helplog { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.helplog p { margin: 0; padding: 8px 12px; border-radius: 12px; max-width: 88%; white-space: pre-wrap; line-height: 1.7; font-size: 13px; }
.helplog .bot { background: #fff; border: 1px solid var(--border); align-self: flex-start; }
.helplog .me { background: var(--soft-blue); color: var(--navy); align-self: flex-end; }
.helplog .waiting { color: var(--muted); }
#helpForm { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); }
#helpForm input { margin: 0; }
#helpForm button { flex-shrink: 0; }
.app.open ~ .helpfab { display: none; }

.shot { margin: 12px 0 4px; }
.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-xs); background: var(--bg); }
.shot figcaption { margin-top: 6px; font-size: 12px; color: var(--muted); text-align: center; }
.shots2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: start; }
.shots2 .shot img { max-height: 520px; object-fit: contain; }
@media (max-width: 700px) {
  .appmain { min-height: calc(100dvh - 57px); }
  .sidebar { box-shadow: none; visibility: hidden; transition: transform .2s var(--ease), visibility 0s .2s; }
  .app.open .sidebar { box-shadow: var(--shadow-lg); visibility: visible; transition: transform .2s var(--ease); }
}

.viewtabs { max-width: 320px; margin: 4px 0 12px; }
.custrow { width: 100%; text-align: left; font: inherit; cursor: pointer; display: block; min-height: 0; }
.custrow:hover { background: #fff; }

.autoyt { margin: 6px 0 10px; }
.autoyt p { margin: 0 0 4px; }
#ytAutoBox { margin-top: 10px; }
.manualyt { margin: 6px 0 12px; }
