/* Shared Semag shell: warm paper, readable ink, and room for the game. */
:root { --text-secondary: #61705e; --text-label: #64745e; }
.eyebrow { color: var(--text-label); font-size: 10px; }
.hub-topbar, .solo-topbar, .room-topbar { height: 68px; }
.breadcrumb, .solo-mode, .connection { color: var(--text-secondary); font-size: 10px; }
.solo-back > b, .back-link > b { color: var(--text-secondary); font-size: 9px; }
.library-heading p, .solo-heading p, .room-heading p { color: var(--text-secondary); }
.solo-heading, .room-heading { padding-top: 22px; padding-bottom: 22px; }
.solo-heading h1, .room-heading h1 { font-weight: 600; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid #a66536;
  outline-offset: 3px;
}

/* The library uses the whole shelf, with the social controls above it. */
.sidebar { width: 196px; padding: 30px 20px; }
.hub-main { margin-left: 196px; padding: 0 34px; max-width: 1720px; }
.library-heading { padding: 30px 0 26px; }
.library-heading h1 { font-size: 40px; font-weight: 600; }
.library-count { color: var(--text-label); font-size: 10px; }
.library-layout { display: block; }
.rooms-column {
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr;
  gap: 16px;
  margin: 0 0 30px;
}
.rooms-panel, .join-panel, .share-panel { min-height: 0; padding: 20px; border-radius: 7px; }
.rooms-panel, .join-panel { background: #fbf9f2; }
.share-panel { background: #e9eddf; border-style: solid; }
.rooms-panel .panel-heading h2, .join-panel h2, .share-panel > strong { font-size: 17px; font-weight: 600; letter-spacing: -.4px; }
.share-panel > strong { margin: 0; }
.live-label { color: #526f42; font-size: 9px; }
.rooms-list { max-height: 126px; overflow-y: auto; }
.rooms-empty { padding: 16px 0 8px; align-items: flex-start; text-align: left; }
.rooms-empty > svg { display: none; }
.rooms-empty strong { font-size: 13px; color: var(--text-secondary); }
.rooms-empty p, .join-panel p, .share-panel > p { color: var(--text-secondary); font-size: 12px; line-height: 1.6; }
.rooms-empty p { margin: 5px 0 0; }
.room-legend { margin-top: 10px; padding-bottom: 0; font-size: 9px; color: var(--text-secondary); }
.room-item { padding: 9px 0; }
.room-item strong { max-width: none; }
.room-item small { color: var(--text-secondary); }
.room-item button { min-height: 44px; }
.join-panel input { min-height: 44px; font-size: 13px; color: #35573d; }
.join-panel input::placeholder { color: #69795f; }
.join-panel form button { width: 44px; }
.share-panel > p { margin: 6px 0 10px; }
.share-panel code { color: #35573d; font-size: 11px; margin: 0 0 8px; }
.share-panel button { min-height: 44px; padding-top: 8px; color: #35573d; }
.share-panel small { color: var(--text-secondary); font-size: 10px; line-height: 1.5; margin-top: 8px; }
.library-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.shelf-filters { margin: 0; gap: 6px; }
.shelf-filters button { min-height: 40px; color: #56664f; padding: 9px 12px; font-size: 12px; }
.shelf-filters button span { color: #63775a; font-size: 10px; }
.game-search { display: flex; align-items: center; gap: 10px; flex: 0 1 220px; padding: 0 12px; height: 40px; border: 1px solid #ccd3c0; border-radius: 4px; background: #fffdf8; }
.game-search svg { width: 16px; height: 16px; flex-shrink: 0; stroke: #65765e; fill: none; stroke-width: 1.5; }
.game-search input { width: 100%; min-width: 0; border: 0; padding: 9px 0; font-size: 12px; background: transparent; color: #26392e; }
.game-search input::placeholder { color: #65765e; }
.game-search:focus-within { outline: 2px solid #a66536; outline-offset: 2px; }
.game-search input:focus-visible { outline: none; }
.game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.game-card { border-color: #d1d5c6; border-radius: 7px; box-shadow: 0 2px 0 #26392e06; }
.game-card:hover { transform: translateY(-3px); box-shadow: 0 9px 24px #26392e12; }
.game-art { height: auto; aspect-ratio: 15 / 8; }
.skill-cover { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.art-badge { font-size: 8px; letter-spacing: .4px; top: 12px; left: 12px; background: #fffaeae8; color: #344d3a; }
.art-number { display: none; }
.game-card-content { padding: 20px; }
.game-category { color: var(--text-label); font-size: 9px; letter-spacing: .6px; }
.game-category > span:last-child { font-size: 9px; }
.game-card h2 { font-size: 23px; font-weight: 600; margin: 11px 0 8px; }
.game-card p { font-size: 13px; color: var(--text-secondary); min-height: 42px; margin-bottom: 18px; }
.game-card-bottom { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.game-chip { justify-self: start; font-size: 9px; color: #536c47; background: #edf0e4; }
.game-card-bottom button { min-height: 44px; width: 100%; justify-content: space-between; padding: 11px 13px; border: 1px solid #c4d1b7; border-radius: 4px; background: #edf2e5; font-size: 13px; color: #315637; }
.game-card-bottom button:hover { background: #dce8ce; color: #24472e; }
.shelf-empty { padding: 40px 20px; border: 1px dashed #bcc9ae; border-radius: 7px; text-align: center; color: var(--text-secondary); }

/* Solo session actions remain next to the HUD on every screen size. */
.solo-layout { grid-template-columns: minmax(0, 1fr) 250px; gap: 24px; }
.solo-hud { display: grid; grid-template-columns: 1fr auto 1fr auto; min-height: 76px; padding: 14px 20px; gap: 20px; }
.solo-score { min-width: 0; }
.solo-score > span { color: var(--text-label); font-size: 10px; letter-spacing: .6px; }
.solo-score > strong { font-size: 25px; color: #35573d; }
.solo-best > strong { color: #916837; }
.solo-play-status { font-size: 9px; color: #556d48; }
.solo-session-actions { display: flex; align-items: center; gap: 8px; }
.solo-session-actions button { width: auto; min-height: 40px; margin: 0; padding: 9px 12px; gap: 12px; font-size: 12px; white-space: nowrap; }
.solo-session-actions .solo-secondary { background: #eef2e6; color: #3e603e; }
.solo-sidebar { gap: 14px; }
.solo-controls-panel, .solo-rules-panel { padding: 20px; }
.solo-sidebar h2 { font-weight: 600; font-size: 15px; }
.solo-control-line > span:last-child { color: var(--text-secondary); font-size: 12px; }
kbd { color: #526b43; }
.solo-controls-panel > p, .solo-rules-panel li, .solo-rules-panel small { color: var(--text-secondary); }
.solo-shortcuts { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 10px !important; line-height: 1.8 !important; }
.solo-shortcuts > span { margin: 0 1px; }
.solo-rules-panel summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 600; }
.solo-rules-panel summary::-webkit-details-marker { display: none; }
.solo-rules-panel h2 { margin-top: 18px; }
.help-toggle { color: #62774e; font: 20px var(--mono); transition: transform .15s; }
.solo-rules-panel[open] .help-toggle { transform: rotate(45deg); }
.solo-sidebar > .solo-record-note { padding: 4px 4px 0; margin: 0; border: 0; }
.solo-record-note p { color: var(--text-secondary); font-size: 11px; }
.solo-objective { color: #536c45; }
.solo-seat { color: #4e6943; }

/* Readable room information, without changing the game's telemetry colors. */
.room-heading p, .party-player span, .party-panel #ready-note, .control-line > span:last-child,
.controls-panel p, .board-instructions p, .board-instructions li, .card-instructions p, .card-instructions li { color: var(--text-secondary); }
.room-name-label, .room-code-button > span, .panel-title > span { color: var(--text-label); font-size: 9px; }
.room-invite code { color: #466838; }
.controls-panel h2, .panel-title h2 { font-weight: 600; }
.objective-bar { color: #536c45; }

@media (min-width: 801px) and (pointer: fine) {
  #solo-touch-help { display: none; }
}
@media (min-width: 1600px) {
  .hub-main { padding: 0 50px; }
  .game-art { height: auto; }
}
@media (max-width: 1200px) {
  .sidebar { width: 175px; padding: 30px 17px; }
  .hub-main { margin-left: 175px; padding: 0 26px; }
  .game-card-content { padding: 16px; }
  .game-category { font-size: 8px; }
  .game-category > span:last-child { font-size: 8px; }
  .game-card h2 { font-size: 21px; }
  .game-grid { gap: 16px; }
  .library-toolbar { align-items: flex-start; }
  .game-search { flex-basis: 180px; }
  .solo-hud { gap: 12px; padding: 14px 16px; }
  .solo-session-actions button { padding: 9px; gap: 8px; }
}
@media (max-width: 1000px) {
  .rooms-column { grid-template-columns: 1fr 1fr; }
  .rooms-panel { grid-row: auto; }
  .share-panel { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; gap: 5px 20px; }
  .share-panel > strong, .share-panel > p, .share-panel code, .share-panel small { grid-column: 1; }
  .share-panel button { grid-column: 2; grid-row: 1 / 4; gap: 20px; border: 0; align-self: center; }
  .share-panel > p { display: none; }
  .share-panel small { margin: 0; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .solo-hud { grid-template-columns: 1fr auto 1fr; }
  .solo-session-actions { grid-column: 1 / -1; justify-content: flex-end; border-top: 1px solid #e0e4d6; padding-top: 10px; }
}
@media (max-width: 800px) {
  .solo-layout { grid-template-columns: 1fr; gap: 18px; }
  .solo-sidebar { display: grid; grid-template-columns: 1fr 1fr; }
  .solo-controls-panel { grid-row: span 2; }
  .solo-session-actions { justify-content: space-between; }
  .solo-session-actions button { flex: 1; min-height: 44px; }
  .solo-topbar, .room-topbar { height: 62px; }
}
@media (max-width: 700px) {
  .sidebar { width: 100%; height: 76px; padding: 15px 20px; }
  .hub-main { margin: 0; padding: 0 20px; }
  .hub-topbar { height: 62px; }
  .rooms-column { margin-bottom: 24px; gap: 12px; }
  .rooms-panel, .join-panel, .share-panel { padding: 16px; }
  .library-toolbar { flex-direction: column; gap: 14px; }
  .game-search { width: 100%; flex-basis: auto; }
  .shelf-filters { width: 100%; }
  .shelf-filters button { min-height: 40px; }
  .game-category > span:last-child { display: none; }
  .art-badge { font-size: 7px; top: 9px; left: 9px; }
  .game-card h2 { font-size: 21px; }
}
@media (max-width: 480px) {
  .hub-main { padding: 0 16px; }
  .library-heading { padding: 24px 0 22px; }
  .library-heading h1 { font-size: 34px; }
  .library-heading p { max-width: 270px; line-height: 1.6; }
  .rooms-column { grid-template-columns: 1fr; }
  .rooms-panel { padding: 14px 16px; }
  .rooms-panel .panel-heading h2 { font-size: 15px; }
  .rooms-empty { padding: 6px 0 0; }
  .rooms-empty strong, .room-legend { display: none; }
  .rooms-empty p { margin: 0; font-size: 11px; }
  .join-panel { padding: 16px; }
  .join-panel h2 { font-size: 16px; }
  .join-panel p { display: none; }
  .join-panel form { margin-top: 10px; }
  .share-panel { grid-column: auto; padding: 13px 16px; }
  .share-panel > strong, .share-panel small { display: none; }
  .share-panel code { font-size: 10px; margin: 0; align-self: center; }
  .share-panel button { grid-row: 1; min-height: 44px; padding: 0; font-size: 11px; gap: 10px; }
  .game-grid { grid-template-columns: 1fr; gap: 18px; }
  .game-card-content { padding: 20px; }
  .game-category, .game-category > span:last-child { font-size: 9px; }
  .game-category > span:last-child { display: flex; }
  .game-card h2 { font-size: 24px; }
  .game-card p { min-height: 0; font-size: 13px; }
  .art-badge { font-size: 8px; top: 12px; left: 12px; }
  .solo-heading { padding: 20px 0; }
  .solo-heading h1 { font-size: 28px; }
  .solo-heading p { line-height: 1.6; }
  .solo-seat { display: none; }
  .solo-hud { padding: 14px; gap: 12px; }
  .solo-score > span { font-size: 9px; }
  .solo-play-status { font-size: 8px; letter-spacing: .4px; }
  .solo-sidebar { grid-template-columns: 1fr; }
  .solo-controls-panel { grid-row: auto; }
  .solo-controls-panel, .solo-rules-panel { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .help-toggle { transition: none; }
}
.card-practice-link { display: flex; align-items: center; justify-content: space-between; min-height: 40px; margin-top: 9px; padding: 8px 12px; border: 1px solid #d4dccb; border-radius: 4px; color: #496346; text-decoration: none; font: 12px Arial, sans-serif; }
.card-practice-link:hover { background: #edf2e5; color: #24472e; }
.card-practice-link:focus-visible { outline: 3px solid #ba8b4d; outline-offset: 3px; }
