:root {
  color-scheme: light;
  --ink: #16324f;
  --muted: #465d72;
  --blue: #174e7b;
  --pale: #edf5fb;
  --line: #b9cddd;
  --danger: #962b32;
  --surface: #ffffff;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 24px; }
body {
  margin: 0;
  color: var(--ink);
  background: #f7fafc;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  font-size: 18px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
a { color: var(--blue); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #be6405; outline-offset: 4px; }
.skip-link { position: absolute; top: -120px; left: 16px; background: white; padding: 12px 20px; z-index: 10; }
.skip-link:focus { top: 10px; }
.site-header { max-width: 1240px; margin: auto; padding: 22px 40px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); font-size: 30px; font-weight: 800; letter-spacing: -0.04em; text-decoration: none; }
.brand span { color: var(--blue); font-weight: 500; }
.home-link { padding: 8px 0; }
.shell { max-width: 1200px; margin: auto; padding: 48px 40px 64px; }
.introduction { margin-bottom: 36px; }
.eyebrow { font-weight: 700; margin: 0 0 12px; color: var(--blue); }
.version { display: inline-block; margin-left: 12px; padding: 0 10px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-weight: 400; }
h1 { font-size: clamp(28px, 3.2vw, 42px); letter-spacing: 0.01em; line-height: 1.5; margin: 0 0 12px; }
h2 { font-size: 26px; line-height: 1.5; margin: 0 0 14px; }
p { margin: 0 0 18px; }
.lead { color: var(--muted); font-size: 20px; margin: 0; }
.entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.entry-card { background: var(--surface); border: 1px solid var(--line); padding: 30px; border-radius: 12px; display: flex; flex-direction: column; min-width: 0; }
.teacher-card { background: var(--pale); }
.role-label { font-size: 18px; color: var(--blue); font-weight: 700; margin-bottom: 8px; }
.entry-card > p:not(.role-label) { color: var(--muted); }
.entry-card form { display: flex; flex-direction: column; flex: 1; }
label { display: block; margin-bottom: 8px; font-weight: 700; }
label span { font-weight: 400; color: var(--muted); margin-left: 6px; }
input { display: block; width: 100%; min-width: 0; min-height: 56px; border: 1px solid #7b96ad; border-radius: 6px; padding: 10px 12px; color: var(--ink); background: white; margin-bottom: 20px; }
input::placeholder { color: #566b7d; opacity: 1; }
input[aria-invalid="true"] { border: 2px solid var(--danger); }
.button { display: inline-flex; min-height: 56px; align-items: center; justify-content: center; border: 2px solid var(--blue); border-radius: 7px; padding: 12px 22px; font-weight: 700; text-align: center; text-decoration: none; line-height: 1.5; color: var(--blue); background: white; }
.entry-card .button { width: 100%; margin-top: auto; }
.button:hover { background: #e2edf5; }
.button.primary { background: var(--blue); color: white; }
.button.primary:hover { background: #123d60; }
.button:disabled { cursor: wait; opacity: 0.6; }
.name-help { margin: 18px 0 36px; color: var(--muted); }
.preparation { border-top: 1px solid var(--line); padding-top: 32px; margin-top: 32px; }
#steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; padding-left: 24px; margin: 24px 0; }
#steps li { padding-left: 6px; }
#steps li::marker { color: var(--blue); font-weight: 700; }
#steps strong, #steps span { display: block; }
#steps span { color: var(--muted); margin-top: 6px; }
.feature-line { font-weight: 700; margin-bottom: 10px; }
.privacy { margin-top: 32px; padding: 28px 30px; border: 1px solid var(--line); border-radius: 8px; background: #eef3f7; }
.privacy h2 { font-size: 22px; }
.privacy ul { padding-left: 24px; margin-bottom: 0; }
.privacy li + li { margin-top: 10px; }
.message { padding: 18px 22px; border: 1px solid var(--line); background: white; border-radius: 6px; }
.error { color: var(--danger); border-color: #c28e92; background: #fff6f6; }
.site-footer { max-width: 1200px; margin: auto; padding: 24px 40px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); }
.retry-help { margin: 16px 0 0; }
.exit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding: 24px 0; }
.exit-row p { flex: 1; min-width: 230px; color: var(--muted); margin: 0; }
.button.leave { border-color: var(--danger); color: var(--danger); }
.button.leave:hover { background: #fff0f0; }
.return-panel { max-width: 760px; margin: 36px auto; padding: 40px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.return-panel h2 { font-size: 34px; }
.return-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.room-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.room-top h2 { font-size: 32px; }
.invitation { padding: 22px; margin: 24px 0; background: var(--pale); border: 1px solid var(--line); border-radius: 8px; }
.invite-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: start; margin-bottom: 12px; }
.invite-tools input { flex: 1 1 320px; margin: 0; }
.invite-tools .button { flex: 0 1 auto; }
#copy-status:not(:empty) { margin-bottom: 12px; color: var(--blue); }
.invitation p { margin-bottom: 0; }
#meeting { width: 100%; min-height: 480px; height: 70vh; height: 70dvh; background: #e5edf4; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
#meeting:empty { min-height: 160px; height: 160px; }
#meeting iframe { display: block; width: 100%; height: 100%; border: 0; }
@media (max-width: 700px) {
  .site-header { padding: 16px 20px; gap: 12px; }
  .brand { font-size: 26px; }
  .shell { padding: 30px 20px 40px; }
  .entry-grid { grid-template-columns: 1fr; gap: 20px; }
  .entry-card { padding: 24px 20px; }
  #steps { grid-template-columns: 1fr; gap: 18px; }
  .privacy { padding: 24px 20px; }
  .site-footer { padding: 24px 20px; }
  h2 { font-size: 24px; }
}
