/* Room card and the Join window, shared by the wall (wall.css variables) and the sign-in page (login.css). */
.room-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  padding: 14px 12px 16px; margin: 4px 0 10px; border: var(--border, 1px solid var(--line)); border-radius: calc(var(--radius, 18px) * 0.8);
}
.room-card b { font-size: 16px; }
.room-sub { color: var(--muted); font-size: 13px; }
.room-kicker { font: 600 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.room-name { font-size: 20px !important; }
.room-card.in { align-items: flex-start; text-align: left; }
.tap-btn { background: none; border: 0; padding: 0; cursor: pointer; color: var(--text); border-radius: 12px; }
.tap-btn:focus-visible { outline: 2px solid var(--accent, #111); outline-offset: 4px; }
.tap-art { width: 190px; height: 104px; display: block; }
.tap-hand { animation: tap-hand 2.6s ease-in-out infinite; }
.tap-ring { opacity: 0; transform-origin: 170px 54px; animation: tap-ring 2.6s ease-out infinite; }
.tap-led { animation: tap-led 2.6s steps(1) infinite; }
@keyframes tap-hand { 0%, 12% { transform: translateX(0); } 38%, 52% { transform: translateX(18px); } 78%, 100% { transform: translateX(0); } }
@keyframes tap-ring { 0%, 38% { opacity: 0; transform: scale(0.8); } 44% { opacity: 0.9; transform: scale(1); } 75%, 100% { opacity: 0; transform: scale(2); } }
@keyframes tap-led { 0%, 40% { opacity: 0.25; } 41%, 70% { opacity: 1; } 71%, 100% { opacity: 0.25; } }
.tap-card { fill: var(--panel); }
.tap-crease { stroke: var(--panel); }
.done { color: var(--known, #16a35a); }
body[data-theme="minimal"] .done { color: #16a35a; }
.done-art { width: 64px; height: 64px; display: block; margin-bottom: 4px; }
.done-ring { stroke-dasharray: 252; stroke-dashoffset: 252; animation: draw 0.6s ease-out forwards; }
.done-check { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw 0.35s 0.45s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.room-join {
  margin-top: 10px; min-height: 40px; padding: 0 22px; font: 600 15px var(--font); color: var(--bg); background: var(--text);
  border: 0; border-radius: 999px; cursor: pointer;
}
.room-make { margin-top: 4px; background: none; border: 0; color: var(--muted); font: 13px var(--font); text-decoration: underline; cursor: pointer; padding: 6px; }
.room-make:hover, .room-make:focus-visible { color: var(--text); outline: none; }
.room-form { display: flex; flex-direction: column; align-items: stretch; gap: 8px; width: 100%; text-align: left; }
.room-form label { display: flex; flex-direction: column; gap: 4px; font: 600 12px var(--font); color: var(--muted); }
.room-form input {
  min-height: 38px; padding: 6px 12px; font: 15px var(--font); color: var(--text); background: var(--bg);
  border: var(--border, 1px solid var(--line)); border-radius: 12px;
}
.room-form .room-join { align-self: flex-start; }
.room-card.choose { align-items: stretch; text-align: left; gap: 8px; }
.room-option {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; cursor: pointer; text-align: left;
  color: var(--text); background: var(--panel); border: var(--border, 1px solid var(--line)); border-radius: calc(var(--radius, 18px) * 0.7);
  font: 15px var(--font); transition: border-color 0.15s, transform 0.15s;
}
.room-option:hover, .room-option:focus-visible { border-color: var(--text); outline: none; transform: translateY(-1px); }
.room-option-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--tile, #f2f2f2); flex: none; }
body[data-theme="minimal"] .room-option-icon { background: #f2f2f2; }
.room-option-text b { display: block; font-size: 15px; }
.room-option-text small { color: var(--muted); font-size: 13px; }
.room-more { display: grid; gap: 6px; width: 100%; margin-top: 12px; }
.room-more .room-option { padding: 8px 10px; }
.room-more .room-option-icon { width: 34px; height: 34px; }

/* Join a room: a small window over the page */
.room-modal {
  position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px;
  background: rgba(0, 0, 0, 0.28); animation: fade 0.2s ease-out;
}
.room-window {
  position: relative; width: min(340px, 100%); display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 26px 22px 22px; text-align: center; color: var(--text);
  background: var(--panel); border: var(--border, 1px solid var(--line)); border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18); animation: pop 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.room-window .tap-art { width: 240px; height: 131px; }
.room-title { font-size: 18px; }
.room-x {
  position: absolute; top: 8px; right: 8px; width: 38px; height: 38px; border: 0; background: none;
  color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; border-radius: 50%;
}
.room-x:hover, .room-x:focus-visible { color: var(--text); outline: none; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(0.97); } }
@media (prefers-reduced-motion: reduce) { .room-modal, .room-window, .tap-hand, .tap-ring, .tap-led, .done-ring, .done-check { animation: none !important; } .done-ring, .done-check { stroke-dashoffset: 0; } }

/* the first-visit window: a welcome and two big options */
.room-window.choose { align-items: stretch; text-align: left; gap: 10px; padding-top: 30px; }
.room-title.big { font-size: 24px; }
.room-window.choose .room-sub { margin-bottom: 6px; }
.room-sub.small { font-size: 12px; text-align: center; }
.room-option.big { padding: 16px; }
.room-option.big .room-option-icon { width: 52px; height: 52px; border-radius: 14px; }
.room-option.big b { font-size: 17px; }

/* the same steps drawn inside the sign-in card */
.room-inline { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 16px; padding: 18px 16px; text-align: center;
  border: var(--border, 1px solid var(--line)); border-radius: 20px; animation: pop 0.25s ease-out; }
.room-inline.choose { align-items: stretch; text-align: left; gap: 10px; }
.room-inline .room-title.big { font-size: 20px; }
.room-inline .tap-art { width: 230px; height: 126px; }
#room-slot.room-inline.choose { border: 0; padding: 0; margin-top: 8px; }   /* the sign-in card is already the frame */
