﻿:root {
  color-scheme: dark;
  --background: #2b3663;
  --header: #8a9bcf;
  --button: #c9d2ef;
  --text: #f1f4ff;
  --line: #8192c2;
  background: var(--background);
  color: var(--text);
  font-family: system-ui, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; }
h1, h2, p { margin: 0; }
button, select, input { font: inherit; }
button {
  background: var(--button);
  border: 0;
  color: var(--background);
  cursor: pointer;
  font-weight: 700;
}
:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }
.symbols { position: absolute; width: 0; height: 0; }
.screen { position: relative; min-height: max(600px, 100svh); text-align: center; }
.brand {
  display: grid;
  place-items: center;
  height: 71px;
  background: var(--header);
  color: var(--background);
  font-size: 24px;
  letter-spacing: -.7px;
}
.brand-logo {
  display: block;
  width: min(192px, calc(100% - 32px));
  height: auto;
}
.login-panel {
  width: min(320px, calc(100% - 48px));
  margin: clamp(40px, 12svh, 104px) auto 40px;
}
.login-panel h1 { margin-bottom: 28px; text-align: center; font-size: 30px; }
.login-panel form { display: grid; gap: 10px; }
.login-panel label { font-weight: 700; }
.login-panel input:not([type="hidden"]) {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #4d5a8e;
  color: var(--text);
}
.login-panel .wide { width: 100%; margin-top: 8px; }
.login-error { color: #ffd4d9; font-size: 14px; }
.login-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.login-switch { display: grid; justify-items: center; gap: 12px; margin-top: auto; padding: 16px 24px max(24px, env(safe-area-inset-bottom)); text-align: center; }
.login-switch form { width: min(320px, 100%); }
.login-switch .wide { width: 100%; }
.login-switch a { color: var(--header); text-decoration: none; }
.host-menu { display: grid; gap: 12px; }
.host-menu a { display: grid; place-items: center; background: var(--button); color: var(--background); font-weight: 700; text-decoration: none; }
#monitor:disabled { opacity: .45; cursor: default; }
#call-guest, #monitor-status { margin-inline: 0; text-align: left; }
.invite-panel a, .login-panel > a { color: inherit; }
.invite-history { margin-top: 24px; }
.invite-history summary { padding: 12px 0; cursor: pointer; font-weight: 700; }
.invite-code-row { position: relative; }
.login-panel .invite-code-row input { margin: 0; padding-right: 48px; }
.invite-code-row button { position: absolute; inset: 0 0 0 auto; display: grid; place-items: center; width: 44px; padding: 0; border-radius: 8px; background: transparent; color: var(--text); }
.invite-code-row button:focus-visible { outline-offset: -4px; }
.invite-code-row button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.invite-code-row + .status:empty { display: none; }
.invite-list { padding: 0; list-style: none; }
.invite-list li { border-top: 1px solid currentColor; padding: 12px 0; overflow-wrap: anywhere; }
.invite-list form { justify-content: start; }
#entry:not([hidden]) { display: flex; flex-direction: column; min-height: 100svh; }
.profile { margin: auto 0; padding: 16px 0; }
.call-profile {
  position: absolute;
  right: 0;
  left: 0;
  top: 33.18%;
}
.avatar {
  display: block;
  width: 146px;
  height: 146px;
  margin: 0 auto;
  border-radius: 50%;
}
.profile p { margin-top: 22px; font-size: 20px; line-height: 1.45; }
.wide { width: min(320px, calc(100% - 40px)); min-height: 54px; border-radius: 14px; }
.entry-actions { display: grid; gap: 12px; width: min(320px, calc(100% - 40px)); margin: 0 auto clamp(20px, 8.77svh, 72px); }
.entry-actions .wide { width: 100%; }
.test-screen {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}
.test-screen h2 { margin-top: clamp(16px, 6svh, 50px); font-size: 30px; line-height: 1.4; }
.test-controls {
  width: min(280px, calc(100% - 48px));
  margin: clamp(16px, 5svh, 42px) auto 0;
  font-size: 14px;
}
.round {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.round svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.test-controls > .audio-actions:first-child {
  display: grid;
  grid-auto-flow: column;
  place-items: center;
  margin: 0 auto;
}
.test-controls p:not(.status) { font-weight: 700; margin: 8px 0 12px; }
.test-controls #mic-label { margin-top: 12px; }
select {
  width: 100%;
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #4d5a8e;
  color: var(--text);
}
#position, meter { display: block; width: 100%; height: 8px; margin: 10px 0 0; }
#position { appearance: none; background: #7589c8; border-radius: 20px; cursor: pointer; }
#position::-webkit-slider-thumb { appearance: none; width: 8px; height: 8px; border-radius: 50%; background: var(--button); }
#position[value="0"]::-webkit-slider-thumb { opacity: 0; }
#position::-moz-range-thumb { width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--button); }
#position[value="0"]::-moz-range-thumb { opacity: 0; }
meter { appearance: none; background: #7589c8; border-radius: 20px; overflow: hidden; }
meter::-webkit-meter-bar { height: 8px; border: 0; background: #7589c8; }
meter::-webkit-meter-optimum-value { background: var(--button); }
meter::-moz-meter-bar { background: var(--button); }
.times { display: flex; justify-content: space-between; margin-top: 5px; font-size: 12px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0 24px; }
.status { margin: 10px auto 0; width: min(100%, 32ch); font-size: 13px; }
.status:empty { display: none; }
.test-navigation {
  margin-top: auto;
  padding: 20px 0 max(16px, env(safe-area-inset-bottom));
}
.navigation { display: grid; justify-items: center; gap: 10px; }
.back { background: transparent; color: var(--text); min-height: 44px; padding: 0 20px; }
@media (max-height: 760px) {
  .test-screen .brand { height: 56px; }
  .test-screen h2 { margin-top: 16px; font-size: 26px; }
  .test-controls { margin-top: 16px; }
  .test-controls p:not(.status) { margin: 6px 0 8px; }
  .test-controls hr { margin: 12px 0; }
  .test-navigation { padding-top: 14px; }
  .navigation {
    grid-template-columns: 1fr auto;
    width: min(320px, calc(100% - 40px));
    margin: 0 auto;
  }
  .navigation .wide { width: 100%; min-height: 44px; }
}
.call-profile { top: 31.99%; }
.waiting-title { display: none; margin-top: 20px; font-size: 30px; }
#call[data-waiting] .waiting-title { display: block; }
#call[data-waiting] .timer,
#call[data-waiting] .audio-actions { display: none; }
.timer { margin-top: 20px; font-size: 34px; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.call-actions {
  position: absolute;
  left: 50%;
  bottom: 8.77%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 25px;
}
.audio-actions {
  display: inline-flex;
  width: max-content;
  vertical-align: middle;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 34px;
}
.audio-actions .round {
  width: 54px;
  height: 54px;
  border: 0;
  background: transparent;
  color: var(--button);
}
.audio-actions .round[aria-pressed="true"] { background: var(--button); color: var(--background); }
.audio-actions svg { width: 28px; height: 28px; }
.hangup { width: 66px; height: 66px; background: #ae516d; color: white; }
