/* ==========================================================================
   小峰园区 V3 趣味扩展样式：必杀漫画 Cut-in / 7日签到 / 气泡聊天 / 装扮衣柜 / 点歌机
   ========================================================================== */

/* 1. 必杀漫画风 Cut-in 特写横幅 */
#park-ult-cutin {
  position: fixed;
  left: 0;
  right: 0;
  top: 26%;
  z-index: 48;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-18%) skewX(-8deg);
  transition: opacity 0.14s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
#park-ult-cutin.is-show {
  opacity: 1;
  transform: translateX(0) skewX(-8deg);
}
.cutin-band {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 520px;
  margin-left: -18px;
  padding: 10px 36px 10px 42px;
  background: linear-gradient(95deg, #2b1810 0%, rgba(72, 34, 18, 0.94) 55%, rgba(255, 184, 77, 0.08) 100%);
  border-top: 3px solid var(--cutin-accent, #ffd45c);
  border-bottom: 3px solid var(--cutin-accent, #ffd45c);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.cutin-lines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -12deg,
    rgba(255, 232, 160, 0.12) 0,
    rgba(255, 232, 160, 0.12) 3px,
    transparent 3px,
    transparent 13px
  );
}
.cutin-portrait {
  position: relative;
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 14px;
  border: 2.5px solid #ffe48a;
  background: #3d2214;
  transform: skewX(8deg) scale(1.06);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  flex: none;
}
.cutin-copy {
  position: relative;
  transform: skewX(8deg);
}
.cutin-copy small {
  display: block;
  font-size: 11px;
  font-weight: 900;
  color: #ffe28c;
  letter-spacing: 1px;
}
.cutin-copy strong {
  display: block;
  margin-top: 2px;
  font-size: 26px;
  font-weight: 900;
  color: #fffaf0;
  letter-spacing: 1px;
  text-shadow: 0 3px 0 #5a2408, 0 0 18px rgba(255, 198, 72, 0.65);
}
@media (max-width: 680px) {
  #park-ult-cutin { top: 20%; }
  .cutin-band { max-width: 320px; padding: 7px 24px 7px 28px; gap: 10px; }
  .cutin-portrait { width: 52px; height: 52px; }
  .cutin-copy strong { font-size: 18px; }
}

/* 2. 休闲区底部快捷操作 */
#park-bottom-dock, #park-dock-actions { display: contents; }
.lounge-key-hint, #lounge-chat-trigger, #lounge-chat-popover { display: none; }

body[data-zone="lounge"] #park-bottom-dock {
  position: absolute;
  left: 50%;
  bottom: max(14px, calc(env(safe-area-inset-bottom) + 9px));
  transform: translateX(-50%);
  z-index: 9;
  display: grid;
  justify-items: center;
  gap: 7px;
  max-width: calc(100% - 20px);
  pointer-events: none;
}
body[data-zone="lounge"] #park-bottom-dock .bottom-tools {
  position: static;
  display: block;
  transform: none;
}
body[data-zone="lounge"] #park-bottom-dock .keyboard-hint { display: none; }
body[data-zone="lounge"] #park-bottom-dock .lounge-key-hint {
  display: block;
  padding: 4px 10px;
  border-radius: 12px;
  background: #fff4deeb;
  color: #614932;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 700;
  white-space: nowrap;
}
body[data-zone="lounge"] #park-dock-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 2px solid #5a3c28;
  border-radius: 13px;
  background: #fff7e7;
  box-shadow: 0 3px 0 #5a3c28;
  pointer-events: auto;
}
body[data-zone="lounge"] #arena #park-dock-actions #emote-menu {
  position: static;
  inset: auto;
  transform: none;
  width: auto;
  padding: 0;
  gap: 3px;
  flex-direction: row;
  background: none;
  border: 0;
  box-shadow: none;
}
body[data-zone="lounge"] #arena #park-dock-actions #emote-menu[hidden] { display: none; }
body[data-zone="lounge"] #arena #park-dock-actions #emote-menu button {
  height: 44px;
  background: #fbefdb;
  box-shadow: none;
}
body[data-zone="lounge"] #lounge-chat-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid #b88a61;
  border-radius: 8px;
  background: #ffe8bd;
  color: #543923;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
#lounge-chat-trigger[aria-expanded="true"] { background: #f6cd93; }
#lounge-chat-trigger svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body[data-zone="lounge"] #lounge-chat-popover:not([hidden]) {
  display: block;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  transform: translateX(-50%);
  width: min(330px, calc(100vw - 24px));
  max-height: min(245px, 56dvh);
  overflow-y: auto;
  padding: 12px;
  border-radius: 14px;
  border: 2px solid #5a3c28;
  background: #fff9ee;
  box-shadow: 0 8px 24px #2a180c50;
  pointer-events: auto;
  touch-action: pan-y;
}
body.photo-mode[data-zone="lounge"] #park-bottom-dock { display: none; }

@media (max-width: 950px), (pointer: coarse) {
  body[data-zone="lounge"] #park-bottom-dock .bottom-tools { display: none; }
  body[data-zone="lounge"] #lounge-chat-trigger { padding: 0 7px; }
}
@media (max-width: 540px) {
  body[data-zone="lounge"] #arena #park-dock-actions #emote-menu button {
    width: 44px; min-width: 44px; padding: 2px;
  }
  body[data-zone="lounge"] #lounge-chat-trigger span { display: none; }
  body[data-zone="lounge"] #arena #joystick,
  body[data-zone="lounge"] #arena #lounge-actions {
    bottom: calc(env(safe-area-inset-bottom) + 78px);
  }
}

/* 左上角玩家名片与组队对战 / 猫友入口间距优化（防止贴边或重叠） */
body.arcade-ui:not(.world-boss-active):not(.mobile-landscape) #party-open,
body.arcade-ui:not(.world-boss-active):not(.mobile-landscape) #cat-friends-open {
  top: max(206px, calc(env(safe-area-inset-top) + 198px));
}
body.arcade-ui:not(.world-boss-active):not(.mobile-landscape) #party-open {
  left: max(16px, env(safe-area-inset-left));
}
body.arcade-ui:not(.world-boss-active):not(.mobile-landscape) #cat-friends-open {
  left: max(16px, env(safe-area-inset-left));
}
body.arcade-ui:not(.world-boss-active):not(.mobile-landscape) #cat-friends-open.has-party-entry {
  left: calc(max(16px, env(safe-area-inset-left)) + 178px);
}
/* 乱斗区隐藏左侧悬浮猫友按钮（避免挡住迷你雷达），菜单内仍可随时打开；拉大榜单与连杀播报间距 */
body[data-zone="brawl"] #cat-friends-open { display: none !important; }
body[data-zone="brawl"] #multikill-notice { top: 104px !important; }
@media (max-width: 720px) {
  body.arcade-ui:not(.world-boss-active):not(.mobile-landscape) #party-open,
  body.arcade-ui:not(.world-boss-active):not(.mobile-landscape) #cat-friends-open {
    top: max(188px, calc(env(safe-area-inset-top) + 180px));
  }

}
.lc-phrases {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 9px;
}
.lc-phrases button {
  padding: 5px 9px;
  border-radius: 999px;
  border: 1.5px solid #d5b48a;
  background: #fff3db;
  color: #5a3c28;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.lc-phrases button:hover { background: #ffe4a8; border-color: #5a3c28; }
.lc-form { display: flex; gap: 6px; }
.lc-form input {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1.5px solid #c9a77a;
  background: #fff;
  color: #462e1f;
  font-size: 12px;
}
.lc-form button {
  padding: 7px 13px;
  border-radius: 10px;
  border: 2px solid #5a3c28;
  border-bottom: 3px solid #b85d19;
  background: linear-gradient(180deg, #ffb266, #f49442);
  color: #3d1d06;
  font-size: 12px;
  font-weight: 900;
}

/* 3. 7日签到弹窗 + 装扮衣柜弹窗 + 点歌机弹窗 */
#park-checkin-dialog, #park-wardrobe-dialog, #park-jukebox-dialog {
  width: min(560px, 94vw);
  max-height: min(88dvh, 780px);
  overflow-y: auto;
}
.ck-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.ck-card {
  padding: 10px 6px;
  border-radius: 13px;
  border: 2px solid #dbc09c;
  background: #fffdf8;
  text-align: center;
  position: relative;
}
.ck-card.is-day7 { grid-column: span 2; background: linear-gradient(110deg, #fff5d4, #ffe19e); border-color: #d99b38; }
.ck-card.is-claimed { opacity: 0.68; background: #eef7ec; border-color: #7cc488; }
.ck-card.is-today { border-color: #5a3c28; box-shadow: 0 3px 0 #5a3c28; background: #fff4cf; }
.ck-card small { display: block; font-size: 10px; color: #8c6b50; font-weight: 800; }
.ck-card .ck-icon { display: block; font-size: 24px; margin: 4px 0; }
.ck-card b { display: block; font-size: 11.5px; color: #462e1f; font-weight: 900; }
.ck-card .ck-tag { display: inline-block; margin-top: 4px; padding: 1px 7px; border-radius: 999px; font-size: 9px; font-weight: 900; background: #5ec472; color: #fff; }

.wb-section-title {
  margin: 12px 0 8px;
  font-size: 13px;
  font-weight: 900;
  color: #5a3c28;
}
.wb-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.wb-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 6px;
  border-radius: 13px;
  border: 2px solid #dbc09c;
  background: #fffdf8;
  color: #462e1f;
  text-align: center;
  cursor: pointer;
}
.wb-card.is-active {
  background: linear-gradient(180deg, #fff5d2, #ffe39e);
  border-color: #5a3c28;
  box-shadow: 0 2.5px 0 #5a3c28;
}
.wb-card span { font-size: 24px; }
.wb-card strong { font-size: 12px; font-weight: 900; }
.wb-card small { font-size: 10px; color: #8c6b50; line-height: 1.3; }

.jb-list { display: grid; gap: 8px; margin-bottom: 12px; }
.jb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 13px;
  border-radius: 13px;
  border: 2px solid #dbc09c;
  background: #fffdf8;
  cursor: pointer;
  text-align: left;
}
.jb-row.is-playing {
  background: linear-gradient(110deg, #fff4d2, #ffe4a6);
  border-color: #5a3c28;
  box-shadow: 0 2.5px 0 #5a3c28;
}
.jb-row strong { display: block; font-size: 13px; color: #462e1f; font-weight: 900; }
.jb-row small { display: block; font-size: 10.5px; color: #8c6b50; margin-top: 2px; }
.jb-row b { font-size: 11px; color: #b85d19; font-weight: 900; white-space: nowrap; }

@media (max-width: 560px) {
  .ck-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
