/* TOQL presentation layer. Keep behavior, visibility and caption scaling in the existing clients. */
body.toql-page {
  --bg: #f3f7f8; --panel: #fff; --line: #d7e3e7; --text: #17314e;
  --muted: #566b7c; --accent: #007d79;
  --toql-navy: #17314e; --toql-teal: #00afa7; --toql-soft: #e9f7f5;
  background: var(--bg); color: var(--text); color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.6;
}
.toql-page .shell { padding: 28px 24px 48px; }
.toql-page .topbar { align-items: center; padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.toql-page .topbar > div:first-child { min-width: 0; }
.toql-page .toql-brand { width: 210px; height: 88px; overflow: hidden; border-radius: 12px; background: #fff; }
.toql-page .toql-brand img { display: block; width: 210px; height: 88px; object-fit: cover; }
.toql-page h1 { font-size: 23px; letter-spacing: .03em; margin: 14px 0 6px; line-height: 1.4; }
.toql-page h2 { font-size: 18px; letter-spacing: .02em; color: var(--text); }
.toql-page h3 { color: var(--text); }
.toql-page .panel, .toql-page .service-meta, .toql-page .public-controls {
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px;
  padding: 24px; margin: 18px 0; box-shadow: 0 4px 18px rgb(23 49 78 / 3%);
}
.toql-page label { color: #374f65; font-weight: 600; }
.toql-page input, .toql-page select, .toql-page textarea {
  min-width: 0; max-width: 100%; background: #fff; color: var(--text);
  border-color: #afc4cd; border-radius: 10px; font-weight: 400;
}
.toql-page input[readonly] { background: #f0f5f7; color: #405b6f; }
.toql-page input::placeholder, .toql-page textarea::placeholder { color: #657888; opacity: 1; }
.toql-page input[type="checkbox"], .toql-page input[type="radio"] { accent-color: #007d79; }
.toql-page button { min-height: 44px; background: var(--toql-navy); color: #fff; border-color: var(--toql-navy); border-radius: 12px; }
.toql-page button:hover:not(:disabled) { background: #244967; border-color: #244967; }
.toql-page button.secondary { background: #fff; color: var(--toql-navy); border-color: #afc4cd; }
.toql-page button.secondary:hover:not(:disabled) { background: var(--toql-soft); border-color: #007d79; }
.toql-page button.danger { background: #fff0f0; color: #a02336; border-color: #d9929b; }
.toql-page button.danger:hover:not(:disabled) { background: #ffe0e4; border-color: #a02336; }
.toql-page :is(button, input, select, textarea, summary, a):focus-visible { outline: 3px solid #008a83; outline-offset: 3px; }
.toql-page button:disabled { cursor: not-allowed; opacity: .5; }
.toql-page a { color: #006c72; text-underline-offset: 3px; }
.toql-page .small, .toql-page .small-inline, .toql-page .public-footer { color: var(--muted); line-height: 1.65; }
.toql-page .notice, .toql-page .eyebrow, .toql-page .help-link { color: #00736f; }
.toql-page .notice { overflow-wrap: anywhere; }
.toql-page .status, .toql-page .broadcast-lamp, .toql-page .vad { background: #eef3f5; color: #486075; border-color: #b9cbd3; }
.toql-page .status.live, .toql-page .vad.speaking { background: #e3f6ef; color: #116544; border-color: #72b89b; }
.toql-page .status.busy { background: #fff5d6; color: #795300; border-color: #d8b55a; }
.toql-page .status.error { background: #fff0f0; color: #a02336; border-color: #d9929b; }
.toql-page .broadcast-lamp.on { background: #fff0f0; color: #a02336; border-color: #d9929b; }
.toql-page .broadcast-lamp.on .lamp-dot { background: #c33248; box-shadow: 0 0 0 3px rgb(195 50 72 / 12%); }
.toql-page .hub-choice-card { box-shadow: none; border-radius: 18px; padding: 26px; }
.toql-page .hub-choice-card.personal { background: var(--toql-soft); color: #145953; border-color: #73c5bc; }
.toql-page .hub-choice-card.personal:hover { background: #d9f1ec; border-color: #007d79; }
.toql-page .hub-choice-card.organization { background: var(--toql-navy); color: #fff; border-color: var(--toql-navy); }
.toql-page .hub-choice-card.organization:hover { background: #244967; border-color: #244967; }
.toql-page .hub-choice-title { font-size: 23px; }
.toql-page .hub-choice-sub { opacity: 1; }
.toql-page #personalHubPanel, .toql-page #personalDataPanel { background: #f4fbf9; border-color: #91cfc6; }
.toql-page .usage-card, .toql-page .subpanel, .toql-page #adminContent .control-card,
.toql-page .settings-panel .subpanel, .toql-page .hub-detail-grid .subpanel {
  background: #f5f9fa; color: var(--text); border-color: var(--line); border-radius: 14px;
}
.toql-page .usage-card.emphasis { background: var(--toql-soft); border-color: #91cfc6; }
.toql-page .usage-card > small, .toql-page .subpanel small,
.toql-page .settings-panel .subpanel .small, .toql-page .settings-panel .subpanel .small-inline { color: var(--muted); }
.toql-page .usage-card > strong { color: var(--toql-navy); font-variant-numeric: tabular-nums; }
.toql-page .settings-panel { background: #fff; color: var(--text); border-color: var(--line); box-shadow: 0 12px 36px rgb(23 49 78 / 12%); }
.toql-page .settings-panel .subpanel input, .toql-page .settings-panel .subpanel select,
.toql-page .settings-panel .subpanel button.secondary { background: #fff; color: var(--text); border-color: #afc4cd; }
.toql-page .primary-control { box-shadow: inset 4px 0 0 var(--toql-teal); }
.toql-page .control-toggle { background: #fff; color: var(--text); border-color: #afc4cd; }
.toql-page .control-toggle small { color: var(--muted); }
.toql-page .control-toggle.on { background: #e3f6ef; color: #145953; border-color: #459f84; }
.toql-page .control-toggle.on:hover { background: #d4eee3; color: #145953; }
.toql-page .control-toggle.on small { color: #116544; }
.toql-page .control-toggle.on .toggle-knob { background: #007d79; }
.toql-page .control-toggle:not(.on):hover { background: #eef5f5; color: var(--text); }
.toql-page .operator-language-row { background: #fff; border-color: var(--line); }
.toql-page .language-group-title, .toql-page .pill { background: #e7f2f3; color: #32596a; }
.toql-page .console-summary span { background: #fff; color: var(--text); }
.toql-page .hub-console-card { background: #fff; color: var(--text); border-color: var(--line); }
.toql-page .hub-console-card.personal { border-left: 4px solid #008a83; }
.toql-page .hub-console-card.organization { border-left: 4px solid var(--toql-navy); }
.toql-page .hub-console-card:hover { background: #f0f8f7; color: var(--text); border-color: #7bbfb7; }
.toql-page .hub-console-card.live { box-shadow: 0 0 0 2px rgb(0 138 131 / 12%); }
.toql-page .live-dot { color: #116544; }
.toql-page .tablewrap { border-radius: 12px; border: 1px solid var(--line); }
.toql-page th { background: #edf4f6; color: #374f65; font-size: 12px; }
.toql-page th, .toql-page td { padding: 12px 10px; }
.toql-page .captions { background: var(--toql-navy); color: #fff; border-color: var(--toql-navy); border-radius: 18px; }
.toql-page .caption-card { border-bottom-color: #3b536a; }
.toql-page .caption-card.previous { opacity: .82; }
.toql-page .caption-ja small, .toql-page .caption-en small { color: #65ddd2; }
.toql-page .placeholder { color: #c0cfda; }
.toql-page .listener-controls { box-shadow: 0 5px 20px rgb(23 49 78 / 7%); }
.toql-page .listener-picker > summary { background: #fff; color: var(--text); border-color: #afc4cd; }
.toql-page .listener-picker[open] > summary { border-color: #008a83; }
.toql-page .listener-choice-list { background: #fff; border-color: #afc4cd; box-shadow: 0 12px 28px rgb(23 49 78 / 15%); }
.toql-page .listener-choice:hover { background: var(--toql-soft); border-radius: 8px; }
.toql-page .audio-play-toggle { background: #fff; color: var(--text); border-color: #afc4cd; }
.toql-page .audio-play-toggle.on { background: #e3f6ef; color: #116544; border-color: #72b89b; }
.toql-page .audio-play-toggle:disabled { background: #eef3f5; color: #566b7c; border-color: #b9cbd3; }
.toql-page .listener-font-controls button { background: #edf4f6; color: var(--text); border-color: #afc4cd; }
.toql-page .public-captions { min-height: 50vh; }
.toql-page .grid2 > *, .toql-page .row > *, .toql-page .sharebox > * { min-width: 0; }
.toql-page ::selection { background: #a8e5dc; color: #17314e; }
/* Candidate copy must shrink independently of the review buttons. */
.toql-page #venueCandidatesV09 {
  min-width: 0; padding: 14px 16px; background: #f5f9fa;
  color: var(--text); border: 1px solid var(--line); border-radius: 14px;
}
.toql-page #venueCandidatesV09 > summary { color: var(--text); overflow-wrap: anywhere; }
.toql-page #venueCandidatesV09 .dict-candidate {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: start; gap: 12px 20px; padding: 16px 0;
}
.toql-page #venueCandidatesV09 .dict-candidate-copy { min-width: 0; overflow-wrap: anywhere; }
.toql-page #venueCandidatesV09 .dict-candidate-copy > strong { display: block; line-height: 1.6; }
.toql-page #venueCandidatesV09 .dict-candidate-translation { margin-top: 3px; color: #405b6f; }
.toql-page #venueCandidatesV09 .dict-candidate-reason { margin-top: 6px; }
.toql-page #venueCandidatesV09 .dict-candidate-actions {
  display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; align-items: start;
}
.toql-page #venueCandidatesV09 .dict-candidate-actions button {
  flex: 0 0 auto; white-space: nowrap; margin: 0;
}
@media (max-width: 850px) {
  .toql-page #venueCandidatesV09 .dict-candidate { grid-template-columns: minmax(0, 1fr); }
  .toql-page #venueCandidatesV09 .dict-candidate-actions { justify-content: flex-start; }
}
@media (max-width: 420px) {
  .toql-page #venueCandidatesV09 { padding: 12px; }
  .toql-page #venueCandidatesV09 .dict-candidate-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .toql-page #venueCandidatesV09 .dict-candidate-actions button { width: 100%; white-space: normal; overflow-wrap: anywhere; }
}
@media (max-width: 700px) {
  .toql-page .shell { padding: 16px 12px 32px; }
  .toql-page .topbar { flex-wrap: wrap; gap: 14px; margin-bottom: 18px; padding-bottom: 16px; }
  .toql-page .topbar h1 { font-size: 20px; }
  .toql-page .live-cluster { max-width: 100%; justify-content: flex-start; }
  .toql-page .panel, .toql-page .service-meta { padding: 18px 16px; border-radius: 16px; }
  .toql-page .public-controls { padding: 12px; border-radius: 14px; }
  .toql-page .toql-brand, .toql-page .toql-brand img { width: 168px; height: 70px; }
  .toql-page input, .toql-page select, .toql-page textarea { font-size: 16px; }
  .toql-page .hub-choice-card { padding: 20px; }
  .toql-page .hub-choice-title { font-size: 21px; }
  .toql-page .console-summary { gap: 6px; }
  .toql-page .hub-console-grid { grid-template-columns: minmax(0, 1fr); }
  .toql-page .public-captions { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .toql-page *, .toql-page *::before, .toql-page *::after { transition: none !important; scroll-behavior: auto !important; }
}

.toql-page .account-device-choice{display:flex;flex-direction:row;align-items:center;gap:10px}
.toql-page .account-device-choice input{width:auto;margin:0;padding:0;flex:none}
