/* «Boards» (/pizarras): the saved ones and the unsaved one as cards, then a new board and the templates in a smaller row. */
.saved-boards-page { display: grid; gap: 18px; }
.saved-boards-page [hidden] { display: none !important; }
.sb-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.sb-head h1 { margin: 0; font-size: clamp(28px, 4vw, 38px); color: var(--brand-navy); }
.sb-head p { margin: 6px 0 0; color: var(--muted); max-width: 60ch; }
.sb-head .sb-count { margin: 0; font-weight: 600; color: var(--brand-navy-2); }
.sb-tools { display: flex; gap: 12px; flex-wrap: wrap; }
.sb-tools label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.sb-tools select { min-height: 42px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--fresco-radius-sm); background: var(--surface); color: var(--text); font: inherit; font-weight: 500; }
.sb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.sb-card { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--fresco-radius); box-shadow: var(--shadow-card); color: var(--text); text-decoration: none; }
.sb-new { min-height: 210px; justify-content: flex-end; gap: 2px; padding: 20px; background: var(--fresco-primary); border-color: var(--fresco-primary); color: #fff; }
.sb-new strong { font-size: 20px; }
.sb-new span:last-child { color: var(--fresco-primary-soft); }
.sb-new-plus { position: absolute; top: 16px; right: 18px; display: grid; place-items: center; width: 44px; height: 44px; border: 2px solid #fff; border-radius: 50%; font-size: 28px; line-height: 1; }
.sb-new:hover, .sb-new:focus-visible { background: var(--fresco-primary-hover); }
.sb-open { position: relative; display: block; border-radius: 11px 11px 0 0; overflow: hidden; }
.sb-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: #ffffff; overflow: hidden; }
.sb-thumb > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.sb-thumb-shapes { position: absolute; inset: 0; width: 100%; height: 100%; }
.sb-thumb-card { position: absolute; border-radius: 4px; background: #fff; border: 1px solid #cfc3ea; }
.sb-thumb-game, .sb-thumb-video { background: var(--fresco-primary); border-color: var(--fresco-primary); }
.sb-thumb-image { background: #d9efff; border-color: #a9cdea; }
.sb-thumb-timer, .sb-thumb-names, .sb-thumb-score { background: #fff3b0; border-color: #e7d36b; }
.sb-thumb-sticker { background: #ffd9e6; border-color: #f0a8c0; border-radius: 50%; }
.sb-thumb-ink { position: absolute; left: 12%; right: 40%; bottom: 14%; height: 3px; border-radius: 3px; background: #cf334b; transform: rotate(-6deg); }
.sb-thumb.is-dark .sb-thumb-card { border-color: #ffffff66; }
.sb-warn { position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 8px; background: var(--fresco-warning-soft); color: var(--fresco-warning-ink); font-size: 12px; font-weight: 600; }
.sb-meta { display: grid; gap: 4px; padding: 12px 14px 14px; }
.sb-meta p { margin: 0; font-size: 13px; color: var(--muted); }
.sb-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.sb-title > a { min-width: 0; color: var(--brand-navy); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.sb-title > a:hover { text-decoration: underline; }
.sb-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.sb-level, .sb-student { padding: 2px 8px; border-radius: 8px; background: var(--accent-purple-soft); color: var(--fresco-primary); font-size: 12px; font-weight: 600; }
.sb-student { background: var(--fresco-success-soft); color: var(--fresco-success); }
.sb-menu { position: relative; flex: none; }
.sb-menu summary { list-style: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; cursor: pointer; font-size: 20px; font-weight: 600; color: var(--muted); }
.sb-menu summary::-webkit-details-marker { display: none; }
.sb-menu summary:hover, .sb-menu[open] summary { background: var(--surface-soft); }
.sb-menu > div { position: absolute; right: 0; top: 34px; z-index: 5; display: grid; min-width: 170px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--fresco-radius-sm); box-shadow: var(--shadow-panel); }
.sb-menu > div > :is(a, button) { padding: 9px 10px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; }
.sb-menu > div > :is(a, button):hover { background: var(--surface-soft); }
.sb-menu [data-sb-remove] { color: var(--fresco-danger); }
.sb-rename { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.sb-rename input { flex: 1 1 100%; min-height: 36px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.sb-rename button { padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; font-weight: 500; cursor: pointer; }
.sb-rename button[type=submit] { background: var(--fresco-primary); border-color: var(--fresco-primary); color: #fff; }
.sb-status { margin: 0; color: var(--muted); font-weight: 500; }
.sb-section { display: grid; gap: 10px; margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.saved-boards-page h2 { margin: 0; font-size: 20px; color: var(--brand-navy); }
.sb-section h2 { font-size: 17px; color: var(--muted); }
.sb-templates { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.sb-templates .sb-card { border-radius: var(--fresco-radius); }
.sb-templates .sb-open { border-radius: 11px 11px 0 0; }
.sb-templates .sb-thumb { aspect-ratio: 16 / 7; }
.sb-templates .sb-new { min-height: 0; padding: 12px; }
.sb-templates .sb-new strong { font-size: 15px; }
.sb-templates .sb-new-plus { width: 32px; height: 32px; font-size: 20px; top: 10px; right: 10px; }
.sb-template .sb-meta { gap: 0; padding: 6px 10px 8px; }
.sb-template .sb-meta strong { color: var(--brand-navy); font-size: 14px; }
.sb-template .sb-meta span { font-size: 12px; color: var(--muted); }
.sb-template:hover, .sb-template:focus-visible { border-color: var(--fresco-primary); }
.sb-mine-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.sb-tools label[hidden] { display: none; }
.sb-status:empty { display: none; }
@media (max-width: 520px) { .sb-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; } .sb-new { min-height: 150px; } }
