/* ============================================================
 * 温泉宫 · 温泉同浴
 * ============================================================ */

.hs-overlay {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.hs-mask {
  position: absolute;
  inset: 0;
  background: rgba(40, 30, 20, 0.48);
  backdrop-filter: blur(2px);
}

.hs-panel {
  position: relative;
  width: min(860px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-gold);
  border-radius: 4px;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.55), transparent 42%),
    radial-gradient(circle at 82% 88%, rgba(184, 146, 76, 0.08), transparent 46%),
    var(--bg-card);
  box-shadow: var(--shadow), 0 0 0 4px rgba(246, 238, 224, 0.28);
}

.hs-panel::before {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(196, 170, 114, 0.35);
  pointer-events: none;
}

.hs-rule {
  height: 3px;
  flex: 0 0 auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.65;
}

.hs-head {
  flex: 0 0 auto;
  padding: 14px 24px 4px;
  text-align: center;
}

.hs-kicker {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--text-dim);
}

.hs-title {
  margin-top: 4px;
  font-family: var(--font-title);
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink);
}

.hs-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 24px 8px;
}

.hs-hint {
  font-family: var(--font-ui);
  font-size: 0.76rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.hs-tool-actions {
  display: flex;
  gap: 8px;
}

.hs-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  padding: 6px 24px 12px;
  scrollbar-width: thin;
}

.hs-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 8px 10px;
  border: 1px solid rgba(196, 170, 114, 0.5);
  border-radius: 3px;
  background: rgba(255, 252, 246, 0.8);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

:where(html:not(.touch-device)) .hs-card:hover {
  border-color: var(--gold);
  background: rgba(255, 252, 246, 0.96);
}

.hs-card.hs-card-on {
  border-color: var(--gold-dark);
  background: rgba(184, 146, 76, 0.16);
  box-shadow: 0 0 0 2px rgba(184, 146, 76, 0.25) inset;
}

.hs-check {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-gold);
  border-radius: 50%;
  background: rgba(255, 252, 246, 0.9);
  color: transparent;
  font-size: 0.72rem;
  line-height: 1;
}

.hs-card-on .hs-check {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  color: #fff8e8;
}

.hs-portrait {
  position: relative;
  width: 100%;
  height: 118px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(184, 146, 76, 0.1);
}

.hs-portrait-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 2rem;
  color: var(--gold-dark);
}

.hs-card-name {
  font-family: var(--font-title);
  font-size: 0.84rem;
  color: var(--ink);
  text-align: center;
  line-height: 1.35;
  word-break: break-all;
}

.hs-card-sub {
  font-family: var(--font-ui);
  font-size: 0.66rem;
  color: var(--text-dim);
}

.hs-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 8px 24px 16px;
}

.hs-foot .hs-hint {
  margin-right: auto;
}

.hs-btn {
  min-width: 84px;
  padding: 7px 16px;
  border-radius: 2px;
  border: 1px solid var(--line-gold);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, opacity 0.15s;
}

.hs-btn-ghost {
  background: transparent;
  color: var(--text);
}

:where(html:not(.touch-device)) .hs-btn-ghost:hover {
  background: rgba(184, 146, 76, 0.12);
}

.hs-btn-main {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  color: #fff8e8;
}

:where(html:not(.touch-device)) .hs-btn-main:hover {
  background: #7a5d30;
}

.hs-btn-main:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---------- 场景 ---------- */

.hs-scene-panel {
  width: min(780px, 96vw);
}

.hs-scene-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 24px 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.95;
  scrollbar-width: thin;
}

.hs-loading {
  padding: 48px 0;
  text-align: center;
  color: var(--text-dim);
  font-family: var(--font-ui);
  font-size: 0.84rem;
}

.hs-ink {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--gold-dark);
  animation: hs-breathe 1.2s ease-in-out infinite;
  vertical-align: middle;
}

@keyframes hs-breathe {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}

.hs-msg-wait {
  opacity: 0;
  transform: translateY(6px);
}

.hs-msg-in {
  animation: hs-fade-in 0.45s ease both;
}

@keyframes hs-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 560px) {
  .hs-overlay { padding: 10px; }
  .hs-grid {
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
    padding: 4px 14px 10px;
  }
  .hs-portrait { height: 92px; }
  .hs-head, .hs-toolbar, .hs-scene-body, .hs-foot { padding-left: 14px; padding-right: 14px; }
  .hs-btn { min-width: 68px; padding: 7px 12px; }
}
