:root {
  color-scheme: light;
  --navy: #17324d;
  --blue: #2563eb;
  --blue-soft: #eaf1ff;
  --green: #087f5b;
  --green-soft: #e6fcf5;
  --red: #c92a2a;
  --red-soft: #fff0f0;
  --ink: #1f2937;
  --muted: #667085;
  --line: #dce3ec;
  --bg: #f4f7fb;
  --card: #ffffff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans JP", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
img { max-width: 100%; }
button, input, select, textarea, summary { touch-action: manipulation; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}
html:lang(ko) { word-break: keep-all; overflow-wrap: anywhere; }
html:lang(ja), html:lang(zh-CN) { line-break: strict; }
h1, h2, h3, summary { font-weight: 700; }
.credential-value, .wifi-detail strong { font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.topbar {
  background: var(--navy);
  color: white;
  padding: 18px clamp(18px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar h1 { font-size: clamp(22px, 3vw, 30px); margin: 0; }
.topbar p { margin: 5px 0 0; color: #dbeafe; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 99px;
  padding: 9px 14px;
  white-space: nowrap;
}
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #69db7c; }
.layout {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, .8fr);
  gap: 24px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(23,50,77,.06);
  padding: 24px;
}
.card h2 { margin: 0 0 8px; font-size: 22px; }
.subtle { color: var(--muted); margin: 0 0 22px; line-height: 1.55; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.secure-form-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #eef6ff;
  color: #174ea6;
  font-size: 14px;
  line-height: 1.5;
}
label { font-weight: 700; }
input, select, textarea {
  width: 100%;
  border: 1px solid #b8c4d4;
  border-radius: 10px;
  background: white;
  padding: 13px 14px;
  min-height: 48px;
}
textarea { min-height: 100px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(37,99,235,.18);
  border-color: var(--blue);
}
.wifi-lock-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #b8c4d4;
  border-radius: 12px;
  background: #f1f5f9;
}
.wifi-lock-heading strong { font-size: 18px; }
.wifi-lock-heading span { color: var(--muted); font-size: 14px; }
.locked-badge {
  display: inline-block;
  margin-left: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}
input.locked-input {
  background: #e9eef5;
  border-color: #cbd5e1;
  color: #475569;
  font-weight: 700;
  cursor: default;
}
.actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.button {
  border: 0;
  border-radius: 12px;
  min-height: 50px;
  padding: 13px 20px;
  font-weight: 800;
}
.button.primary { background: var(--blue); color: white; }
.button.danger { background: var(--red-soft); color: var(--red); border: 1px solid #ffc9c9; }
.button.secondary { background: white; color: var(--navy); border: 1px solid #b8c4d4; }
.button:disabled { opacity: .48; cursor: not-allowed; }
.notice {
  border-radius: 12px;
  padding: 13px 15px;
  margin-bottom: 18px;
  line-height: 1.5;
}
.notice.info { background: var(--blue-soft); color: #174ea6; }
.notice.success { background: var(--green-soft); color: var(--green); }
.notice.error { background: var(--red-soft); color: var(--red); }
.hidden { display: none !important; }

.admin-pairing-card {
  margin: 18px 0 24px;
  padding: 20px;
  border: 2px solid #74a7d8;
  border-radius: 18px;
  background: #eef7ff;
}
.admin-pairing-card h3 { margin: 0 0 8px; color: var(--navy); }
.admin-pairing-card p { margin: 0 0 14px; color: #42566f; }
.admin-pairing-row { display: flex; gap: 10px; }
.admin-pairing-row input { flex: 1; min-width: 0; letter-spacing: .18em; font-weight: 700; }
.admin-pairing-row .button { flex: 0 0 auto; }
.tablet-pairing-card { max-width: 620px; margin: 24px auto 0; text-align: left; }
.tablet-pairing-card input { font-size: 22px; }

@media (max-width: 560px) {
  .admin-pairing-row { flex-direction: column; }
  .admin-pairing-row .button { width: 100%; }
}
.session-summary {
  background: var(--green-soft);
  border: 1px solid #96f2d7;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 20px;
}
.session-summary strong { color: var(--green); font-size: 20px; }
.summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.summary-item { background: rgba(255,255,255,.7); padding: 10px; border-radius: 8px; }
.admin-recovery-info {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #74a7d8;
  border-radius: 10px;
  background: #eef7ff;
  color: #17324d;
}
.admin-recovery-info strong { color: #17324d; font-size: 17px; }
.admin-recovery-info code {
  width: fit-content;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 7px;
  background: white;
  font-size: 16px;
  overflow-wrap: anywhere;
}
.checkin-email-card { margin: 0 0 20px; padding: 18px; border: 2px solid #d5b247; border-radius: 14px; background: #fffaf0; }
.checkin-email-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.checkin-email-heading h3 { margin: 7px 0 0; color: var(--navy); font-size: 20px; }
.optional-badge, .email-language-badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: 14px; font-weight: 800; }
.optional-badge { background: #fff0b8; color: #6b4d00; }
.email-language-badge { flex-shrink: 0; background: white; color: #31556e; border: 1px solid #b9ccdc; }
.checkin-email-card > p { margin: 0 0 14px; color: #42566f; font-size: 16px; line-height: 1.55; }
.checkin-email-card > label { display: block; margin-bottom: 7px; font-weight: 750; }
.checkin-email-recipient { margin-bottom: 12px; }
.checkin-email-recipient input { width: 100%; min-width: 0; font-size: 16px; }
.checkin-email-step { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-top: 10px; padding: 14px; border: 1px solid #dfc771; border-radius: 12px; background: white; }
.email-step-number { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: white; font-size: 18px; font-weight: 900; }
.email-step-copy h4 { margin: 0 0 4px; color: var(--navy); font-size: 17px; }
.email-step-copy p { margin: 0; color: #52657a; font-size: 14px; line-height: 1.45; }
.email-passport-confirm { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; padding: 11px; border: 1px solid #c7d7e4; border-radius: 10px; background: #f4f8fb; color: #20384b; cursor: pointer; }
.email-passport-confirm input { width: 22px; height: 22px; margin: 0; flex: 0 0 auto; }
.email-passport-confirm span { display: grid; gap: 3px; }
.email-passport-confirm strong { font-size: 15px; line-height: 1.35; }
.email-passport-confirm small { color: #5b6f82; font-size: 13px; line-height: 1.4; }
.checkin-email-actions { display: grid; grid-template-columns: minmax(190px, 1fr) auto auto; gap: 8px; }
.checkin-email-actions input { min-width: 0; font-size: 16px; }
.gmail-compose-button { background: #b3261e; color: white; }
.checkin-email-status { display: block; min-height: 22px; margin-top: 9px; color: #31556e; font-size: 14px; font-weight: 700; }
.checkin-email-preview { margin-top: 8px; }
.checkin-email-preview summary { color: #31556e; font-size: 15px; font-weight: 750; cursor: pointer; }
.checkin-email-preview pre { max-height: 260px; overflow: auto; margin: 10px 0 0; padding: 12px; border: 1px solid #d8e1e8; border-radius: 9px; background: white; color: #20384b; font: 14px/1.55 Arial, sans-serif; white-space: pre-wrap; overflow-wrap: anywhere; }
.checkin-email-card .gmail-send-note { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid #ead9a4; font-size: 14px; }
@media (max-width: 760px) {
  .checkin-email-actions { grid-template-columns: 1fr; }
  .checkin-email-actions .button { width: 100%; min-height: 48px; }
  .checkin-email-heading { flex-direction: column; }
  .checkin-email-step { grid-template-columns: 38px minmax(0, 1fr); align-items: start; }
  .checkin-email-step > .button, .checkin-email-step > .checkin-email-actions { grid-column: 1 / -1; width: 100%; }
}
.chat-card { display: flex; flex-direction: column; min-height: 640px; }
.chat-log {
  flex: 1;
  overflow-y: auto;
  max-height: 520px;
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 12px;
  padding: 14px;
}
.message { margin-bottom: 14px; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.message.admin { border-left: 5px solid var(--blue); }
.message.guest { border-left: 5px solid #f08c00; }
.message.ai { border-left: 5px solid #7950f2; }
.message-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.sender { font-weight: 800; }
.sender.admin { color: var(--blue); }
.sender.guest { color: #d9480f; }
.sender.ai { color: #7048e8; }
.message-time { color: var(--muted); font-size: 13px; }
.message-label { color: var(--muted); font-size: 12px; font-weight: 700; margin: 8px 0 2px; }
.message-text { margin: 0; white-space: pre-wrap; line-height: 1.5; overflow-wrap: anywhere; }
.chat-image {
  display: block;
  width: auto;
  max-width: min(100%, 440px);
  max-height: 420px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-top: 10px;
  background: #f1f5f9;
}
.translation { background: #f1f5f9; border-radius: 8px; padding: 9px 10px; }
.translation-error { color: var(--red); font-size: 13px; margin-top: 7px; }
.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
  max-width: 100%;
  gap: 10px;
  margin-top: 12px;
}
.chat-form > * { min-width: 0; max-width: 100%; }
.chat-form textarea { width: 100%; min-width: 0; min-height: 72px; }
.chat-form .button { align-self: stretch; min-width: 92px; }
.attachment-area { grid-column: 1 / -1; }
.attachment-button { min-height: 48px; }
.photo-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}
.photo-preview img {
  width: 92px;
  height: 92px;
  border-radius: 10px;
  object-fit: cover;
  background: #e2e8f0;
}
.photo-preview strong { display: block; margin-bottom: 8px; }
.remove-photo-button {
  border: 0;
  padding: 6px 0;
  background: transparent;
  color: var(--red);
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}
.security-note { font-size: 13px; color: var(--muted); line-height: 1.45; margin-top: 10px; }

/* Admin multi-room dashboard */
.admin-shell {
  width: min(1480px, calc(100% - 32px));
  margin: 26px auto 60px;
}
.admin-layout {
  width: 100%;
  margin: 24px 0 0;
  grid-template-columns: minmax(520px, 1fr) minmax(430px, .92fr);
}
.session-inbox-card { padding: 22px; }
.inbox-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.inbox-heading .subtle { margin-bottom: 0; }
.inbox-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.active-count {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 15px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: #174ea6;
  white-space: nowrap;
}
.notification-on {
  border-color: #63e6be !important;
  background: var(--green-soft) !important;
  color: var(--green) !important;
}
.notification-status {
  margin: 16px 0;
  padding: 11px 14px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #52606d;
  font-size: 14px;
  line-height: 1.5;
}
.session-list {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}
.session-tile {
  position: relative;
  min-width: 0;
  min-height: 138px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
  color: var(--ink);
  text-align: left;
}
.session-tile strong {
  color: var(--navy);
  font-size: 25px;
}
.session-tile > span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.session-tile.empty {
  background: #f8fafc;
  border-style: dashed;
}
.session-tile.empty:hover { border-color: var(--blue); background: var(--blue-soft); }
.session-tile.active { background: white; border-color: #91a8c7; }
.session-tile.active:hover { border-color: var(--blue); }
.session-tile.active.selected {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.session-tile.active.has-unread {
  border-color: #fa5252;
  background: #fff5f5;
}
.session-tile-top {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 0 !important;
}
.unread-badge {
  display: inline-grid !important;
  place-items: center;
  min-width: 30px;
  height: 30px;
  margin: 0 !important;
  padding: 0 8px;
  border-radius: 999px;
  background: #e03131;
  color: white !important;
  font-size: 15px !important;
  font-weight: 900;
}
.session-preview {
  overflow: hidden;
  display: -webkit-box !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #344054 !important;
}
.tablet-badge {
  display: inline-block !important;
  width: fit-content;
  padding: 4px 7px;
  border-radius: 999px;
  background: #d3f9d8;
  color: #087f5b !important;
  font-weight: 800;
}
.phone-connected-badge {
  display: inline-block !important;
  width: fit-content;
  padding: 4px 7px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8 !important;
  font-weight: 800;
}
.chat-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.chat-card-heading .subtle { margin-bottom: 14px; }
.translation-status { min-width: min(460px, 70vw); }
.translation-usage-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink);
  font-size: 14px;
}
.translation-usage-heading strong { font-size: 15px; }
.translation-status progress {
  display: block;
  width: 100%;
  height: 12px;
  margin-top: 7px;
  accent-color: var(--blue);
}
.selected-chat-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.selected-chat-actions .button {
  min-height: 42px;
  padding: 9px 12px;
  font-size: 13px;
}
.selected-chat-actions .tablet-clear-button:not(:disabled) {
  border-color: #ffd43b;
  background: #fff9db;
  color: #8a5700;
}

/* Guest tablet */
.guest-body { background: #f8fafc; overflow-anchor: none; }
.guest-shell { width: min(1000px, calc(100% - 30px)); margin: 24px auto 60px; }
.waiting {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 32px;
}
.waiting-icon { font-size: 64px; margin-bottom: 16px; }
.waiting h2 { font-size: clamp(30px, 5vw, 48px); margin: 0 0 16px; }
.waiting p { font-size: 21px; color: var(--muted); line-height: 1.6; }
.approval {
  background: var(--green-soft);
  border: 2px solid #63e6be;
  border-radius: 22px;
  padding: clamp(24px, 5vw, 44px);
  text-align: center;
  margin-bottom: 24px;
}
.approval-mark {
  width: 62px; height: 62px; display: grid; place-items: center;
  background: var(--green); color: white; border-radius: 50%;
  font-size: 36px; font-weight: 900; margin: 0 auto 16px;
}
.approval h2 { color: #065f46; font-size: clamp(28px, 5vw, 46px); margin: 0; }
.room-number { font-size: clamp(68px, 14vw, 120px); font-weight: 900; color: var(--navy); line-height: 1; margin: 26px 0 8px; }
.room-label { font-size: 22px; color: var(--muted); }
.guest-meta { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
.guest-meta span { background: white; border-radius: 99px; padding: 10px 16px; font-weight: 700; }
.credentials-card {
  margin-bottom: 24px;
  padding: clamp(22px, 4vw, 32px);
  border: 3px solid #2563eb;
  border-radius: 20px;
  background: #eef5ff;
  box-shadow: 0 10px 30px rgba(37,99,235,.12);
}
.credentials-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.credentials-heading > span { font-size: 40px; }
.credentials-heading h2 { margin: 0 0 5px; color: #17324d; font-size: clamp(25px, 4vw, 34px); }
.credentials-heading p { margin: 0; color: var(--muted); font-size: 18px; }
.credentials-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 12px; }
.credential-room { grid-column: 1 / -1; }
.wifi-network-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  grid-column: 1 / -1;
}
.credential-item {
  min-width: 0;
  padding: 18px;
  border: 1px solid #b6cced;
  border-radius: 14px;
  background: white;
  text-align: center;
}
.credential-item h3 { margin: 0 0 12px; color: var(--muted); font-size: 16px; }
.credential-value {
  color: #102a43;
  font-size: clamp(36px, 7vw, 58px);
  font-weight: 900;
  letter-spacing: .12em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.credential-value-small { font-size: clamp(28px, 5vw, 42px); letter-spacing: .04em; }
.wifi-network { text-align: left; }
.wifi-network > h3 {
  margin-bottom: 14px;
  color: var(--navy);
  font-size: 20px;
  text-align: center;
}
.wifi-detail {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-top: 1px solid #cdd9e8;
}
.wifi-detail span { color: var(--muted); font-size: 14px; font-weight: 800; }
.wifi-detail strong {
  overflow-wrap: anywhere;
  color: #0f2f54;
  font-size: clamp(21px, 3.6vw, 30px);
  line-height: 1.2;
}
.credentials-note {
  margin: 16px 0 0;
  padding: 11px 14px;
  border-radius: 10px;
  background: #fff4e6;
  color: #9c4a00;
  font-weight: 800;
  line-height: 1.5;
}
.phone-continue-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  margin: 22px 0;
  padding: 26px;
  border: 3px solid #20c997;
  border-radius: 20px;
  background: #ecfff8;
  box-shadow: 0 10px 28px rgba(8,127,91,.12);
}
.phone-continue-copy {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.phone-continue-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: #087f5b;
  font-size: 31px;
}
.phone-continue-card h2 {
  margin: 0 0 10px;
  color: #075c43;
  font-size: clamp(25px, 4vw, 34px);
}
.phone-continue-card p {
  margin: 0;
  color: #24443a;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.55;
}
.phone-continue-card .phone-continue-note {
  margin-top: 12px;
  color: #526d64;
  font-size: 16px;
}
.phone-recovery-card {
  display: grid;
  gap: 12px;
  margin: 0 0 20px;
  padding: 18px;
  border: 2px solid #74a7d8;
  border-radius: 16px;
  background: #eef7ff;
  color: #17324d;
}
.phone-recovery-heading { display: flex; align-items: center; gap: 10px; font-size: 19px; }
.phone-recovery-card p { margin: 0; font-size: 16px; line-height: 1.6; }
.guest-notification-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 20px;
  padding: 18px 20px;
  border: 2px solid #72a8d7;
  border-radius: 18px;
  background: #edf6ff;
  color: #17324d;
}
.guest-notification-copy { display: grid; gap: 5px; }
.guest-notification-copy strong { font-size: 19px; line-height: 1.35; }
.guest-notification-copy p { margin: 0; font-size: 15px; line-height: 1.55; }
.guest-notification-card .button { flex: 0 0 auto; min-height: 50px; }
.phone-recovery-data { display: grid; gap: 5px; }
.phone-recovery-data span { font-size: 14px; font-weight: 700; color: #42566f; }
.phone-recovery-data code {
  width: fit-content;
  max-width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  background: white;
  color: #17324d;
  font-size: 18px;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.manual-transfer {
  margin-top: 18px;
  padding: 14px 16px;
  border: 2px solid #9bd8c5;
  border-radius: 14px;
  background: white;
  color: #17324d;
}
.manual-transfer > strong {
  display: block;
  margin-bottom: 9px;
  font-size: 18px;
}
.manual-transfer p {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  margin-top: 9px;
  font-size: 15px;
  font-weight: 600;
}
.manual-transfer code {
  overflow-wrap: anywhere;
  color: #075c43;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: .02em;
  user-select: all;
}
.manual-transfer #manualTransferCode {
  font-size: 27px;
  letter-spacing: .12em;
}
.manual-transfer #manualTransferUrl {
  white-space: nowrap;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: .04em;
}
.manual-access-form {
  display: grid;
  gap: 12px;
  width: min(100%, 460px);
  margin: 24px auto 0;
  text-align: left;
}
.manual-access-form label {
  color: var(--navy);
  font-size: 18px;
  font-weight: 800;
}
.manual-access-form input {
  min-height: 58px;
  text-align: center;
  text-transform: uppercase;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: .1em;
}
.qr-frame {
  padding: 12px;
  border: 2px solid #9bd8c5;
  border-radius: 16px;
  background: white;
}
.qr-frame img {
  display: block;
  width: min(260px, 32vw);
  height: auto;
  aspect-ratio: 1;
}
.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.guide-item { border: 1px solid var(--line); background: white; border-radius: 16px; padding: 22px; }
.guide-item h3 { display: flex; align-items: center; gap: 10px; font-size: 21px; margin: 0 0 12px; color: var(--navy); }
.guide-item p { font-size: 19px; line-height: 1.65; margin: 0; }
.special { grid-column: 1 / -1; border-color: #ffd43b; background: #fff9db; }
.delivery { grid-column: 1 / -1; border: 2px solid #f59f00; background: #fff9db; }
.delivery h3 { color: #9c5600; }
.delivery p { font-weight: 800; color: #663c00; }
.photo-guide-section { margin-top: 30px; }
.section-heading { margin-bottom: 16px; }
.section-heading h2 { margin: 0 0 7px; font-size: clamp(26px, 4vw, 34px); color: var(--navy); }
.section-heading p { margin: 0; color: var(--muted); font-size: 18px; }
.photo-guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.photo-guide-card {
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(23,50,77,.06);
}
.photo-guide-card.important { border: 3px solid #f03e3e; background: #fff5f5; }
.photo-guide-card.important .photo-guide-copy h3 { color: #c92a2a; }
.photo-guide-card.important .photo-guide-copy p { color: #842029; font-weight: 800; }
.photo-guide-card.wide { grid-column: 1 / -1; }
.photo-guide-card.wide .sorting-list { grid-template-columns: 1fr 1fr; }
.photo-guide-copy { padding: 20px 20px 16px; }
.photo-guide-copy h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-size: 22px;
  margin: 0 0 10px;
}
.photo-guide-copy p { font-size: 18px; line-height: 1.6; margin: 0; }
.photo-guide-copy p + p { margin-top: 10px; }
.photo-guide-copy, .guide-item, .topbar > div, .field { min-width: 0; overflow-wrap: anywhere; }
.optional-guide summary {
  padding: 20px;
  min-height: 48px;
  cursor: pointer;
  color: var(--navy);
  font-size: 20px;
  font-weight: 700;
}
.optional-guide summary:focus-visible { outline: 3px solid #228be6; outline-offset: -3px; }
.optional-guide[open] summary { border-bottom: 1px solid var(--line); }
.optional-guide .photo-button img { height: auto; max-height: 560px; object-fit: contain; background: white; }
.instruction-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}
.instruction-step {
  position: relative;
  min-height: 154px;
  padding: 16px 14px;
  border: 2px solid #9bd8c5;
  border-radius: 14px;
  background: #edfff8;
}
.instruction-step .step-number {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: 7px;
  border-radius: 50%;
  background: #087f5b;
  color: white;
  font-weight: 900;
}
.instruction-step .step-icon { font-size: 25px; vertical-align: middle; }
.instruction-step strong {
  display: block;
  margin: 12px 0 5px;
  color: #075c43;
  font-size: 20px;
}
.instruction-step p { color: #24443a; font-size: 16px; line-height: 1.45; }
.instruction-step.instruction-warning { background: #fff4e6; border-color: #d97706; }
.instruction-warning strong, .instruction-warning p { color: #713f12; font-weight: 700; }
.laundry .photo-button span { position: static; display: block; border-radius: 0; font-size: 14px; line-height: 1.5; }
.sorting-list { display: grid; gap: 10px; margin-top: 18px; }
.sorting-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d9e2ec;
  border-radius: 12px;
  background: #f8fafc;
}
.sorting-icon { font-size: 29px; line-height: 1; text-align: center; }
.sorting-item strong { display: block; margin-bottom: 4px; color: var(--navy); font-size: 16px; }
.sorting-item p { color: #3e4c59; font-size: 16px; line-height: 1.5; }
.photo-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2px; background: var(--line); }
.photo-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #eef2f7;
  overflow: hidden;
}
.photo-button:focus-visible { outline: 5px solid #74c0fc; outline-offset: -5px; }
.photo-button img {
  display: block;
  width: 100%;
  height: 280px;
  object-fit: contain;
  background: #eef2f7;
}
.photo-button span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 8px 11px;
  border-radius: 99px;
  color: white;
  background: rgba(17,24,39,.82);
  font-size: 14px;
  font-weight: 800;
}
.photo-dialog {
  width: min(1100px, 94vw);
  max-height: 94vh;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #111827;
  color: white;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.photo-dialog::backdrop { background: rgba(15,23,42,.84); }
.photo-dialog form { position: absolute; top: 12px; right: 12px; z-index: 2; }
.photo-close {
  width: 50px;
  height: 50px;
  border: 2px solid rgba(255,255,255,.8);
  border-radius: 50%;
  background: rgba(15,23,42,.85);
  color: white;
  font-size: 34px;
  line-height: 1;
}
.photo-dialog img { display: block; width: 100%; max-height: 82vh; object-fit: contain; }
.photo-dialog p { margin: 0; padding: 14px 20px 18px; text-align: center; font-size: 20px; font-weight: 800; }
.guest-question {
  display: none;
}
.guest-chat { min-height: auto; margin-top: 22px; }
.guest-chat .chat-log { flex: none; max-height: none; min-height: 220px; overflow: visible; overflow-anchor: none; }
.guest-chat .chat-form { flex-direction: column; }
.guest-chat .button { font-size: 20px; min-height: 58px; }
.guest-chat .photo-preview { font-size: 18px; }
.guest-chat .remove-photo-button { font-size: 17px; }

@media (max-width: 850px) {
  .layout { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .session-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inbox-heading, .chat-card-heading { flex-direction: column; }
  .inbox-actions, .selected-chat-actions { justify-content: flex-start; }
  .chat-card { min-height: 520px; }
  .chat-form { grid-template-columns: minmax(0, 1fr); }
  .chat-form .button { width: 100%; }
  .credentials-grid { grid-template-columns: 1fr; }
  .wifi-network-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .form-grid, .guide-grid, .photo-guide-grid { grid-template-columns: 1fr; }
  .field.full, .special, .photo-guide-card.wide { grid-column: auto; }
  .summary-grid { grid-template-columns: 1fr; }
  .chat-form { flex-direction: column; }
  .chat-form .button { width: 100%; }
  .photo-button img { height: 240px; }
  .photo-guide-card.wide .sorting-list { grid-template-columns: 1fr; }
  .instruction-steps { grid-template-columns: 1fr; }
  .instruction-step { min-height: 0; }
  .phone-continue-card { grid-template-columns: 1fr; text-align: center; }
  .phone-continue-copy { flex-direction: column; align-items: center; }
  .guest-notification-card { align-items: stretch; flex-direction: column; padding: 16px; }
  .guest-notification-card .button { width: 100%; }
  .qr-frame { justify-self: center; }
  .qr-frame img { width: min(280px, 72vw); }
  .admin-shell { width: min(100% - 20px, 1480px); margin-top: 12px; }
  .session-inbox-card { padding: 16px; }
  .session-tile { min-height: 126px; }
}

/* Phone reading layout; retain the larger tablet presentation. */
@media (max-width: 600px) {
  body { font-size: 16px; line-height: 1.55; }
  .topbar { padding: 14px 16px; gap: 10px; }
  .topbar h1 { font-size: 21px; line-height: 1.35; }
  .topbar p { font-size: 14px; }
  .status-pill { padding: 5px 10px; font-size: 14px; }
  .guest-shell, .admin-shell { width: calc(100% - 24px); margin: 14px auto 32px; }
  .card { padding: 16px; border-radius: 14px; }
  .card h2, .section-heading h2 { font-size: 21px; line-height: 1.4; }
  .subtle { margin-bottom: 16px; }
  .approval { padding: 18px 14px; margin-bottom: 16px; border-radius: 16px; }
  .approval-mark { width: 32px; height: 32px; font-size: 21px; margin-bottom: 8px; }
  .approval h2 { font-size: 22px; line-height: 1.4; }
  .room-number { font-size: 60px; margin: 12px 0 4px; }
  .room-label { font-size: 16px; }
  .guest-meta { gap: 6px; margin-top: 12px; }
  .guest-meta span { padding: 6px 10px; border-radius: 10px; font-size: 14px; }
  .credentials-card { padding: 14px; margin-bottom: 16px; border-width: 2px; border-radius: 16px; }
  .credentials-heading { gap: 10px; margin-bottom: 12px; }
  .credentials-heading > span { font-size: 26px; }
  .credentials-heading h2 { font-size: 21px; line-height: 1.4; }
  .credentials-heading p { font-size: 14px; }
  .credential-item { padding: 12px; }
  .credential-item h3 { margin-bottom: 8px; }
  .credential-value { font-size: 32px; letter-spacing: .08em; line-height: 1.3; }
  .wifi-network-grid { gap: 8px; }
  .wifi-network > h3 { text-align: left; font-size: 17px; margin-bottom: 6px; }
  .wifi-detail { grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); align-items: start; gap: 10px; padding: 8px 0; }
  .wifi-detail strong { font-size: 18px; line-height: 1.45; }
  .credentials-note { font-size: 14px; padding: 10px; margin-top: 12px; font-weight: 600; }
  .guide-grid, .photo-guide-grid { gap: 12px; }
  .guide-item { padding: 16px; }
  .guide-item h3, .photo-guide-copy h3 { font-size: 19px; line-height: 1.4; margin-bottom: 8px; align-items: flex-start; }
  .guide-item p, .photo-guide-copy p { font-size: 16px; line-height: 1.65; }
  .photo-guide-copy { padding: 16px; }
  .photo-guide-card.important .photo-guide-copy p, .delivery p { font-weight: 600; }
  .photo-guide-section { margin-top: 22px; }
  .section-heading p { font-size: 14px; }
  .photo-list { grid-template-columns: minmax(0, 1fr); gap: 8px; background: white; }
  .photo-button img { height: auto; max-height: 340px; object-fit: contain; }
  .photo-button span { position: static; display: block; border-radius: 0; padding: 9px; background: #17324d; font-size: 14px; }
  .optional-guide summary { padding: 16px; font-size: 17px; line-height: 1.5; }
  .optional-guide .photo-button img { max-height: 460px; }
  .instruction-steps { gap: 8px; margin-top: 12px; }
  .instruction-step { padding: 12px; }
  .instruction-step strong { display: inline; font-size: 17px; margin-left: 6px; }
  .instruction-step p { margin-top: 6px; }
  .sorting-item { grid-template-columns: 28px minmax(0, 1fr); padding: 10px; gap: 8px; }
  .sorting-icon { font-size: 24px; }
  .phone-continue-card { padding: 16px; gap: 14px; margin: 0 0 16px; border-width: 2px; }
  .phone-continue-icon { display: none; }
  .phone-continue-card h2 { font-size: 22px; }
  .phone-continue-card p { font-size: 16px; font-weight: 500; }
  .phone-continue-card .phone-continue-note { font-size: 14px; }
  .qr-frame img { width: min(240px, 65vw); }
  .guest-chat, .chat-card { min-height: 0; }
  .guest-chat .button { font-size: 16px; min-height: 48px; }
  .guest-chat .chat-log { min-height: 160px; max-height: none; }
  .chat-log { padding: 8px; }
  .message { padding: 10px; }
  .message-head { flex-wrap: wrap; }
  .message-label, .security-note, .translation-error, .message-time { font-size: 14px; }
  .photo-dialog p { font-size: 16px; }
  .admin-layout { gap: 16px; margin-top: 16px; }
  .session-list { gap: 8px; }
  .session-tile { padding: 12px; min-height: 110px; }
  .session-tile > span { font-size: 14px; line-height: 1.45; }
  .inbox-actions { gap: 8px; }
  .selected-chat-actions { width: 100%; display: grid; grid-template-columns: 1fr; }
  .selected-chat-actions .button { font-size: 14px; min-height: 44px; }
  input, select, textarea { font-size: 16px; min-width: 0; max-width: 100%; }
  .waiting { min-height: 60vh; padding: 20px 16px; }
  .waiting h2 { font-size: 26px; }
  .waiting p { font-size: 16px; }
}

.room-password-card { margin-top: 16px; }
.room-password-card > summary { color: #17324d; font-size: 18px; font-weight: 800; cursor: pointer; line-height: 1.5; }
.room-password-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.room-password-row { padding: 14px; border: 1px solid #bed0de; border-radius: 12px; background: #f5f9fc; }
.room-password-row label { display: block; margin-bottom: 8px; font-weight: 750; }
.room-password-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.room-password-controls input { min-width: 0; font-size: 18px; }
.room-password-controls .button { min-height: 48px; }
.room-save-status { display: block; margin-top: 8px; min-height: 22px; font-size: 14px; color: #31556e; }
@media (max-width: 600px) { .room-password-grid { grid-template-columns: 1fr; } }
