/* MedicalTV Remote UI polish pass - 2026-04-08
   Visual hierarchy and navigation simplification only.
   No command routing or control semantics are changed here.
*/

:root{
  --polish-surface:rgba(8,16,29,.82);
  --polish-surface-2:rgba(12,23,39,.9);
  --polish-line:rgba(145,176,214,.18);
  --polish-line-strong:rgba(145,176,214,.30);
  --polish-shadow:0 14px 34px rgba(0,0,0,.22);
}

.wrap{max-width:1100px}
.app-topbar{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:16px;
  align-items:center;
}
.brand-block{display:grid;gap:6px}
.brand-block h1{margin:0;font-size:clamp(28px,4vw,38px)}
.subtitle{max-width:52rem}
.top-actions{align-self:stretch}
.top-actions .badge{min-width:132px;justify-content:center}

.quick-start-strip{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.quick-start-step{
  display:flex;
  align-items:center;
  gap:12px;
  min-height:74px;
  padding:14px 16px;
  border-radius:22px;
  border:1px solid var(--polish-line);
  background:linear-gradient(180deg, rgba(13,25,43,.86), rgba(8,16,29,.88));
  box-shadow:var(--polish-shadow);
}
.step-dot{
  width:34px;
  height:34px;
  border-radius:999px;
  display:grid;
  place-items:center;
  font-weight:900;
  color:#07111d;
  background:linear-gradient(180deg,#9bcaff,#68abff);
  flex:0 0 auto;
}
.quick-start-step strong,
.quick-start-step small{display:block}
.quick-start-step strong{font-size:14px;line-height:1.2;color:#f5f9ff}
.quick-start-step small{margin-top:3px;color:#afc3d8;line-height:1.3}

.hero-status{gap:10px}
.hero-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.stat-pill{min-height:70px}

.section-tabs{
  top:calc(84px + var(--safe-top));
  gap:8px;
  padding:6px;
  background:rgba(7,15,26,.84);
}
.section-tab{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:50px;
  padding:0 16px;
  border-radius:15px;
  color:#d9e6f5;
}
.section-tab.is-active,
.dock-item.is-active{
  background:linear-gradient(180deg,#9bcaff,#6baeff);
  border-color:rgba(155,202,255,.82);
}
.thumb-rail{top:calc(146px + var(--safe-top));padding:6px 8px}
.thumb-rail-btn{border-radius:15px;font-weight:800}

.card{padding:18px}
.section-head{align-items:flex-start;gap:16px}
.section-head > div{display:grid;gap:4px}
.jump-chip{border-radius:999px}

#pair-card .pair-entry,
#pair-card .pair-help{
  border-radius:22px;
  border:1px solid var(--polish-line);
  background:linear-gradient(180deg, rgba(10,18,32,.74), rgba(7,14,25,.78));
}
#pair-card .pair-entry{
  grid-template-columns:minmax(0,1fr) repeat(2,minmax(122px,auto));
  padding:14px;
}
#pair-card .pair-help{padding:16px 18px}
#pair-card .steps{display:grid;gap:10px;padding-left:18px}
#pair-card .footer-tools{margin-top:12px}
#pair-card .panel-toolkit{margin-top:12px}

.instant-panel .section-head{margin-bottom:14px}
.instant-remote-shell{gap:16px}
.instant-remote-meta{gap:12px}
.remote-live-pill,
.instant-subsection,
.compat-brand-card,
.card-lite,
.details{
  box-shadow:var(--polish-shadow);
}
.remote-live-pill{
  border-color:var(--polish-line-strong);
  background:linear-gradient(180deg, rgba(12,24,42,.94), rgba(8,17,30,.94));
}
.remote-quick-jumps .jump-chip,
.remote-quick-jumps .tool-link{
  min-height:42px;
  background:rgba(10,18,31,.9);
}
.instant-remote-stage{gap:18px;align-items:stretch}
.instant-remote-core{
  padding:18px;
  border-radius:28px;
  background:linear-gradient(180deg, rgba(8,15,26,.72), rgba(8,15,26,.34));
  border:1px solid var(--polish-line);
}
.instant-top-row button,
.instant-home-row button,
.instant-transport button,
.instant-app-grid button,
.instant-action-grid button{
  box-shadow:var(--polish-shadow);
}
.instant-top-row button,
.instant-home-row button{min-height:64px}
.instant-transport button,
.instant-app-grid button,
.instant-action-grid button{min-height:56px}
.instant-rail{
  border-color:var(--polish-line);
  background:linear-gradient(180deg, rgba(10,18,32,.98), rgba(8,14,25,.96));
}
.instant-rail-track button{
  min-height:108px;
  border-color:var(--polish-line-strong);
}
.instant-rail-mini{font-weight:800}
.instant-pad{padding:18px 16px;border-color:var(--polish-line)}
.instant-pad-hint{max-width:42rem;margin:2px auto 0}
.instant-bottom-deck{gap:16px}
.subsection-headline{margin-bottom:10px}

#search-card .search-stack,
#keyboard-card .keyboard-sync,
#compat-card .compat-intro,
#compat-card .compat-grid{gap:14px}
.search-actions{grid-template-columns:repeat(4,minmax(0,1fr))}
.search-actions button,
.keyboard-actions button{min-height:52px}
.results-nav-card,
.tv-result-item,
.history-item{box-shadow:var(--polish-shadow)}
#keyboardInput{line-height:1.45}
.keyboard-status-row{align-items:start}

.compat-market .maker-grid{gap:10px}
.profile-chip{min-height:44px;padding:0 14px}
.summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.summary::after{
  content:"Expand";
  font-size:12px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:#a7bfd8;
}
details[open] > .summary::after{content:"Collapse"}

@media (max-width:980px){
  .quick-start-strip{grid-template-columns:1fr}
  .hero-stats{grid-template-columns:1fr}
  .search-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:860px){
  .instant-remote-stage{grid-template-columns:1fr;gap:12px}
  .instant-rail{
    grid-template-columns:auto 1fr auto;
    grid-template-rows:auto;
    align-items:center;
    gap:12px;
    padding:12px 14px;
    border-radius:24px;
  }
  .instant-rail-left{order:1}
  .instant-remote-core{order:2}
  .instant-rail-right{order:3}
  .instant-rail-track{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }
  .instant-rail-track button{
    min-height:72px;
    border-radius:22px;
  }
  .instant-rail-mini{min-width:76px;min-height:48px}
}

@media (max-width:720px){
  .app-topbar{grid-template-columns:1fr;padding:14px}
  .top-actions{width:100%;justify-content:space-between}
  .quick-start-step{min-height:64px;padding:12px 14px;border-radius:18px}
  .step-dot{width:30px;height:30px;font-size:13px}
  .section-tabs{top:calc(84px + var(--safe-top));padding:5px}
  .section-tab{min-height:44px;padding:0 14px}
  .card{padding:14px}
  #pair-card .pair-entry{grid-template-columns:1fr;padding:12px}
  #pair-card .pair-help{padding:14px}
  .remote-live-pill{padding:12px 14px}
  .instant-remote-core{padding:14px;border-radius:24px}
  .instant-rail{padding:10px 12px}
  .instant-rail-label{font-size:11px}
  .instant-rail-track button{min-height:68px}
  .instant-top-row button,
  .instant-home-row button,
  .instant-transport button,
  .instant-app-grid button,
  .instant-action-grid button,
  .search-actions button,
  .keyboard-actions button{min-height:50px}
  .search-actions{grid-template-columns:1fr}
  .remote-quick-jumps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%}
  .remote-quick-jumps .jump-chip,
  .remote-quick-jumps .tool-link{min-width:0;padding:0 10px}
}

@media (max-width:480px){
  .brand-block h1{font-size:30px}
  .subtitle{font-size:13px}
  .quick-start-step strong{font-size:13px}
  .quick-start-step small{font-size:12px}
  .section-tab{font-size:12px}
  .remote-quick-jumps{grid-template-columns:1fr}
  .instant-rail{grid-template-columns:1fr}
  .instant-rail-track{grid-template-columns:repeat(2,minmax(0,1fr))}
  .instant-rail-mini{width:100%}
  .summary::after{font-size:11px}
}
