@charset "UTF-8";
:root {
  color-scheme: light;
  --ink: #203b36;
  --muted: #6a7d75;
  --green: #1c5c52;
  --green-dark: #14483f;
  --mint: #edf5ef;
  --line: #dfe6de;
  --paper: #fff;
  --bg: #f5f6f2;
  --red: #a6493e;
  --sans: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #a3813a;
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
button {
  border: 0;
}
button svg {
  pointer-events: none;
}
[hidden] {
  display: none !important;
}
input,
select {
  width: 100%;
  color: var(--ink);
  border: 1px solid #cfd9cf;
  border-radius: 8px;
  background: #fff;
}
input:focus,
select:focus {
  border-color: var(--green);
}
input {
  padding: 13px 15px;
}
select {
  padding: 13px 38px 13px 15px;
  min-height: 50px;
}
label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 9px;
}
input::placeholder {
  color: #becbc2;
}
small {
  font-size: 11px;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-family: Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 10px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border-radius: 8px;
  padding: 14px 22px;
  min-height: 50px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s;
}
.primary {
  background: var(--green);
  color: white;
}
.primary:hover:not(:disabled) {
  background: var(--green-dark);
}
.primary span {
  font-size: 21px;
  line-height: 1;
}
.secondary {
  background: #f0f3ee;
  color: var(--ink);
}
.danger-button {
  background: var(--red);
  color: white;
}
.text-button {
  background: transparent;
  padding: 7px 0;
  font-size: 12px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.text-button:hover {
  color: var(--green);
}
.text-button.danger {
  color: var(--red);
}
.form-message {
  font-size: 12px;
  min-height: 23px;
  margin-top: 12px;
  color: var(--green);
}
.error-text,
#login-message {
  color: var(--red);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand > span {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0.09em;
  font-size: 19px;
  line-height: 1.5;
  white-space: nowrap;
}
.brand small {
  display: block;
  font-family: Arial, sans-serif;
  font-size: 8px;
  letter-spacing: 0.16em;
  font-weight: 400;
  margin-top: 3px;
}
.brand img {
  flex-shrink: 0;
}
.connection {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  font-size: 11px;
  color: var(--green);
}
.connection:before,
.small-dot,
.live-dot {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4d8a63;
  flex-shrink: 0;
}
.connection.offline {
  color: #8a6321;
}
.connection.offline:before {
  background: #b78d47;
}
.notice {
  background: #fcf1d9;
  border: 1px solid #e4c68c;
  color: #76561e;
  border-radius: 8px;
  padding: 12px 22px;
  text-align: center;
}
.notice.error {
  background: #fbece9;
  color: var(--red);
  border-color: #e7c2b9;
}
.admin-page {
  background: var(--bg);
}
.admin-layout {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 246px;
  flex-shrink: 0;
  padding: 38px 23px 25px;
  border-right: 1px solid var(--line);
  background: #fdfefa;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar .brand {
  gap: 10px;
}
.sidebar .brand > span {
  font-size: 17px;
}
.sidebar .brand img {
  width: 38px;
  height: 38px;
}
.sidebar-label {
  font-size: 10px;
  letter-spacing: 0.07em;
  color: #89968b;
  margin: 55px 14px 15px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 7px;
  color: #708176;
  font-size: 12px;
  margin-bottom: 8px;
}
.nav-item.selected {
  background: #e9f1e9;
  color: var(--green);
  font-weight: 600;
}
.nav-item:hover {
  background: #edf2e9;
}
.nav-item > span:first-child {
  font-size: 18px;
  line-height: 1;
}
.external {
  margin-left: auto;
}
.sidebar-bottom {
  margin-top: auto;
  font-size: 10px;
  color: #768779;
  padding: 14px 12px 0;
  border-top: 1px solid var(--line);
}
.sidebar-bottom .small-dot {
  margin-right: 6px;
}
.sidebar-bottom small {
  display: block;
  font-family: Arial, sans-serif;
  letter-spacing: 0.12em;
  font-size: 8px;
  color: #97a294;
  margin-top: 9px;
}
.admin-main {
  padding: 43px 48px 28px;
  max-width: 1450px;
  flex: 1;
  min-width: 0;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 33px;
}
.page-header h1 {
  font-size: 27px;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin-bottom: 8px;
}
.page-header .muted {
  font-size: 12px;
}
.header-tools {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: 0 3px 10px #25372a03;
}
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.15fr) minmax(290px, 1fr);
  gap: 24px;
  align-items: start;
}
.call-panel,
.current-panel {
  padding: 25px 28px 21px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 26px;
}
.section-heading h2 {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.step {
  font:
    10px Arial,
    sans-serif;
  letter-spacing: 0.03em;
  border: 1px solid #d2dfd4;
  border-radius: 5px;
  color: var(--green);
  padding: 5px;
}
.pill {
  font-size: 10px;
  color: #68846e;
  border: 1px solid #dbe5d8;
  border-radius: 4px;
  padding: 2px 7px;
  white-space: nowrap;
}
.number-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-top: 25px;
  margin-bottom: 8px;
}
.number-label label {
  margin: 0;
}
.number-label > span {
  font-size: 10px;
  color: #849087;
}
.number-input-wrap {
  position: relative;
}
.number-input-wrap input {
  font-family: Arial, sans-serif;
  font-size: 54px;
  font-weight: 500;
  text-align: center;
  letter-spacing: 0.1em;
  background: #fcfdfb;
  height: 105px;
  padding: 12px 40px;
}
.erase-button {
  position: absolute;
  right: 12px;
  top: calc(50% - 18px);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 21px;
  color: #819286;
  background: transparent;
}
.erase-button:hover {
  background: #edf2eb;
}
.field-help {
  color: #8a978c;
  font-size: 10px;
  margin-top: 9px;
}
.call-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f2f6f0;
  border-radius: 7px;
  padding: 14px;
  margin: 24px 0 18px;
  min-height: 65px;
}
.preview-icon {
  font-size: 18px;
  color: var(--green);
}
.call-preview p {
  font-size: 11px;
  color: #5c7564;
}
.call-button {
  width: 100%;
  justify-content: space-between;
  padding: 17px 23px;
}
.call-panel .form-message {
  margin-bottom: 0;
  line-height: 1.7;
  min-height: 21px;
}
.current-panel .section-heading {
  margin-bottom: 7px;
}
.live-label {
  font:
    9px Arial,
    sans-serif;
  letter-spacing: 0.13em;
  color: #729d77;
}
.panel-description {
  font-size: 11px;
  margin-bottom: 21px;
}
.current-room {
  background: #f8f9f5;
  border: 1px solid #e6eae1;
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 13px;
}
.current-room.active {
  background: #f3f7f0;
  border-color: #dae5d6;
}
.current-room-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.current-room h3 {
  font-size: 12px;
  font-weight: 600;
}
.room-state {
  font-size: 9px;
  color: #81917e;
}
.active .room-state {
  color: var(--green);
}
.current-number {
  text-align: center;
  font:
    500 43px/1.4 Arial,
    sans-serif;
  letter-spacing: 0.05em;
  color: var(--green);
  margin: 9px 0;
}
.current-room:not(.active) .current-number {
  color: #bdc9ba;
}
.room-idle {
  text-align: center;
  font-size: 10px;
  color: #94a08e;
  margin-top: 4px;
}
.room-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  font-size: 9px;
  color: #8b9983;
}
.room-actions > div {
  display: flex;
  gap: 5px;
}
.small-button {
  font-size: 9px;
  min-height: 30px;
  background: white;
  border: 1px solid #d8e1d2;
  color: #62785a;
  padding: 5px 8px;
  border-radius: 4px;
}
.small-button:hover {
  background: #eaf1e5;
}
.display-shortcut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}
.display-shortcut strong {
  font-size: 11px;
  font-weight: 500;
}
.display-shortcut p {
  font-size: 9px;
  color: #92a08a;
  margin-top: 3px;
}
.icon-link {
  width: 33px;
  height: 33px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: #f1f5ed;
  font-size: 18px;
  color: var(--green);
}
.icon-link:hover {
  background: #e1ebda;
}
.history-panel {
  margin-top: 26px;
  padding: 23px 28px;
}
.history-panel .section-heading {
  margin-bottom: 15px;
}
.history-count {
  font-size: 9px;
  font-weight: 400;
  color: #95a08e;
  margin-left: 5px;
}
.empty-state {
  text-align: center;
  padding: 23px 0 31px;
}
.empty-state > span {
  font-size: 28px;
  color: #a3b49a;
}
.empty-state p {
  font-size: 12px;
  color: #7f8c76;
  margin: 8px 0 3px;
}
.empty-state small {
  color: #9ba691;
  font-size: 10px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 10px;
  color: #8b9983;
  background: #f6f8f2;
  font-weight: 500;
  padding: 10px 16px;
}
th:first-child {
  border-radius: 5px 0 0 5px;
}
th:last-child {
  border-radius: 0 5px 5px 0;
}
td {
  font-size: 11px;
  padding: 13px 16px;
  border-bottom: 1px solid #eff2eb;
}
.history-time {
  font-family: Arial, sans-serif;
  color: #89977f;
}
.history-number {
  font:
    600 17px Arial,
    sans-serif;
  letter-spacing: 0.03em;
  color: var(--green);
}
tr:last-child td {
  border-bottom: 0;
}
.admin-footnote {
  font-size: 9px;
  color: #97a18e;
  margin-top: 21px;
  text-align: center;
}
.login-panel {
  max-width: 510px;
  margin: 50px auto;
  padding: 35px;
}
.login-panel h2 {
  font-size: 21px;
  margin-bottom: 12px;
}
.login-panel .muted {
  font-size: 12px;
  margin-bottom: 27px;
}
.login-panel .button {
  width: 100%;
  margin-top: 20px;
}
.subtle-link {
  font-size: 11px;
  color: var(--muted);
  display: inline-block;
  border-bottom: 1px solid var(--line);
  margin-top: 13px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  width: 460px;
  max-width: calc(100% - 32px);
  padding: 30px;
  color: var(--ink);
  box-shadow: 0 20px 80px #203b3620;
}
dialog::backdrop {
  background: #122e2666;
}
dialog h2 {
  font-size: 19px;
  margin: 8px 0 13px;
}
dialog .muted {
  font-size: 12px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
}
.dialog-actions .button {
  font-size: 12px;
  padding: 12px 16px;
}
@media (max-width: 1150px) {
  .sidebar {
    width: 215px;
    padding: 30px 17px;
  }
  .sidebar .brand > span {
    font-size: 15px;
  }
  .sidebar .brand img {
    width: 33px;
    height: 33px;
  }
  .admin-main {
    padding: 35px 28px;
  }
  .workspace-grid {
    gap: 18px;
    grid-template-columns: minmax(280px, 1fr) minmax(260px, 0.95fr);
  }
  .call-panel,
  .current-panel {
    padding: 21px;
  }
  .page-header h1 {
    font-size: 24px;
  }
  .number-label > span {
    font-size: 9px;
  }
  .section-heading h2 {
    font-size: 13px;
  }
  .room-actions {
    flex-wrap: wrap;
  }
}
@media (max-width: 900px) {
  .sidebar {
    width: 180px;
    padding: 28px 12px;
  }
  .sidebar .brand {
    flex-direction: column;
    gap: 9px;
    align-items: flex-start;
    padding-left: 12px;
  }
  .sidebar-label {
    font-size: 9px;
    margin-top: 37px;
  }
  .nav-item {
    font-size: 10px;
    padding: 12px 10px;
    gap: 7px;
  }
  .sidebar-bottom {
    font-size: 9px;
  }
  .admin-main {
    padding: 30px 23px;
  }
  .workspace-grid {
    grid-template-columns: 1fr;
  }
  .page-header {
    align-items: flex-start;
  }
  .page-header h1 {
    font-size: 22px;
  }
  .header-tools {
    padding-top: 5px;
  }
  .page-header .muted {
    max-width: 280px;
  }
  .current-panel {
    padding-bottom: 24px;
  }
  #current-rooms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
    gap: 13px;
  }
  .current-room {
    margin-bottom: 0;
  }
  .display-shortcut {
    margin-top: 20px;
  }
  .history-panel {
    padding: 22px;
  }
}
@media (max-width: 600px) {
  .admin-layout {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    width: auto;
    padding: 15px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .sidebar .brand {
    flex-direction: row;
    padding: 0;
    gap: 9px;
    align-items: center;
  }
  .sidebar .brand > span {
    font-size: 15px;
  }
  .sidebar .brand img {
    width: 31px;
    height: 31px;
  }
  .sidebar .brand small {
    font-size: 6px;
  }
  .sidebar-label,
  .sidebar-bottom,
  .nav-item.selected {
    display: none;
  }
  .nav-item {
    font-size: 9px;
    padding: 8px 10px;
    margin: 0;
  }
  .nav-item > span:first-child {
    display: none;
  }
  .admin-main {
    padding: 24px 17px;
  }
  .page-header {
    gap: 10px;
    margin-bottom: 22px;
  }
  .page-header h1 {
    font-size: 20px;
  }
  .page-header .eyebrow {
    font-size: 9px;
    margin-bottom: 8px;
  }
  .page-header .muted {
    font-size: 10px;
    max-width: 240px;
  }
  .connection {
    font-size: 9px;
    gap: 5px;
  }
  .text-button {
    font-size: 10px;
  }
  .header-tools {
    gap: 0;
  }
  .call-panel,
  .current-panel {
    padding: 21px;
  }
  .history-panel {
    padding: 19px 17px;
    margin-top: 20px;
  }
  .history-panel .section-heading h2 {
    font-size: 12px;
    gap: 4px;
  }
  .history-count {
    font-size: 8px;
  }
  .history-panel .text-button {
    font-size: 9px;
  }
  .history-panel .section-heading {
    gap: 7px;
  }
  .admin-footnote {
    font-size: 9px;
    line-height: 1.9;
  }
  th,
  td {
    padding: 11px 9px;
    font-size: 10px;
  }
  .login-panel {
    margin: 25px auto;
    padding: 27px 23px;
  }
  .login-panel h2 {
    font-size: 19px;
  }
  .number-label > span {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* 配色参考: http://inquiry.noboritoobgyn.com/ */
.display-page {
  color-scheme: light;
  --brand-brown: #5d4a40;
  --brand-brown-light: #826e64;
  --bg-color: #fbf9f6;
  --border-color: #e6dfd8;
  --text-color: #3b2f29;
  --text-muted: #73645b;
  --sans: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", serif;
  margin: 0;
  color: var(--text-color);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: var(--bg-color);
}

.display-page h1,
.display-page h2,
.display-page p {
  margin: 0;
}

.display-page [hidden] {
  display: none !important;
}

:where(.display-page) button {
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

.display-page button:focus-visible {
  outline: 3px solid var(--brand-brown);
  outline-offset: 5px;
}

.display-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 1.8vh 3.2vw;
  border-bottom: 1px solid var(--border-color);
  background: #fff;
}

.display-brand {
  color: var(--brand-brown);
  font-family: var(--serif);
  font-size: clamp(24px, 2.8vh, 48px);
  font-weight: 600;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.display-clock {
  display: flex;
  align-items: center;
  gap: 1.5vw;
  color: var(--text-muted);
}

.display-clock > div {
  font-size: clamp(18px, 2.1vh, 32px);
}

.display-clock time {
  font:
    500 clamp(30px, 4vh, 64px) / 1.2 Arial,
    sans-serif;
  color: var(--brand-brown);
  font-variant-numeric: tabular-nums;
}

.display-main {
  display: flex;
  flex-direction: column;
  gap: 2.8vh;
  min-height: 0;
  padding: 2.8vh 3.2vw 3vh;
}

.display-intro {
  flex-shrink: 0;
  text-align: center;
}

.display-intro h1 {
  color: var(--brand-brown);
  font-size: clamp(32px, 4.8vh, 80px);
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.4;
}

.display-intro p {
  margin-top: 0.8vh;
  font-size: clamp(22px, 3vh, 48px);
}

.display-rooms {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(var(--room-columns, 1), minmax(0, 1fr));
  grid-template-rows: repeat(var(--room-rows, 1), minmax(0, 1fr));
  gap: 2vh 1.8vw;
  min-height: 0;
}

.display-empty {
  display: grid;
  place-content: center;
  padding: 3vw;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  background: #fff;
  color: var(--text-muted);
  text-align: center;
  font-size: clamp(28px, 4.2vh, 64px);
}

.display-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  background: #fff;
  text-align: center;
}

.display-card-heading {
  flex-shrink: 0;
  padding: 1.5vh 1.4vw;
  background: #eee7df;
  color: var(--text-muted);
}

.display-card-heading h2 {
  font-size: clamp(24px, 4.2vh, 68px);
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.is-calling {
  border-color: var(--brand-brown);
}

.is-calling .display-card-heading {
  background: var(--brand-brown);
  color: #fff;
}

.display-card-body {
  container-type: size;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5vh;
  min-height: 0;
  padding: 1.8vh 1.2vw;
}

.display-number-label {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: clamp(22px, 3vh, 48px);
  letter-spacing: 0.12em;
  line-height: 1.3;
}

.display-number {
  flex-shrink: 0;
  color: #b4a69b;
  font-family: Arial, sans-serif;
  font-size: clamp(80px, 16vw, 360px);
  font-size: min(33cqw, 58cqh);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.is-calling .display-number {
  color: var(--brand-brown);
}

.display-card-instruction {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: clamp(22px, 3.2vh, 52px);
  line-height: 1.4;
}

.is-calling .display-card-instruction {
  color: var(--brand-brown);
  font-weight: 600;
}

.display-rooms[data-compact="true"] .display-card-heading {
  padding-block: 0.7vh;
}

.display-rooms[data-compact="true"] h2 {
  font-size: clamp(22px, 3.3vh, 52px);
}

.display-rooms[data-compact="true"] .display-number-label {
  /* 主見出しと同じ意味のラベルを省き、2段表示でも番号を優先する。 */
  display: none;
}

.display-rooms[data-compact="true"] .display-card-body {
  gap: 0.8vh;
  padding-block: 1vh;
}

.display-rooms[data-compact="true"] .display-number {
  font-size: min(33cqw, 65cqh);
}

.display-rooms[data-compact="true"] .display-card-instruction {
  font-size: clamp(20px, 2.6vh, 40px);
}

.display-page .notice {
  flex-shrink: 0;
  border: 2px solid #b58c55;
  border-radius: 8px;
  padding: 1vh 1.5vw;
  background: #fff2df;
  color: #704a1c;
  font-size: clamp(22px, 3vh, 48px);
  font-weight: 600;
  text-align: center;
}

.display-page .notice.error {
  color: #823d32;
  border-color: #c38d80;
  background: #fff0ec;
}

.display-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 1vh 3.2vw;
  border-top: 1px solid var(--border-color);
}

.display-page .connection {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text-muted);
  font-size: clamp(16px, 1.8vh, 28px);
  white-space: nowrap;
}

.display-page .connection::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand-brown-light);
}

.display-page .connection.offline {
  color: #8a6321;
}

.display-page .connection.offline::before {
  background: #b78d47;
}

.display-controls {
  display: flex;
  gap: 1.6vw;
}

.display-control {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.4vh 0.5vw;
  background: transparent;
  color: var(--text-muted);
  font-size: clamp(16px, 1.8vh, 28px);
}

.display-control:hover,
.display-control[aria-pressed="true"] {
  border-color: var(--border-color);
  background: #eee7df;
  color: var(--brand-brown);
}

.display-message {
  position: fixed;
  bottom: 7vh;
  left: 50%;
  z-index: 1;
  max-width: 90vw;
  padding: 12px 24px;
  transform: translateX(-50%);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 24px #5d4a401a;
  color: var(--text-color);
  font-size: clamp(18px, 2.2vh, 36px);
  text-align: center;
}

.display-message:empty {
  display: none;
}

.just-called {
  animation: call-highlight 1.4s ease-in-out 3;
}

@keyframes call-highlight {
  0%,
  100% {
    box-shadow: 0 0 0 0 #826e6430;
  }
  50% {
    box-shadow: 0 0 0 8px #826e6440;
  }
}

/* 縦置きの段組みは、表示室数と実際の表示領域から計算する。 */
@media (max-aspect-ratio: 1/1) {
  .display-header {
    flex-wrap: wrap;
    padding: 16px 5vw;
  }
  .display-brand {
    font-size: clamp(22px, 4.5vw, 40px);
  }
  .display-clock {
    gap: 14px;
  }
  .display-clock > div {
    font-size: 16px;
  }
  .display-clock time {
    font-size: 28px;
  }
  .display-main {
    gap: 2vh;
    padding: 2vh 5vw;
  }
  .display-intro h1 {
    font-size: clamp(28px, 5vw, 48px);
  }
  .display-intro p {
    font-size: clamp(18px, 3vw, 28px);
  }
  .display-rooms[data-room-count] {
    gap: 1.5vh;
  }
  .display-rooms:not([data-room-count="1"]) .display-number-label {
    display: none;
  }
  .display-card-heading {
    padding: 12px;
  }
  .display-card-heading h2 {
    font-size: clamp(20px, 3vw, 36px);
  }
  .display-rooms[data-room-count] .display-number {
    font-size: min(33cqw, 58cqh);
  }
  .display-number-label {
    font-size: 22px;
  }
  .display-card-instruction {
    font-size: 22px;
  }
  .display-footer {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 5vw;
  }
  .display-controls {
    flex-wrap: wrap;
    gap: 12px;
  }
  .display-control,
  .display-page .connection {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
  }
}
