:root{
  color-scheme:light;
  --bg:#4b4b4b;
  --card:#1f1f1f;
  --panel:#161616;
  --panel2:#111;
  --text:#f3f3f3;
  --muted:#bdbdbd;
  --line:#3a3a3a;
  --blue:#bfe5ff;
  --gold:#ffeaa0;
  --green:#b8f0c2;
}

*{box-sizing:border-box;}
body{
  margin:0;
  min-height:100vh;
  font-family:Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255,234,160,0.16), transparent 32%),
    radial-gradient(circle at top right, rgba(191,229,255,0.16), transparent 34%),
    var(--bg);
  color:var(--text);
}

.room-shell{
  min-height:100vh;
  padding:22px;
  display:flex;
  justify-content:center;
  align-items:flex-start;
}
.room-card{
  width:min(1280px, 100%);
  background:var(--card);
  border:2px solid #000;
  border-radius:14px;
  padding:20px;
  box-shadow:0 14px 36px rgba(0,0,0,0.45);
}
.room-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:16px;
}
h1{margin:0;font-size:40px;line-height:1;}
#account-line{margin:8px 0 0;color:var(--muted);}
.version-pill{
  background:#111;
  border:1px solid var(--line);
  border-radius:999px;
  padding:7px 10px;
  color:var(--gold);
  white-space:nowrap;
}
.panel{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:10px;
  padding:14px;
  margin-bottom:14px;
}
.panel-title{color:#ddd;font-weight:bold;margin-bottom:10px;}
.identity-grid,
.prepared-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:10px;
}
.identity-grid div,
.prepared-grid div{
  background:var(--panel2);
  border:1px solid var(--line);
  border-radius:8px;
  padding:10px;
  min-width:0;
}
.identity-grid span,
.prepared-grid span{
  display:block;
  color:var(--muted);
  font-size:13px;
  margin-bottom:4px;
}
.identity-grid strong,
.prepared-grid strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.identity-actions{margin-top:12px;}
.room-entry-row,
.room-link-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.room-entry-row input{flex:1 1 220px;}
.room-entry-row .description-input{flex:1 1 260px;}
.room-entry-row select{flex:0 0 120px;}
input,
select{
  border:1px solid var(--line);
  border-radius:8px;
  background:#0e0e0e;
  color:var(--text);
  padding:11px;
  font-size:16px;
}
button,
.button-link{
  border:0;
  border-radius:8px;
  padding:11px 14px;
  background:#111;
  color:#fff;
  font:inherit;
  cursor:pointer;
  text-decoration:none;
  display:inline-block;
}
button.primary{background:#154f85;}
#logout-button{background:#9f2b2b;color:#ffeaa0;}

button.primary.ready:not(:disabled){
  background:#1f7a3a;
  color:#fff;
  box-shadow:0 0 0 2px rgba(184,240,194,0.45) inset;
}
button:disabled{opacity:0.45;cursor:not-allowed;}
button:hover:not(:disabled),
.button-link:hover{filter:brightness(1.15);}
.room-note{color:var(--muted);margin:12px 0 0;}
.recent-list{display:grid;gap:8px;}
.recent-room{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  background:var(--panel2);
  border:1px solid var(--line);
  border-radius:8px;
  padding:8px;
}
.recent-room span{color:var(--muted);}
.recent-room strong{color:var(--text);}
.recent-room small{display:block;color:var(--muted);margin-top:3px;}
.footer-links{display:flex;gap:12px;flex-wrap:wrap;padding-top:4px;}
.footer-links a{color:var(--blue);text-decoration:none;}
.footer-links a:hover{filter:brightness(1.2);}
@media (max-width:760px){
  .identity-grid,
  .prepared-grid{grid-template-columns:1fr;}
}
@media (max-width:480px){
  .room-shell{padding:10px;}
  h1{font-size:32px;}
}

.recovery-code-line{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:10px;}
.recovery-code-line strong{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:1.05rem;letter-spacing:.08em;background:#f6f1e8;border:1px solid var(--border);border-radius:8px;padding:8px 10px;}

button.play-button{
  background:#2f8f4b;
  color:#f8fff8;
  box-shadow:0 0 0 2px rgba(184,240,194,0.35) inset;
}
button.watch-button{
  background:#3a8f52;
}

.recent-room-main{min-width:0;flex:1;}
.recent-room-actions{flex:0 0 auto;display:flex;justify-content:flex-end;}
