/* PL: Globalne zmienne motywu i wspólna paleta kolorów aplikacji.
   EN: Global theme variables and the shared application color palette. */
:root {
    --bg: #0a0a0a;
    --bg-2: #11131a;
    --surface: rgba(12, 16, 28, 0.84);
    --surface-strong: rgba(16, 21, 36, 0.96);
    --surface-soft: rgba(255, 255, 255, 0.05);
    --card: rgba(23, 29, 48, 0.9);
    --card-2: rgba(19, 25, 42, 0.96);
    --primary: #5b5cf0;
    --primary-2: #7c3aed;
    --accent: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --text: #f8fafc;
    --muted: #93a0ba;
    --line: rgba(255, 255, 255, 0.09);
    --glow: rgba(91, 92, 240, 0.28);
    --shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --transition: 180ms ease;
}

/* PL: Nadpisania dla jasnego motywu interfejsu.
   EN: Overrides for the light interface theme. */
body.light-theme {
    --bg: #edf2ff;
    --bg-2: #f8fbff;
    --surface: rgba(255, 255, 255, 0.84);
    --surface-strong: rgba(255, 255, 255, 0.98);
    --surface-soft: rgba(99, 102, 241, 0.08);
    --card: rgba(255, 255, 255, 0.92);
    --card-2: rgba(245, 247, 255, 0.98);
    --text: #0f172a;
    --muted: #53627c;
    --line: rgba(15, 23, 42, 0.08);
    --glow: rgba(91, 92, 240, 0.16);
    --shadow: 0 28px 70px rgba(97, 118, 163, 0.22);
}

/* PL: Bazowy reset i ogólne zachowanie dokumentu.
   EN: Base reset and general document behavior. */
* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(91, 92, 240, 0.18), transparent 26%),
        radial-gradient(circle at 85% 18%, rgba(124, 58, 237, 0.14), transparent 22%),
        linear-gradient(180deg, #07080e 0%, var(--bg) 52%, var(--bg-2) 100%);
    color: var(--text);
    font-family: 'Roboto', sans-serif;
}

body.light-theme {
    background:
        radial-gradient(circle at top left, rgba(91, 92, 240, 0.14), transparent 28%),
        radial-gradient(circle at 85% 18%, rgba(59, 130, 246, 0.12), transparent 24%),
        linear-gradient(180deg, #fbfdff 0%, var(--bg) 54%, var(--bg-2) 100%);
}

button,
input,
textarea,
select {
    font: inherit;
}

/* PL: Tło, siatka i dekoracyjne elementy budujące klimat aplikacji.
   EN: Background, grid, and decorative elements shaping the app atmosphere. */
a {
    color: inherit;
    text-decoration: none;
}

.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: radial-gradient(circle at center, black 30%, transparent 86%);
}

body.light-theme .bg-grid {
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
}

.ambient-orb {
    position: fixed;
    z-index: 0;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.32;
    pointer-events: none;
}

.ambient-orb-a {
    top: 64px;
    left: -120px;
    background: #4f46e5;
}

.ambient-orb-b {
    top: 340px;
    right: -140px;
    background: #0891b2;
}

/* PL: Główne kontenery i szklane panele używane na stronie głównej oraz boardzie.
   EN: Main layout containers and glass panels used on the landing page and board view. */
.landing-shell,
.board-shell {
    position: relative;
    z-index: 1;
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    padding: 30px 0 56px;
}

.landing-shell {
    display: grid;
    grid-template-columns: minmax(320px, 540px) minmax(340px, 1fr);
    gap: 28px;
    min-height: 100vh;
    align-items: start;
}

.glass-panel,
.glass-inset {
    border: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: blur(22px);
    box-shadow: var(--shadow);
}

.glass-panel {
    border-radius: var(--radius-xl);
}

.glass-inset {
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
}

.hero-panel {
    padding: 24px 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.hero-panel h1,
.section-head h2,
.section-head h3 {
    margin: 10px 0;
    letter-spacing: -0.04em;
    line-height: 0.98;
}

.hero-panel h1 {
    max-width: 8ch;
    font-size: clamp(2.8rem, 8vw, 5.8rem);
}

.hero-copy,
.board-subtitle,
.board-tile p,
.empty-state p,
.spinner-result {
    color: var(--muted);
    line-height: 1.6;
}

.create-board-form,
.boards-panel,
.board-topbar,
.tabs-panel {
    padding: 24px;
}

.create-board-form {
    display: grid;
    gap: 18px;
    margin-top: 28px;
}

.board-lock-form {
    margin-top: 24px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(17, 24, 39, 0.46);
}

.board-lock-shell {
    padding-left: 28px;
    padding-right: 28px;
}

.board-lock-panel {
    padding-left: 34px;
    padding-right: 34px;
}

.open-board-form {
    margin-bottom: 18px;
    padding: 18px;
}

/* PL: Formularze, etykiety i układy akcji dla pól wejściowych.
   EN: Forms, labels, and action layouts for input fields. */
.form-row {
    display: grid;
    gap: 8px;
}

.form-row label {
    color: var(--muted);
    font-size: 0.92rem;
}

.inline-input-group,
.cta-row,
.section-head,
.board-actions,
.retro-toolbar,
.card-footer,
.column-header,
.card-actions,
.name-row,
.spinner-stage {
    display: flex;
    align-items: center;
    gap: 12px;
}

.inline-input-group,
.cta-row,
.board-actions,
.retro-toolbar {
    flex-wrap: wrap;
}

.retro-toolbar {
    margin-bottom: 5mm;
}

input[type="text"],
input[type="password"],
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    background: var(--surface-strong);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition), background var(--transition);
}

textarea {
    min-height: 110px;
    resize: vertical;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: rgba(91, 92, 240, 0.64);
    box-shadow: 0 0 0 4px rgba(91, 92, 240, 0.14);
}

button {
    border: 0;
    cursor: pointer;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), opacity var(--transition), border-color var(--transition);
}

.primary-button {
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
    box-shadow: 0 16px 34px var(--glow);
}

.secondary-button,
.ghost-button,
.icon-button {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
}

body.light-theme .secondary-button,
body.light-theme .ghost-button,
body.light-theme .icon-button {
    background: rgba(255, 255, 255, 0.82);
}

.small-button {
    min-height: 40px;
    padding: 0 15px;
    font-size: 0.92rem;
}

.wide-button {
    width: 100%;
}

.tile-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.danger-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(239, 68, 68, 0.14);
    background: rgba(239, 68, 68, 0.08);
    color: #fda4af;
    font-size: 0.88rem;
    font-weight: 700;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), opacity var(--transition), border-color var(--transition);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.icon-button:hover,
.danger-chip:hover,
.fab:hover,
.tile-pill:hover {
    transform: translateY(-1px);
}

button:disabled,
input:disabled,
textarea:disabled,
select:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
}

.id-readonly-input:disabled {
    opacity: 1;
    color: var(--text);
    -webkit-text-fill-color: var(--text);
}

.section-head {
    justify-content: space-between;
    margin-bottom: 22px;
}

.section-head.compact {
    margin-bottom: 18px;
}

.section-head.compact > .eyebrow {
    margin-bottom: 0;
    min-height: 112px;
    display: inline-flex;
    align-items: center;
}

.boards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.board-tile {
    padding: 22px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, var(--card) 0%, var(--card-2) 100%);
    border: 1px solid var(--line);
}

.board-tile-header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px;
}

.tile-pill,
.tile-time {
    color: var(--muted);
    font-size: 0.82rem;
}

.tile-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(91, 92, 240, 0.14);
}

.empty-state {
    display: grid;
    place-items: center;
    gap: 12px;
    min-height: 240px;
    text-align: center;
}

.empty-state .material-icons-round {
    font-size: 56px;
    color: rgba(91, 92, 240, 0.72);
}

.board-page .board-shell {
    display: grid;
    gap: 22px;
}

.board-topbar {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) auto;
    gap: 20px;
    align-items: center;
    overflow: hidden;
}

.board-headline {
    max-width: 920px;
}

.board-security-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 14px;
    border: 1px solid rgba(99, 102, 241, 0.34);
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.16);
    color: #c7d2fe;
    font-size: 0.92rem;
    font-weight: 600;
}

.board-title-input {
    display: block;
    width: 100%;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    box-shadow: none;
    font-size: clamp(2.2rem, 6vw, 4.8rem);
    font-weight: 900;
    letter-spacing: -0.06em;
    line-height: 0.92;
    resize: none;
    overflow: hidden;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.board-title-input:focus {
    box-shadow: none;
}

.board-title-input:disabled {
    color: var(--text);
    opacity: 0.98;
    cursor: not-allowed;
    -webkit-text-fill-color: var(--text);
}

.board-title-input.board-title-medium {
    font-size: clamp(1.92rem, 5.4vw, 3.8rem);
}

.board-title-input.board-title-long {
    font-size: clamp(1.56rem, 4.5vw, 3rem);
    line-height: 0.96;
}

.board-title-input.board-title-xlong {
    font-size: clamp(1.22rem, 3.8vw, 2.36rem);
    line-height: 1.02;
}

.board-actions {
    justify-content: flex-end;
    align-items: center;
}

.theme-picker {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.theme-picker .material-icons-round {
    font-size: 1.05rem;
}

.theme-picker-label {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
}

.topbar-pickers {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 30px;
}

.theme-button {
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text);
    font-weight: 700;
}

.theme-button.is-active {
    background: linear-gradient(135deg, rgba(91, 92, 240, 0.96), rgba(124, 58, 237, 0.96));
    color: white;
    box-shadow: 0 10px 24px rgba(91, 92, 240, 0.22);
}

.tabs-panel {
    display: grid;
    gap: 20px;
}

.mui-tabs {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
}

.mui-tab {
    min-width: 132px;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-weight: 700;
}

.mui-tab.active {
    background: linear-gradient(135deg, rgba(91, 92, 240, 0.96), rgba(124, 58, 237, 0.96));
    color: white;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.status-bar {
    min-height: 26px;
    color: #bfd2ff;
    font-size: 0.94rem;
    font-weight: 500;
}

body.light-theme .status-bar {
    color: #3158d8;
}

.copy-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 5;
    min-width: 220px;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid rgba(34, 197, 94, 0.28);
    background: rgba(15, 23, 42, 0.96);
    color: #f8fafc;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
    pointer-events: none;
}

.copy-toast.is-visible {
    animation: toastInOut 2.1s ease forwards;
}

.error-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 6;
    min-width: 260px;
    max-width: min(420px, calc(100% - 32px));
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid rgba(248, 113, 113, 0.28);
    background: rgba(127, 29, 29, 0.96);
    color: #fee2e2;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
    pointer-events: none;
}

.error-toast-visible {
    animation: toastInOut 3s ease forwards;
}

body.light-theme .copy-toast {
    background: rgba(255, 255, 255, 0.98);
    color: #0f172a;
    border-color: rgba(34, 197, 94, 0.22);
}

.retro-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    align-items: start;
}

.retro-column {
    display: grid;
    gap: 14px;
    min-height: 360px;
    padding: 18px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, var(--card) 0%, var(--card-2) 100%);
}

.column-header {
    justify-content: space-between;
    align-items: flex-start;
}

.column-title-input {
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    font-size: 1.08rem;
    font-weight: 800;
}

.column-title-input:focus {
    box-shadow: none;
}

.cards-list {
    display: grid;
    gap: 12px;
    min-height: 90px;
}

.card-composer {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: var(--surface-soft);
}

.sticky-card {
    position: relative;
    display: grid;
    gap: 10px;
    overflow: hidden;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at top right, rgba(91, 92, 240, 0.22), transparent 42%),
        linear-gradient(180deg, rgba(33, 40, 63, 0.96), rgba(17, 23, 39, 0.98));
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
    cursor: grab;
}

body.light-theme .sticky-card {
    border-color: rgba(15, 23, 42, 0.08);
    background:
        radial-gradient(circle at top right, rgba(91, 92, 240, 0.16), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 246, 255, 0.98));
}

.sticky-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 30%);
    pointer-events: none;
}

.sticky-card.dragging {
    opacity: 0.6;
    transform: rotate(2deg) scale(0.98);
}

.sticky-card.is-blurred .card-text,
.sticky-card.is-blurred .card-meta {
    filter: blur(8px);
    user-select: none;
}

.sticky-card.owned-card {
    border-color: rgba(34, 197, 94, 0.34);
}

.card-blur-label {
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
}

.sticky-card.is-blurred .card-blur-label {
    display: inline-flex;
}

.card-text {
    white-space: pre-wrap;
    line-height: 1.58;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.card-text-compact {
    font-size: 0.96rem;
    line-height: 1.52;
}

.card-text-dense {
    font-size: 0.88rem;
    line-height: 1.46;
}

.card-text-micro {
    font-size: 0.8rem;
    line-height: 1.38;
}

.card-meta {
    color: var(--muted);
    font-size: 0.82rem;
}

.admin-note {
    display: block;
    width: 100%;
    margin-right: 6px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px dashed rgba(91, 92, 240, 0.28);
    background: rgba(91, 92, 240, 0.08);
    color: var(--text);
    line-height: 1.5;
    font-size: 0.9rem;
}

.card-note-button {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(91, 92, 240, 0.1);
    color: var(--text);
    font-weight: 700;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(4, 8, 18, 0.62);
    backdrop-filter: blur(8px);
}

.modal-backdrop.is-open {
    display: grid !important;
}

.modal-card {
    width: min(560px, 100%);
    padding: 22px;
}

.modal-copy {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.6;
}

.modal-head,
.modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.modal-body {
    margin: 18px 0;
}

.modal-status {
    margin: 14px 0 0;
    padding: 12px 14px;
    font-size: 0.92rem;
    line-height: 1.5;
}

/* PL: Dodatkowe odstepy w modalu ustawiania hasla tablicy.
   EN: Extra spacing in the board password modal. */
#boardPasswordModal .modal-body {
    display: block;
}

#boardPasswordModal .board-password-row {
    gap: 10px;
}

#boardPasswordModal #boardPasswordAdminInput {
    margin-bottom: 5mm !important;
}

#boardPasswordModal .board-password-row-secondary {
    margin-top: 0 !important;
}

.modal-body textarea {
    min-height: 180px;
}

.column-dropzone {
    min-height: 90px;
    border-radius: var(--radius-md);
    border: 1px dashed rgba(91, 92, 240, 0.5);
    background: rgba(91, 92, 240, 0.08);
}

.card-footer {
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
}

.vote-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    overflow: hidden;
}

.vote-chip.is-animated {
    animation: votePulse 560ms cubic-bezier(0.18, 0.85, 0.28, 1);
}

.vote-chip.is-animated::after {
    content: '+1';
    position: absolute;
    right: 12px;
    top: -2px;
    color: #86efac;
    font-weight: 800;
    animation: voteBurst 560ms ease-out forwards;
}

.icon-button {
    min-width: 38px;
    min-height: 38px;
    padding: 0;
    border-radius: 50%;
}

.danger-button {
    color: #fda4af;
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.14);
}

body.light-theme .danger-button {
    color: #4b1116;
    background: rgba(251, 113, 133, 0.22);
    border-color: rgba(225, 29, 72, 0.18);
}

body.light-theme .danger-chip {
    color: #4b1116;
    background: rgba(251, 113, 133, 0.2);
    border-color: rgba(225, 29, 72, 0.18);
}

.spinner-layout {
    display: grid;
    grid-template-columns: minmax(320px, 520px) minmax(280px, 1fr);
    gap: 24px;
    align-items: start;
}

.spinner-stage {
    flex-direction: column;
    justify-content: center;
    padding: 22px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, var(--card) 0%, var(--card-2) 100%);
}

.spinner-wheel-wrap {
    position: relative;
    width: min(100%, 360px);
    aspect-ratio: 1;
    padding: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(91, 92, 240, 0.18), rgba(10, 14, 24, 0.9) 66%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 24px 48px rgba(0, 0, 0, 0.24);
}

.spinner-wheel {
    position: relative;
    width: 100%;
    height: 100%;
    border: 8px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    overflow: hidden;
    transition: transform 4.2s cubic-bezier(0.18, 0.86, 0.18, 1);
}

.spinner-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.spinner-segment-label {
    fill: #ffffff;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    paint-order: stroke;
    stroke: rgba(0, 0, 0, 0.16);
    stroke-width: 2px;
    stroke-linejoin: round;
}

.spinner-pointer {
    width: 0;
    height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 28px solid #f8fafc;
    filter: drop-shadow(0 12px 12px rgba(0, 0, 0, 0.28));
}

.spinner-result {
    font-size: 1.06rem;
}

.spinner-wheel.is-spinning {
    animation: wheelGlow 1.1s ease-in-out infinite alternate;
}

.names-list {
    display: grid;
    gap: 12px;
}

.names-editor {
    padding: 22px;
}

.name-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.name-row .icon-button {
    flex-shrink: 0;
}

.name-row input {
    width: 100%;
    min-width: 0;
}

.fab {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 58px;
    padding: 0 18px;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, #4338ca 0%, #312e81 100%);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34);
}

.fab-admin {
    left: 20px;
    right: auto;
    opacity: 0.2;
}

.fab-admin:hover,
.fab-admin:focus-visible {
    opacity: 1;
}

.alert-box {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    color: #fecaca;
    background: rgba(127, 29, 29, 0.32);
    border: 1px solid rgba(248, 113, 113, 0.24);
}

@keyframes wheelGlow {
    from {
        box-shadow: 0 0 0 rgba(91, 92, 240, 0);
    }
    to {
        box-shadow: 0 0 34px rgba(91, 92, 240, 0.28);
    }
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(10px) rotate(-1.5deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }
}

@keyframes votePulse {
    0% {
        transform: scale(1);
    }
    40% {
        transform: scale(1.1);
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.16);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

@keyframes voteBurst {
    0% {
        opacity: 0;
        transform: translateY(8px) scale(0.7);
    }
    30% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-18px) scale(1.12);
    }
}

@keyframes toastInOut {
    0% {
        opacity: 0;
        transform: translateY(-12px) scale(0.96);
    }
    12% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    82% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }
}

.sticky-card,
.retro-column,
.board-tile,
.spinner-stage {
    animation: cardAppear 320ms ease;
}

@media (max-width: 1120px) {
    .landing-shell,
    .board-topbar,
    .spinner-layout {
        grid-template-columns: 1fr;
    }

    .board-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .landing-shell,
    .board-shell {
        width: min(100% - 20px, 1440px);
    }

    .create-board-form,
    .boards-panel,
    .board-topbar,
    .tabs-panel {
        padding: 18px;
    }

    .inline-input-group,
    .name-row,
    .section-head,
    .column-header,
    .card-footer,
    .board-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .theme-picker {
        width: 100%;
        justify-content: space-between;
    }

    .theme-picker select {
        width: 100%;
    }

    .topbar-pickers {
        width: 100%;
        align-items: stretch;
        gap: 12px;
    }

    .section-head.compact > .eyebrow {
        min-height: auto;
    }

    .retro-columns {
        grid-template-columns: 1fr;
    }

    .names-editor {
        padding: 18px;
    }

    .name-row {
        grid-template-columns: 1fr;
    }

    .mui-tabs {
        width: 100%;
    }

    .mui-tab {
        flex: 1;
        min-width: 0;
    }
}
