@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;1,500&family=Zen+Old+Mincho:wght@600;700&family=Zen+Kaku+Gothic+New:wght@400;500;700&display=swap");

:root {
  --stone: rgba(224, 216, 202, 0.82);
  --stone-active: rgba(224, 216, 202, 0.95);
  --stone-border: rgba(120, 100, 70, 0.5);
  --gold-accent: #8a6e3d;
  --gold-bright: #cba966;
  --text-on-stone: #2a241c;
  --text-on-stone-sub: #5c5347;
  --text-on-photo: #f7f5ef;
  --text-on-photo-sub: rgba(247, 245, 239, 0.72);
  --line: rgba(120, 100, 70, 0.32);
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  --radius: 6px;
  --font-ui: "Noto Sans JP", "BIZ UDPGothic", "Yu Gothic UI", "Yu Gothic", "Meiryo", sans-serif;
  --font-en: "Noto Sans JP", "Segoe UI", sans-serif;
  --font-heading: "Zen Old Mincho", "Shippori Mincho", "Noto Serif JP", "Yu Mincho", serif;
  --font-brand: "Cormorant Garamond", "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--text-on-photo);
  font-size: 20px;
  overflow-y: scroll;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(10, 9, 8, 0.32), rgba(20, 18, 16, 0.34)),
    url("/assets/Z08_0339.jpg") center center / cover no-repeat,
    #16140f;
  background-attachment: fixed;
  font-family: var(--font-ui);
  line-height: 1.6;
  letter-spacing: 0.01em;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  appearance: none;
}

.app {
  min-height: 100vh;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.app::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 20%),
    radial-gradient(circle at 50% 0%, rgba(231, 214, 166, 0.06), transparent 34%);
  pointer-events: none;
}

.ambient {
  position: absolute;
  width: 42vw;
  height: 42vw;
  filter: blur(70px);
  opacity: 0.1;
  pointer-events: none;
}

.ambient-a {
  top: -8vw;
  right: -6vw;
  background: rgba(231, 214, 166, 0.36);
}

.ambient-b {
  bottom: -12vw;
  left: -12vw;
  background: rgba(98, 128, 174, 0.34);
}

.frame {
  --frame-pad-x: clamp(20px, 3.5vw, 40px);
  --frame-pad-y-top: clamp(12px, 2vh, 28px);
  --frame-pad-y-bottom: clamp(14px, 2.4vh, 36px);
  position: relative;
  min-height: 100vh;
  max-width: 1480px;
  margin: 0 auto;
  padding: calc(var(--frame-pad-y-top) + env(safe-area-inset-top)) var(--frame-pad-x)
    calc(var(--frame-pad-y-bottom) + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 2vw, 20px);
  z-index: 1;
  margin-bottom: clamp(8px, 1.5vh, 20px);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  font-family: var(--font-brand);
  font-size: 1.28rem;
  color: var(--text-on-photo);
  text-transform: uppercase;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.brand-mark {
  width: clamp(2.3rem, 2.9vw, 2.9rem);
  height: clamp(2.3rem, 2.9vw, 2.9rem);
  flex: 0 0 auto;
  overflow: visible;
}

.brand-logo {
  height: clamp(2.4rem, 3.9vw, 3.15rem);
  width: auto;
  flex: 0 0 auto;
  display: block;
}

.brand-mark text {
  font-family: var(--font-brand);
  font-weight: 600;
  fill: var(--gold-accent);
  stroke: var(--gold-accent);
  stroke-width: 1.4px;
  stroke-linejoin: round;
  paint-order: stroke fill;
}

.brand-mark-r {
  font-size: 92px;
}

.brand-mark-g {
  font-size: 56px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.language-toggle,
.icon-button,
.mini-action,
.keyboard-switch button,
.language-switch button,
#spaceButton,
#backspaceButton,
#dakutenButton,
#smallKanaButton,
#companyPrefixButton,
.primary-cta,
.key,
.menu-card,
.staff-result,
.visitor-continue-button,
.start-button {
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    transform 150ms ease,
    box-shadow 150ms ease,
    color 150ms ease,
    opacity 150ms ease;
}

.icon-button,
.mini-action,
.keyboard-switch button,
.language-switch button,
#spaceButton,
#backspaceButton,
#dakutenButton,
#smallKanaButton,
#companyPrefixButton {
  border: 1px solid var(--stone-border);
  background: var(--stone);
  color: var(--text-on-stone);
  border-radius: var(--radius);
  padding: clamp(8px, 1.4vh, 14px) clamp(14px, 2.2vw, 20px);
  font-size: 1rem;
  cursor: pointer;
  backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.icon-button:hover,
.mini-action:hover,
.keyboard-switch button:hover,
.language-switch button:hover,
#spaceButton:hover,
#backspaceButton:hover,
#dakutenButton:hover,
#smallKanaButton:hover,
#companyPrefixButton:hover,
.staff-result:hover,
.primary-cta:hover,
.key:hover,
.icon-button:active,
.mini-action:active,
.keyboard-switch button:active,
.language-switch button:active,
#spaceButton:active,
#backspaceButton:active,
#dakutenButton:active,
#smallKanaButton:active,
#companyPrefixButton:active,
.staff-result:active,
.primary-cta:active,
.key:active {
  background: var(--stone-active);
  border-color: var(--gold-accent);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(138, 110, 61, 0.18);
}

.icon-button:active,
.mini-action:active,
.keyboard-switch button:active,
.language-switch button:active,
#spaceButton:active,
#backspaceButton:active,
#dakutenButton:active,
#smallKanaButton:active,
#companyPrefixButton:active,
.primary-cta:active,
.key:active,
.menu-card:active,
.staff-result:active,
.visitor-continue-button:active {
  transform: scale(0.98);
}

.language-toggle {
  border: 1px solid var(--stone-border);
  background: var(--stone);
  color: var(--text-on-stone);
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.04em;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.language-toggle:active {
  background: var(--stone-active);
  border-color: var(--gold-accent);
}

.language-switch {
  display: inline-flex;
  gap: 12px;
  margin-bottom: 28px;
}

#menuView .language-switch {
  display: none;
}

.language-switch button.active,
.keyboard-switch button.active {
  background: var(--stone-active);
  border-color: var(--gold-accent);
  color: var(--text-on-stone);
  box-shadow: 0 0 0 1px rgba(138, 110, 61, 0.18);
}

.screen {
  flex: 1;
  display: flex;
  align-items: stretch;
}

.view {
  display: none;
  width: 100%;
}

.view.active {
  display: flex;
  flex-direction: column;
}

#welcomeView.active {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
}

.stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: url("/assets/Z08_0339.jpg") center 30% / cover no-repeat;
}

.scrim-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 22%;
  background: linear-gradient(180deg, rgba(10, 9, 8, 0.75) 0%, rgba(10, 9, 8, 0) 100%);
  pointer-events: none;
}

.scrim-left {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 62%;
  background: linear-gradient(90deg, rgba(10, 9, 8, 0.72) 0%, rgba(10, 9, 8, 0.38) 55%, rgba(10, 9, 8, 0) 100%);
  pointer-events: none;
}

.scrim-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(0deg, rgba(10, 9, 8, 0.8) 0%, rgba(10, 9, 8, 0) 100%);
  pointer-events: none;
}

.welcome {
  position: absolute;
  left: 64px;
  top: 38%;
  transform: translateY(-50%);
  z-index: 3;
  max-width: 620px;
}

.welcome-tag {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: var(--gold-accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-family: var(--font-brand);
}

.welcome-tag-rule {
  width: 28px;
  height: 1px;
  background: var(--gold-accent);
}

.welcome-kicker {
  margin: 0 0 6px;
  color: var(--text-on-photo-sub);
  font-size: 1.3rem;
  font-weight: 500;
  font-family: var(--font-heading);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.welcome-title {
  margin: 0;
  font-size: clamp(3.3rem, 6.6vw, 6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-on-photo);
  -webkit-text-stroke: 1.5px rgba(0, 0, 0, 0.75);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3),
    0 2px 1px rgba(0, 0, 0, 0.85),
    0 4px 10px rgba(0, 0, 0, 0.6);
}

.welcome-message {
  margin: 20px 0 0;
  color: var(--text-on-photo-sub);
  font-size: 1.15rem;
  line-height: 1.6;
  font-weight: 400;
  font-family: var(--font-heading);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.clock {
  display: none;
  font-family: var(--font-en);
  color: var(--text-on-photo-sub);
  font-size: 0.95rem;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.frame:has(#welcomeView.active) .clock {
  display: block;
}

.start-button {
  position: absolute;
  left: 50%;
  bottom: calc(72px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 3;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  padding: 32px 68px;
  border-radius: 999px;
  border: 2.5px solid var(--gold-accent);
  background: rgba(12, 18, 30, 0.35);
  color: var(--text-on-photo);
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition:
    background 150ms ease,
    transform 100ms ease;
}

.start-button:hover {
  transform: translateX(-50%);
}

.start-button:active {
  background: rgba(203, 169, 102, 0.16);
  border-color: var(--gold-accent);
  transform: translateX(-50%) scale(0.98);
}

.start-label {
  font-size: 27px;
  letter-spacing: 0.05em;
  font-family: var(--font-heading);
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.2;
}

.start-arrow {
  font-size: 31px;
  line-height: 1;
  color: var(--gold-accent);
}

.section-header {
  position: relative;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto clamp(10px, 2.2vh, 28px);
}

.section-header-centered {
  text-align: center;
  z-index: 2;
}

.section-header-centered::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: -22px;
  transform: translateX(-50%);
  width: min(calc(100% + 140px), 760px);
  height: calc(100% + 46px);
  background: radial-gradient(
    ellipse 75% 100% at 32% 50%,
    rgba(8, 7, 6, 0.72) 0%,
    rgba(8, 7, 6, 0.46) 48%,
    rgba(8, 7, 6, 0) 82%
  );
  filter: blur(14px);
  pointer-events: none;
}

.section-header-centered::after {
  left: 50%;
  transform: translateX(-50%);
}

.section-header h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2vw + 1.3vh, 3.25rem);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-family: var(--font-heading);
  color: var(--text-on-photo);
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.6);
}

.section-header p {
  margin: clamp(4px, 1vh, 12px) 0 0;
  color: var(--text-on-photo-sub);
  font-size: clamp(0.9rem, 0.5vw + 0.7rem, 1.08rem);
  line-height: 1.35;
  font-weight: 400;
  font-family: var(--font-heading);
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.6);
}

.section-header-centered h2 {
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 2px 7px rgba(0, 0, 0, 0.75),
    0 6px 24px rgba(0, 0, 0, 0.6);
}

.section-header-centered p {
  color: rgba(247, 245, 239, 0.92);
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.85),
    0 2px 6px rgba(0, 0, 0, 0.7),
    0 6px 18px rgba(0, 0, 0, 0.55);
}

.menu-groups {
  display: grid;
  row-gap: clamp(16px, 3.5vw, 52px);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: clamp(14px, 2vw, 28px);
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.menu-card-slot {
  display: contents;
}

.shortcut-section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.menu-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: clamp(8px, 1.2vw, 14px);
  border: 1px solid rgba(203, 169, 102, 0.75);
  border-radius: var(--radius);
  background: rgba(20, 18, 16, 0.52);
  color: var(--text-on-photo);
  padding: clamp(16px, 2.1vw, 26px);
  padding-right: clamp(44px, 6vw, 60px);
  text-align: left;
  cursor: pointer;
  min-height: clamp(120px, 16vw, 196px);
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(203, 169, 102, 0.18);
  backdrop-filter: blur(8px) saturate(1.05);
}

.menu-card-large {
  min-height: clamp(190px, 27vw, 340px);
  padding: clamp(18px, 2.6vw, 28px);
  padding-right: clamp(44px, 6vw, 60px);
  justify-content: flex-start;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: clamp(12px, 1.8vw, 22px);
}

.shortcut-card {
  min-height: clamp(100px, 13vw, 164px);
  background: rgba(20, 18, 16, 0.52);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(0.85rem, 1.7vw, 2rem);
  line-height: 1.3;
  font-weight: 600;
  font-family: var(--font-heading);
  color: var(--text-on-photo);
  white-space: nowrap;
}

.menu-card-large .card-title {
  font-size: clamp(1.2rem, 2.6vw, 2.8rem);
}

.card-title::before {
  content: "";
  display: block;
  flex: 0 0 auto;
  width: 38px;
  aspect-ratio: 1 / 1;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 75% 75%;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
}

.menu-card-large .card-title::before {
  width: 60px;
}

.card-description {
  display: block;
  margin-top: clamp(3px, 0.5vw, 8px);
  color: rgba(247, 245, 239, 0.72);
  font-size: clamp(0.82rem, 0.4vw + 0.6rem, 1rem);
  line-height: 1.5;
  font-weight: 400;
  font-family: var(--font-heading);
  white-space: pre-line;
}

.menu-card-large .card-description {
  font-size: clamp(1rem, 0.55vw + 0.8rem, 1.3rem);
}

.card-arrow {
  position: absolute;
  top: 50%;
  right: 22px;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  margin: 0;
  font-size: 0;
  opacity: 0.75;
}

.card-arrow::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23CBA966' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

#codeCard .card-title::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23CBA966' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5h6'/%3E%3Cpath d='M9 12h6'/%3E%3Cpath d='M9 19h6'/%3E%3Cpath d='M5 5h.01'/%3E%3Cpath d='M5 12h.01'/%3E%3Cpath d='M5 19h.01'/%3E%3Cpath d='M19 5h.01'/%3E%3Cpath d='M19 12h.01'/%3E%3Cpath d='M19 19h.01'/%3E%3C/svg%3E");
}

#staffCard .card-title::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23CBA966' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
}

[data-shortcut-id='interview'] .card-title::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23CBA966' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21a8 8 0 0 0-16 0'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

[data-shortcut-id='general'] .card-title::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23CBA966' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18'/%3E%3Cpath d='M5 21V7l7-4 7 4v14'/%3E%3Cpath d='M9 10h.01'/%3E%3Cpath d='M15 10h.01'/%3E%3Cpath d='M9 14h.01'/%3E%3Cpath d='M15 14h.01'/%3E%3C/svg%3E");
}

[data-shortcut-id='delivery'] .card-title::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23CBA966' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 16V8a2 2 0 0 0-2-2H4v10'/%3E%3Cpath d='M2 16h15'/%3E%3Cpath d='M18 8h1.5a2 2 0 0 1 1.6.8L22 10v6h-3'/%3E%3Ccircle cx='7.5' cy='16.5' r='1.5'/%3E%3Ccircle cx='17.5' cy='16.5' r='1.5'/%3E%3C/svg%3E");
}

/* English titles run longer than Japanese, so nowrap (used for the JA layout)
   overflows the card. Wrapping to up to 2 lines needs the icon top-aligned
   (not centered) and a reserved 2-line title height so every card's
   description starts from the same offset regardless of whether its own
   title actually wraps. */
html[lang="en"] .menu-card {
  padding-left: clamp(20px, 2.6vw, 30px);
  padding-right: clamp(48px, 6.5vw, 64px);
}

html[lang="en"] .menu-card:not(.menu-card-large) .card-title {
  align-items: flex-start;
  white-space: normal;
  overflow-wrap: break-word;
  font-size: clamp(0.95rem, 1.75vw, 1.85rem);
  min-height: calc(1.3em * 2);
}

html[lang="en"] .menu-card-large .card-title {
  font-size: clamp(1rem, 2.1vw, 2.1rem);
}

#codeView,
#staffView,
#successView {
  align-items: center;
}

.keyboard-panel {
  position: relative;
  width: 100%;
  border-radius: 12px;
  padding: clamp(12px, 2vh, 20px) clamp(14px, 2vw, 24px);
  overflow: hidden;
}

#codeView .keyboard-panel {
  margin-top: 60px;
}

.keyboard-panel::before {
  content: "";
  position: absolute;
  inset: -20px;
  backdrop-filter: blur(14px) saturate(1.1);
  background: rgba(20, 16, 12, 0.45);
  z-index: 0;
}

.keyboard-panel > * {
  position: relative;
  z-index: 1;
}

.input-panel {
  position: relative;
  max-width: 720px;
  width: 100%;
  margin: 0 auto clamp(10px, 2vh, 18px);
}

.code-input-panel {
  max-width: 500px;
}

.display-input {
  width: 100%;
  border: 1px solid var(--stone-border);
  border-radius: var(--radius);
  background: var(--stone);
  color: var(--text-on-stone);
  padding: clamp(12px, 2vh, 24px) 74px clamp(12px, 2vh, 24px) 28px;
  font-family: var(--font-heading);
  font-size: 2.2rem;
  line-height: 1.3;
  letter-spacing: 0.08em;
  backdrop-filter: none;
  box-shadow: var(--shadow);
}

.display-input-code {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.code-otp-display {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, 1.5vw, 16px);
}

.code-slot {
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--stone-border);
  background: var(--stone);
  backdrop-filter: none;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 2.3vw + 1.8vh, 3.4rem);
  font-weight: 700;
  color: var(--text-on-stone);
}

.code-slot.active {
  border-color: var(--gold-accent);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(138, 110, 61, 0.18);
}

.code-slot.filled {
  background: var(--stone-active);
}

.mini-action {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
}

.status-panel {
  width: min(720px, 100%);
  margin: 0 auto clamp(10px, 2vh, 18px);
  padding: clamp(10px, 1.5vh, 16px) clamp(12px, 2vw, 18px);
  border-radius: var(--radius);
  border: 1px solid transparent;
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
  line-height: 1.7;
}

.status-panel-info {
  background: rgba(138, 110, 61, 0.16);
  border-color: rgba(138, 110, 61, 0.3);
  color: var(--text-on-photo);
}

.status-panel-success {
  background: rgba(215, 233, 183, 0.14);
  border-color: rgba(215, 233, 183, 0.26);
  color: var(--text-on-photo);
}

.status-panel-error {
  background: rgba(240, 198, 193, 0.16);
  border-color: rgba(240, 198, 193, 0.24);
  color: var(--text-on-photo);
}

.status-panel-overlay {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin: 10px auto 0;
  z-index: 5;
}

.keypad {
  display: grid;
  gap: clamp(8px, 1.3vh, 20px);
}

.keypad-numeric {
  width: min(560px, 100%);
  margin: 0 auto clamp(10px, 1.8vh, 22px);
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 1.8vw, 24px);
}

.keypad-numeric .key {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 1.7vw + 1.2vh, 2.3rem);
  font-weight: 700;
}

.keypad-kana {
  width: min(1120px, 100%);
  margin: 0 auto;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 16px;
}

.key {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--stone-border);
  background: var(--stone);
  color: var(--text-on-stone);
  height: clamp(52px, 8vh, 88px);
  border-radius: var(--radius);
  font-size: clamp(1.2rem, 1.5vw + 1vh, 2rem);
  line-height: 1;
  cursor: pointer;
  backdrop-filter: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.key-empty {
  border: 0;
  background: transparent;
  height: clamp(44px, 7vh, 78px);
  visibility: hidden;
  pointer-events: none;
  box-shadow: none;
}

/* カナ/英数キーボードは列数が多いため、正方形にすると縦に伸びすぎる。
   高さは独立してvh基準で決め、横向きiPadの低い高さでも収まるようにする */
.keypad-kana .key,
.keypad-kana .key-empty {
  height: clamp(34px, 5vh, 64px);
}

.keypad-kana .key {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 3.6vh, 2.1rem);
}

.keypad-numeric .key-delete {
  font-size: 1.15rem;
  color: var(--gold-accent);
}

.keyboard-switch {
  display: flex;
  gap: 16px;
  margin: 0 auto clamp(8px, 1.3vh, 16px);
  width: min(1120px, 100%);
}

.keyboard-switch button {
  min-height: clamp(38px, 6vh, 56px);
  min-width: 180px;
  font-family: var(--font-heading);
  font-weight: 500;
}

.keyboard-actions {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: clamp(8px, 1.3vh, 14px) auto 0;
  width: min(1120px, 100%);
}

#spaceButton,
#backspaceButton,
#dakutenButton,
#smallKanaButton,
#companyPrefixButton {
  display: block;
  width: min(260px, 100%);
  min-height: clamp(38px, 6vh, 64px);
  font-size: 1.05rem;
  font-weight: 500;
  font-family: var(--font-heading);
  background: var(--stone);
  border: 1px solid var(--stone-border);
  color: var(--text-on-stone);
  backdrop-filter: none;
}

.visitor-continue-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: min(200px, 100%);
  min-height: clamp(48px, 7vh, 64px);
  margin: 22px auto 0;
  padding: 0 clamp(20px, 3vw, 28px);
  border: 1px solid var(--stone-border);
  border-radius: var(--radius);
  background: var(--stone);
  color: var(--text-on-stone-sub);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  font-family: var(--font-heading);
  cursor: pointer;
  backdrop-filter: none;
}

.continue-label {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 600;
}

.continue-chevron {
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  opacity: 0.6;
  line-height: 1;
}

.visitor-continue-button:not(:disabled) {
  border-color: var(--gold-accent);
  color: var(--text-on-stone);
}

.visitor-continue-button:not(:disabled) .continue-chevron {
  color: var(--gold-accent);
  opacity: 0.9;
}

.visitor-continue-button:not(:disabled):hover,
.visitor-continue-button:not(:disabled):focus-visible {
  border-color: var(--gold-bright);
  background: var(--stone-active);
}

.visitor-continue-button[hidden] {
  display: none;
}

.visitor-continue-button:disabled,
.primary-cta:disabled {
  opacity: 0.65;
  cursor: default;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  transform: none;
}

.search-results-wrap {
  margin: clamp(10px, 1.5vh, 18px) auto 0;
  width: min(1120px, 100%);
}

.search-results-wrap h3 {
  margin: 0 0 clamp(6px, 1vh, 10px);
  color: var(--gold-accent);
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--font-brand);
}

.search-results {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-height: clamp(160px, 24vh, 320px);
  overflow-y: auto;
  padding-right: 4px;
}

.staff-result {
  border: 1px solid var(--stone-border);
  border-radius: var(--radius);
  background: var(--stone);
  color: var(--text-on-stone);
  padding: clamp(8px, 1.2vh, 14px) 22px;
  cursor: pointer;
  text-align: left;
  font-size: 1.05rem;
  backdrop-filter: none;
  box-shadow: var(--shadow);
}

.staff-result strong {
  display: block;
  font-size: 1.22rem;
  line-height: 1.3;
  font-family: var(--font-heading);
  font-weight: 600;
}

.staff-result small {
  display: block;
  color: var(--text-on-stone-sub);
  margin-top: 6px;
  font-size: 0.96rem;
  line-height: 1.3;
  font-family: var(--font-heading);
}

.staff-result-static {
  cursor: default;
}

.staff-result-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.staff-result-main {
  min-width: 0;
}

.staff-result-meta {
  display: grid;
  justify-items: end;
  gap: 10px;
  color: var(--gold-accent);
}

.staff-result-meta small {
  margin: 0;
  font-size: 0.9rem;
}

.staff-result-arrow {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--gold-accent);
}

.selected-host-card {
  border-color: var(--gold-accent);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(138, 110, 61, 0.18);
}

.confirm-card {
  width: min(760px, 100%);
  margin: auto;
  padding: 48px 40px;
  border-radius: var(--radius);
  background: var(--stone);
  border: 1px solid var(--stone-border);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22);
  text-align: center;
  backdrop-filter: blur(16px) saturate(1.05);
}

.confirm-ticket {
  --ticket-pad-x: 56px;
  --ticket-pad-y: 48px;
  width: min(700px, 100%);
  padding: var(--ticket-pad-y) var(--ticket-pad-x);
}

.confirm-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 16px;
  display: block;
  border-radius: 10px;
  overflow: visible;
}

.confirm-icon path {
  fill: none;
  stroke: var(--gold-accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.confirm-card h2 {
  margin: 0;
  font-size: clamp(1.15rem, 1.4vw, 1.4rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-family: var(--font-heading);
  color: var(--text-on-stone-sub);
}

.confirm-ticket h2 {
  font-size: 30px;
  font-weight: 700;
}

.confirm-card p {
  margin: 6px 0 0;
  color: var(--text-on-stone-sub);
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: pre-line;
  font-family: var(--font-heading);
}

.confirm-ticket p {
  margin-top: 8px;
  color: var(--text-on-stone-sub);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  font-family: var(--font-heading);
}

.ticket-eyebrow {
  margin: 0 0 12px;
  color: var(--gold-accent);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-family: var(--font-heading);
}

.ticket-divider {
  position: relative;
  width: calc(100% + var(--ticket-pad-x) * 2);
  margin: 20px calc(var(--ticket-pad-x) * -1);
  border-top: 1px dashed var(--stone-border);
}

.ticket-divider::before,
.ticket-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--stone);
  transform: translateY(-50%);
}

.ticket-divider::before {
  left: -12px;
}

.ticket-divider::after {
  right: -12px;
}

.confirm-details {
  display: grid;
  gap: 24px;
  margin: 20px 0 16px;
  text-align: left;
}

.confirm-detail {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
}

.confirm-detail:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.confirm-detail-label {
  color: var(--text-on-stone-sub);
  font-size: 16px;
  letter-spacing: 0.02em;
  font-family: var(--font-heading);
}

.confirm-detail strong {
  font-size: 34px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-on-stone);
  font-family: var(--font-heading);
}

#confirmButton {
  width: 100%;
  margin-top: 16px;
  font-size: 20px;
  min-height: 64px;
  padding: 14px 28px;
}

.primary-cta {
  border: 1.5px solid var(--stone-border);
  border-radius: var(--radius);
  padding: clamp(12px, 2vh, 18px) clamp(20px, 3vw, 28px);
  min-height: clamp(48px, 8vh, 68px);
  font-size: 1.15rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--text-on-stone);
  background: var(--stone);
  cursor: pointer;
  min-width: 220px;
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(138, 110, 61, 0.18);
}

.primary-cta-wide {
  width: min(420px, 100%);
}

#submitCodeButton {
  display: block;
  margin: clamp(8px, 2vh, 28px) auto 0;
}

#successView {
  justify-content: center;
}

#successView.success-view-split {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  align-self: center;
  gap: clamp(28px, 4vw, 56px);
}

.success-card {
  width: min(600px, 100%);
  padding: 32px 32px;
  background: var(--stone);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  align-items: center;
}

#successView.success-view-split .success-card {
  flex: 0 1 40%;
  align-self: stretch;
  justify-content: center;
  width: auto;
  max-width: 420px;
  margin: 0;
  padding: 24px 26px;
}

#successView.success-view-split .success-card h2 {
  font-size: clamp(1.3rem, 0.9vw + 1.05rem, 1.7rem);
  white-space: nowrap;
}

.success-card .confirm-icon {
  margin-bottom: 14px;
  transition:
    box-shadow 220ms ease,
    transform 220ms ease,
    filter 220ms ease;
}

.success-card h2 {
  font-size: clamp(1.6rem, 1.1vw + 1.3rem, 2.1rem);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: 0.03em;
  font-family: var(--font-heading);
  color: var(--text-on-stone);
  margin: 0 0 12px;
  transition:
    color 220ms ease,
    text-shadow 220ms ease,
    transform 220ms ease,
    opacity 220ms ease;
}

.success-card p {
  margin: 0 0 20px;
  width: 100%;
  max-width: 28rem;
  color: #453e33;
  font-size: clamp(0.95rem, 0.4vw + 0.8rem, 1.1rem);
  line-height: 1.65;
}

.success-card .primary-cta {
  margin-top: 0;
}

.waiting-room-guide {
  display: block;
  width: clamp(360px, 45vw, 620px);
  max-width: 90%;
  height: auto;
  margin: 26px auto 0;
  background: var(--stone);
  border-radius: var(--radius);
}

#successView.success-view-split .waiting-room-guide {
  flex: 0 1 58%;
  width: auto;
  max-width: 640px;
  margin: 0;
}

.waiting-room-guide[hidden] {
  display: none;
}

.success-card[data-handling-status="acknowledged"] .confirm-icon {
  box-shadow:
    0 0 0 1px rgba(203, 169, 102, 0.08),
    0 0 18px rgba(231, 214, 166, 0.08);
  filter: saturate(1.02);
}

.success-card[data-handling-status="acknowledged"] h2 {
  color: var(--text-on-stone);
  text-shadow:
    0 0 4px rgba(231, 214, 166, 0.04),
    0 0 10px rgba(203, 169, 102, 0.03);
}

.success-card[data-handling-status="acknowledged"] p {
  color: #453e33;
}

.success-card.acknowledged-flash {
  animation: success-card-ack-glow 850ms ease;
}

.success-card .confirm-icon.acknowledged-flash {
  animation: success-icon-ack-glow 850ms ease;
}

.success-card h2.acknowledged-flash {
  animation: success-title-ack-glow 850ms ease;
}

@keyframes success-card-ack-glow {
  0% {
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22);
  }

  35% {
    box-shadow:
      0 20px 48px rgba(0, 0, 0, 0.22),
      0 0 24px rgba(231, 214, 166, 0.08);
  }

  100% {
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22);
  }
}

@keyframes success-icon-ack-glow {
  0% {
    transform: scale(1);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  }

  35% {
    transform: scale(1.03);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.03),
      0 0 24px rgba(231, 214, 166, 0.12);
  }

  100% {
    transform: scale(1);
    box-shadow:
      0 0 0 1px rgba(203, 169, 102, 0.08),
      0 0 18px rgba(231, 214, 166, 0.08);
  }
}

@keyframes success-title-ack-glow {
  0% {
    opacity: 0.96;
    transform: translateY(0);
    text-shadow:
      0 0 4px rgba(231, 214, 166, 0.03),
      0 0 8px rgba(203, 169, 102, 0.02);
  }

  40% {
    opacity: 1;
    transform: translateY(-1px);
    text-shadow:
      0 0 12px rgba(231, 214, 166, 0.1),
      0 0 18px rgba(203, 169, 102, 0.04);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
    text-shadow:
      0 0 4px rgba(231, 214, 166, 0.04),
      0 0 10px rgba(203, 169, 102, 0.03);
  }
}

.hidden {
  display: none !important;
}

.loading .view.active {
  opacity: 0.4;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

@media (max-width: 1100px) {
  .menu-grid,
  .shortcut-grid {
    grid-template-columns: 1fr;
  }

  .keypad-kana {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  html,
  body {
    font-size: 16px;
  }

  .topbar {
    align-items: flex-start;
  }

  .keyboard-switch {
    flex-wrap: wrap;
  }

  .keyboard-switch button,
  #spaceButton,
  #backspaceButton,
  #dakutenButton,
  #smallKanaButton,
  #companyPrefixButton {
    width: 100%;
  }

  .staff-result-action,
  .confirm-detail {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .staff-result-meta {
    justify-items: start;
  }

  .confirm-card {
    padding: 34px 22px;
  }

  .ticket-divider {
    width: calc(100% + 44px);
    margin: 24px -22px;
  }
}

/* iPad横向きなど、幅は広いが縦が低いタブレット画面向け。
   余白・フォントサイズ・カード/キーの高さは clamp()/aspect-ratio で
   フルードに縮むため、ここでは列数(グリッド構造)の調整のみ残す。 */
@media (orientation: landscape) and (min-width: 900px) and (max-height: 900px) {
  .menu-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }

  .shortcut-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .keypad-kana {
    gap: 10px;
  }
}
