:root {
  --pq-header: #1e88e5;
  --pq-header-dark: #1976d2;
  --pq-accent: #1976d2;
  --pq-action: #1976d2;
  --pq-action-hover: #1976d2;
  --pq-danger: #e53935;
  --pq-surface: #e3f2fd;
  --pq-surface-soft: #f0f7ff;
  --pq-row: #ffffff;
  --pq-border: #bbdefb;
}

html, body {
  height: 100%;
  background: #cfd8dc;
}

body {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  max-width: 420px;
  min-height: 100%;
  margin: 0 auto;
  background: var(--pq-surface-soft);
  position: relative;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.12);
}

    /* スキャン済み商品一覧：操作ガイドは背面に固定し、商品レコードがその上に重なる */
    #view-list {
      display: flex;
      flex-direction: column;
    }

    #view-list .pq-list-wrap {
      position: relative;
    }

    #view-list .pq-list-wrap::before {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      width: 100%;
      height: 100%;
      max-height: calc(100dvh - 8.25rem);
      box-sizing: border-box;
      padding: inherit;
      background-image: url("../images/item-list-bg.png");
      background-size: contain;
      background-position: center;
      background-repeat: no-repeat;
      background-origin: content-box;
      pointer-events: none;
      z-index: 0;
    }

/* --- 来場者用QRコード画面 --- */
.qr-header {
  background: linear-gradient(180deg, var(--pq-header) 0%, var(--pq-header-dark) 100%);
  color: #fff;
  padding: 0.75rem 0.75rem;
  text-align: center;
  flex-shrink: 0;
}

.qr-header-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.04em;
}

.qr-header-sub {
  font-size: 0.72rem;
  margin: 0.35rem 0 0;
  opacity: 0.92;
  font-weight: 500;
}

.qr-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1rem 1.5rem;
}

.qr-lead {
  text-align: center;
  font-size: 0.88rem;
  color: #37474f;
  line-height: 1.6;
  margin: 0 0 1.75rem;
  max-width: 20rem;
}

.visitor-affiliation {
  text-align: center;
  max-width: 20rem;
  margin: 0.15rem 0 0.65rem;
  word-break: break-word;
}

.visitor-org {
  font-size: 0.95rem;
  font-weight: 700;
  color: #263238;
  line-height: 1.45;
  margin: 0;
}

.visitor-meta {
  font-size: 0.82rem;
  font-weight: 500;
  color: #546e7a;
  line-height: 1.5;
  margin: 0.2rem 0 0;
}

.visitor-meta span + span::before {
  content: "　";
}

.visitor-label {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: #1565c0;
  margin: 0 0 0.75rem;
  max-width: 20rem;
  word-break: break-word;
}

.qr-card {
  background: #fff;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 4px 18px rgba(21, 101, 192, 0.15);
  border: 1px solid #e3f2fd;
  margin-bottom: 1rem;
}

.qr-host {
  line-height: 0;
}

.qr-host img,
.qr-host canvas {
  display: block;
  width: min(52vw, 200px) !important;
  height: min(52vw, 200px) !important;
  max-width: 100%;
}

.visitor-affiliation {
  margin-bottom: 0.4rem;
}

.visitor-org {
  font-size: 1rem;
  color: #212121;
}

.visitor-meta {
  font-size: 0.85rem;
  color: #424242;
}

.code-display {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0;
  color: #263238;
  margin: 0 0 0.35rem;
  font-variant-numeric: tabular-nums;
}

.code-caption {
  font-size: 0.72rem;
  color: #78909c;
  margin: 0 0 1.25rem;
  text-align: center;
}

.usage-list {
  width: 100%;
  max-width: 20rem;
  font-size: 0.78rem;
  color: #546e7a;
  line-height: 1.55;
  margin: 0 0 1.25rem;
  padding-left: 1.15rem;
}

.usage-list li + li {
  margin-top: 0.35rem;
}

.btn-print {
  min-width: 11rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.55rem 1.5rem;
}

.qr-error {
  text-align: center;
  max-width: 20rem;
}

.qr-error-title {
  font-size: 1rem;
  font-weight: 700;
  color: #c62828;
  margin-bottom: 0.75rem;
}

.qr-error-text {
  font-size: 0.85rem;
  color: #546e7a;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.qr-error-example {
  font-size: 0.78rem;
  background: #fff;
  border: 1px solid #bbdefb;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  word-break: break-all;
  color: #1565c0;
}

.print-sheet-title {
  display: none;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: #212121;
}

.print-footer-note {
  display: none;
  text-align: center;
  font-size: 0.7rem;
  color: #616161;
  margin-top: 0.75rem;
}

@media print {
  html, body {
    height: auto;
    background: #fff;
  }

  body {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .app-shell {
    max-width: none;
    min-height: 0;
    box-shadow: none;
    background: #fff;
  }

  .qr-header,
  .screen-only,
  .usage-list {
    display: none !important;
  }

  .qr-main {
    padding: 0;
    justify-content: center;
    min-height: auto;
  }

  .print-sheet-title,
  .print-footer-note {
    display: block;
  }

  .qr-lead {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: #212121;
  }

  .qr-card {
    box-shadow: none;
    border: 2px solid #212121;
    border-radius: 8px;
    padding: 0.75rem;
    page-break-inside: avoid;
  }

  .qr-host img,
  .qr-host canvas {
    width: 48mm !important;
    height: 48mm !important;
  }

  .code-display {
    font-size: 1.5rem;
    margin-top: 0.25rem;
  }

  .code-caption {
    margin-bottom: 0;
  }

  @page {
    margin: 18mm;
    size: A4 portrait;
  }
}

/* --- ログイン画面 --- */
.login-header {
  background: linear-gradient(180deg, var(--pq-header) 0%, var(--pq-header-dark) 100%);
  color: #fff;
  padding: 0.75rem 0.75rem;
  text-align: center;
  flex-shrink: 0;
}

.login-header-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.04em;
}

.login-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1rem 1.25rem;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.login-lead {
  text-align: center;
  font-size: 0.85rem;
  color: #546e7a;
  line-height: 1.55;
  margin: 0 0 1rem;
  max-width: 20rem;
}

.qr-scan-area {
  position: relative;
  overflow: hidden;
  background: #263238;
  isolation: isolate;
}

.login-main .qr-scan-area {
  width: 100%;
  max-width: 340px;
  height: min(40vh, 300px);
  flex-shrink: 0;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(21, 101, 192, 0.18);
}

.reception-wait-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--portal-navy);
  flex-shrink: 0;
}

.reception-wait-form {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
}

.reception-wait-form .portal-input {
  flex: 1;
  min-width: 0;
  letter-spacing: 0.04em;
  ime-mode: disabled;
}

.reception-wait-form .portal-input:disabled {
  background: #f5f7f9;
  color: #78909c;
}

.reception-wait-form .portal-btn {
  flex-shrink: 0;
}

.reception-wait-note {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .reception-wait-form {
    flex-direction: column;
  }
}

/* タブレット以下はカメラ。広い画面の受付PCはスキャナのまま */
.reception-camera {
  display: none;
  width: min(480px, 100%);
  margin-top: 0.25rem;
}

.reception-camera .qr-scan-area {
  width: 100%;
  height: min(46vh, 420px);
  min-height: 240px;
  margin-top: 0.85rem;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(21, 101, 192, 0.18);
}

.reception-camera .scan-qr-frame-wrap {
  width: min(72%, 280px);
}

@media (max-width: 1199px), ((max-width: 1400px) and (hover: none) and (pointer: coarse)) {
  .reception-scan-lead--hardware {
    display: none;
  }

  .reception-camera {
    display: block;
  }
}

.portal-site-header--reception {
  align-items: center;
}

.portal-site-header__start {
  display: flex;
  align-items: flex-end;
  gap: 1.75rem;
  min-width: 0;
}

.reception-switch {
  display: flex;
  align-items: flex-end;
  gap: 1.15rem;
  transform: translateY(0.35em);
}

.reception-switch__link {
  display: inline-flex;
  align-items: center;
  color: #9aa3ad;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1;
  text-decoration: none;
  border-bottom: 4px solid transparent;
  padding-bottom: 0.5rem;
}

.reception-switch__link:hover,
.reception-switch__link:focus-visible {
  color: #111;
  outline: none;
}

.reception-switch__link.is-current {
  color: #111;
  border-bottom-color: var(--portal-navy);
}

.portal-site-header__tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  margin-left: auto;
  min-width: 0;
}

.reception-menu {
  position: relative;
}

.reception-menu__button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2.25rem;
  padding: 0 0.85rem;
  border: 1px solid #c5ced6;
  border-radius: 6px;
  background: #fff;
  color: var(--portal-navy);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  cursor: pointer;
}

.reception-menu__button:hover,
.reception-menu__button:focus-visible,
.reception-menu__button[aria-expanded="true"] {
  border-color: var(--portal-navy);
  background: #f4f7f9;
  outline: none;
}

.reception-menu__chevron {
  display: block;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.reception-menu__button[aria-expanded="true"] .reception-menu__chevron {
  transform: rotate(180deg);
}

.reception-menu__panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  width: min(17.5rem, calc(100vw - 2rem));
  padding: 0.45rem 0 0.5rem;
  border: 1px solid #d8dee4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(var(--portal-navy-rgb), 0.12);
  z-index: 30;
}

.reception-menu__item {
  display: block;
  padding: 0.65rem 1rem;
  color: #1c2430;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.4;
}

.reception-menu__item:hover,
.reception-menu__item:focus-visible {
  background: #f4f7f9;
  color: var(--portal-navy);
  outline: none;
}

#scanVideo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}

.scan-camera-error {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem;
  background: rgba(18, 32, 40, 0.92);
}

.scan-camera-error-inner {
  max-width: 20rem;
  text-align: center;
  color: #eceff1;
}

.scan-camera-error-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
  color: #fff;
}

.scan-camera-error-text {
  font-size: 0.82rem;
  line-height: 1.55;
  margin-bottom: 1rem;
  color: #b0bec5;
}

.scan-camera-error-text.scan-camera-error-flash {
  animation: scan-camera-error-flash 0.6s ease;
}

@keyframes scan-camera-error-flash {
  0%, 100% { color: #b0bec5; }
  40% { color: #fff; }
}

.scan-camera-error-note {
  font-size: 0.7rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 0.75rem;
}

.scan-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.scan-qr-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem 1rem;
}

.scan-qr-frame-wrap {
  position: relative;
  width: min(72%, 260px);
  aspect-ratio: 1;
  max-height: min(72%, 260px);
}

.scan-qr-cutout {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  /* 枠外はカード背景色と同じで覆う（真っ暗にならないように） */
  box-shadow: 0 0 0 400vmax rgba(38, 50, 56, 1);
  position: relative;
  overflow: hidden;
}

.scan-qr-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: #64b5f6;
  border-style: solid;
  border-width: 0;
  z-index: 1;
}

.scan-qr-corner.tl { top: 0; left: 0; border-top-width: 4px; border-left-width: 4px; border-top-left-radius: 10px; }
.scan-qr-corner.tr { top: 0; right: 0; border-top-width: 4px; border-right-width: 4px; border-top-right-radius: 10px; }
.scan-qr-corner.bl { bottom: 0; left: 0; border-bottom-width: 4px; border-left-width: 4px; border-bottom-left-radius: 10px; }
.scan-qr-corner.br { bottom: 0; right: 0; border-bottom-width: 4px; border-right-width: 4px; border-bottom-right-radius: 10px; }

.scan-hint {
  position: absolute;
  top: 7%;
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  padding: 0 1rem;
}

.scan-hint-sub {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.88;
}

.scan-demo-hit {
  position: absolute;
  inset: 0;
  cursor: pointer;
  z-index: 2;
  border-radius: 14px;
  pointer-events: auto;
}

.scan-demo-note {
  position: absolute;
  bottom: 22%;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.72);
  pointer-events: none;
}

.login-manual-note {
  flex-shrink: 0;
  width: 100%;
  max-width: 340px;
  text-align: center;
  font-size: 0.85rem;
  color: #37474f;
  line-height: 1.5;
  margin: 0 0 0.75rem;
  position: relative;
  z-index: 10;
}

.login-manual-link {
  color: var(--pq-accent) !important;
  font-weight: 600;
  font-size: inherit;
  text-decoration: underline !important;
  text-underline-offset: 2px;
  vertical-align: baseline;
}

.login-manual-link:hover {
  color: var(--pq-header-dark) !important;
}

.login-footer-hint {
  flex-shrink: 0;
  padding: 0.5rem 0.5rem 0;
  text-align: center;
  font-size: 0.68rem;
  color: #78909c;
  line-height: 1.45;
  margin: 0;
  max-width: 20rem;
}

#hiddenCanvas {
  display: none;
}

.modal-connect .modal-content {
  border-radius: 0.65rem;
  text-align: center;
}

.modal-connect .modal-body {
  padding: 1.25rem 1.25rem 1.5rem;
}

/* --- ログイン成功トースト（一覧の上に重ねる） --- */
.pq-login-toast {
  position: absolute;
  top: 3.5rem;
  left: 0.75rem;
  right: 0.75rem;
  z-index: 1030;
  margin: 0;
  padding: 0.65rem 0.85rem;
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  pointer-events: none;
}

/* --- 一覧ヘッダー --- */
.pq-header {
  background: linear-gradient(180deg, var(--pq-header) 0%, var(--pq-header-dark) 100%);
  color: #fff;
  padding: 0.75rem 0.75rem;
  position: sticky;
  top: 0;
  z-index: 1020;
  display: flex;
  align-items: center;
}

.pq-header-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 1;
  min-width: 0;
  padding: 0 2.75rem;
}

.pq-title-main {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0;
  text-align: center;
  line-height: 1.25;
}

.pq-menu-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  background: transparent;
  border: 0;
  color: #fff;
  padding: 0.1rem 0.25rem;
  line-height: 0;
  display: none;
  align-items: center;
  justify-content: center;
}

.pq-menu-btn.active {
  display: flex;
}

.pq-menu-btn svg {
  width: 32px;
  height: 32px;
  display: block;
}

.hamburger-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0.75rem;
  width: 50%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  background: #fff;
  border: 2px solid var(--pq-header);
  border-radius: 0.35rem;
  color: #263238;
  box-sizing: border-box;
  z-index: 1030;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hamburger-menu.active {
  display: block;
}

.hamburger-menu-inner {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.hamburger-menu-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.hamburger-menu-label {
  font-size: 0.75rem;
  color: #607d8b;
  line-height: 1.2;
}

.hamburger-menu-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #263238;
  line-height: 1.3;
}

.hamburger-menu-footer {
  margin-top: 0.15rem;
  padding-top: 0.65rem;
  border-top: 1px solid #cfd8dc;
}

.hamburger-logout-btn {
  width: 100%;
  padding: 0.4rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #546e7a;
  background: #fff;
  border: 1px solid #90a4ae;
  border-radius: 0.3rem;
  line-height: 1.3;
}

.hamburger-logout-btn:hover,
.hamburger-logout-btn:focus-visible {
  background: #eceff1;
  color: #37474f;
}

.hamburger-logout-btn:active {
  background: #cfd8dc;
}

/* --- サマリー --- */
.pq-summary {
  background: var(--pq-surface);
  border-bottom: 1px solid var(--pq-border);
  padding: 0.65rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.pq-summary-label {
  font-size: 0.75rem;
  color: #546e7a;
}

.pq-summary-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--pq-accent);
  line-height: 1.1;
}

/* --- 商品リスト --- */
.pq-list-wrap {
  padding: 0.5rem 0.65rem 6.75rem;
  flex: 1;
}

.pq-item {
  background: transparent;
  border: 1px solid var(--pq-border);
  border-radius: 0.35rem;
  margin-bottom: 0.45rem;
  position: relative;
  z-index: 1;
  transition: box-shadow 0.2s;
  overflow: hidden;
  padding: 0;
  scroll-margin-bottom: 7.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.pq-item.pq-item-latest {
  box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.35);
}

.pq-item-track {
  position: relative;
}

.pq-item-actions {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 88px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: linear-gradient(180deg, var(--pq-danger) 0%, #c62828 100%);
  z-index: 0;
}

.pq-item-delete-btn {
  flex: 1;
  border: 0;
  background: transparent;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  padding: 0.5rem;
  -webkit-tap-highlight-color: transparent;
}

.pq-item-delete-btn:active {
  background: rgba(0, 0, 0, 0.12);
}

.pq-item-panel {
  position: relative;
  z-index: 1;
  background: var(--pq-row);
  padding: 0.6rem 0.65rem;
  transform: translateX(0);
  transition: transform 0.22s ease-out;
  touch-action: pan-y;
}

.pq-item--dragging .pq-item-panel {
  transition: none;
  user-select: none;
  -webkit-user-select: none;
}

.pq-item--open .pq-item-panel {
  transform: translateX(-88px);
}

.pq-item-row1 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.pq-item-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #263238;
  padding-right: 1.25rem;
}

.pq-item-chevron {
  position: absolute;
  top: 0.55rem;
  right: 0.5rem;
  color: var(--pq-accent);
  font-size: 1rem;
}

.pq-item-tax {
  font-size: 0.7rem;
  color: #78909c;
  margin-top: 0.15rem;
}

.pq-item-row2 {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 0.45rem;
}

.pq-item-price {
  font-size: 1.35rem;
  font-weight: 700;
  color: #37474f;
}

/* --- 一覧フッター（中央スキャン） --- */
.pq-footer {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 420px;
  background: var(--pq-surface);
  border-top: 1px solid var(--pq-border);
  padding: 0.45rem 0.45rem 0.55rem;
  padding-bottom: calc(0.55rem + env(safe-area-inset-bottom, 0px));
  z-index: 1030;
}

.pq-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  min-height: 3.4rem;
}

.pq-footer-action {
  flex: 1;
  text-align: center;
  color: var(--pq-action);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  padding: 0.25rem 0.2rem;
  min-height: 3.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.pq-footer-action svg {
  display: block;
  margin: 0 auto 0.16rem;
  width: 29px;
  height: 29px;
}

.pq-footer-quote-hit {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pq-footer-quote-hit:focus-visible {
  outline: 2px solid var(--pq-action);
  outline-offset: 2px;
}

/* 未依頼のスキャン済み商品があるとき、見積もり依頼を目立たせる */
.pq-footer-action.pq-footer-quote--pending {
  color: var(--pq-danger);
}

.pq-footer-quote--pending:focus-visible {
  outline-color: var(--pq-danger);
}

.pq-scan-fab {
  position: absolute;
  left: 50%;
  top: -2.2rem;
  transform: translateX(-50%);
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: linear-gradient(180deg, #42a5f5 0%, #1e88e5 100%);
  border: 3px solid #e3f2fd;
  color: #fff;
  box-shadow: 0 3px 10px rgba(30, 136, 229, 0.38);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.15;
  cursor: pointer;
  border: 0;
}

.pq-scan-fab svg {
  width: 29px;
  height: 29px;
  margin-bottom: 0.12rem;
}

.pq-scan-fab:active {
  transform: translateX(-50%) scale(0.97);
}

/* --- スキャン画面 --- */
#view-scan {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1040;
  max-width: 420px;
  margin: 0 auto;
  background: #000;
  flex-direction: column;
}

#view-scan.active {
  display: flex;
}

.scan-header {
  background: linear-gradient(180deg, var(--pq-header) 0%, var(--pq-header-dark) 100%);
  color: #fff;
  padding: 0.5rem 0.65rem 0.65rem;
  flex-shrink: 0;
}

.scan-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.scan-back {
  background: transparent;
  border: 0;
  color: #fff;
  padding: 0.35rem;
  line-height: 1;
}

.scan-title-block {
  text-align: center;
  flex: 1;
}

.scan-title-sub {
  font-size: 0.65rem;
  opacity: 0.9;
}

.scan-title {
  font-size: 1rem;
  font-weight: 700;
}

#view-scan .qr-scan-area {
  flex: 1;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(21, 101, 192, 0.18);
}

.scan-camera-error {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem;
  background: rgba(18, 32, 40, 0.92);
  pointer-events: auto;
}

.scan-camera-error-inner {
  max-width: 20rem;
  text-align: center;
  color: #eceff1;
}

.scan-camera-error-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
  color: #fff;
}

.scan-camera-error-text {
  font-size: 0.82rem;
  line-height: 1.55;
  margin-bottom: 1rem;
  color: #b0bec5;
}

.scan-camera-error-note {
  font-size: 0.7rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 0.75rem;
}

#scanVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scan-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* QR: 中央の正方形読取枠＋周囲を暗く */
.scan-qr-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem 1rem;
}

.scan-qr-frame-wrap {
  position: relative;
  width: min(78vw, 300px);
  aspect-ratio: 1;
  max-height: min(78vw, 52vh);
}

.scan-qr-cutout {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  /* 枠外はカード背景色と同じで覆う（真っ暗にならないように） */
  box-shadow: 0 0 0 400vmax rgba(38, 50, 56, 1);
  position: relative;
  overflow: hidden;
}

.scan-qr-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: #64b5f6;
  border-style: solid;
  border-width: 0;
  z-index: 1;
  filter: drop-shadow(0 0 6px rgba(100, 181, 246, 0.65));
}

.scan-qr-corner.tl {
  top: 0;
  left: 0;
  border-top-width: 4px;
  border-left-width: 4px;
  border-top-left-radius: 10px;
}

.scan-qr-corner.tr {
  top: 0;
  right: 0;
  border-top-width: 4px;
  border-right-width: 4px;
  border-top-right-radius: 10px;
}

.scan-qr-corner.bl {
  bottom: 0;
  left: 0;
  border-bottom-width: 4px;
  border-left-width: 4px;
  border-bottom-left-radius: 10px;
}

.scan-qr-corner.br {
  bottom: 0;
  right: 0;
  border-bottom-width: 4px;
  border-right-width: 4px;
  border-bottom-right-radius: 10px;
}

.scan-qr-icon-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.22;
  z-index: 0;
  color: #fff;
}

.scan-hint {
  position: absolute;
  top: 7%;
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  padding: 0 1rem;
  pointer-events: none;
}

.scan-hint-sub {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.88;
}

.scan-footer {
  display: flex;
  justify-content: space-around;
  padding: 0.55rem 0.25rem 0.7rem;
  padding-bottom: calc(0.7rem + env(safe-area-inset-bottom, 0px));
  background: var(--pq-surface);
  border-top: 1px solid var(--pq-border);
}

.scan-footer-btn {
  background: transparent;
  border: 0;
  color: var(--pq-action);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.3rem;
  text-align: center;
  max-width: 42%;
  min-height: 3.2rem;
}

.scan-footer-btn svg {
  display: block;
  margin: 0 auto 0.2rem;
  width: 29px;
  height: 29px;
}

.scan-demo-hit {
  position: absolute;
  inset: 0;
  cursor: pointer;
  z-index: 2;
  border-radius: 14px;
  pointer-events: auto;
}

.scan-demo-note {
  position: absolute;
  bottom: 22%;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.72);
  pointer-events: none;
}

#hiddenCanvas {
  display: none;
}

.modal-connect .modal-content {
  border-radius: 0.65rem;
  text-align: center;
  padding: 1rem 0.5rem;
}

.modal-connect .modal-body {
  padding: 1rem 1.25rem 1.25rem;
}

.view-list-hidden {
  visibility: hidden;
}

/* --- 商品詳細モーダル：画像カルーセル --- */
.pq-item-detail-images {
  margin-top: 0.75rem;
}

.pq-item-detail-carousel {
  background: #f8f9fa;
  border-radius: 0.35rem;
  overflow: hidden;
}

.pq-item-detail-carousel .carousel-inner {
  min-height: 180px;
}

.pq-item-detail-carousel .pq-item-detail-image {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  background: #f8f9fa;
}

.pq-item-detail-carousel .carousel-indicators {
  margin-bottom: 0.35rem;
}

.pq-item-detail-carousel .carousel-indicators [data-bs-target] {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #495057;
  opacity: 0.45;
}

.pq-item-detail-carousel .carousel-indicators .active {
  background-color: var(--pq-accent);
  opacity: 1;
}

.pq-item-detail-carousel .carousel-control-prev,
.pq-item-detail-carousel .carousel-control-next {
  width: 12%;
}

.pq-item-detail-carousel .carousel-control-prev-icon,
.pq-item-detail-carousel .carousel-control-next-icon {
  background-color: rgba(33, 37, 41, 0.65);
  border-radius: 50%;
  background-size: 60%;
  width: 2rem;
  height: 2rem;
}

/* --- 展示会申し込みポータル（デザイン確認用） --- */
body.portal-body {
  --portal-navy: #2f5472;
  --portal-navy-hover: #284760;
  --portal-navy-rgb: 47, 84, 114;
  --portal-amber: #b07a3a;
  --portal-amber-hover: #956530;
  --portal-amber-rgb: 176, 122, 58;
  background: #fff;
  min-height: 100%;
}

.portal-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #fff;
  padding: 2.5rem 1.25rem 3rem;
  box-sizing: border-box;
}

.portal-shell--index {
  padding: 0;
}

.portal-shell--form {
  background: #f7f8fa;
}

.portal-container {
  flex: 1;
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 2rem 2.5rem 3rem;
  box-sizing: border-box;
}

.portal-site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #d8dee4;
}

.portal-site-header__brand {
  flex-shrink: 0;
}

.portal-logo {
  display: block;
  width: min(220px, 42vw);
  height: auto;
}

.portal-site-header__event {
  margin: 0;
  flex: 1;
  text-align: right;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  font-weight: 600;
  color: #111;
  letter-spacing: 0.03em;
  line-height: 1.5;
}

.portal-section-heading {
  display: flex;
  align-items: center;
  align-self: flex-start;
  width: 100%;
  gap: 0.75rem;
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 700;
  color: #111;
  letter-spacing: 0.03em;
  line-height: 1.4;
}

.portal-page-body--index .portal-section-heading::before {
  content: "";
  display: block;
  width: 4px;
  height: 1.2em;
  flex-shrink: 0;
  background: var(--portal-navy);
  border-radius: 1px;
}

.portal-shell--home .portal-site-header {
  display: none;
}

.portal-shell--home .portal-main--index {
  padding-top: 2rem;
}

.portal-index-intro {
  text-align: center;
  margin: 0.5rem 0 2.25rem;
}

.portal-index-intro__event {
  margin: 0 auto;
  max-width: 22em;
  font-size: clamp(2rem, 7vw, 3.2rem);
  font-weight: 700;
  color: #8b1e1e;
  letter-spacing: 0.04em;
  line-height: 1.35;
  overflow-wrap: break-word;
  word-break: normal;
  text-wrap: balance;
  white-space: pre-line;
}

.portal-index-intro__title {
  margin: 1.1rem 0 0;
  font-size: clamp(1.7rem, 5.5vw, 2.25rem);
  font-weight: 700;
  color: #111;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.portal-index-intro__note {
  margin: 0.65rem 0 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: #111;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.portal-page-body--index .portal-section-heading {
  font-size: clamp(1.4rem, 3.4vw, 1.75rem);
}

.portal-index-cta {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.portal-index-cta .portal-section-heading {
  align-self: stretch;
}

.portal-index-cta .portal-choice-grid--cta {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

@media (min-width: 721px) {
  .portal-index-intro__event {
    font-size: 2.15rem;
  }

  .portal-index-intro__title {
    font-size: 1.55rem;
  }

  .portal-index-intro__note {
    font-size: 0.95rem;
  }

  .portal-page-body--index .portal-section-heading {
    font-size: 1.25rem;
  }

  .portal-choice-card--invite,
  .portal-choice-card--guest {
    min-height: 5.25rem;
    padding: 0.85rem 1.25rem;
    gap: 0.7rem;
  }

  .portal-choice-card--invite .portal-choice-card__title,
  .portal-choice-card--guest .portal-choice-card__title {
    font-size: 1.55rem;
  }

  .portal-choice-card--invite .portal-choice-card__desc,
  .portal-choice-card--guest .portal-choice-card__desc {
    font-size: 1.05rem;
  }

  .portal-choice-card--invite .portal-choice-card__icon,
  .portal-choice-card--guest .portal-choice-card__icon {
    width: 2.6rem;
    height: 2.6rem;
  }

  .portal-site-header__event {
    font-size: 1.15rem;
    white-space: pre-line;
  }

  .portal-section-heading {
    font-size: 1.4rem;
  }

  .portal-page-lead,
  .portal-index-lead {
    font-size: 1rem;
  }

  .portal-label,
  .portal-form-label,
  .portal-confirm-label,
  .portal-confirm-value {
    font-size: 1rem;
  }

  .portal-input,
  .portal-form-input,
  .portal-checkbox,
  .portal-radio {
    font-size: 1rem;
  }

  .portal-btn,
  .portal-btn-confirm,
  .portal-btn-back {
    font-size: 1.05rem;
    padding: 0.8rem 1.4rem;
  }

  .portal-form-title {
    font-size: 1.5rem;
  }

  .portal-thanks-heading {
    font-size: 1.4rem;
  }

  .portal-thanks-message {
    font-size: 1rem;
  }
}

.portal-page-body {
  width: 100%;
}

.portal-page-body--login {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.portal-page-body--login .portal-page-lead {
  padding-left: 0;
  text-align: center;
}

.portal-page-body--thanks {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.portal-section-heading--center {
  align-self: center;
  justify-content: center;
}

.portal-page-lead,
.portal-index-lead {
  margin: 0.85rem 0 0;
  font-size: 1.15rem;
  color: #546e7a;
  line-height: 1.6;
}

.portal-login-form {
  width: min(480px, 100%);
  margin-top: 2rem;
  margin-left: auto;
  margin-right: auto;
  padding: 1.75rem 1.5rem;
  border: 1px solid #d8dee4;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.portal-login-form .portal-field:last-of-type {
  margin-bottom: 0;
}

.portal-login-form .portal-actions {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eceff1;
}

.portal-login-form .reception-wait-note {
  margin: 0.35rem 0 0;
}

.portal-site-footer {
  flex-shrink: 0;
  background: var(--portal-navy);
  padding: 0.85rem 1rem;
  text-align: center;
}

.portal-site-footer__copy {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  letter-spacing: 0.04em;
}

.portal-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.portal-title {
  margin: 0;
  font-size: clamp(1.15rem, 2.4vw, 1.65rem);
  font-weight: 700;
  color: #111;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.portal-subtitle {
  margin: 0.75rem 0 0;
  font-size: 1rem;
  font-weight: 600;
  color: #37474f;
  letter-spacing: 0.06em;
}

.portal-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-main--narrow {
  align-items: flex-start;
}

.portal-main--wide {
  align-items: flex-start;
}

.portal-main--index {
  align-items: stretch;
  justify-content: flex-start;
  flex-direction: column;
  padding: 2.75rem 0 1rem;
}

.portal-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
  margin-top: 2rem;
}


.portal-choice-grid--cta {
  grid-template-columns: minmax(0, 1fr);
  gap: 1.1rem;
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.portal-choice-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 7.5rem;
  padding: 1.35rem 1.25rem;
  border: 1px solid #d8dee4;
  border-left-width: 4px;
  border-radius: 8px;
  background: #fff;
  color: #111;
  text-decoration: none;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, filter 0.15s ease;
}

.portal-choice-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  flex: 1;
}

.portal-choice-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.02em;
}

.portal-choice-card__desc {
  font-size: 0.875rem;
  font-weight: 400;
  color: #546e7a;
  line-height: 1.55;
}

.portal-choice-card__arrow {
  flex-shrink: 0;
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--portal-navy);
  line-height: 1;
  transition: transform 0.15s ease;
}

.portal-choice-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  color: #fff;
}

.portal-choice-card__icon svg {
  width: 100%;
  height: 100%;
}

.portal-choice-card--invite,
.portal-choice-card--guest {
  width: 100%;
  height: auto;
  min-height: 6.5rem;
  padding: 1rem 1.25rem;
  border: none;
  border-radius: 10px;
  color: #fff;
  box-sizing: border-box;
  justify-content: center;
  gap: 0.85rem;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.18);
}

.portal-choice-card--invite .portal-choice-card__body,
.portal-choice-card--guest .portal-choice-card__body {
  flex: 0 1 auto;
  width: auto;
  max-width: calc(100% - 4rem);
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  text-align: center;
}

.portal-choice-card--invite {
  background: #2f5a2b;
}

.portal-choice-card--guest {
  background: #c45a28;
}

.portal-choice-card--invite .portal-choice-card__title,
.portal-choice-card--guest .portal-choice-card__title {
  font-size: clamp(1.65rem, 5.5vw, 2.35rem);
  letter-spacing: 0.04em;
}

.portal-choice-card--invite .portal-choice-card__desc,
.portal-choice-card--guest .portal-choice-card__desc {
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1.15rem, 4vw, 1.5rem);
}

.portal-choice-card--invite .portal-choice-card__icon,
.portal-choice-card--guest .portal-choice-card__icon {
  width: clamp(2.75rem, 8vw, 3.5rem);
  height: clamp(2.75rem, 8vw, 3.5rem);
}

.portal-choice-card:hover,
.portal-choice-card:focus-visible {
  border-color: var(--portal-navy);
  box-shadow: 0 8px 24px rgba(var(--portal-navy-rgb), 0.1);
  color: #111;
  outline: none;
  transform: translateY(-1px);
}

.portal-choice-card--invite:hover,
.portal-choice-card--invite:focus-visible,
.portal-choice-card--guest:hover,
.portal-choice-card--guest:focus-visible {
  border-color: transparent;
  color: #fff;
  filter: brightness(1.06);
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.22);
}

.portal-choice-card:hover .portal-choice-card__arrow,
.portal-choice-card:focus-visible .portal-choice-card__arrow {
  transform: translateX(3px);
}

.portal-choice-card:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(var(--portal-navy-rgb), 0.08);
}

.portal-choice-card--invite:active,
.portal-choice-card--guest:active {
  filter: brightness(0.96);
  box-shadow: 0 3px 10px rgba(17, 24, 39, 0.16);
}

.portal-choice-card--has-id {
  background: #eef3f7;
  border-color: var(--portal-navy);
}

.portal-choice-card--has-id .portal-choice-card__arrow {
  color: var(--portal-navy);
}

.portal-choice-card--has-id:hover,
.portal-choice-card--has-id:focus-visible {
  background: #e4edf3;
  border-color: var(--portal-navy);
  box-shadow: 0 8px 24px rgba(var(--portal-navy-rgb), 0.16);
}

.portal-choice-card--has-id:active {
  box-shadow: 0 2px 8px rgba(var(--portal-navy-rgb), 0.1);
}

.portal-choice-card--no-id {
  background: #f8f3eb;
  border-color: var(--portal-amber);
}

.portal-choice-card--no-id .portal-choice-card__desc {
  color: #7a6550;
}

.portal-choice-card--no-id .portal-choice-card__arrow {
  color: var(--portal-amber);
}

.portal-choice-card--no-id:hover,
.portal-choice-card--no-id:focus-visible {
  background: #f3eadc;
  border-color: var(--portal-amber);
  box-shadow: 0 8px 24px rgba(var(--portal-amber-rgb), 0.16);
}

.portal-choice-card--no-id:active {
  box-shadow: 0 2px 8px rgba(var(--portal-amber-rgb), 0.1);
}

.portal-panel {
  width: min(640px, 100%);
  background: #fff;
  border: 1px solid #cfd8dc;
  padding: 1.75rem 1.5rem 1.5rem;
  box-sizing: border-box;
}

.portal-panel--center {
  text-align: center;
}

.portal-main--wide .portal-panel {
  width: min(760px, 100%);
}

.portal-lead {
  margin: 0 0 1.5rem;
  font-size: 0.92rem;
  color: #546e7a;
  line-height: 1.7;
}

.portal-thanks-heading {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 700;
  color: #111;
  letter-spacing: 0.03em;
  line-height: 1.5;
}

.portal-thanks-message {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 400;
  color: #546e7a;
  line-height: 1.8;
}

.portal-thanks-note {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: #546e7a;
  line-height: 1.7;
}

.portal-thanks-back {
  margin-top: 1.75rem;
  min-width: 12rem;
}

.portal-section + .portal-section {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eceff1;
}

.portal-section-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  color: #263238;
  letter-spacing: 0.04em;
}

.portal-hint {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  color: #78909c;
  line-height: 1.5;
}

.portal-field {
  margin-bottom: 1.1rem;
}

.portal-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
}

.portal-input {
  display: block;
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid #cfd4da;
  border-radius: 6px;
  background: #fff;
  color: #111;
  font-size: 1.15rem;
  line-height: 1.4;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.portal-input:focus {
  outline: none;
  border-color: var(--portal-navy);
  box-shadow: 0 0 0 3px rgba(var(--portal-navy-rgb), 0.12);
}

.portal-textarea {
  resize: vertical;
  min-height: 6rem;
}

.portal-radio-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.portal-radio {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  color: #263238;
  cursor: pointer;
}

.portal-readonly-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
}

.portal-readonly {
  padding: 0.75rem 0.85rem;
  background: #f5f7f9;
  border: 1px solid #e0e6ea;
}

.portal-readonly--full {
  grid-column: 1 / -1;
}

.portal-readonly-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  color: #78909c;
}

.portal-readonly-value {
  display: block;
  font-size: 0.95rem;
  color: #212121;
  font-weight: 600;
  word-break: break-word;
}

.portal-confirm-list {
  margin: 0;
}

.portal-confirm-row {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid #eceff1;
}

.portal-confirm-row dt {
  margin: 0;
  font-size: 0.85rem;
  color: #78909c;
  font-weight: 600;
}

.portal-confirm-row dd {
  margin: 0;
  font-size: 0.95rem;
  color: #212121;
  font-weight: 600;
  word-break: break-word;
}

.portal-confirm-note {
  white-space: pre-wrap;
  font-weight: 500 !important;
}

.portal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}

.portal-actions--center {
  justify-content: center;
}

.portal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 8.5rem;
  padding: 0.9rem 1.5rem;
  border: 1px solid #d8dee4;
  border-radius: 6px;
  background: #fff;
  color: #111;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.3;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.portal-btn--primary {
  background: var(--portal-navy);
  border-color: var(--portal-navy);
  color: #fff;
}

.portal-btn--primary:hover,
.portal-btn--primary:focus-visible {
  background: var(--portal-navy-hover);
  border-color: var(--portal-navy-hover);
  color: #fff;
}

.portal-btn--ghost:hover,
.portal-btn--ghost:focus-visible {
  background: #f5f7f9;
  border-color: #b8c4ce;
  color: #111;
}

@media (max-width: 720px) {
  .portal-shell {
    padding: 1.75rem 1rem 2rem;
  }

  .portal-shell--index {
    padding: 0;
  }

  .portal-container {
    padding: 1.5rem 1rem 2rem;
  }

  .portal-site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 1rem;
  }

  .portal-site-header--reception {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 0.75rem;
    row-gap: 0.55rem;
    align-items: center;
  }

  .portal-site-header--reception .portal-site-header__start {
    display: contents;
  }

  .portal-site-header--reception .portal-site-header__brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .portal-site-header--reception .reception-switch {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .portal-site-header--reception .portal-site-header__tools {
    grid-column: 2;
    grid-row: 1;
    margin-left: 0;
    padding-top: 0;
  }

  .reception-menu__button {
    flex-shrink: 0;
  }

  .reception-menu__panel {
    left: auto;
    right: 0;
  }

  .portal-site-header__event {
    text-align: left;
    font-size: 1.25rem;
  }

  .portal-main--index {
    padding-top: 2rem;
  }

  .portal-section-heading {
    font-size: 1.5rem;
  }

  .portal-page-lead,
  .portal-index-lead {
    font-size: 1.1rem;
  }

  .portal-login-form {
    margin-top: 1.5rem;
    padding: 1.35rem 1.1rem;
  }

  .portal-thanks-box {
    padding: 2rem 1.25rem;
  }

  .portal-header {
    margin-bottom: 1.75rem;
  }

  .portal-choice-grid {
    grid-template-columns: 1fr;
    margin-top: 1.5rem;
  }

  .portal-choice-card {
    min-height: auto;
    padding: 1.15rem 1rem;
  }

  .portal-choice-card--invite,
  .portal-choice-card--guest {
    height: auto;
    min-height: 6.25rem;
    padding: 1rem 1rem;
  }

  .portal-index-intro {
    margin: 0.25rem 0 1.75rem;
  }

  .portal-index-intro__event {
    max-width: none;
    font-size: clamp(1.85rem, 7.5vw, 2.45rem);
  }

  .portal-index-intro__title {
    font-size: clamp(1.55rem, 6vw, 1.95rem);
  }

  .portal-index-intro__note {
    font-size: 0.95rem;
  }

  .portal-page-body--index .portal-section-heading {
    font-size: clamp(1.25rem, 4.8vw, 1.5rem);
  }

  .portal-choice-card--invite .portal-choice-card__title,
  .portal-choice-card--guest .portal-choice-card__title {
    font-size: clamp(1.55rem, 6.2vw, 2rem);
  }

  .portal-choice-card--invite .portal-choice-card__desc,
  .portal-choice-card--guest .portal-choice-card__desc {
    font-size: clamp(1.1rem, 4.2vw, 1.35rem);
  }

  .portal-choice-card--invite .portal-choice-card__icon,
  .portal-choice-card--guest .portal-choice-card__icon {
    width: 3rem;
    height: 3rem;
  }

  .portal-readonly-grid {
    grid-template-columns: 1fr;
  }

  .portal-confirm-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .portal-actions {
    justify-content: stretch;
  }

  .portal-btn {
    flex: 1 1 auto;
  }

  .portal-form-card {
    padding: 1.5rem 1.1rem 1.75rem;
  }

  .portal-form-submit--split {
    flex-direction: column-reverse;
  }

  .portal-form-submit--split .portal-btn,
  .portal-form-submit--split .portal-btn-confirm {
    width: 100%;
  }
}

/* --- 申し込みウェブフォーム（FlexCRM風デザイン） --- */
.portal-form-card {
  width: min(720px, 100%);
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 2rem 2rem 2.25rem;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.portal-form-title {
  margin: 0 0 1.75rem;
  text-align: center;
  font-size: clamp(1.65rem, 3.2vw, 2rem);
  font-weight: 700;
  color: #111;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.portal-form-block {
  padding: 1.15rem 0;
  border-top: 1px dotted #d7dbe0;
}

.portal-form-block:first-of-type {
  border-top: none;
  padding-top: 0;
}

.portal-form-block--day {
  padding-top: 1.35rem;
}

.portal-form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #111;
  line-height: 1.4;
}

.portal-required {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  background: #e53935;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.portal-form-input {
  display: block;
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid #cfd4da;
  border-radius: 6px;
  background: #fff;
  color: #111;
  font-size: 1.15rem;
  line-height: 1.4;
  box-sizing: border-box;
}

.portal-form-input:focus {
  outline: 2px solid rgba(30, 136, 229, 0.35);
  border-color: #64b5f6;
}

.portal-form-input[readonly],
.portal-form-input:disabled {
  background: #f5f7f9;
  color: #607d8b;
  cursor: not-allowed;
}

.portal-form-input[readonly]:focus,
.portal-form-input:disabled:focus {
  outline: none;
  border-color: #cfd4da;
  background: #f5f7f9;
}

.portal-form-input.is-invalid {
  border-color: #e53935;
}

.portal-form-input.is-invalid:focus {
  outline: 2px solid #ef9a9a;
  border-color: #e53935;
}

.portal-form-block .portal-field-error {
  margin-top: 0.45rem;
}

.portal-field-hint {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 400;
  color: #9e9e9e;
  line-height: 1.4;
}

@media (max-width: 720px) {
  .portal-form-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
  }
}

.portal-form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 12px 8px;
  padding-right: 2.25rem;
}

.portal-day-heading {
  margin-bottom: 0.85rem;
}

.portal-day-label {
  font-size: 1.2rem;
  font-weight: 700;
  color: #111;
  line-height: 1.4;
}

.portal-day-date {
  margin-top: 0.15rem;
  font-size: 1.15rem;
  color: #111;
  line-height: 1.4;
}

.portal-schedule-label {
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #111;
}

.portal-checkbox-list,
.portal-radio-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.portal-checkbox,
.portal-radio {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.15rem;
  color: #222;
  cursor: pointer;
  line-height: 1.4;
}

.portal-checkbox input,
.portal-radio input {
  width: 1.2rem;
  height: 1.2rem;
  margin: 0;
  accent-color: var(--portal-navy);
  flex-shrink: 0;
}

.portal-checkbox input.is-invalid {
  outline: 2px solid #e53935;
  outline-offset: 1px;
}

.portal-form-submit {
  margin-top: 1.75rem;
  text-align: center;
}

.portal-form-submit--split {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.portal-btn-confirm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 8.5rem;
  padding: 0.95rem 1.75rem;
  border: none;
  border-radius: 6px;
  background: var(--portal-navy);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.3;
  transition: background-color 0.15s ease;
}

.portal-form-submit .portal-btn-confirm {
  min-width: 16rem;
}

.portal-btn-confirm:hover,
.portal-btn-confirm:focus-visible {
  background: var(--portal-navy-hover);
  color: #fff;
  outline: none;
}

.portal-btn-confirm:disabled,
.portal-btn-confirm:disabled:hover,
.portal-btn-confirm:disabled:focus-visible {
  background: #9aa3ad;
  cursor: default;
}

.portal-btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 8.5rem;
  padding: 0.95rem 1.75rem;
  border: none;
  border-radius: 6px;
  background: #cfd4da;
  color: #333;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.3;
}

.portal-btn-back:hover,
.portal-btn-back:focus-visible {
  background: #b8bec6;
  color: #222;
  outline: none;
}

.portal-confirm-stack {
  margin: 0;
}

.portal-confirm-item {
  padding: 1.1rem 0;
  border-top: 1px dotted #d7dbe0;
}

.portal-confirm-item:first-child {
  border-top: none;
  padding-top: 0;
}

.portal-confirm-label {
  margin-bottom: 0.55rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #111;
  line-height: 1.4;
}

.portal-confirm-value {
  font-size: 1.15rem;
  font-weight: 400;
  color: #222;
  line-height: 1.6;
  word-break: break-word;
}

.portal-confirm-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.portal-confirm-date {
  font-weight: 500;
  color: #90a4ae;
  font-size: 0.8rem;
}

.portal-shell--thanks {
  padding-top: 2.5rem;
}

.portal-thanks-main {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.portal-thanks-box {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 2.5rem 2rem;
  border: 1px solid #d8dee4;
  border-radius: 8px;
  background: #fff;
  text-align: center;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.portal-input.is-invalid {
  border-color: #e53935;
}

.portal-input.is-invalid:focus {
  outline: 2px solid #ef9a9a;
  border-color: #e53935;
}

.portal-field-error {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: #c62828;
  line-height: 1.4;
}

.portal-form-heading {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.portal-form-heading .portal-form-label {
  margin-bottom: 0;
}

.portal-form-input[readonly]:focus,
.portal-form-input:disabled:focus {
  outline: none;
  border-color: #cfd4da;
  background: #f5f7f9;
}

.portal-form-input.is-invalid {
  border-color: #e53935;
}

.portal-form-input.is-invalid:focus {
  outline: 2px solid #ef9a9a;
  border-color: #e53935;
}

.portal-form-block .portal-field-error {
  margin-top: 0.45rem;
}

.portal-field-hint {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 400;
  color: #9e9e9e;
  line-height: 1.4;
}

@media (max-width: 720px) {
  .portal-form-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
  }
}

.portal-confirm-actions form {
  margin: 0;
}

.portal-confirm-schedule {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.portal-confirm-schedule-heading {
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
  font-weight: 400;
  color: #222;
  line-height: 1.6;
}

.portal-confirm-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.portal-confirm-slot {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.65rem;
  border: 1px solid #cfd4da;
  border-radius: 999px;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 400;
  color: #222;
  line-height: 1.4;
}

.portal-confirm-slots-empty {
  font-size: 0.95rem;
  font-weight: 400;
  color: #222;
  line-height: 1.6;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

/* --- 受付証 --- */
.reception-pass-root {
  position: fixed;
  left: 0;
  top: 0;
  z-index: -1;
  opacity: 0.01;
  pointer-events: none;
}

.reception-pass-sheet {
  width: 105mm;
  height: 304mm;
  box-sizing: border-box;
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.reception-pass {
  width: 105mm;
  height: 152mm;
  flex: 0 0 152mm;
  max-height: 152mm;
  box-sizing: border-box;
  padding: 6mm 8mm 5mm;
  background: #fff;
  color: #111;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.reception-pass--flipped {
  transform: rotate(180deg);
  transform-origin: center center;
}

.reception-pass__industry {
  display: none;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  color: #fff;
  font-weight: 700;
  font-size: 22pt;
  letter-spacing: 0.1em;
  line-height: 1.3;
  padding: 0.42em 0.3em 0.36em;
  margin: 0 0 6mm;
  background: #d4564e;
}

.reception-pass__industry.is-visible {
  display: block;
}

.reception-pass__industry[data-industry="1"] { background: #d4564e; } /* 外食・給食・病院 */
.reception-pass__industry[data-industry="2"] { background: #f2c200; } /* 量販店・生協・CVS */
.reception-pass__industry[data-industry="3"] { background: #3d6aa2; } /* 卸売店 */
.reception-pass__industry[data-industry="4"] { background: #9a9a9a; } /* 商社・報道 */

.reception-pass__org {
  width: 100%;
  font-size: 30pt;
  font-weight: 700;
  text-align: center;
  line-height: 1.4;
  margin: 0 0 6mm;
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
}

.reception-pass__dept,
.reception-pass__job {
  width: 100%;
  font-size: 16pt;
  font-weight: 500;
  text-align: center;
  line-height: 1.7;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
}

.reception-pass__dept.is-empty,
.reception-pass__job.is-empty {
  display: none;
}

.reception-pass__name {
  width: 100%;
  font-size: 26pt;
  font-weight: 700;
  text-align: center;
  line-height: 1.4;
  letter-spacing: 0.12em;
  margin: 6mm 0 0;
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
}

.reception-pass__qr {
  width: 16mm;
  height: 16mm;
  margin: auto auto 0;
  flex-shrink: 0;
}

.reception-pass__qr img,
.reception-pass__qr canvas,
.reception-pass__qr table {
  width: 16mm !important;
  height: 16mm !important;
}

.reception-pass__code {
  font-size: 11pt;
  letter-spacing: 0.02em;
  text-align: center;
  margin-top: auto;
  flex-shrink: 0;
}

.reception-pass__symbols {
  margin-left: 0.4em;
}

.reception-pass__event {
  width: 100%;
  font-size: 14pt;
  font-weight: 700;
  text-align: center;
  line-height: 1.4;
  margin-top: 1mm;
  margin-bottom: 0;
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
  flex-shrink: 0;
}

@media print {
  @page {
    size: 105mm 304mm;
    margin: 0;
  }

  body.is-printing-pass {
    margin: 0;
    padding: 0;
    background: #fff;
    width: 105mm;
    height: 304mm;
    overflow: hidden;
  }

  body.is-printing-pass > *:not(#receptionPassRoot) {
    display: none !important;
  }

  body.is-printing-pass #receptionPassRoot {
    position: static !important;
    left: auto !important;
    top: auto !important;
    opacity: 1 !important;
    z-index: auto !important;
    pointer-events: auto !important;
  }
}

