/* PersonaScope V553: result type-card first view + home resident controls */

/* Result: matching type card is the first visual impact on the result screen. */
.result-type-panel{
  margin:0 0 18px;
}
.result-type-panel.hidden{display:none!important}
.result-type-visual-slot{
  margin:0;
  cursor:pointer;
  outline:none;
}
.result-type-visual-slot:focus-visible{
  border-radius:26px;
  box-shadow:0 0 0 3px rgba(218,181,74,.4);
}
.result-type-visual-card{
  position:relative;
  display:grid;
  margin:0;
  padding:0;
  overflow:hidden;
  border-radius:26px;
  background:#fff;
  border:1px solid rgba(138,163,255,.28);
  box-shadow:0 24px 70px rgba(0,0,0,.28);
}
.result-type-visual-heading{
  display:grid;
  gap:5px;
  padding:20px 22px 18px;
  color:#162037;
  background:
    radial-gradient(circle at 92% 0%,rgba(212,175,55,.2),transparent 38%),
    linear-gradient(145deg,#ffffff,#f4f6fb);
  border-bottom:1px solid rgba(20,32,55,.09);
  text-align:left;
}
.result-type-visual-heading span{
  color:#8a6c18;
  font-size:.68rem;
  font-weight:900;
  letter-spacing:.16em;
}
.result-type-visual-heading h1{
  margin:0;
  color:#111827;
  font-size:clamp(1.35rem,5vw,2rem);
  line-height:1.35;
}
.result-type-visual-heading p{
  margin:0;
  color:#687188;
  font-size:.78rem;
  line-height:1.65;
}
.result-type-visual-image{
  display:block;
  width:100%;
  height:auto;
  border-radius:0;
  background:#fff;
}
.result-type-visual-hint{
  position:absolute;
  right:12px;
  top:12px;
  padding:7px 11px;
  border:1px solid rgba(255,255,255,.55);
  border-radius:999px;
  background:rgba(8,14,25,.78);
  color:#fff;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  font-size:.68rem;
  font-weight:800;
  letter-spacing:.02em;
}
.result-type-collapsed{
  width:100%;
  min-height:62px;
  padding:12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  border:1px solid rgba(218,181,74,.32);
  border-radius:18px;
  background:linear-gradient(145deg,rgba(22,34,58,.96),rgba(10,20,37,.96));
  color:#f5f7fb;
  box-shadow:0 16px 42px rgba(0,0,0,.2);
  text-align:left;
  font:inherit;
  cursor:pointer;
}
.result-type-collapsed[hidden]{display:none!important}
.result-type-collapsed span{display:grid;gap:2px;min-width:0}
.result-type-collapsed small{color:#d4bd72;font-size:.64rem;font-weight:900;letter-spacing:.12em}
.result-type-collapsed strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.96rem}
.result-type-collapsed b{flex:0 0 auto;color:#f0d27a;font-size:.75rem}
.result-type-collapsed:focus-visible{outline:2px solid #f0d27a;outline-offset:2px}

/* Keep the requested type-card exception in Simple Mode. */
html.simple-mode-pending #resultTypeVisual:not(.hidden),
body.simple-mode #resultTypeVisual:not(.hidden){display:block!important}
html.simple-mode-pending #resultTypePanel:not(.hidden),
body.simple-mode #resultTypePanel:not(.hidden){display:block!important}

/* Home resident: weekday/time, compact mode, and top/bottom placement. */
.home-resident-card.home-resident-card-top,
.home-resident-card.home-resident-card-bottom{
  width:min(100%,720px);
  margin-left:auto;
  margin-right:auto;
  min-height:clamp(390px,76vw,620px);
}
.home-resident-card.home-resident-card-top{margin-top:18px;margin-bottom:24px}
.home-resident-card.home-resident-card-bottom{margin-top:28px;margin-bottom:0}
.home-resident-card{cursor:default}
.home-resident-card img{object-fit:contain;object-position:center}
.home-resident-clock{
  position:absolute;
  z-index:10;
  top:14px;
  right:14px;
  display:grid;
  justify-items:end;
  gap:2px;
  padding:8px 11px;
  border:1px solid rgba(255,255,255,.16);
  border-radius:15px;
  background:rgba(7,11,20,.74);
  color:#fff;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  pointer-events:none;
}
.home-resident-clock span{font-size:.66rem;font-weight:800;letter-spacing:.06em;color:rgba(255,255,255,.72)}
.home-resident-clock strong{font-size:1rem;line-height:1.1;letter-spacing:.03em}
.home-resident-controls{
  position:absolute;
  z-index:11;
  top:69px;
  right:14px;
  display:flex;
  gap:6px;
}
.home-resident-controls button,
.home-resident-collapsed-actions button{
  min-height:34px;
  padding:6px 9px;
  border:1px solid rgba(255,255,255,.15);
  border-radius:11px;
  background:rgba(7,11,20,.76);
  color:rgba(255,255,255,.88);
  font:inherit;
  font-size:.66rem;
  font-weight:800;
  cursor:pointer;
  backdrop-filter:blur(9px);
  -webkit-backdrop-filter:blur(9px);
}
.home-resident-controls button[aria-pressed="true"],
.home-resident-collapsed-actions button[aria-pressed="true"]{
  border-color:rgba(240,210,122,.58);
  background:rgba(139,101,22,.68);
  color:#fff0b8;
}
.home-resident-controls button:focus-visible,
.home-resident-collapsed-actions button:focus-visible,
.home-resident-expand:focus-visible{outline:2px solid #f0d27a;outline-offset:2px}
.home-resident-bubble{display:block}
.home-resident-collapsed{display:none}

.home-resident-card.is-collapsed{
  min-height:0!important;
  height:auto!important;
  overflow:visible;
  border-radius:18px;
  background:linear-gradient(145deg,rgba(19,32,53,.96),rgba(9,18,33,.96));
  box-shadow:0 14px 38px rgba(0,0,0,.18);
}
.home-resident-card.is-collapsed > :not(.home-resident-collapsed){display:none!important}
.home-resident-card.is-collapsed .home-resident-collapsed{
  min-height:68px;
  padding:11px 12px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
}
.home-resident-collapsed-summary{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}
.home-resident-collapsed-time{
  display:grid;
  gap:2px;
  min-width:72px;
}
.home-resident-collapsed-time span{color:rgba(255,255,255,.65);font-size:.64rem;font-weight:800;letter-spacing:.04em}
.home-resident-collapsed-time strong{color:#fff;font-size:1rem}
.home-resident-expand{
  min-width:0;
  padding:8px 10px;
  border:0;
  border-radius:11px;
  background:rgba(255,255,255,.06);
  color:#f5f7fb;
  font:inherit;
  font-size:.75rem;
  font-weight:850;
  text-align:left;
  cursor:pointer;
}
.home-resident-collapsed-actions{display:flex;gap:6px;justify-content:flex-end}

@media(max-width:640px){
  .result-type-visual-heading{padding:16px 16px 14px}
  .result-type-visual-hint{right:9px;top:9px;font-size:.62rem}
  .home-resident-card.home-resident-card-top,
  .home-resident-card.home-resident-card-bottom{min-height:430px}
  .home-resident-card.home-resident-card-top{margin-top:14px;margin-bottom:18px}
  .home-resident-clock{top:10px;right:10px}
  .home-resident-controls{top:64px;right:10px;gap:5px}
  .home-resident-controls button{padding:6px 8px}
}
@media(max-width:360px){
  .home-resident-card.is-collapsed .home-resident-collapsed{grid-template-columns:1fr}
  .home-resident-collapsed-actions{justify-content:stretch}
  .home-resident-collapsed-actions button{flex:1}
}
@media(max-width:380px){
  .home-resident-meta{max-width:55%}
  .home-resident-controls{flex-wrap:wrap;justify-content:flex-end;max-width:150px}
  .result-type-collapsed strong{font-size:.86rem}
}
@media(prefers-reduced-motion:reduce){
  .result-type-visual-slot,.home-resident-card{scroll-behavior:auto}
}
.result-type-collapsed em{font-style:normal}
.home-resident-card:not(.is-collapsed) .home-cat-event{top:112px}
@media(max-width:560px){.home-resident-card:not(.is-collapsed) .home-cat-event{top:106px}}
