/* ============================================================
   css/restaurant-upgrade.css
   【猫猫食堂：重新开张！】剧情演出样式
   ------------------------------------------------------------
   背景 = 真实餐厅实景（RSView），本层只做「浮在实景之上的剧情 UI」：
   透明覆盖层 + 底部可读性渐变 + 对白/提示/终幕/展示条/跳过。
   不再自绘假餐厅（用户要求：用现在餐厅的实景）。
   ============================================================ */
#rui {
  position: fixed; inset: 0; z-index: 99999;
  background: transparent;
  overflow: hidden; user-select: none; -webkit-tap-highlight-color: transparent;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  animation: rui-fade .5s ease both;
}
@keyframes rui-fade { from { opacity: 0 } to { opacity: 1 } }
#rui.shake { animation: rui-shake .48s ease; }
@keyframes rui-shake {
  0%,100% { transform: translateX(0) }
  20% { transform: translateX(-7px) } 40% { transform: translateX(6px) }
  60% { transform: translateX(-5px) } 80% { transform: translateX(4px) }
}

/* 底部/顶部可读性渐变（不挡真实场景，只压暗文字区） */
.rui-vignette {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to top, rgba(24,14,6,.62) 0%, rgba(24,14,6,.18) 26%, rgba(24,14,6,0) 42%),
    linear-gradient(to bottom, rgba(24,14,6,.30) 0%, rgba(24,14,6,0) 20%);
}

/* ---------- 展示条（食材/菜谱/家具，写实景信息面板） ---------- */
.rui-strip { position: absolute; left: 50%; top: 12%; transform: translate(-50%, -8px);
  display: flex; gap: 6px; max-width: 92%; overflow-x: auto; padding: 6px 8px;
  background: rgba(255,250,240,.94); border: 2px solid #d9b483; border-radius: 12px;
  box-shadow: 0 6px 16px rgba(90,60,30,.25); opacity: 0; pointer-events: none;
  transition: opacity .4s ease, transform .4s ease; z-index: 6; }
#rui.show-ing .rui-strip-ing, #rui.show-rec .rui-strip-rec, #rui.show-furn .rui-strip-furn { opacity: 1; transform: translate(-50%, 0); }
.rui-chip { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  background: #fff; border: 1px solid #e6cfa6; border-radius: 999px; padding: 3px 9px; font-size: 12px; color: #6b4a2f; }
.rui-chip i { font-style: normal; font-size: 14px; }

/* ---------- 对白 ---------- */
.rui-dialog { position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%) translateY(8px);
  width: min(92%, 720px); display: flex; gap: 12px; align-items: flex-end;
  background: rgba(255,252,246,.97); border: 3px solid #d9b483; border-radius: 16px;
  padding: 12px 16px; box-shadow: 0 12px 30px rgba(80,50,20,.35);
  opacity: 0; pointer-events: none; transition: opacity .35s ease, transform .35s ease; z-index: 8; }
.rui-dialog.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.rui-dialog.narr { background: rgba(40,30,20,.62); border-color: transparent; color: #fff; justify-content: center; }
.rui-dialog.narr .rui-name { display: none; }
.rui-dialog.narr .rui-text { color: #ffe9c8; font-style: italic; text-align: center; font-size: 16px; }
.rui-ava { width: 56px; height: 56px; flex: 0 0 56px; }
.rui-ava svg { width: 100%; height: 100%; }
.rui-bubble { flex: 1; min-width: 0; }
.rui-name { font-weight: 800; color: #b5642a; font-size: 14px; margin-bottom: 3px; }
.rui-text { font-size: 16px; line-height: 1.5; color: #4a3a2a; word-break: break-word; }

/* ---------- 提示小卡 ---------- */
.rui-tip { position: absolute; left: 50%; top: 22%; transform: translate(-50%, -8px);
  display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
  background: rgba(63,174,90,.95); color: #fff; border-radius: 12px; padding: 8px 18px;
  box-shadow: 0 8px 20px rgba(30,120,50,.4); opacity: 0; pointer-events: none;
  transition: opacity .35s ease, transform .35s ease; z-index: 7; max-width: 80%; }
.rui-tip.show { opacity: 1; transform: translate(-50%, 0); }
.rui-tip b { font-size: 15px; } .rui-tip span { font-size: 13px; opacity: .95; }

/* ---------- 终幕标题 ---------- */
.rui-title { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(30,20,12,.55); opacity: 0; pointer-events: none; transition: opacity .5s ease; z-index: 10; }
.rui-title.show { opacity: 1; pointer-events: auto; }
.rui-title-card { background: linear-gradient(180deg, #fff7ea, #ffe9c6); border: 4px solid #d9a85a;
  border-radius: 20px; padding: 26px 34px; text-align: center; box-shadow: 0 20px 50px rgba(60,40,15,.5);
  animation: rui-pop .5s cubic-bezier(.2,1.3,.4,1) both; max-width: 90%; }
@keyframes rui-pop { from { transform: scale(.7); opacity: 0 } to { transform: scale(1); opacity: 1 } }
.rui-title-main { font-size: 26px; font-weight: 900; color: #b5642a; }
.rui-title-sub { font-size: 18px; font-weight: 800; color: #3fae5a; margin: 6px 0; }
.rui-title-desc { font-size: 15px; color: #6b4a2f; margin-bottom: 16px; }
.rui-start { font-size: 17px; font-weight: 800; color: #fff; background: linear-gradient(180deg, #ff9a4c, #f07a2c);
  border: none; border-radius: 12px; padding: 11px 30px; cursor: pointer; box-shadow: 0 5px 0 #c85e1c; }
.rui-start:active { transform: translateY(3px); box-shadow: 0 2px 0 #c85e1c; }

/* ---------- 跳过 ---------- */
.rui-skip { position: absolute; right: 14px; top: 12px; z-index: 11;
  font-size: 12px; color: #6b4a2f; background: rgba(255,255,255,.6); border: 1px solid rgba(150,110,60,.4);
  border-radius: 999px; padding: 5px 12px; cursor: pointer; opacity: .55; transition: opacity .2s; }
.rui-skip:hover { opacity: 1; }

/* ---------- 移动端适配 ---------- */
@media (max-width: 640px) {
  .rui-ava { width: 44px; height: 44px; flex-basis: 44px; }
  .rui-text { font-size: 14px; } .rui-name { font-size: 13px; }
  .rui-dialog { padding: 9px 12px; bottom: 3%; }
  .rui-strip { top: 9%; padding: 5px 6px; }
  .rui-chip { font-size: 11px; padding: 2px 7px; }
  .rui-title-main { font-size: 21px; } .rui-title-sub { font-size: 15px; }
  .rui-title-card { padding: 20px 22px; }
  .rui-skip { right: 10px; top: 10px; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .rui-dialog { bottom: 8px; padding: 7px 12px; max-height: 36%; overflow-y: auto; }
  .rui-text { font-size: 13px; }
  .rui-strip { top: 6%; }
}
