/* NYAAS final correction pass — 2026-08-15
   Scope: user-reported layout defects only. Existing V10 media/save/reaction systems are untouched. */

/* ===== CONTACT: CAST NAME — supplied frame, text optically lowered ===== */
#room .room-name-card{
  padding-top:5.15vh!important;
  padding-bottom:1.15vh!important;
}
#room .room-name-card small{margin-bottom:.42vh!important}
#room .room-name-card>small,#room .room-name-card>div{transform:translateY(.22vh)!important}

/* ===== MUSIC — all five buttons fully inside the decorative panel ===== */
#room .music-widget{overflow:hidden!important}
#room .music-now{
  left:2.25vh!important;top:2.15vh!important;width:26.7vh!important;height:8.95vh!important;
  padding:.48vh .55vh .3vh 8.45vh!important;
}
#room .music-note-icon{left:.82vh!important;top:.72vh!important;width:5.25vh!important;height:5.25vh!important}
#room .music-copy small{font-size:clamp(10px,1.0vh,12px)!important}
#room .music-copy b{max-width:17.25vh!important;font-size:clamp(15px,1.65vh,19px)!important;margin-top:.42vh!important}
#room .music-copy em{margin-top:.38vh!important;font-size:clamp(9px,.9vh,11px)!important}
#room .music-room-controls{
  left:2.55vh!important;right:2.55vh!important;bottom:3.45vh!important;
  grid-template-columns:3.05vh 3.05vh 3.05vh 5.25vh minmax(0,1fr)!important;
  gap:.38vh!important;
}
#room .music-room-controls button{
  height:2.85vh!important;min-height:22px!important;padding:0!important;
  font-size:clamp(7px,.72vh,9px)!important;line-height:1!important;
}
#room #roomTrackPrev,#room #roomTrackPlay,#room #roomTrackNext{font-size:clamp(10px,1.08vh,13px)!important}
#room .music-room-controls .random-btn{font-size:clamp(6.5px,.65vh,8px)!important;letter-spacing:-.01em!important}

/* ===== OSHI RANK — label the relation meter and keep NEXT MISSION in its box ===== */
#room .meter{top:13.55vh!important;height:1.2vh!important;overflow:visible!important}
#room .meter::before{
  content:"推し度"!important;position:absolute!important;left:0!important;top:-1.55vh!important;
  color:#8a6070!important;font-size:clamp(7px,.72vh,9px)!important;font-weight:950!important;line-height:1!important;
}
#room .mini-stats{top:16.55vh!important;height:9.35vh!important}
#room .mini-stats button{height:9.35vh!important}
#room .mission-chip{
  left:2.8vh!important;right:2.8vh!important;bottom:3.15vh!important;height:6.45vh!important;
  padding:.52vh .95vh .42vh!important;display:flex!important;flex-direction:column!important;
  justify-content:flex-start!important;align-items:flex-start!important;overflow:hidden!important;
}
#room .mission-chip small{font-size:clamp(10px,1.0vh,12px)!important;line-height:1!important}
#room .mission-chip b{margin-top:.35vh!important;font-size:clamp(12px,1.22vh,15px)!important;line-height:1.08!important;max-width:100%!important}
#room .mission-chip em{margin-top:.22vh!important;font-size:clamp(9px,.88vh,11px)!important;line-height:1.05!important;max-width:100%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#room .mission-chip i{position:absolute!important;left:.95vh!important;right:.95vh!important;bottom:.22vh!important;height:.28vh!important;border-radius:99px!important;background:#ee6794!important}

/* ===== OSHIKATSU NOTE — use the three actual writing zones ===== */
#room .memory-quick{width:21.5vh!important;height:32.25vh!important;background-size:100% 100%!important}
#room .memory-book-label{
  left:4.8vh!important;right:3.45vh!important;top:5.85vh!important;
  font-size:clamp(14px,1.55vh,18px)!important;line-height:1!important;
}
#room .memory-today{left:4.8vh!important;right:3.45vh!important;top:7.9vh!important;font-size:clamp(8px,.78vh,10px)!important}
#room #memoryLoveMini{
  left:4.9vh!important;right:3.45vh!important;top:9.9vh!important;
  font-size:clamp(15px,1.55vh,19px)!important;line-height:1!important;
}
#room #memoryNextMini{
  left:4.9vh!important;right:3.45vh!important;top:13.25vh!important;
  font-size:clamp(11px,1.1vh,14px)!important;line-height:1.18!important;max-height:2.4em!important;
}
#room .memory-reward-mini{
  left:4.85vh!important;right:3.35vh!important;top:20.65vh!important;bottom:auto!important;
  gap:.62vh!important;
}
#room .memory-reward-mini i{
  height:2.65vh!important;min-height:21px!important;padding:.55vh .62vh!important;
  border-radius:.95vh!important;font-size:clamp(10px,1.0vh,12px)!important;line-height:1!important;
  white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
}

/* ===== LOWER ACTION DOCK — 80% scale, native aspect, no outer-frame collision ===== */
#room .quick-actions{
  width:min(760px,58vw)!important;height:auto!important;aspect-ratio:4.8/1!important;
  bottom:5.55vh!important;padding:clamp(51px,4.05vw,60px) clamp(25px,1.95vw,30px) clamp(8px,.65vw,10px)!important;
  display:flex!important;align-items:stretch!important;justify-content:stretch!important;gap:0!important;
  background:url("assets/ui_final_0815/quick_dock_clean.png") center/100% 100% no-repeat!important;
  overflow:visible!important;box-sizing:border-box!important;
}
#room .quick-actions .qa{
  flex:1 1 0!important;width:auto!important;min-width:0!important;height:auto!important;min-height:0!important;
  padding:.1vh .05vh .28vh!important;gap:.12vh!important;overflow:hidden!important;
}
#room .quick-actions .qa span{font-size:clamp(19px,2.15vh,25px)!important;margin:0 0 .08vh!important}
#room .quick-actions .qa b{font-size:clamp(13px,1.42vh,16px)!important;line-height:1!important}
#room .quick-actions .qa.private b{font-size:clamp(11px,1.2vh,14px)!important}
#room .quick-actions .qa small{font-size:clamp(8px,.78vh,9.5px)!important;line-height:1!important}
#room .quick-actions .qa.cheers>span{display:block!important;visibility:visible!important;opacity:1!important;font-size:clamp(21px,2.35vh,28px)!important}
#room .quick-collapse-toggle{bottom:19.45vh!important;z-index:69!important}
#room .quick-actions.collapsed{
  width:0!important;height:0!important;aspect-ratio:auto!important;padding:0!important;background:none!important;
  overflow:visible!important;pointer-events:none!important;
}
#room .quick-actions.collapsed .qa{display:none!important}
#room .quick-actions.collapsed + .quick-collapse-toggle{
  bottom:5.7vh!important;width:4.8vh!important;height:3.0vh!important;min-width:38px!important;min-height:24px!important;
}

/* ===== FIRST / MILESTONE TEXT — white type + shadow only, never a cushion ===== */
#room .first-text-burst{
  color:#fff!important;background:transparent!important;border:0!important;outline:0!important;box-shadow:none!important;
  padding:0!important;-webkit-text-stroke:0!important;
  text-shadow:0 3px 6px rgba(45,28,36,.62),0 1px 2px rgba(45,28,36,.58)!important;
}
#room .first-text-burst::before,#room .first-text-burst::after{display:none!important;content:none!important}

/* No reward/order action may paint or blur the whole room. */
#room .heart-burst,#room .action-banner,#room .first-text-burst{background-color:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
#room .heart-burst::before,#room .heart-burst::after,#room .action-banner::before,#room .action-banner::after{display:none!important;content:none!important}
#momentOverlay,#momentOverlay.open{background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}

/* ===== MENU / ORDER + support/gift — remove duplicate/noise borders ===== */
#menuOverlay .support-grid,#menuOverlay .gift-grid{
  border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;overflow:visible!important;
}
#menuOverlay .support-card,#menuOverlay .gift-card{
  outline:0!important;box-shadow:0 4px 10px rgba(77,39,55,.05)!important;background:#fff!important;background-image:none!important;
}
#menuOverlay .support-grid::before,#menuOverlay .support-grid::after,#menuOverlay .gift-grid::before,#menuOverlay .gift-grid::after,
#menuOverlay .support-card::before,#menuOverlay .support-card::after,#menuOverlay .gift-card::before,#menuOverlay .gift-card::after,
#menuOverlay .support-card>*::before,#menuOverlay .support-card>*::after,#menuOverlay .gift-card>*::before,#menuOverlay .gift-card>*::after{display:none!important;content:none!important}
#menuOverlay .order-window-head h2{transform:translateY(-5px)!important}

/* ===== TIME EXTENSION PROMPT ===== */
#timeOverlay{align-items:center!important;justify-content:center!important;background:rgba(45,29,36,.30)!important;backdrop-filter:blur(4px)!important;-webkit-backdrop-filter:blur(4px)!important}
#timeOverlay .time-card{width:min(620px,88vw)!important;padding:26px!important;text-align:center!important}
#timeOverlay .time-card>span{display:inline-block!important;margin-bottom:8px!important;color:#d84776!important;font-size:11px!important;font-weight:950!important;letter-spacing:.12em!important}
#timeOverlay .time-card h2{margin:4px 0 8px!important;font-size:28px!important;color:#35272d!important}
#timeOverlay .time-card p{margin:0 0 15px!important;font-size:13px!important;line-height:1.55!important;color:#694b56!important}
.time-extension-options{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;margin:14px 0!important}
.time-extension-options[hidden]{display:none!important}
.time-extension-options button{min-height:82px!important;padding:12px!important;border:2px solid #eea5bc!important;border-radius:18px!important;background:#fff!important;color:#3e2c33!important}
.time-extension-options button b{display:block!important;color:#d74073!important;font-size:18px!important}
.time-extension-options button small{display:block!important;margin-top:5px!important;color:#775764!important;font-size:10px!important;line-height:1.35!important}
.time-extension-fee{grid-column:1/3!important;margin:0!important;padding:8px 10px!important;border-radius:12px!important;background:#fff2f7!important;color:#a84d70!important;font-size:10px!important;font-weight:900!important}
.time-base-actions{display:flex!important;gap:10px!important;margin-top:10px!important}
.time-base-actions button{flex:1!important;min-height:58px!important}

@media(max-height:760px){
  #room .room-name-card{padding-top:4.8vh!important}
  #room .music-room-controls{bottom:3.15vh!important}
  #room .quick-actions{width:min(700px,58vw)!important;bottom:5.05vh!important;padding:clamp(45px,3.9vw,53px) clamp(22px,1.85vw,27px) 7px!important}
  #room .quick-collapse-toggle{bottom:18.7vh!important}
  #room .quick-actions.collapsed + .quick-collapse-toggle{bottom:5.2vh!important}
  #room .memory-book-label{top:5.65vh!important;font-size:13px!important}
  #room .memory-today{top:7.55vh!important}
  #room #memoryLoveMini{top:9.5vh!important;font-size:13px!important}
  #room #memoryNextMini{top:12.75vh!important;font-size:10px!important}
  #room .memory-reward-mini{top:19.95vh!important;gap:.48vh!important}
  #room .memory-reward-mini i{height:2.45vh!important;min-height:18px!important;font-size:9px!important;padding:.42vh .52vh!important}
  #room .mission-chip{bottom:3.0vh!important;height:6.3vh!important}
  #room .mission-chip small{font-size:9px!important}#room .mission-chip b{font-size:11px!important}#room .mission-chip em{font-size:8px!important}
}

@media(max-width:1100px){
  #room .quick-actions{width:min(700px,62vw)!important}
}
@media(max-width:900px){
  #room .quick-actions{width:66vw!important;bottom:5.0vh!important;padding:clamp(40px,4.6vw,50px) clamp(18px,2.2vw,24px) 6px!important}
  #room .quick-actions .qa b{font-size:11px!important}#room .quick-actions .qa.private b{font-size:9.5px!important}#room .quick-actions .qa small{font-size:7px!important}#room .quick-actions .qa span{font-size:18px!important}
  .time-extension-options{grid-template-columns:1fr!important}.time-extension-fee{grid-column:1!important}
}

/* ===== FINAL2: repeated user defects — hard containment pass ===== */
/* Cast-name type: latest supplied frame, text deliberately lower inside its clear writing zone. */
#room .room-name-card{
  background-image:url("assets/ui_final_0815/cast_name_user_0815.png")!important;
  padding-top:5.55vh!important;
}
#room .room-name-card>small,#room .room-name-card>div{transform:translateY(.45vh)!important}

/* Music: slightly smaller controls and visibly higher; no button may touch the lower lace. */
#room .music-room-controls{
  left:2.65vh!important;right:2.65vh!important;bottom:4.02vh!important;
  grid-template-columns:2.78vh 2.78vh 2.78vh 5.05vh minmax(0,1fr)!important;
  gap:.34vh!important;
}
#room .music-room-controls button{height:2.58vh!important;min-height:20px!important}
#room #roomTrackPrev,#room #roomTrackPlay,#room #roomTrackNext{font-size:clamp(9px,.98vh,12px)!important}
#room .music-room-controls .random-btn{font-size:clamp(6px,.60vh,7.5px)!important}

/* Rank: make progress identity explicit and reserve the whole bottom writing box for NEXT MISSION. */
#room .meter::before{content:"推し度"!important;font-size:clamp(8px,.78vh,10px)!important}
#room .mission-chip{
  left:2.85vh!important;right:2.85vh!important;bottom:3.72vh!important;height:7.05vh!important;
  padding:.72vh 1.0vh .55vh!important;overflow:hidden!important;
}
#room .mission-chip small{font-size:clamp(10px,1.02vh,12.5px)!important}
#room .mission-chip b{margin-top:.38vh!important;font-size:clamp(12.5px,1.28vh,15.5px)!important;line-height:1.05!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#room .mission-chip em{margin-top:.28vh!important;font-size:clamp(9px,.91vh,11.5px)!important;line-height:1.02!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#room .mission-chip i{bottom:.30vh!important}

/* Notebook: all dynamic type stays in the three printed writing zones, away from the ribbon/pen. */
#room .memory-book-label{top:6.05vh!important;font-size:clamp(14px,1.5vh,18px)!important}
#room .memory-today{top:8.10vh!important}
#room #memoryLoveMini{top:10.12vh!important;font-size:clamp(15px,1.55vh,19px)!important}
#room #memoryNextMini{top:13.55vh!important;font-size:clamp(11px,1.10vh,14px)!important}
#room .memory-reward-mini{top:20.30vh!important;gap:.52vh!important}
#room .memory-reward-mini i{
  height:2.72vh!important;min-height:22px!important;padding:.52vh .66vh!important;
  font-size:clamp(10.5px,1.03vh,12.5px)!important;line-height:1!important;
}

/* Quick dock: true 80% presentation and a guaranteed clear gap above the outer bottom frame. */
#room .quick-actions{
  width:min(730px,55.5vw)!important;bottom:6.25vh!important;
  padding:clamp(48px,3.78vw,56px) clamp(24px,1.88vw,28px) clamp(8px,.62vw,9px)!important;
  overflow:visible!important;
}
#room .quick-actions .qa{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important}
#room .quick-actions .qa span{font-size:clamp(18px,2.00vh,23px)!important}
#room .quick-actions .qa b{font-size:clamp(12.5px,1.34vh,15px)!important;white-space:nowrap!important}
#room .quick-actions .qa.private b{font-size:clamp(10.5px,1.10vh,13px)!important}
#room .quick-actions .qa small{font-size:clamp(7.5px,.72vh,9px)!important;white-space:nowrap!important}
#room .quick-actions .qa.cheers>span{font-size:clamp(20px,2.18vh,26px)!important}
#room .quick-collapse-toggle{bottom:20.25vh!important}
#room .quick-actions.collapsed + .quick-collapse-toggle{bottom:5.85vh!important}

/* Gift/support modal: mark-specific inner frame is intentionally removed so no border can cut through rows. */
#menuOverlay[data-mode="gift"] .menu-book-body,
#menuOverlay[data-mode="cheer"] .menu-book-body{
  border:0!important;outline:0!important;box-shadow:0 20px 55px rgba(70,36,50,.16)!important;
  padding-bottom:20px!important;
}
#menuOverlay[data-mode="gift"] .gift-grid,
#menuOverlay[data-mode="cheer"] .support-grid{padding-bottom:8px!important}

/* Absolutely no full-screen reward tint after a purchase/action. */
#room::after{pointer-events:none!important}
#room .heart-burst.play{background:transparent!important;box-shadow:none!important;filter:none!important}
#momentOverlay:not(.open),#momentOverlay.open{background-color:transparent!important;background-image:none!important}

/* Milestone copy = white type + shadow only. No plate, no stroke, no pseudo decoration. */
#room .first-text-burst,
#room .first-text-burst.show{
  color:#fff!important;background:transparent!important;background-image:none!important;
  border:0!important;outline:0!important;box-shadow:none!important;padding:0!important;
  -webkit-text-stroke:0 transparent!important;paint-order:normal!important;
  text-shadow:0 .24vh .30vh rgba(40,26,32,.82),0 .65vh 1.25vh rgba(40,26,32,.56)!important;
}
#room .first-text-burst::before,#room .first-text-burst::after{display:none!important;content:none!important;background:none!important}

@media(max-height:760px){
  #room .room-name-card{padding-top:5.0vh!important}
  #room .music-room-controls{bottom:3.72vh!important}
  #room .mission-chip{bottom:3.35vh!important;height:6.75vh!important}
  #room .quick-actions{width:min(665px,58vw)!important;bottom:5.65vh!important;padding:clamp(42px,3.62vw,49px) clamp(21px,1.75vw,25px) 6px!important}
  #room .quick-collapse-toggle{bottom:19.1vh!important}
  #room .quick-actions.collapsed + .quick-collapse-toggle{bottom:5.35vh!important}
  #room .memory-book-label{top:5.75vh!important}
  #room .memory-today{top:7.65vh!important}
  #room #memoryLoveMini{top:9.65vh!important}
  #room #memoryNextMini{top:12.9vh!important}
  #room .memory-reward-mini{top:19.25vh!important}
  #room .memory-reward-mini i{height:2.52vh!important;min-height:18px!important;font-size:9.5px!important}
}
@media(max-width:1100px){#room .quick-actions{width:min(665px,59vw)!important}}
@media(max-width:900px){
  #room .quick-actions{width:62vw!important;bottom:5.55vh!important;padding:clamp(38px,4.25vw,47px) clamp(17px,2.0vw,22px) 6px!important}
  #room .quick-actions .qa span{font-size:17px!important}#room .quick-actions .qa b{font-size:10.5px!important}#room .quick-actions .qa.private b{font-size:9px!important}#room .quick-actions .qa small{font-size:6.8px!important}
}

/* Mission button had a legacy width:100%; neutralize it so left/right constraints actually contain it. */
#room .mission-chip{width:auto!important;max-width:none!important;box-sizing:border-box!important;position:absolute!important}

/* Notebook reward rows: structured label/value layout prevents recurring text spill. */
#room .right-bottom-tools{width:24.4vh!important}
#room .memory-quick{width:22.8vh!important;height:34.2vh!important}
#room .memory-reward-mini{left:4.75vh!important;right:3.05vh!important;top:21.42vh!important}
#room .memory-reward-mini i{
  display:flex!important;align-items:center!important;justify-content:space-between!important;gap:.35vh!important;
  font-style:normal!important;white-space:nowrap!important;text-overflow:clip!important;
}
#room .memory-reward-mini i b,#room .memory-reward-mini i span{
  display:block!important;min-width:0!important;white-space:nowrap!important;line-height:1!important;
  font-size:clamp(9.5px,.94vh,11.5px)!important;font-weight:950!important;color:#5d4350!important;
}
#room .memory-reward-mini i span{font-size:clamp(8.5px,.84vh,10.5px)!important;text-align:right!important}
@media(max-height:760px){
  #room .right-bottom-tools{width:24.2vh!important}
  #room .memory-quick{width:23.0vh!important;height:34.5vh!important}
  #room .memory-reward-mini{left:4.6vh!important;right:2.9vh!important;top:20.55vh!important}
  #room .memory-reward-mini i b{font-size:8.7px!important}
  #room .memory-reward-mini i span{font-size:7.9px!important}
}
@media(max-width:900px){
  #room .mission-chip{left:2.15vh!important;right:2.15vh!important}
  #room .mission-chip b{font-size:11.5px!important}
  #room .mission-chip em{font-size:8.5px!important}
}

/* Low-height legibility: never clip notebook row baselines. */
@media(max-height:760px){
  #room .memory-reward-mini i{height:3.05vh!important;min-height:20px!important;padding:.34vh .52vh!important;line-height:1!important}
}
@media(max-width:1000px){
  #room .mission-chip{left:1.75vh!important;right:1.75vh!important}
  #room .mission-chip b{font-size:11.5px!important}
  #room .mission-chip em{font-size:8.5px!important}
}
