:root {
  color-scheme: light;
  font-family: "Yu Gothic", "游ゴシック", "Yu Gothic UI", sans-serif;
  color: #102a43;
  background: #f7fbff;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.board {
  min-height: 100vh;
  padding: clamp(24px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(rgba(255,255,255,.86), rgba(247,251,255,.94)),
    repeating-linear-gradient(135deg, #eaf5ff 0, #eaf5ff 2px, transparent 2px, transparent 18px);
  position: relative;
}

.company-logo {
  position: absolute; top: clamp(18px, 3vw, 38px); left: clamp(20px, 3.5vw, 52px);
  width: clamp(92px, 13vw, 180px); height: clamp(56px, 8vw, 108px); object-fit: contain;
  background: #fff; border-radius: 4px; padding: 5px;
}

.board-header, .admin-header, .calendar-head, .form-actions, .event-row {
  display: flex;
  align-items: center;
}

.board-header { justify-content: space-between; gap: 24px; padding-left: clamp(110px, 16vw, 220px); }
.eyebrow { margin: 0 0 8px; color: #476057; font-size: clamp(14px, 1.6vw, 20px); font-weight: 700; }
h1 { margin: 0; font-size: clamp(34px, 5.2vw, 72px); line-height: 1.1; letter-spacing: 0; font-weight: 800; }
.date-trigger { border: 0; background: transparent; color: #17241f; padding: 14px; font-weight: 700; font-size: clamp(18px, 2.2vw, 30px); }
.today-list { flex: 1; display: grid; align-content: center; gap: 16px; max-width: 1180px; width: 100%; margin: 32px auto; }
.appointment {
  width: 100%; border: 1px solid #cad1cc; border-left: 8px solid #136f63; border-radius: 6px;
  background: rgba(255,255,255,.96); color: #102a43; padding: clamp(22px, 3vw, 38px); text-align: left;
  display: grid; grid-template-columns: minmax(220px, 0.8fr) 2fr; align-items: center; gap: 32px;
  box-shadow: 0 8px 22px rgba(23, 36, 31, .07);
}
.appointment:active { transform: scale(.995); }
.time { font-size: clamp(24px, 3.3vw, 44px); font-weight: 800; color: #136f63; }
.guest {
  font-size: clamp(28px, 4vw, 56px); font-weight: 800; color: #0b3f75;
  -webkit-text-stroke: 1px #fff;
  text-shadow: 1px 1px 0 #fff, 2px 2px 0 #8eb8d8;
}
.purpose {
  display: block; margin-top: 12px; color: #243f56; font-size: clamp(15px, 1.8vw, 23px); font-weight: 700;
  -webkit-text-stroke: 0; text-shadow: none;
}
.location-badge { display: inline-block; margin-right: 12px; padding: 3px 9px; border-radius: 4px; background: #e2f0fa; color: #0b4d7a; font-size: .88em; }
.contact-name { display: block; margin-top: 8px; color: #244c68; font-size: .9em; font-weight: 800; }
.empty { text-align: center; color: #52635c; font-size: clamp(24px, 3vw, 40px); }
.board-footer { text-align: center; color: #718079; font-size: 14px; }
.reception-note { display: grid; justify-items: center; gap: 5px; padding: 18px 12px 4px; color: #183f5d; text-align: center; font-size: clamp(15px, 1.6vw, 22px); }
.reception-note strong { color: #0a4f84; font-size: 1.12em; }

.welcome {
  min-height: 100vh; display: grid; place-items: center; padding: 40px; text-align: center;
  background:
    linear-gradient(rgba(240,248,255,.88), rgba(255,255,255,.96)),
    repeating-linear-gradient(135deg, #cde7fb 0, #cde7fb 3px, transparent 3px, transparent 22px);
  color: #0a3470; position: relative;
}
.welcome-logo { z-index: 2; }
.welcome-inner { max-width: 1100px; position: relative; z-index: 1; }
.welcome-inner.with-person { padding-right: min(30vw, 430px); }
.welcome-person {
  position: absolute; right: clamp(16px, 4vw, 64px); bottom: 0; z-index: 1;
  width: min(34vw, 480px); height: min(76vh, 680px); display: flex; align-items: flex-end; justify-content: center;
}
.welcome-person img { width: 100%; max-height: 78%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 10px 14px rgba(10,52,112,.16)); }
.elizabeth-person { height: min(68vh, 590px); }
.elizabeth-person img { max-height: 68%; }
.elizabeth-bubble { top: 8%; right: 4%; width: min(30vw, 360px); white-space: nowrap; }
.speech-bubble {
  position: absolute; top: 4%; right: 2%; z-index: 2; width: min(31vw, 390px); padding: 18px 20px; border: 3px solid #0a3c73;
  border-radius: 8px; background: #fff; color: #0a3c73; font-size: clamp(20px, 2.4vw, 34px); font-weight: 800; line-height: 1.35;
  box-shadow: 5px 5px 0 #a7c9e4; text-align: center; overflow-wrap: anywhere;
}
.speech-bubble::after {
  content: ""; position: absolute; right: 22%; bottom: -20px; width: 28px; height: 28px;
  background: #fff; border-right: 3px solid #0a3c73; border-bottom: 3px solid #0a3c73; transform: rotate(45deg);
}
.survey-qr {
  position: absolute; left: clamp(16px, 2.5vw, 40px); bottom: 10px; z-index: 3;
  display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px;
  border: 2px solid #b9d4e8; border-radius: 8px; background: rgba(255,255,255,.97);
  box-shadow: 0 8px 20px rgba(10,52,112,.12);
}
.survey-qr img { width: clamp(82px, 8vw, 116px); height: auto; }
.survey-qr p { margin: 0; color: #0a3c73; font-size: clamp(14px, 1.5vw, 21px); font-weight: 800; line-height: 1.4; }
.welcome-mark { width: 86px; height: 5px; margin: 0 auto 44px; background: #1479c9; }
.welcome h1 { font-size: clamp(48px, 8vw, 112px); }
.welcome h1 { white-space: nowrap; }
.welcome-inner.with-person h1 { font-size: clamp(42px, 4.8vw, 78px); }
.welcome-name { margin: 24px 0 0; font-size: clamp(42px, 7vw, 96px); font-weight: 800; }
.welcome-note { margin-top: 56px; color: #466a8e; font-size: clamp(16px, 2vw, 24px); font-weight: 700; }
.outlined-text {
  color: #0a3c73;
  -webkit-text-stroke: 1px #fff;
  text-shadow: 2px 2px 0 #fff, 4px 4px 0 #85b3d8;
}
.welcome > #closeWelcome { position: fixed; inset: 0; width: 100%; border: 0; background: transparent; color: transparent; z-index: 0; }
.slide-arrow {
  position: fixed; top: 50%; z-index: 8; width: 64px; height: 96px; border: 1px solid #9abbd5;
  background: rgba(255,255,255,.92); color: #0a3c73; font-size: 58px; line-height: 1; transform: translateY(-50%);
  box-shadow: 0 6px 18px rgba(10,52,112,.14);
}
.slide-right { right: 18px; border-radius: 8px 0 0 8px; }
.slide-left { left: 18px; border-radius: 0 8px 8px 0; }
.survey-focus { position: relative; z-index: 2; display: grid; justify-items: center; gap: 24px; }
.survey-focus p { margin: 0; color: #0a3c73; font-size: clamp(30px, 4vw, 58px); font-weight: 800; }
.survey-focus img { width: min(42vh, 380px); padding: 14px; border: 2px solid #b9d4e8; border-radius: 8px; background: #fff; box-shadow: 0 10px 28px rgba(10,52,112,.14); }

.admin { min-height: 100vh; padding: 28px; background: #eef1ef; }
.admin-shell { max-width: 1280px; margin: 0 auto; }
.admin-header { justify-content: space-between; margin-bottom: 24px; }
.admin-header h1 { font-size: clamp(28px, 4vw, 48px); }
.primary, .secondary, .danger, .icon-btn {
  min-height: 48px; border-radius: 6px; border: 1px solid transparent; padding: 10px 18px; font-weight: 800;
}
.primary { background: #136f63; color: #fff; }
.secondary, .icon-btn { background: #fff; color: #26362f; border-color: #c8d0cb; }
.danger { background: #fff; color: #a13535; border-color: #dfbcbc; }
.admin-grid { display: grid; grid-template-columns: minmax(420px, 1.25fr) minmax(320px, .75fr); gap: 24px; }
.panel { background: #fff; border: 1px solid #d3d9d5; border-radius: 8px; padding: 22px; }
.calendar-head { justify-content: space-between; margin-bottom: 18px; }
.calendar-title { font-size: 24px; font-weight: 800; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.weekday { text-align: center; padding: 8px 0; color: #61716a; font-size: 14px; font-weight: 700; }
.day { aspect-ratio: 1; border: 1px solid #dbe0dd; border-radius: 5px; background: #fafbf9; position: relative; font-weight: 700; }
.day:hover, .day:focus-visible { border-color: #136f63; }
.day.selected { background: #136f63; color: #fff; }
.day.today:not(.selected) { border: 2px solid #136f63; }
.day.other { color: #a5aea9; background: #f4f5f4; }
.dot { position: absolute; bottom: 7px; left: 50%; width: 6px; height: 6px; border-radius: 50%; background: #d5a500; transform: translateX(-50%); }
.selected .dot { background: #ffe486; }
.editor h2 { margin: 0 0 18px; font-size: 24px; }
.field { display: grid; gap: 7px; margin-bottom: 14px; font-weight: 700; }
.field input, .field textarea { width: 100%; border: 1px solid #bfc9c3; border-radius: 5px; padding: 12px; background: #fff; }
.time-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { gap: 10px; }
.welcome-options { margin: 0 0 18px; padding: 0; border: 0; }
.welcome-options legend { margin-bottom: 8px; font-weight: 800; }
.welcome-options label { display: inline-flex; margin: 0 8px 8px 0; }
.welcome-options input { position: absolute; opacity: 0; pointer-events: none; }
.welcome-options span { display: block; min-height: 46px; padding: 11px 16px; border: 1px solid #bfc9c3; border-radius: 6px; background: #fff; font-weight: 700; }
.welcome-options input:checked + span { border-color: #136f63; background: #e3f3f0; color: #0b584f; box-shadow: inset 0 0 0 1px #136f63; }
.scheduled { margin-top: 24px; border-top: 1px solid #dce1de; padding-top: 18px; }
.scheduled h3 { margin: 0 0 12px; }
.event-row { justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #edf0ee; }
.row-actions { display: flex; gap: 8px; flex: none; }
.event-summary { min-width: 0; }
.event-summary strong { display: block; }
.event-summary span { color: #65736d; }

@media (max-width: 800px) {
  .admin-grid { grid-template-columns: 1fr; }
  .appointment { grid-template-columns: 1fr; gap: 8px; }
  .admin { padding: 16px; }
  .panel { padding: 16px; }
  .day { min-height: 45px; aspect-ratio: auto; }
  .welcome-person { width: 42vw; opacity: .94; }
  .welcome-inner.with-person { padding-right: 28vw; }
  .speech-bubble { right: 0; width: min(38vw, 340px); }
  .survey-qr { left: 8px; bottom: 6px; padding: 6px 9px 6px 6px; }
  .survey-qr img { width: 72px; }
}
