/* NYAAS refinement pass 2026-08-15
   User-requested scope only: cast-name asset, lower dock/collapse, music controls,
   rank mission, mini notebook, compact hamburger sheets, compact menu/order.
   Existing V10 behavior and already-correct room UI are intentionally untouched. */

/* ===== 1. CAST NAME — use the user's supplied part, with no synthetic white plate ===== */
#room .room-name-card{
  left:2.35vh!important;
  top:2.15vh!important;
  width:31.8vh!important;
  height:14.1vh!important;
  padding:4.55vh 2.85vh 1.65vh 5.7vh!important;
  background:url("assets/ui_final_0815/cast_name_user_0815.png") center/100% 100% no-repeat!important;
  overflow:visible!important;
}
#room .room-name-card::before,#room .room-name-card::after{display:none!important;content:none!important}
#room .room-name-card small{font-size:clamp(11px,1.22vh,15px)!important;margin-bottom:.5vh!important}
#room .room-name-card b{font-size:clamp(25px,2.95vh,34px)!important}
#room .room-name-card em{font-size:clamp(10px,1.08vh,14px)!important}
/* keep staff card clear of the taller supplied name plate */
#room .left-ui-stack{top:18.2vh!important}

/* ===== 2. LOWER CONTACT DOCK — native 1536:320 aspect, aligned content, true minimum collapse ===== */
#room .quick-actions{
  z-index:66!important;
  left:50%!important;
  bottom:2.2vh!important;
  width:min(840px,72vw)!important;
  height:auto!important;
  aspect-ratio:4.8 / 1!important;
  padding:8.35% 3.85% 1.55%!important;
  box-sizing:border-box!important;
  background:url("assets/ui_final_0815/quick_dock_clean.png") center/100% 100% no-repeat!important;
  grid-template-columns:repeat(7,minmax(0,1fr))!important;
  gap:.38%!important;
  overflow:visible!important;
  pointer-events:auto!important;
}
#room .quick-actions .qa{
  width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;
  padding:.2vh .1vh .35vh!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  gap:.22vh!important;overflow:hidden!important;pointer-events:auto!important;
}
#room .quick-actions .qa span{font-size:clamp(22px,2.55vh,30px)!important;margin:0 0 .16vh!important}
#room .quick-actions .qa b{font-size:clamp(14px,1.52vh,18px)!important;line-height:1.02!important}
#room .quick-actions .qa.private b{font-size:clamp(12px,1.32vh,16px)!important}
#room .quick-actions .qa small{font-size:clamp(8px,.78vh,10px)!important;line-height:1!important}
#room .quick-actions .qa.cheers>span{font-size:clamp(24px,2.75vh,32px)!important}

#room .quick-collapse-toggle{
  z-index:68!important;
  left:50%!important;
  bottom:18.5vh!important;
  width:4.2vh!important;height:2.6vh!important;
  min-width:34px!important;min-height:22px!important;
  border:2px solid #fff!important;outline:1px solid #ed91af!important;
  border-radius:999px!important;background:#ea5a89!important;color:#fff!important;
  box-shadow:0 .25vh .7vh rgba(78,37,55,.16)!important;
  font-size:clamp(10px,1.05vh,13px)!important;line-height:1!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  pointer-events:auto!important;
}
/* when stored, remove the entire decorative template instead of leaving an empty strip */
#room .quick-actions.collapsed{
  width:0!important;height:0!important;aspect-ratio:auto!important;
  padding:0!important;margin: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:2.45vh!important;
  width:4.6vh!important;height:3.0vh!important;
  min-width:38px!important;min-height:24px!important;
}

/* ===== 3. MUSIC — move the entire control row upward and keep all five controls inside ===== */
#room .music-widget{overflow:hidden!important}
#room .music-now{left:2.25vh!important;top:2.35vh!important;width:26.6vh!important;height:8.65vh!important;padding:.4vh .55vh .25vh 8.25vh!important}
#room .music-note-icon{left:.85vh!important;top:.75vh!important;width:5.5vh!important;height:5.5vh!important}
#room .music-copy b{max-width:17.1vh!important;font-size:clamp(15px,1.67vh,20px)!important}
#room .music-room-controls{
  left:2.15vh!important;right:2.15vh!important;bottom:2.65vh!important;
  grid-template-columns:3.45vh 3.45vh 3.45vh 5.8vh minmax(0,1fr)!important;
  gap:.42vh!important;
}
#room .music-room-controls button{
  height:3.35vh!important;min-height:25px!important;padding:0!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  line-height:1!important;overflow:hidden!important;
}
#room .music-room-controls .random-btn{font-size:clamp(7px,.7vh,9px)!important}

/* ===== 4. OSHI RANK — NEXT MISSION must read as a real contained panel ===== */
#room .mission-chip{
  left:2.65vh!important;right:2.65vh!important;bottom:2.35vh!important;height:7.2vh!important;
  padding:.82vh 1.05vh .7vh!important;display:flex!important;flex-direction:column!important;
  justify-content:center!important;overflow:hidden!important;
}
#room .mission-chip small{font-size:clamp(10px,1.0vh,13px)!important;line-height:1!important;letter-spacing:.065em!important}
#room .mission-chip b{margin-top:.42vh!important;font-size:clamp(12px,1.28vh,16px)!important;line-height:1.12!important;max-height:2.3em!important;overflow:hidden!important}
#room .mission-chip em{font-size:clamp(9px,.88vh,11px)!important;line-height:1.05!important}

/* ===== 5. MINI OSHIKATSU NOTE — larger, with explicit writing zones below the bow ===== */
#room .right-bottom-tools{right:3.25vh!important;top:52.6vh!important;width:24.2vh!important;height:45.0vh!important}
#room .memory-quick{width:23.8vh!important;height:32.2vh!important;background-size:100% 100%!important}
#room .memory-book-label{
  left:5.75vh!important;right:3.95vh!important;top:5.25vh!important;
  font-size:clamp(16px,1.78vh,21px)!important;line-height:1!important;
}
#room .memory-today{
  left:5.75vh!important;right:3.95vh!important;top:7.75vh!important;
  font-size:clamp(9px,.9vh,12px)!important;line-height:1!important;
}
#room #memoryLoveMini{
  left:5.75vh!important;right:3.95vh!important;top:10.55vh!important;
  font-size:clamp(16px,1.68vh,20px)!important;line-height:1!important;
}
#room #memoryNextMini{
  left:5.75vh!important;right:3.95vh!important;top:14.1vh!important;
  font-size:clamp(12px,1.22vh,15px)!important;line-height:1.2!important;max-height:2.5em!important;
}
#room .memory-reward-mini{
  left:5.45vh!important;right:3.55vh!important;bottom:3.25vh!important;gap:.62vh!important;
}
#room .memory-reward-mini i{
  height:2.25vh!important;min-height:18px!important;padding:.38vh .62vh!important;
  font-size:clamp(9px,.88vh,11px)!important;line-height:1.05!important;
  overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
}
#room .memory-ribbon{right:.4vh!important;bottom:.15vh!important;width:17vh!important;height:6.5vh!important}

/* ===== 6. HAMBURGER SUB-SHEETS — useful modal, not a full-height wall ===== */
#sheet{
  top:5vh!important;bottom:5vh!important;right:2.6vw!important;
  width:min(700px,70vw)!important;max-height:90vh!important;
  border:2px solid #efb4c7!important;border-radius:28px!important;
  box-shadow:0 20px 65px rgba(68,35,49,.24)!important;
  transform:translateX(calc(110% + 5vw))!important;
  padding:18px!important;
}
#sheet.open{transform:translateX(0)!important}
#sheet>header{top:-18px!important;margin:-18px -18px 14px!important;padding:16px 18px 13px!important;border-radius:25px 25px 0 0!important}
#sheet>header h2{font-size:28px!important}
#sheetBody{font-size:15px!important;overflow-wrap:anywhere!important}
/* no unreadable inherited white text in sheets */
#sheetBody button:not(.active),#sheetBody b,#sheetBody strong,#sheetBody h3,#sheetBody h4{color:#34252b!important;text-shadow:none!important}
#sheetBody p,#sheetBody small,#sheetBody em{color:#75525f!important;text-shadow:none!important}

/* ===== 7. MENU / ORDER — compact, centered, count-first layout inspired by supplied reference ===== */
#menuOverlay.menu-overlay.open{
  display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;
  gap:10px!important;padding:4vh 4vw!important;background:rgba(74,43,56,.30)!important;
  backdrop-filter:blur(8px)!important;-webkit-backdrop-filter:blur(8px)!important;
}
#menuOverlay .order-window-head{
  position:relative!important;top:auto!important;left:auto!important;right:auto!important;transform:none!important;
  width:min(820px,76vw)!important;min-height:62px!important;margin:0!important;
  padding:10px 70px 9px 22px!important;border-radius:20px!important;
  flex:0 0 auto!important;
}
#menuOverlay .order-window-head small{font-size:9px!important}
#menuOverlay .order-window-head h2{font-size:25px!important;line-height:1!important;margin:2px 0 0!important}
#menuOverlay .order-window-head>button{top:9px!important;right:12px!important;width:42px!important;height:42px!important}
#menuOverlay .menu-book-body{
  width:min(820px,76vw)!important;height:min(610px,72vh)!important;min-height:0!important;
  margin:0!important;padding:14px!important;border:2px solid #f0b4c8!important;outline:4px solid rgba(255,255,255,.92)!important;
  border-radius:25px!important;background:linear-gradient(150deg,#fffafd,#fff)!important;
  overflow:auto!important;box-shadow:0 20px 55px rgba(70,36,50,.20)!important;
  flex:0 1 auto!important;
}
#menuOverlay .menu-cast-hint{min-height:40px!important;padding:7px 11px!important;gap:10px!important}
#menuOverlay .menu-cast-hint b{font-size:12px!important}
#menuOverlay .menu-cast-hint span{font-size:9px!important}
#menuOverlay .ref-tabs{margin:9px 0!important;border-radius:13px!important}
#menuOverlay .ref-tabs button{min-height:42px!important;font-size:11px!important;padding:5px 3px!important}
#menuOverlay .menu-list-ref{gap:7px!important;padding-bottom:74px!important}
#menuOverlay .menu-row-ref{
  grid-template-columns:40px minmax(0,1fr) 90px 122px!important;
  min-height:58px!important;padding:6px 9px!important;gap:8px!important;border-radius:15px!important;
}
#menuOverlay .menu-food-icon{font-size:25px!important}
#menuOverlay .menu-row-ref b{font-size:13px!important}
#menuOverlay .menu-row-ref small{font-size:9px!important}
#menuOverlay .menu-row-ref strong{font-size:12px!important}
#menuOverlay .menu-qty{
  display:grid!important;grid-template-columns:34px 38px 34px!important;align-items:center!important;justify-content:end!important;
  border:1.5px solid #efb8ca!important;border-radius:999px!important;overflow:hidden!important;background:#fff!important;
}
#menuOverlay .menu-qty button{width:34px!important;height:34px!important;border:0!important;background:#fff!important;color:#e15583!important;font-size:20px!important;font-weight:950!important}
#menuOverlay .menu-qty b{display:grid!important;place-items:center!important;height:34px!important;border-left:1px solid #f0d6df!important;border-right:1px solid #f0d6df!important;font-size:13px!important;color:#3d2b32!important}
#menuOverlay .menu-order-footer{
  position:sticky!important;left:0!important;right:0!important;bottom:-14px!important;z-index:4!important;
  margin:8px -14px -14px!important;padding:10px 14px 12px!important;
  display:grid!important;grid-template-columns:1fr auto!important;align-items:center!important;gap:12px!important;
  background:linear-gradient(180deg,rgba(255,250,252,.90),#fff7fa 36%)!important;border-top:1px solid #efc7d5!important;
}
#menuOverlay .menu-order-total{display:flex!important;align-items:baseline!important;gap:9px!important;color:#5b3f4a!important;font-size:11px!important}
#menuOverlay .menu-order-total b{font-size:20px!important;color:#d64273!important}
#menuOverlay .menu-submit-order{min-width:180px!important;height:44px!important;border:0!important;border-radius:999px!important;background:linear-gradient(90deg,#ff759f,#e94f82)!important;color:#fff!important;font-size:15px!important;font-weight:950!important;box-shadow:0 5px 12px rgba(115,44,70,.16)!important}
#menuOverlay .menu-submit-order:disabled{opacity:.42!important}

/* support / gift: same compact modal, no decorative noise lines */
#menuOverlay .support-grid,#menuOverlay .gift-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
#menuOverlay .support-card,#menuOverlay .gift-card{min-height:88px!important;padding:10px 12px!important;border-radius:15px!important;overflow:hidden!important;background:#fff!important;background-image:none!important}
#menuOverlay .support-card::before,#menuOverlay .support-card::after,#menuOverlay .gift-card::before,#menuOverlay .gift-card::after,
#menuOverlay .support-grid::before,#menuOverlay .support-grid::after,#menuOverlay .gift-grid::before,#menuOverlay .gift-grid::after{display:none!important;content:none!important}
#menuOverlay .support-card>span,#menuOverlay .gift-card>span{font-size:24px!important}
#menuOverlay .support-card b,#menuOverlay .gift-card b{font-size:13px!important}
#menuOverlay .support-card small,#menuOverlay .gift-card small{font-size:9px!important}
#menuOverlay .support-card strong,#menuOverlay .gift-card strong{font-size:12px!important}

/* compact / Intel-Mac windows */
@media(max-height:760px){
  #room .room-name-card{width:29.4vh!important;height:13.1vh!important;padding:4.2vh 2.6vh 1.4vh 5.25vh!important}
  #room .left-ui-stack{top:17.4vh!important}
  #room .quick-actions{width:min(760px,72vw)!important;bottom:1.8vh!important}
  #room .quick-collapse-toggle{bottom:18.0vh!important}
  #room .quick-actions.collapsed + .quick-collapse-toggle{bottom:2.1vh!important}
  #room .music-room-controls{bottom:2.35vh!important}
  #room .right-bottom-tools{top:52.2vh!important;width:22.6vh!important}
  #room .memory-quick{width:22.3vh!important;height:30.3vh!important}
  #room .memory-book-label{top:4.9vh!important;font-size:14px!important}
  #room .memory-today{top:7.1vh!important;font-size:8px!important}
  #room #memoryLoveMini{top:9.75vh!important;font-size:14px!important}
  #room #memoryNextMini{top:13.0vh!important;font-size:10px!important}
  #room .memory-reward-mini i{font-size:8px!important;min-height:16px!important}
  #sheet{top:4vh!important;bottom:4vh!important}
  #menuOverlay .menu-book-body{height:min(530px,70vh)!important}
}
@media(max-width:1100px){
  #room .quick-actions{width:min(760px,72vw)!important}
  #sheet{width:min(650px,72vw)!important;right:2vw!important}
  #menuOverlay .order-window-head,#menuOverlay .menu-book-body{width:min(760px,82vw)!important}
}
@media(max-width:900px){
  #room .quick-actions{width:76vw!important}
  #room .qa b{font-size:12px!important}.qa small{font-size:8px!important}.qa span{font-size:20px!important}
  #sheet{width:82vw!important;right:2vw!important}
  #menuOverlay .order-window-head,#menuOverlay .menu-book-body{width:88vw!important}
  #menuOverlay .menu-row-ref{grid-template-columns:34px minmax(0,1fr) 74px 110px!important}
  #menuOverlay .support-grid,#menuOverlay .gift-grid{grid-template-columns:1fr!important}
}

/* final lower-dock row fix: one definite grid row prevents the legacy 100%-height collapse */
#room .quick-actions{
  height:clamp(142px,13.5vw,175px)!important;
  aspect-ratio:auto!important;
  grid-template-rows:minmax(0,1fr)!important;
  align-items:stretch!important;
}
#room .quick-actions .qa{
  height:100%!important;min-height:0!important;align-self:stretch!important;
}
#room .memory-reward-mini i{font-size:clamp(10px,.98vh,12px)!important;font-weight:950!important}
@media(max-height:760px){
  #room .quick-actions{height:clamp(136px,13.5vw,162px)!important}
  #room .memory-reward-mini i{font-size:9px!important}
}
/* flex layout is deliberate here: seven supplied wells are fixed and must not collapse to content height */
#room .quick-actions{display:flex!important;align-items:stretch!important;justify-content:stretch!important}
#room .quick-actions .qa{flex:1 1 0!important;height:auto!important;align-self:stretch!important}
/* padding percentages on an absolutely-positioned dock resolve against the room width; use clamped pixels instead */
#room .quick-actions{
  padding:clamp(58px,4.9vw,70px) clamp(28px,2.2vw,34px) clamp(9px,.75vw,12px)!important;
}
/* notebook final writing-zone alignment: use the third actual page block, never the outer edge */
#room .memory-reward-mini{
  top:20.9vh!important;bottom:auto!important;
  left:5.55vh!important;right:3.7vh!important;
  gap:.72vh!important;
}
#room .memory-reward-mini i{
  height:3.0vh!important;min-height:24px!important;
  padding:.62vh .72vh!important;
  border-radius:1.05vh!important;
  font-size:clamp(11px,1.08vh,13px)!important;
  line-height:1!important;
  text-overflow:clip!important;
}
@media(max-height:760px){
  #room .memory-reward-mini{top:19.25vh!important;left:5.1vh!important;right:3.35vh!important;gap:.55vh!important}
  #room .memory-reward-mini i{height:2.7vh!important;min-height:20px!important;font-size:9px!important;padding:.45vh .55vh!important}
}
/* menu body must never create the old horizontal/noise line */
#menuOverlay .menu-book-body{overflow-y:auto!important;overflow-x:hidden!important}
#menuOverlay .menu-list-ref,#menuOverlay .support-grid,#menuOverlay .gift-grid{max-width:100%!important;overflow-x:hidden!important}
/* final optical alignment requested: lift MENU / ORDER label slightly */
#menuOverlay .order-window-head h2{transform:translateY(-2px)!important}
