/* ===== Check-in App ===== */
.check-in-page {
  position: fixed;
  inset: 0;
  z-index: 838;
  display: none;
  flex-direction: column;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
}

.check-in-page.active {
  display: flex;
}

.check-in-nav {
  background: var(--glass);
  border-bottom: 1px solid var(--glass-border);
  color: var(--text);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.check-in-nav .chat-nav-back,
.check-in-nav .chat-nav-btn {
  color: var(--text) !important;
  background: var(--glass-strong) !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow: 0 8px 18px var(--glass-shadow);
}

.check-in-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 14px calc(18px + env(safe-area-inset-bottom));
}

.check-in-list-panel,
.check-in-detail-panel {
  width: min(760px, 100%);
  margin: 0 auto;
}


.check-in-role-list {
  display: grid;
  gap: 10px;
}

.check-in-role-card {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--glass);
  color: var(--text);
  box-shadow: 0 14px 30px var(--glass-shadow);
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.check-in-role-card:active {
  transform: scale(0.992);
  border-color: var(--text);
}

.check-in-role-avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  overflow: hidden;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  color: var(--text3);
}

.check-in-role-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.check-in-role-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.check-in-role-name {
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.check-in-role-meta {
  color: var(--text3);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.check-in-role-arrow {
  width: 18px;
  height: 18px;
  color: var(--text3);
}

.check-in-empty {
  padding: 36px 16px;
  border: 1px dashed var(--glass-border);
  border-radius: 8px;
  background: var(--glass);
  color: var(--text3);
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
}


.check-in-settings-modal.chat-modal-overlay {
  z-index: 930;
  background: rgba(0, 0, 0, 0.58);
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 20px;
}

.check-in-settings-modal.keyboard-safe-modal {
  align-items: center;
}

.check-in-settings-modal.keyboard-safe-modal > .check-in-settings-panel {
  margin-top: 0;
  max-height: min(84vh, calc(var(--app-visual-viewport-height, 100vh) - 40px));
}

.check-in-settings-panel {
  width: min(460px, calc(100vw - 28px));
  max-height: min(84vh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: var(--glass-strong);
  color: var(--text);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
  overflow: hidden;
}

.check-in-settings-head {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--glass-border);
}

.check-in-settings-title {
  color: var(--text);
  font-size: 16px;
  line-height: 1.25;
  font-weight: 800;
}

.check-in-settings-subtitle {
  margin-top: 3px;
  color: var(--text3);
  font-size: 12px;
  line-height: 1.35;
}

.check-in-icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--glass);
  color: var(--text);
  cursor: pointer;
}

.check-in-icon-btn svg {
  width: 18px;
  height: 18px;
}

.check-in-settings-body {
  overflow: auto;
  padding: 12px;
}

.check-in-settings-stack {
  display: grid;
  gap: 10px;
}

.check-in-settings-section {
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--glass);
  overflow: hidden;
}

.check-in-settings-section summary {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  cursor: pointer;
  color: var(--text);
  font-size: 14px;
  line-height: 1.3;
  font-weight: 800;
  list-style: none;
}

.check-in-settings-section summary::-webkit-details-marker {
  display: none;
}

.check-in-summary-title {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.check-in-image-mode-select {
  width: clamp(140px, 42vw, 188px);
  height: 32px;
  min-width: 0;
  flex: 0 0 auto;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text2);
  padding: 0 8px;
  font: inherit;
  font-size: 12px;
  line-height: 32px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.check-in-image-mode-select:focus {
  border-color: var(--text3);
  box-shadow: 0 0 0 3px var(--glass-shadow);
}

.check-in-settings-section summary::after {
  content: "";
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-right: 2px solid var(--text3);
  border-bottom: 2px solid var(--text3);
  transform: rotate(45deg) translateY(-2px);
}

.check-in-settings-section[open] summary::after {
  transform: rotate(225deg) translateY(-2px);
}

.check-in-settings-fields {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.check-in-status {
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: var(--glass-strong);
  color: var(--text3);
  padding: 8px 9px;
  font-size: 12px;
  line-height: 1.45;
}

.check-in-status.is-dedicated {
  color: var(--text);
  border-color: var(--text3);
}

.check-in-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.check-in-field span {
  color: var(--text2);
  font-size: 12px;
  line-height: 1.3;
  font-weight: 700;
}

.check-in-field input,
.check-in-field select,
.check-in-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: none;
}

.check-in-field input,
.check-in-field select {
  height: 38px;
  padding: 0 10px;
}

.check-in-field textarea {
  min-height: 78px;
  resize: vertical;
  padding: 9px 10px;
  line-height: 1.5;
}

.check-in-field input:focus,
.check-in-field select:focus,
.check-in-field textarea:focus {
  border-color: var(--text3);
  box-shadow: 0 0 0 3px var(--glass-shadow);
}

.check-in-model-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.check-in-small-btn,
.check-in-secondary-btn,
.check-in-primary-btn,
.check-in-model-tag {
  appearance: none;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}

.check-in-small-btn {
  height: 38px;
  border: 1px solid var(--glass-border);
  background: var(--glass-strong);
  color: var(--text);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.check-in-small-btn:disabled {
  opacity: 0.56;
  cursor: default;
}

.check-in-model-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.check-in-model-tag {
  max-width: 100%;
  border: 1px solid var(--glass-border);
  background: var(--bg);
  color: var(--text2);
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.check-in-model-tag.active {
  border-color: var(--text3);
  background: var(--glass-strong);
  color: var(--text);
}

.check-in-settings-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.check-in-secondary-btn,
.check-in-primary-btn {
  min-height: 38px;
  border: 1px solid var(--glass-border);
  font-size: 13px;
  font-weight: 800;
}

.check-in-secondary-btn {
  background: var(--glass);
  color: var(--text2);
}

.check-in-primary-btn {
  background: var(--text);
  color: var(--bg);
}

@media (max-width: 560px) {

  .check-in-role-card {
    grid-template-columns: 48px minmax(0, 1fr) auto;
  }

  .check-in-role-avatar {
    width: 48px;
    height: 48px;
  }

  .check-in-model-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ===== Check-in Action Modal & Spy Scene ===== */
.check-in-action-modal.chat-modal-overlay {
  z-index: 925;
  background: rgba(0, 0, 0, 0.52);
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: none;
  contain: layout paint;
}

.check-in-action-modal.chat-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.check-in-action-panel {
  width: min(420px, calc(100vw - 28px));
  max-height: min(82vh, calc(var(--app-visual-viewport-height, 100vh) - 40px));
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--glass-strong);
  color: var(--text);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
  overflow: hidden;
  transform: scale(1) translateY(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.check-in-action-head {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--glass-border);
}

.check-in-action-role {
  min-width: 0;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.check-in-action-role-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.check-in-action-role-name {
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.check-in-action-role-meta {
  color: var(--text3);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.check-in-action-title {
  padding: 12px 12px 0;
  color: var(--text2);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 800;
}

.check-in-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
}

.check-in-action-choice {
  min-width: 0;
  min-height: 88px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  align-content: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--glass);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 14px 30px var(--glass-shadow);
}

.check-in-action-choice:active {
  transform: scale(0.985);
  border-color: var(--text);
}

.check-in-action-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: var(--bg);
  color: var(--text);
}

.check-in-action-icon svg {
  width: 20px;
  height: 20px;
}

.check-in-action-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.check-in-action-main strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 900;
}

.check-in-action-main small {
  color: var(--text3);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
}

.check-in-detail-panel {
  width: min(980px, 100%);
}

.check-in-spy-stage {
  position: relative;
  min-height: min(720px, calc(var(--app-visual-viewport-height, 100vh) - 104px));
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: #101317;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.36);
  isolation: isolate;
}

.check-in-spy-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.42s ease, transform 0.42s ease;
}

.check-in-spy-stage.has-image .check-in-spy-bg {
  opacity: 1;
  transform: scale(1);
}

.check-in-spy-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,0.34), rgba(0,0,0,0.10) 42%, rgba(0,0,0,0.74));
  pointer-events: none;
}

.check-in-spy-loading,
.check-in-spy-scene,
.check-in-spy-error {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.check-in-spy-loading[hidden],
.check-in-spy-scene[hidden],
.check-in-spy-error[hidden],
.check-in-dialogue-avatar[hidden],
.check-in-choice-panel[hidden],
.check-in-narration[hidden] {
  display: none !important;
}

.check-in-spy-loading {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding: 24px;
  background: radial-gradient(circle at center, rgba(255,255,255,0.08), rgba(0,0,0,0.22) 42%, rgba(0,0,0,0.78));
}

.check-in-monitor-shell {
  position: relative;
  width: min(280px, 70vw);
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  overflow: hidden;
  box-shadow: inset 0 0 42px rgba(255,255,255,0.12), 0 0 36px rgba(255,255,255,0.12);
}

.check-in-monitor-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.12) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.5;
}

.check-in-monitor-shell::before,
.check-in-monitor-shell::after {
  content: "";
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 50%;
}

.check-in-monitor-shell::after {
  inset: 34%;
}

.check-in-monitor-scan {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 50%;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.9), rgba(255,255,255,0));
  transform-origin: left center;
  animation: checkInRadarSweep 1.8s linear infinite;
}

.check-in-monitor-node {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px rgba(255,255,255,0.9);
  animation: checkInNodePulse 1.6s ease-in-out infinite;
}

.check-in-monitor-node.node-a { left: 31%; top: 28%; }
.check-in-monitor-node.node-b { right: 26%; top: 48%; animation-delay: 0.35s; }
.check-in-monitor-node.node-c { left: 48%; bottom: 25%; animation-delay: 0.7s; }

.check-in-spy-stage.is-raid-loading .check-in-spy-loading {
  background:
    radial-gradient(circle at 50% 58%, rgba(255,255,255,0.08), transparent 34%),
    linear-gradient(180deg, rgba(5,8,13,0.96), rgba(0,0,0,0.82));
}

.check-in-spy-stage.is-raid-loading .check-in-monitor-shell {
  width: min(320px, 76vw);
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  border-color: rgba(255,255,255,0.28);
  background: linear-gradient(180deg, #101722 0 46%, #272d33 47% 100%);
  box-shadow: inset 0 0 36px rgba(255,255,255,0.08), 0 18px 44px rgba(0,0,0,0.42);
}

.check-in-spy-stage.is-raid-loading .check-in-monitor-grid {
  inset: 0;
  opacity: 1;
  background:
    repeating-linear-gradient(105deg, rgba(255,255,255,0.12) 0 2px, transparent 2px 34px),
    linear-gradient(180deg, rgba(80,108,132,0.2), transparent 45%);
  background-size: 88px 100%, 100% 100%;
  animation: checkInRoadMove 0.85s linear infinite;
}

.check-in-spy-stage.is-raid-loading .check-in-monitor-shell::before {
  inset: auto 0 42%;
  height: 4px;
  border: 0;
  border-radius: 0;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.86) 0 26px, transparent 26px 54px);
  animation: checkInLaneMove 0.65s linear infinite;
}

.check-in-spy-stage.is-raid-loading .check-in-monitor-shell::after {
  inset: auto 34px 28px auto;
  width: 72px;
  height: 30px;
  border: 0;
  border-radius: 9px 12px 7px 7px;
  background: linear-gradient(180deg, #f6f7f9, #aab3bf 48%, #333a44 49% 100%);
  box-shadow: -18px 5px 22px rgba(255,255,255,0.18), 0 8px 18px rgba(0,0,0,0.36);
  animation: checkInCarBounce 0.72s ease-in-out infinite;
}

.check-in-spy-stage.is-raid-loading .check-in-monitor-scan {
  left: auto;
  top: auto;
  right: 90px;
  bottom: 20px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #05070a;
  box-shadow: 48px 0 0 #05070a;
  transform: none;
  animation: checkInWheelBounce 0.36s ease-in-out infinite;
}

.check-in-spy-stage.is-raid-loading .check-in-monitor-node {
  display: none;
}

.check-in-loading-copy {
  display: grid;
  gap: 8px;
  text-align: center;
}

.check-in-loading-title {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: 0;
}

.check-in-loading-status {
  color: rgba(255,255,255,0.76);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
}

.check-in-spy-scene {
  display: block;
  padding: 18px;
  cursor: pointer;
}

.check-in-scene-top {
  position: absolute;
  left: 16px;
  top: 16px;
  right: 16px;
  z-index: 3;
  display: grid;
  gap: 5px;
  pointer-events: none;
  text-shadow: 0 2px 10px rgba(0,0,0,0.55);
}

.check-in-scene-title {
  font-size: clamp(18px, 4vw, 28px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: 0;
}

.check-in-scene-meta {
  color: rgba(255,255,255,0.78);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 800;
}


.check-in-narration {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 148px;
  z-index: 3;
  max-width: 620px;
  color: rgba(255,255,255,0.88);
  font-size: 14px;
  line-height: 1.7;
  text-shadow: 0 2px 10px rgba(0,0,0,0.58);
}

.check-in-dialogue-dock {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 4;
}

.check-in-choice-panel {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 160px;
  z-index: 5;
  width: min(640px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  gap: 8px;
}

.check-in-choice-btn {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.18) 0%, rgba(5,8,12,0.88) 18%, rgba(5,8,12,0.94) 50%, rgba(5,8,12,0.88) 82%, rgba(0,0,0,0.18) 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(0,0,0,0.34);
  font: inherit;
  text-align: left;
  padding: 9px 12px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.check-in-choice-btn:active {
  transform: scale(0.985);
  border-color: rgba(255,255,255,0.58);
}

.check-in-choice-index {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.34);
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
}

.check-in-choice-text {
  min-width: 0;
  color: rgba(255,255,255,0.94);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 800;
  word-break: break-word;
}

.check-in-dialogue-avatar {
  width: max-content;
  height: max-content;
  max-width: min(34vw, 118px);
  max-height: 92px;
  display: inline-grid;
  place-items: center;
  align-self: center;
  justify-self: start;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.34);
  background: rgba(0,0,0,0.48);
  color: rgba(255,255,255,0.82);
  box-shadow: 0 12px 30px rgba(0,0,0,0.34);
}

.check-in-dialogue-avatar img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(34vw, 118px);
  max-height: 92px;
  object-fit: contain;
}

.check-in-dialogue-avatar-random {
  position: relative;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(var(--npc-angle, 45deg), var(--npc-a, #6d8cff), var(--npc-b, #f0b35a));
}

.check-in-dialogue-avatar-random::before {
  content: "";
  position: absolute;
  inset: 18% 18% 38%;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
}

.check-in-dialogue-avatar-dot {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.28);
}

.check-in-dialogue-avatar-dot.dot-a {
  width: 22px;
  height: 22px;
  right: -5px;
  top: 8px;
}

.check-in-dialogue-avatar-dot.dot-b {
  width: 16px;
  height: 16px;
  left: 7px;
  bottom: 6px;
}

.check-in-dialogue-avatar-initial {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.94);
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
  text-shadow: 0 2px 8px rgba(0,0,0,0.28);
}

.check-in-dialogue-panel {
  min-width: 0;
  height: 132px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.26);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.18) 0%, rgba(3,5,8,0.90) 18%, rgba(3,5,8,0.94) 50%, rgba(3,5,8,0.90) 82%, rgba(0,0,0,0.18) 100%);
  color: #fff;
  box-shadow: 0 18px 42px rgba(0,0,0,0.38);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.check-in-dialogue-dock.is-narration .check-in-dialogue-panel {
  grid-template-columns: minmax(0, 1fr);
  height: 132px;
}

.check-in-dialogue-content {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.check-in-dialogue-speaker {
  flex: 0 0 auto;
  margin-bottom: 6px;
  color: rgba(255,255,255,0.78);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 900;
}

.check-in-dialogue-speaker[hidden] {
  display: none !important;
}

.check-in-dialogue-text {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.65;
  font-weight: 700;
  word-break: break-word;
}

.check-in-spy-error {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 24px;
  background: rgba(0,0,0,0.62);
  text-align: center;
}

.check-in-error-title {
  color: #fff;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 900;
}

.check-in-error-text {
  max-width: 560px;
  color: rgba(255,255,255,0.78);
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;
}

@keyframes checkInRadarSweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes checkInNodePulse {
  0%, 100% { opacity: 0.45; transform: scale(0.82); }
  50% { opacity: 1; transform: scale(1.18); }
}

@keyframes checkInRoadMove {
  from { background-position: 0 0, 0 0; }
  to { background-position: -88px 0, 0 0; }
}

@keyframes checkInLaneMove {
  from { background-position: 0 0; }
  to { background-position: -54px 0; }
}

@keyframes checkInCarBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes checkInWheelBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1px); }
}

@media (max-width: 560px) {
  .check-in-action-grid {
    grid-template-columns: 1fr;
  }

  .check-in-spy-stage {
    min-height: calc(var(--app-visual-viewport-height, 100vh) - 96px);
  }

  .check-in-spy-scene {
    padding: 14px;
  }

  .check-in-scene-top,
  .check-in-narration,
  .check-in-dialogue-dock {
    left: 12px;
    right: 12px;
  }

  .check-in-choice-panel {
    left: 12px;
    right: 12px;
    bottom: 150px;
    width: calc(100% - 24px);
  }

  .check-in-choice-btn {
    min-height: 40px;
    padding: 8px 10px;
  }

  .check-in-choice-text {
    font-size: 13px;
    line-height: 1.38;
  }

  .check-in-narration {
    bottom: 162px;
    font-size: 13px;
    line-height: 1.58;
  }

  .check-in-dialogue-dock {
    bottom: 12px;
  }

  .check-in-dialogue-avatar,
  .check-in-dialogue-avatar img {
    max-width: min(32vw, 96px);
    max-height: 86px;
  }

  .check-in-dialogue-avatar-random {
    width: 64px;
    height: 64px;
  }

  .check-in-dialogue-panel,
  .check-in-dialogue-dock.is-narration .check-in-dialogue-panel {
    height: 126px;
  }

  .check-in-dialogue-text {
    max-height: none;
    font-size: 14px;
    line-height: 1.55;
  }
}

/* ===== Check-in Story Light Refresh ===== */
.check-in-body:has(#checkInSpyScene:not([hidden])) {
  padding: 0;
  overflow: hidden;
  background: #ffffff;
}

.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) {
  width: 100%;
  height: 100%;
  margin: 0;
}

.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-spy-stage {
  min-height: 0;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  color: #182638;
  box-shadow: none;
}

.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-spy-scrim {
  background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,255,255,0.12) 42%, rgba(255,255,255,0.86));
}

.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-spy-scene {
  padding: 0;
}

.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-scene-top {
  color: #182638;
  text-shadow: 0 2px 10px rgba(255,255,255,0.88);
}

.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-scene-meta {
  color: #4d6075;
}

.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-narration {
  color: #182638;
  text-shadow: 0 2px 10px rgba(255,255,255,0.88);
}

.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-dialogue-panel,
.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-choice-btn {
  border: 0;
  background: linear-gradient(90deg, rgba(247,252,255,0.80) 0%, rgba(224,241,255,0.94) 28%, rgba(209,233,252,0.98) 50%, rgba(224,241,255,0.94) 72%, rgba(247,252,255,0.80) 100%);
  color: #182638;
  box-shadow: 0 18px 42px rgba(74,112,146,0.20);
}

.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-choice-btn:active {
  box-shadow: 0 8px 22px rgba(74,112,146,0.22);
}

.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-dialogue-speaker {
  color: #477fae;
}

.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-dialogue-text,
.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-choice-text {
  color: #182638;
}

.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-choice-index {
  border-color: rgba(102,166,215,0.28);
  background: rgba(255,255,255,0.64);
  color: #3f78a8;
}

.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-dialogue-avatar {
  border: 0;
  background: rgba(225,242,255,0.86);
  color: #4d6075;
  box-shadow: 0 12px 30px rgba(74,112,146,0.18);
}

/* ===== Check-in Story Refinement ===== */
.check-in-spy-stage.is-loading {
  background: #ffffff;
  color: #182638;
}

.check-in-spy-loading,
.check-in-spy-stage.is-raid-loading .check-in-spy-loading {
  background: radial-gradient(circle at center, rgba(221,241,255,0.78), rgba(248,252,255,0.94) 44%, rgba(255,255,255,0.98));
}

.check-in-spy-loading .check-in-loading-title {
  color: #182638;
}

.check-in-spy-loading .check-in-loading-status {
  color: #4d6075;
}

.check-in-spy-loading .check-in-monitor-shell {
  border-color: rgba(145,195,230,0.48);
  box-shadow: inset 0 0 42px rgba(201,231,252,0.54), 0 0 36px rgba(125,180,220,0.20);
}

.check-in-spy-loading .check-in-monitor-grid {
  background-image: linear-gradient(rgba(128,185,226,0.18) 1px, transparent 1px), linear-gradient(90deg, rgba(128,185,226,0.18) 1px, transparent 1px);
}

.check-in-spy-loading .check-in-monitor-shell::before,
.check-in-spy-loading .check-in-monitor-shell::after {
  border-color: rgba(128,185,226,0.24);
}

.check-in-spy-loading .check-in-monitor-scan {
  background: linear-gradient(90deg, rgba(93,158,210,0.88), rgba(93,158,210,0));
}

.check-in-spy-loading .check-in-monitor-node {
  background: #5d9ed2;
  box-shadow: 0 0 12px rgba(93,158,210,0.62);
}

.check-in-spy-stage.is-raid-loading .check-in-monitor-shell {
  border-color: rgba(145,195,230,0.42);
  background: linear-gradient(180deg, #f9fdff 0 46%, #dff1ff 47% 100%);
  box-shadow: inset 0 0 36px rgba(201,231,252,0.44), 0 18px 44px rgba(74,112,146,0.18);
}

.check-in-spy-stage.is-raid-loading .check-in-monitor-grid {
  background: repeating-linear-gradient(105deg, rgba(117,178,222,0.22) 0 2px, transparent 2px 34px), linear-gradient(180deg, rgba(206,233,252,0.42), transparent 45%);
}

.check-in-spy-stage.is-raid-loading .check-in-monitor-shell::before {
  background: repeating-linear-gradient(90deg, rgba(82,145,196,0.62) 0 26px, transparent 26px 54px);
}

.check-in-spy-stage.is-raid-loading .check-in-monitor-shell::after {
  background: linear-gradient(180deg, #ffffff, #bfe2fb 48%, #6aa8d7 49% 100%);
  box-shadow: -18px 5px 22px rgba(140,196,235,0.18), 0 8px 18px rgba(74,112,146,0.24);
}

.check-in-spy-stage.is-raid-loading .check-in-monitor-scan {
  background: #477fae;
  box-shadow: 48px 0 0 #477fae;
}

.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-dialogue-panel,
.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-dialogue-dock.is-narration .check-in-dialogue-panel {
  height: 168px;
  padding: 16px 18px;
}

.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-dialogue-text {
  font-size: 16px;
  line-height: 1.72;
}

.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-dialogue-speaker {
  font-size: 13px;
  margin-bottom: 8px;
}

.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-choice-panel {
  top: 42%;
  bottom: auto;
  width: min(720px, calc(100% - 40px));
  transform: translateY(-50%);
}

@media (max-width: 560px) {
  .check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-dialogue-panel,
  .check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-dialogue-dock.is-narration .check-in-dialogue-panel {
    height: 152px;
    padding: 13px 14px;
  }

  .check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-dialogue-text {
    font-size: 15px;
    line-height: 1.62;
  }

  .check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-choice-panel {
    top: 40%;
    bottom: auto;
    width: calc(100% - 24px);
  }
}

/* ===== Check-in Story Polish 2 ===== */
.check-in-spy-stage.is-loading {
  background: #ffffff;
  color: #111111;
  box-shadow: none;
}

.check-in-spy-loading,
.check-in-spy-stage.is-raid-loading .check-in-spy-loading {
  background: transparent;
}

.check-in-spy-loading .check-in-loading-title {
  color: #111111;
}

.check-in-spy-loading .check-in-loading-status {
  color: #4a4a4a;
}

.check-in-spy-loading .check-in-monitor-shell {
  border-color: rgba(0,0,0,0.34);
  background: rgba(255,255,255,0.72);
  box-shadow: inset 0 0 36px rgba(0,0,0,0.08), 0 14px 34px rgba(0,0,0,0.10);
}

.check-in-spy-loading .check-in-monitor-grid {
  background-image: linear-gradient(rgba(0,0,0,0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,0.12) 1px, transparent 1px);
}

.check-in-spy-loading .check-in-monitor-shell::before,
.check-in-spy-loading .check-in-monitor-shell::after {
  border-color: rgba(0,0,0,0.18);
}

.check-in-spy-loading .check-in-monitor-scan {
  background: linear-gradient(90deg, rgba(0,0,0,0.82), rgba(0,0,0,0));
}

.check-in-spy-loading .check-in-monitor-node {
  background: #111111;
  box-shadow: 0 0 10px rgba(0,0,0,0.42);
}

.check-in-spy-stage.is-raid-loading .check-in-monitor-shell {
  border-color: rgba(0,0,0,0.28);
  background: linear-gradient(180deg, #ffffff 0 46%, #eeeeee 47% 100%);
  box-shadow: inset 0 0 30px rgba(0,0,0,0.06), 0 14px 34px rgba(0,0,0,0.12);
}

.check-in-spy-stage.is-raid-loading .check-in-monitor-grid {
  background: repeating-linear-gradient(105deg, rgba(0,0,0,0.12) 0 2px, transparent 2px 34px), linear-gradient(180deg, rgba(0,0,0,0.08), transparent 45%);
}

.check-in-spy-stage.is-raid-loading .check-in-monitor-shell::before {
  background: repeating-linear-gradient(90deg, rgba(0,0,0,0.42) 0 26px, transparent 26px 54px);
}

.check-in-spy-stage.is-raid-loading .check-in-monitor-shell::after {
  background: linear-gradient(180deg, #ffffff, #d7d7d7 48%, #222222 49% 100%);
  box-shadow: -18px 5px 22px rgba(0,0,0,0.08), 0 8px 18px rgba(0,0,0,0.18);
}

.check-in-spy-stage.is-raid-loading .check-in-monitor-scan {
  background: #111111;
  box-shadow: 48px 0 0 #111111;
}

.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-spy-scrim {
  background: transparent;
}

.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-dialogue-dock {
  left: 0;
  right: 0;
  bottom: 0;
}

.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-dialogue-panel,
.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-dialogue-dock.is-narration .check-in-dialogue-panel {
  border: 0;
  border-radius: 0;
  height: 178px;
  padding: 18px 24px calc(18px + env(safe-area-inset-bottom));
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.62) 18%, rgba(255,255,255,0.94) 50%, rgba(255,255,255,0.62) 82%, rgba(255,255,255,0) 100%);
  color: #111111;
  box-shadow: 0 -14px 36px rgba(0,0,0,0.08);
}

.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-choice-panel {
  top: 38%;
}

.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-choice-btn {
  grid-template-columns: minmax(0, 1fr);
  border: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.64) 18%, rgba(255,255,255,0.94) 50%, rgba(255,255,255,0.64) 82%, rgba(255,255,255,0) 100%);
  color: #111111;
  box-shadow: 0 12px 24px rgba(0,0,0,0.10);
}

.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-choice-index {
  display: none;
}

.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-choice-btn:active {
  box-shadow: 0 8px 22px rgba(0,0,0,0.12);
}

.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-dialogue-speaker {
  color: #333333;
}

.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-dialogue-text,
.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-choice-text {
  color: #111111;
}

.check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-dialogue-avatar {
  background: rgba(255,255,255,0.82);
  color: #333333;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

@media (max-width: 560px) {
  .check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-dialogue-panel,
  .check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-dialogue-dock.is-narration .check-in-dialogue-panel {
    height: 162px;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  }

  .check-in-detail-panel:has(#checkInSpyScene:not([hidden])) .check-in-choice-panel {
    top: 36%;
  }
}

/* ===== Check-in Loading White Surface ===== */
.check-in-spy-stage.is-loading,
.check-in-spy-stage.is-raid-loading {
  background: #ffffff;
}

.check-in-spy-loading,
.check-in-spy-stage.is-raid-loading .check-in-spy-loading {
  background: #ffffff;
}

.check-in-spy-loading .check-in-monitor-shell,
.check-in-spy-stage.is-raid-loading .check-in-monitor-shell {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.check-in-spy-stage.is-raid-loading .check-in-monitor-grid {
  background: transparent;
}