/* The approved Game Room design, scoped to Tools and Games. */
:is(.hm-room-directory,.hm-room-detail) {
  --room-paper:#faf6ee; --room-card:#fffdf9; --room-ink:#5f2e1a; --room-muted:#9b4b26;
  --room-line:#e2d7c5; --room-green:#7c3c20; --room-soft:#f4e2cb; --room-warm:#f3e7cf; --room-clay:#815236;
  background:var(--room-paper); color:var(--room-ink);
}
.hm-room-directory .room-shell { width:min(calc(100% - 56px),1080px); margin:30px auto 60px; }
.hm-room-directory .room-hero {
  display:flex; flex-direction:column; align-items:center; gap:14px; text-align:center; padding:39px 24px;
  border:1px solid var(--room-line); border-radius:28px;
  background:radial-gradient(ellipse at 97% 0,var(--room-warm),transparent 56%),radial-gradient(ellipse at 0 100%,var(--room-soft),transparent 45%),var(--room-card);
}
.hm-room-directory .room-hero :is(h1,p) { margin:0; }
.hm-room-directory .room-kicker,.hm-room-detail .room-manuscript-label { text-transform:uppercase; font:600 .75rem/1.4 system-ui; letter-spacing:.13em; color:var(--room-clay); }
.hm-room-directory .room-hero h1 { font:400 clamp(2rem,4.4vw,3.25rem)/1.1 Georgia,serif; letter-spacing:-.035em; text-wrap:balance; }
.hm-room-directory .room-intro { max-width:560px; font-size:1rem; line-height:1.55; color:var(--room-muted); }
.hm-room-directory .room-primary,.hm-room-directory .room-filter {
  min-height:44px; border-radius:24px; font:600 .875rem/1.3 system-ui; border:1px solid var(--room-line); color:var(--room-ink); background:var(--room-card); padding:9px 16px;
}
.hm-room-directory .room-primary,.hm-room-directory .room-filter[aria-pressed=true] { background:var(--room-green); border-color:var(--room-green); color:#fffdf9; }
.hm-room-directory .room-primary { padding-inline:22px; }
.hm-room-directory .room-primary:disabled { opacity:.6; cursor:default; }
.hm-room-directory .room-search { width:min(100%,380px); min-height:44px; padding:9px 17px; border:1px solid var(--room-line); border-radius:24px; background:var(--room-card); color:var(--room-ink); font:1rem system-ui; }
.hm-room-directory .room-filters { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin:22px 0 12px; }
.hm-room-directory .room-list-header { display:flex; align-items:center; justify-content:space-between; min-height:44px; gap:12px; margin:0 0 9px; }
.hm-room-directory .room-count,.hm-room-directory .room-players { font: .875rem/1.4 system-ui; color:var(--room-muted); margin:0; }
.hm-room-directory .room-players { display:flex; align-items:center; gap:8px; }
.hm-room-directory .room-players select { min-height:44px; border:1px solid var(--room-line); border-radius:10px; background:var(--room-card); color:var(--room-ink); padding:6px 10px; font:inherit; }
.hm-room-directory .room-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.hm-room-directory .room-card { display:flex; flex-direction:column; gap:9px; min-width:0; padding:19px; border:1px solid var(--room-line); border-radius:20px; background:var(--room-card); color:var(--room-ink); text-decoration:none; transition:border-color .15s,box-shadow .15s; }
.hm-room-directory .room-card:hover { border-color:var(--room-green); box-shadow:0 6px 16px #7c3c200f; }
.hm-room-directory .room-icon { width:43px; height:43px; display:grid; place-items:center; border-radius:13px; background:var(--room-soft); }
.hm-room-directory .room-card:nth-child(3n) .room-icon { background:var(--room-warm); }
.hm-room-directory .room-icon img { display:block; width:25px; height:25px; }
.hm-room-directory .room-card h2 { font:400 1.25rem/1.23 Georgia,serif; margin:0; overflow-wrap:anywhere; }
.hm-room-directory .room-description { color:var(--room-muted); font:.9375rem/1.45 system-ui; margin:0; }
.hm-room-directory .room-card-footer { display:flex; align-items:center; justify-content:space-between; gap:6px 8px; flex-wrap:wrap; margin-top:auto; padding-top:5px; }
.hm-room-directory .room-tag { display:inline-block; background:var(--room-soft); color:var(--room-green); font:.75rem/1.4 system-ui; padding:4px 8px; border-radius:20px; }
.hm-room-directory .room-action { font:650 .8125rem/1.4 system-ui; color:var(--room-green); white-space:nowrap; }
.hm-room-directory .room-prep { color:var(--room-clay); font:.75rem/1.4 system-ui; }
.hm-room-directory .room-empty { grid-column:1/-1; text-align:center; padding:28px; }
.hm-room-directory .room-all { display:block; margin:22px auto 0; }
.hm-room-directory .room-all[hidden] { display:none; }
.hm-room-directory :focus-visible { outline:3px solid var(--room-green); outline-offset:3px; }
.hm-room-detail :is(.game-detail,.tool-detail) { max-width:1120px; }
.hm-room-detail .detail-kicker { display:none; }
.hm-room-detail :is(.game-heading,.tool-heading) { display:flex!important; align-items:flex-start; flex-wrap:wrap; gap:12px; padding:6px 0 18px!important; margin:0!important; }
.hm-room-detail .room-detail-icon { padding:9px; width:46px; height:46px; border-radius:14px; background:var(--room-soft); flex:none; }
.hm-room-detail :is(.game-heading,.tool-heading)>div:first-of-type { flex:1 1 280px; min-width:0; }
.hm-room-detail :is(.game-heading,.tool-heading) h1 { color:var(--room-ink); font:400 clamp(1.65rem,3vw,2.45rem)/1.15 Georgia,serif; margin:0 0 6px; overflow-wrap:anywhere; }
.hm-room-detail .detail-lead { color:var(--room-muted); }
.hm-room-detail .du-session-toolbar { margin:0; }
.hm-room-detail .du-session-toolbar button { border:1px solid var(--room-line); border-radius:24px; background:var(--room-card); font:.875rem/1.3 system-ui; }
.hm-room-detail .du-workspace { margin-top:0!important; }
.hm-room-detail .game-shell { max-width:none; border:1px solid var(--room-line); border-radius:24px; background:var(--room-card); padding:22px!important; }
.hm-room-detail[data-room-phase=playing] .game-shell-header { display:none; }
.hm-room-detail[data-room-phase=playing][data-room-paused=false] #experience>.task-real-status { display:none; }
.hm-room-detail #experience { min-width:0; }
.hm-room-detail.hm-game-stage #experience { padding:0!important; }
.hm-room-detail #experience>.status { margin:0 0 10px!important; color:var(--room-clay); font:600 .8125rem/1.4 system-ui; }
.hm-room-detail #experience>h2 { font:400 clamp(1.2rem,2.2vw,1.8rem)/1.24 Georgia,serif; margin:0 0 14px!important; }
.hm-room-detail .play-area { padding:0!important; margin:0!important; min-height:0!important; }
.hm-room-detail .play-area:not(.room-host-stage) textarea { min-height:76px!important; }
.hm-room-detail .play-area .field { margin:0 0 10px!important; }
.hm-room-detail .play-area .error:empty { display:none; }
.hm-room-detail .play-area.stack { gap:12px!important; }
.hm-room-detail .task-manuscript { background:var(--room-paper)!important; border:0!important; border-left:3px solid var(--room-clay)!important; border-radius:16px; min-height:0!important; margin:0 0 14px!important; padding:20px!important; }
.hm-room-detail .task-manuscript p { margin:0 0 8px!important; font:400 1.2rem/1.55 Georgia,serif!important; }
.hm-room-detail .task-manuscript .room-manuscript-label { font:600 .75rem/1.4 system-ui!important; margin:0 0 10px!important; }
.hm-room-detail .task-current-contribution { padding:14px!important; margin:0!important; border-radius:14px; background:var(--room-card)!important; }
.hm-room-detail .task-current-contribution h3 { margin:0 0 8px!important; font-size:1.1rem!important; }
.hm-room-detail .task-current-contribution form { gap:8px!important; }
.hm-room-detail .task-current-contribution textarea { height:80px; }
.hm-room-detail .task-current-contribution .button { margin:0 5px 5px 0; }
.hm-room-detail .game-privacy { color:var(--room-muted); margin:12px 0 0; }
.hm-room-detail .task-match-table { padding:0!important; }
.hm-room-detail :is(.task-match-left,.task-match-right) button { min-height:44px; white-space:normal; overflow-wrap:anywhere; }
.hm-room-detail[data-room-id=WF02] #experience>.task-live-question { max-width:none!important; background:radial-gradient(ellipse at 100% 0,var(--room-warm),transparent 58%),var(--room-card)!important; border:1px solid var(--room-line); border-radius:24px; }
.hm-room-detail[data-room-id=WF02] #experience>.task-live-question h3 { color:var(--room-ink); font:400 clamp(1.45rem,3vw,2.05rem)/1.4 Georgia,serif!important; }
.hm-room-detail .room-repeated-prompt { display:none!important; }
.hm-room-detail[data-room-id=WF02] #experience>.task-live-question { text-align:center; padding:clamp(18px,5vw,40px)!important; }
.hm-room-detail[data-room-id=WF02] #experience>.task-live-question :is(h3,p) { margin:8px auto!important; max-width:34em; }
.hm-room-detail[data-room-id=WF02] #experience>.task-live-question + .actions { display:flex; justify-content:center; flex-wrap:wrap; gap:8px; }
.hm-room-detail .room-question-next { color:#fffdf9!important; border-color:var(--room-green)!important; background:var(--room-green)!important; }
.hm-room-detail .room-question-options { flex:1 0 100%; border-top:1px solid var(--room-line); margin:6px 0 0; }
.hm-room-detail .room-question-options summary { text-align:center; }
.hm-room-detail .room-secondary-actions { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; }
.hm-room-detail #experience .actions .button { min-height:44px; }
@media(max-width:880px) { .hm-room-directory .room-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:640px) {
  .hm-room-directory .room-shell { width:calc(100% - 24px); margin:15px auto 40px; }
  .hm-room-directory .room-hero { padding:23px 15px; border-radius:21px; gap:10px; }
  .hm-room-directory .room-intro { font-size:.9375rem; }
  .hm-room-directory .room-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
  .hm-room-directory .room-card { padding:12px; gap:7px; border-radius:14px; }
  .hm-room-directory .room-card h2 { font-size:1.06rem; }
  .hm-room-directory .room-description { font-size:.875rem; }
  .hm-room-directory .room-filters { justify-content:flex-start; margin-top:14px; gap:6px; }
  .hm-room-directory .room-filter { padding-inline:11px; }
  .hm-room-directory .room-card-footer { align-items:flex-start; flex-direction:column; }
  .hm-room-detail .room-detail-icon { width:38px; height:38px; padding:7px; }
  .hm-room-detail :is(.game-heading,.tool-heading)>div:first-of-type { flex-basis:calc(100% - 56px); }
  .hm-room-detail .game-shell { padding:12px!important; border-radius:14px; }
  .hm-room-detail .task-manuscript { max-height:220px; overflow:auto; padding:13px!important; }
  .hm-room-detail .task-manuscript p { font-size:1.05rem!important; }
  .hm-room-detail .task-current-contribution { padding:11px!important; }
  .hm-room-detail .room-host-stage .op-editor-row { grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:8px!important; padding:10px!important; }
  .hm-room-detail .room-host-stage .op-editor-row>label { grid-column:auto!important; min-width:0; }
  .hm-room-detail .room-host-stage .op-editor-row :is(input,select) { width:100%; min-width:0; }
}
@media print { .hm-room-detail .room-detail-icon { display:none!important; } }
