/* Festeheld — white cards, green accents and clear, friendly typography. */
:root {
    --bg: #edf2e8;
    --bg-2: #e4ecdc;
    --card: #fff;
    --card-solid: #fff;
    --text: #15231a;
    --muted: #465440;
    --line: #a3b19a;
    --accent: #226c1b;
    --accent-2: #155411;
    --accent-3: #4d7e33;
    --soft: #dce9d2;
    --soft-2: #e9f0e1;
    --focus: rgba(63, 145, 41, .2);
    --shadow: 0 22px 60px rgba(25, 50, 26, .09);
    --shadow-soft: 0 5px 20px rgba(25, 50, 26, .045);
    --radius: 18px;
    --primary-dark: #1b5721;
}
html.dark, html.dark-mode {
    --bg: #121b15;
    --bg-2: #18261b;
    --card: #1e2a22;
    --card-solid: #1e2a22;
    --text: #f1f5ed;
    --muted: #b0bcae;
    --line: #36453a;
    --accent: #8acd71;
    --accent-2: #abd895;
    --accent-3: #619d48;
    --soft: #2f442c;
    --soft-2: #253729;
    --focus: rgba(145, 201, 116, .25);
    --shadow: 0 22px 60px rgba(0, 0, 0, .22);
    --shadow-soft: 0 5px 20px rgba(0, 0, 0, .12);
    --primary-dark: #c9e8b8;
}
.ui-icon { width: 1.25em; height: 1.25em; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.site-brand { display: inline-flex; flex-shrink: 0; align-items: center; gap: 12px; text-decoration: none; font-size: 1.8rem; font-weight: 780; letter-spacing: -.065em; line-height: 1; color: var(--text); }
.site-brand img { display: block; width: 46px; height: 46px; }
.brand-domain { color: var(--accent); font-weight: 550; letter-spacing: -.06em; }
.header-menu { display: none; width: 42px; height: 42px; padding: 9px; border: 1px solid var(--line); background: var(--card-solid); color: var(--text); border-radius: 12px; cursor: pointer; }
.header-menu:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.eyebrow { font-size: .72rem; font-weight: 750; letter-spacing: .13em; color: var(--accent); margin: 0 0 13px; line-height: 1.4; }
.site-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 54px; padding: 24px 0 10px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.participant-name-with-icon { display: inline-flex; gap: 12px; align-items: center; min-width: 0; }
.participant-initials { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; flex: 0 0 36px; border-radius: 50%; background: #ddefd6; color: #245023; box-shadow: none; font-size: .74rem; font-weight: 650; letter-spacing: .015em; }
.avatar-tone-0 { background: #ddefd6; color: #245023; }
.avatar-tone-1 { background: #fff0b7; color: #665320; }
.avatar-tone-2 { background: #ffdde1; color: #793e47; }
.avatar-tone-3 { background: #e9dff1; color: #5e426e; }
.avatar-tone-4 { background: #dfeee9; color: #315a4e; }
.category-icon { --category-icon-background: #fce9d6; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; border: 0; box-shadow: none; line-height: 1; color: #202721; background: radial-gradient(circle at 32% 24%, rgba(255,255,255,.34), transparent 72%), var(--category-icon-background); }
.category-icon svg { display: block; width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.category-icon--salad, .category-icon--fruit { --category-icon-background: #ddf0d5; }
.category-icon--food, .category-icon--grill, .category-icon--party { --category-icon-background: #fce9d6; }
.category-icon--bread, .category-icon--coffee, .category-icon--dishes { --category-icon-background: #f8e9c7; }
.category-icon--drink, .category-icon--beer, .category-icon--juice { --category-icon-background: #ffe59a; }
.category-icon--water, .category-icon--cleaning { --category-icon-background: #e0f0ef; }
.category-icon--cake, .category-icon--dessert, .category-icon--sweets { --category-icon-background: #ffd6dc; }
.category-icon--wine, .category-icon--music { --category-icon-background: #efdaea; }
.category-icon--task, .category-icon--helper { --category-icon-background: #e0eddb; }
.category-icon--box, .category-icon--tech { --category-icon-background: #efe3d2; }
.category-icon--decor, .category-icon--gift { --category-icon-background: #f7e4d8; }
.category-icon--other { --category-icon-background: #f5edcc; }

@media screen {
    body { background: radial-gradient(ellipse at 95% 2%, rgba(192,222,170,.12), transparent 38rem), var(--bg); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; line-height: 1.5; -webkit-font-smoothing: antialiased; }
    .wrap, .home-wrap { max-width: 1280px; padding: 24px 32px 96px; }
    .topbar { position: relative; top: auto; display: flex; flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; min-height: 76px; margin: 0 0 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line); z-index: 30; }
    .topbar .toolbar-card { display: flex; align-items: center; justify-content: flex-end; gap: 7px; width: auto; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none; backdrop-filter: none; }
    .btn, .icon-btn, .pill-btn, .zoom-control button { font-weight: 650; font-size: .86rem; }
    .btn { min-height: 43px; padding: 10px 17px; border-radius: 12px; line-height: 1.35; }
    .btn-primary, .save-float { background: linear-gradient(120deg,#2d931d,#208417); color: #fff; box-shadow: 0 5px 12px rgba(40,130,24,.13); }
    .btn-primary:hover { background: #227b18; filter: none; box-shadow: 0 7px 16px rgba(40,130,24,.18); }
    .btn-soft { color: var(--text); background: var(--card-solid); border: 1px solid var(--line); box-shadow: none; }
    .btn-soft:hover { border-color: #93b485; background: var(--soft-2); filter: none; }
    .btn-danger { background: #b94742; box-shadow: none; }
    .btn:focus-visible, .icon-btn:focus-visible, .pill-btn:focus-visible { outline: 3px solid var(--focus); }
    .icon-btn { width: 43px; height: 43px; border-radius: 13px; background: var(--card-solid); border: 1px solid var(--line); color: var(--text); box-shadow: var(--shadow-soft); }
    .zoom-control { gap: 1px; padding: 3px; border-radius: 12px; background: var(--card-solid); border: 1px solid var(--line); }
    .zoom-control button { width: 30px; height: 34px; border-radius: 8px; background: var(--soft-2); color: var(--text); font-size: .82rem; }
    .zoom-control span { min-width: 30px; font-size: .7rem; font-weight: 550; }
    .mode-switch { gap: 6px; padding: 5px 10px 5px 5px; background: var(--card-solid); border-color: var(--line); border-radius: 12px; font-size: .76rem; }
    .mode-dot { width: 30px; height: 30px; border-radius: 8px; background: var(--soft-2); color: var(--accent); font-size: 1rem; }
    .card, .category, .modal-card, .admin-panel { background: var(--card); border-color: var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); backdrop-filter: none; }
    .card { padding: 24px; }
    .card-title { font-size: 1.15rem; font-weight: 700; letter-spacing: -.025em; margin-bottom: 12px; }
    .hero { padding: 32px 0 26px; color: var(--text); border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
    .hero::before, .hero::after { display: none; }
    .hero-content { grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 36px; }
    .hero h1 { font-size: clamp(2rem,4.5vw,3.2rem); font-weight: 750; line-height: 1.08; letter-spacing: -.05em; overflow-wrap: anywhere; }
    .hero p { color: var(--muted); font-size: .95rem; font-weight: 400; max-width: 730px; line-height: 1.65; margin-top: 12px; }
    .hero p.eyebrow, .hero .kicker { margin: 0 0 12px; color: var(--accent); font-size: .7rem; font-weight: 750; letter-spacing: .14em; }
    .hero .event-date { display: flex; align-items: center; gap: 9px; margin-top: 14px; color: var(--muted); font-size: 1.1rem; font-weight: 500; line-height: 1.4; letter-spacing: 0; text-shadow: none; }
    .statbox { min-width: 186px; padding: 22px 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--card-solid); box-shadow: 0 6px 19px rgba(30,49,28,.06); backdrop-filter: none; text-align: left; }
    .statbox small { color: var(--muted); font-size: .8rem; font-weight: 500; letter-spacing: 0; }
    .statbox strong { color: var(--accent); font-size: 3rem; font-weight: 750; line-height: 1.15; letter-spacing: -.05em; margin-top: 4px; }
    .section { margin-top: 26px; }
    .category-title, .info-heading { color: var(--text); font-size: 1.16rem; font-weight: 700; letter-spacing: -.025em; line-height: 1.3; }
    .info-heading { padding: 0; margin-bottom: 14px; }
    .category-overview-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-top: 16px; }
    .category-overview-card { display: grid; grid-template-columns: 46px minmax(0,1fr); gap: 13px; align-items: center; min-height: 112px; padding: 18px; border: 1px solid var(--line); }
    .category-overview-main { display: grid; gap: 8px; min-width: 0; }
    .category-overview-title strong { font-size: .95rem; font-weight: 650; line-height: 1.35; white-space: normal; text-overflow: clip; overflow-wrap: anywhere; }
    .category-overview-card .category-overview-status { display: flex; flex-wrap: wrap; gap: 5px; border: 0; border-radius: 0; padding: 0; min-height: 0; background: none; font-size: .7rem; font-weight: 500; white-space: normal; }
    .category-overview-card .category-overview-status strong { font-size: .7rem; font-weight: 600; }
    html.dark .category-overview-card .category-overview-status, html.dark-mode .category-overview-card .category-overview-status,
    html.dark .demo-number, html.dark-mode .demo-number, html.dark .demo-row-status, html.dark-mode .demo-row-status { background: transparent; }
    .category-overview-link:hover, .category-overview-link:focus-visible { border-color: #91b882; box-shadow: 0 8px 22px rgba(34,81,24,.08); transform: translateY(-2px); }
    .category-overview-link:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
    .status-dot { width: 8px; height: 8px; flex: 0 0 auto; box-shadow: none; }
    .status-green .status-dot { background: #37a52b; }
    .status-yellow .status-dot { background: #e5b400; }
    .status-red .status-dot { background: #e64d48; }
    .category-status { min-height: 28px; padding: 5px 9px; border-radius: 8px; font-size: .75rem; font-weight: 550; gap: 6px; }
    .category-status strong { font-weight: 600; font-size: .73rem; }
    .status-green { color: #297e21; border-color: #dcebd3; background: #f1f8ed; }
    .status-yellow { color: #997907; border-color: #efdfaa; background: #fff9e5; }
    .status-red { color: #be4a43; border-color: #f3dcd7; background: #fff3f0; }
    .status-neutral { color: var(--muted); background: var(--soft-2); border-color: var(--line); }
    .section-title-row { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin: 42px 0 17px; }
    .section-title-row .eyebrow { margin-bottom: 6px; }
    .section-title-row h2 { margin: 0; font-size: 1.6rem; font-weight: 720; letter-spacing: -.035em; }
    .category-list { gap: 24px; }
    #festForm .category-list { margin-top: 0; }
    .category { padding: 22px 24px 10px; }
    .category-head { display: flex; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-bottom: 17px; margin-bottom: 0; border-bottom: 1px solid var(--line); }
    .category-head .category-status { min-height: 29px; font-size: .73rem; padding: 5px 9px; font-weight: 550; }
    .category-title-with-icon { gap: 11px; padding: 0; }
    .participant-list { gap: 0; }
    .participant-card { padding: 18px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
    .participant-card:last-child:where(:not(.empty-drop-hint, .fest-list-card, .admin-user-card)) { border-bottom: 0; }
    .participant-card:hover { transform: none; box-shadow: none; border-color: var(--line); }
    .admin-page .grid-3 > form.participant-card { border-bottom: 1px solid var(--line); }
    html.dark .participant-card, html.dark-mode .participant-card { background: transparent; }
    .participant-head { margin-bottom: 12px; align-items: center; }
    .participant-name { font-size: .98rem; line-height: 1.4; font-weight: 650; }
    .participant-name-with-icon > span:last-child { min-width: 0; overflow-wrap: anywhere; }
    .form-grid { grid-template-columns: minmax(80px,.55fr) repeat(3,minmax(0,1fr)); gap: 12px; }
    .label { font-size: .75rem; font-weight: 550; text-transform: none; letter-spacing: 0; margin-bottom: 6px; color: var(--muted); }
    .label-live { gap: 5px; }
    .char-counter { font-size: .66rem; font-weight: 400; opacity: .85; }
    .input, .textarea, .select { min-height: 43px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--bg); color: var(--text); font-size: .88rem; line-height: 1.5; }
    .input:focus, .textarea:focus, .select:focus { background: var(--card-solid); border-color: #84af73; box-shadow: 0 0 0 3px var(--focus); }
    html.dark .input, html.dark .textarea, html.dark .select, html.dark-mode .input, html.dark-mode .textarea, html.dark-mode .select { background: #18211c; }
    .participant-grip { display: inline-flex; align-items: center; color: #a4aca6; margin-right: 4px; cursor: grab; }
    .move-actions { display: flex; gap: 4px; flex-wrap: wrap; }
    .move-btn { width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: var(--card-solid); box-shadow: none; }
    .move-btn svg { width: 16px; height: 16px; stroke-width: 1.9; }
    .move-btn:hover, .move-btn:focus-visible { color: var(--accent); background: var(--soft-2); border-color: #95b986; box-shadow: none; }
    .move-btn:focus-visible { outline: 3px solid var(--focus); }
    .participant-dropzone { border-radius: 12px; }
    .participant-dropzone.is-drag-over { background: var(--soft-2); box-shadow: inset 0 0 0 2px #80b469; }
    .draggable-participant.is-moved { box-shadow: 0 0 0 2px #94bb80; border-radius: 12px; padding-inline: 10px; }
    .dropzone { border-color: #9fc48d; background: var(--soft-2); border-radius: 13px; }
    .drag-item { padding: 11px 12px; border-radius: 10px; font-size: .88rem; font-weight: 550; }
    .drag-item::after { content: '☰'; margin-left: auto; color: var(--muted); opacity: .5; }
    .drag-person { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
    .drag-person-name { white-space: normal; overflow-wrap: anywhere; }
    .empty-state, .participant-card.empty-drop-hint { background: var(--soft-2); color: var(--muted); border: 1px dashed #a2c18c; border-radius: 12px; padding: 20px; text-align: center; font-size: .9rem; }
    .floating { right: 24px; bottom: 24px; gap: 10px; }
    .float-column { gap: 8px; }
    .save-float { min-width: 132px; height: 45px; border-radius: 12px; }
    .add-float { background: #2a941d; color: #fff; border-color: #2a941d; box-shadow: 0 5px 16px rgba(38,133,26,.2); animation: fh-add-pulse 3.8s ease-in-out infinite; }
    .add-float::before { inset: -5px; background: #67b449; opacity: .2; filter: blur(5px); animation: fh-add-glow 3.8s ease-in-out infinite; border-radius: 17px; }
    .add-float::after { inset: -5px; background: transparent; border: 1px solid #a4d58d; opacity: .5; animation: fh-add-ring 3.8s ease-out infinite; border-radius: 17px; }
    .add-float .plus-symbol { font-size: 1.85rem; font-weight: 450; }
    .modal { background: rgba(18,31,21,.36); backdrop-filter: blur(5px); }
    .modal-card { max-height: calc(100dvh - 36px); overflow-y: auto; border-radius: 22px; padding: 26px; box-shadow: 0 24px 80px rgba(18,31,21,.18); }
    .toast-layer { background: rgba(18,31,21,.3); backdrop-filter: blur(3px); }
    .toast-message { max-width: 590px; border-radius: 22px; padding: 30px; box-shadow: var(--shadow); font-weight: 600; }
    .toast-text { font-size: clamp(1.05rem,3vw,1.6rem); line-height: 1.5; letter-spacing: -.02em; }
    .toast-ok { margin-top: 20px; min-height: 44px; font-size: .9rem; }
    .badge { background: var(--soft-2); border-color: var(--line); color: var(--muted); font-size: .75rem; font-weight: 550; border-radius: 8px; }
    input[type="checkbox"] { accent-color: #2b901b; }
    .password-toggle { box-shadow: none; border-color: var(--line); background: var(--card-solid); width: 32px; height: 32px; border-radius: 8px; }
    .table th { font-size: .7rem; font-weight: 600; }
    .table td { border-color: var(--line); font-size: .88rem; }
    .admin-category-row { border-radius: 14px; background: var(--bg); border-color: var(--line); padding: 16px; }
    .admin-category-actions .category-status { min-height: 43px; }
    .admin-category-actions > .btn, .admin-category-actions .admin-category-delete-form .btn { min-height: 43px; }
    .fest-list-card { padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: var(--card-solid); }
    .admin-page .fest-list-card.is-selected-fest { border-width: 1px; border-color: #88b46f; background: var(--soft-2); box-shadow: none; }
    html.dark .fest-list-card.is-selected-fest, html.dark-mode .fest-list-card.is-selected-fest { border-color: #81ad6d; background: #283c26; }
    .delete-date-badge { background: var(--soft-2); color: var(--muted); border-color: var(--line); }
    .admin-user-card { padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: var(--bg); }
    .auth-page .hero { padding-top: 32px; }
    .auth-grid { gap: 24px; margin-top: 22px; }
    .auth-grid .login-card { padding: 30px; }
    .admin-page .category-overview-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .admin-page .category-title { font-size: .95rem; }
    .admin-page .category-head { gap: 8px; }
    .admin-page .section.hero { border-top: 1px solid var(--line); padding-top: 38px; margin-top: 38px; }
    .admin-page .admin-edit-stack { gap: 24px; }
    .admin-page .grid > *, .admin-page .participant-head > div { min-width: 0; }
    .admin-page .badge { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
    .admin-page .admin-user-card .muted { overflow-wrap: anywhere; }
    .admin-page .grid-3 > .category { padding: 15px; }
    .admin-page .grid-3 > .category .category-head { flex-direction: column; align-items: flex-start; }
    .admin-page .grid-3 > .category .dropzone { margin-top: 12px; }

    /* Landing page */
    .home-topbar { border-bottom: 0; margin-bottom: 4px; }
    .home-hero { position: relative; padding: 48px 0 55px; isolation: isolate; }
    .home-hero::before { content: ''; position: absolute; z-index: -1; width: min(760px,100%); height: 790px; top: -140px; right: 0; border-radius: 46% 0 45% 55%; background: radial-gradient(ellipse at center,#e5f4d8 0%,rgba(231,244,219,.5) 49%,transparent 72%); pointer-events: none; }
    html.dark .home-hero::before, html.dark-mode .home-hero::before { background: radial-gradient(ellipse at center,#263e24 0%,transparent 70%); }
    .home-page { overflow-x: clip; }
    .hero-bunting { position: absolute; z-index: -1; width: 53%; height: 130px; top: -42px; right: 10%; opacity: .55; pointer-events: none; overflow: visible; }
    .hero-bunting path:first-child { fill: none; stroke: #d7eabc; stroke-width: 2; }
    .hero-bunting path:last-child { fill: #e3f1d0; stroke: none; }
    .home-hero-grid { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); gap: clamp(25px,5vw,66px); align-items: center; }
    .home-eyebrow { display: flex; align-items: center; gap: 8px; color: var(--accent); font-size: 1.46rem; line-height: 1.4; font-weight: 600; margin-bottom: 24px; }
    .home-eyebrow > span { width: 7px; height: 7px; background: #78ad5d; border-radius: 50%; box-shadow: 0 0 0 5px var(--soft-2); }
    .home-hero h1 { font-size: clamp(3.5rem,6.7vw,5.7rem); font-weight: 800; color: #0e2b19; line-height: 1.01; letter-spacing: -.065em; margin: 0; }
    html.dark .home-hero h1, html.dark-mode .home-hero h1 { color: #e2eedc; }
    .hero-dot { color: #2e951b; }
    .home-lead { max-width: 495px; font-size: clamp(1rem,1.7vw,1.25rem); line-height: 1.65; margin: 25px 0 0; color: var(--muted); font-weight: 400; }
    .home-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 29px; }
    .home-actions .btn { min-height: 52px; padding: 13px 22px; border-radius: 999px; font-size: .91rem; }
    .home-actions .btn-primary { gap: 14px; }
    .home-actions .btn-soft { background: transparent; }
    .home-benefits { display: flex; align-items: center; margin-top: 38px; }
    .home-benefits > div { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 0 25px; border-right: 1px solid var(--line); text-align: center; }
    .home-benefits > div:first-child { padding-left: 0; }
    .home-benefits > div:last-child { border: 0; }
    .home-benefits > div > span { display: flex; width: 54px; height: 54px; align-items: center; justify-content: center; background: var(--card-solid); border: 1px solid var(--line); border-radius: 50%; box-shadow: 0 3px 8px rgba(25,50,26,.06); color: var(--accent); }
    .home-benefits .ui-icon { width: 26px; height: 26px; stroke-width: 1.7; }
    .home-benefits strong { font-size: .8rem; font-weight: 600; white-space: nowrap; }
    .home-showcase { min-width: 0; padding: 6px 10px 0; }
    .demo-window { transform: rotate(-2.8deg); border: 5px solid #24332b; border-radius: 28px; background: var(--card-solid); overflow: hidden; box-shadow: 0 24px 50px rgba(25,50,26,.14),0 2px 5px rgba(25,50,26,.1); }
    .demo-window-bar { display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; border-bottom: 1px solid var(--line); }
    .demo-window-bar > span { color: var(--muted); }
    .demo-brand { display: flex; align-items: center; gap: 8px; }
    .demo-brand img { width: 28px; height: 28px; }
    .demo-brand strong { font-size: 1rem; letter-spacing: -.06em; }
    .demo-brand strong span { color: var(--accent); font-weight: 500; }
    .demo-window-body { background: var(--bg); padding: 23px 19px 18px; }
    .demo-event-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 22px; }
    .demo-event-heading h2 { font-size: 1.42rem; font-weight: 700; line-height: 1.2; letter-spacing: -.04em; margin: 0 0 9px; }
    .demo-date { display: inline-flex; align-items: center; gap: 6px; font-size: .77rem; color: var(--muted); }
    .demo-stat { flex: 0 0 auto; padding: 11px 13px; background: var(--card-solid); border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 3px 7px rgba(25,50,26,.06); }
    .demo-stat small { display: block; color: var(--muted); font-size: .61rem; }
    .demo-stat strong { display: block; font-size: 1.95rem; line-height: 1.2; font-weight: 720; letter-spacing: -.05em; color: var(--accent); margin-top: 3px; }
    .demo-overview { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-bottom: 17px; }
    .demo-overview-card { min-width: 0; padding: 13px 10px; background: var(--card-solid); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 3px 7px rgba(25,50,26,.035); }
    .demo-overview-card > strong { display: block; font-size: .68rem; font-weight: 600; line-height: 1.4; min-height: 1.9rem; }
    .demo-number { display: flex; align-items: center; gap: 7px; margin-top: 5px; color: var(--text); font-size: 1.2rem; background: none; border: 0; }
    .demo-number .status-dot { width: 11px; height: 11px; }
    .demo-overview-card small { display: block; color: var(--muted); font-size: .62rem; margin-top: 4px; }
    .demo-list { background: var(--card-solid); border: 1px solid var(--line); border-radius: 15px; padding: 15px 12px 12px; }
    .demo-list h3 { margin: 0 0 11px; font-size: .91rem; font-weight: 680; letter-spacing: -.025em; }
    .demo-list-row { display: grid; grid-template-columns: 34px minmax(0,1fr) auto 15px; align-items: center; gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--line); }
    .demo-list-row .category-icon { width: 34px; height: 34px; }
    .demo-list-row .category-icon svg { width: 20px; height: 20px; }
    .demo-list-row strong { display: block; font-size: .7rem; line-height: 1.3; font-weight: 600; }
    .demo-list-row small { display: block; font-size: .63rem; margin-top: 3px; color: var(--muted); }
    .demo-row-status { font-size: .58rem; white-space: nowrap; background: none; border: 0; }
    .demo-grip { color: #a3aaa5; font-size: .75rem; }
    .demo-drop-hint { display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px dashed #72ac58; border-radius: 8px; padding: 10px 8px; margin-top: 12px; font-size: .65rem; color: var(--muted); }
    .demo-preview-link { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 23px auto 0; font-size: .76rem; color: var(--accent); text-decoration: none; }
    .demo-preview-link:hover { text-decoration: underline; }
    .home-section-heading { padding: 32px 0 0; text-align: center; margin-bottom: 25px; }
    .home-section-heading .eyebrow { margin-bottom: 10px; }
    .home-section-heading h2 { font-size: clamp(1.65rem,3vw,2.1rem); font-weight: 720; letter-spacing: -.045em; line-height: 1.2; margin: 0; }
    .home-section-heading > p:last-child { color: var(--muted); font-size: .9rem; margin-top: 13px; }
    .home-features { margin-top: 0; gap: 16px; grid-template-columns: repeat(3,minmax(0,1fr)); }
    .home-feature { padding: 24px; }
    .home-feature-icon { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 50%; background: var(--soft-2); color: var(--accent); box-shadow: none; }
    .home-feature-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
    .home-feature h2 { margin: 0; font-size: 1rem; font-weight: 650; letter-spacing: -.025em; }
    .home-feature p { font-size: .85rem; line-height: 1.65; margin: 9px 0 0; }
    .home-info-grid { margin-top: 24px; }
    .home-info-card { padding: 27px; }
    .home-info-card h2 { font-size: 1.2rem; line-height: 1.35; letter-spacing: -.03em; }
    .home-info-card p, .home-info-card li { font-size: .9rem; line-height: 1.65; }
    .home-bottom { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin-top: 24px; }
    .home-link-box, .home-step-box { padding: 26px; }
    .home-link-box strong { font-size: 1.5rem; font-weight: 650; line-height: 1.2; letter-spacing: -.025em; }
    .home-link-box span, .home-step span { color: var(--muted); font-size: .88rem; line-height: 1.6; }
    .home-steps { counter-reset: step; display: grid; gap: 16px; margin-top: 18px; }
    .home-step { counter-increment: step; display: grid; grid-template-columns: 34px 1fr; gap: 12px; }
    .home-step::before { content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--soft-2); color: var(--accent); font-weight: 650; }
    .home-step strong, .home-step span { display: block; }
    .home-fest-list { display: grid; gap: 10px; margin-top: 16px; }
    .home-fest-link { display: flex; justify-content: space-between; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; }
    .home-fest-link span { color: var(--muted); }
    .legal-info-grid { margin-top: 38px; }
    .legal-card h2 { font-size: 1.15rem; font-weight: 650; }
    .legal-card h3 { font-weight: 650; }
    .legal-card p, .legal-card li { font-size: .83rem; line-height: 1.7; }
    .legal-card a { color: var(--accent); font-weight: 550; }
    .fest-page .site-footer { padding-bottom: 35px; }
}

@keyframes fh-add-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.025); } }
@keyframes fh-add-glow { 0%,100% { opacity: .14; } 50% { opacity: .35; } }
@keyframes fh-add-ring { 0% { opacity: .55; transform: scale(.95); } 70%,100% { opacity: 0; transform: scale(1.2); } }

/* Larger, crisp check marks on the homepage. */
.home-page .home-check-list { gap: 12px; }
.home-page .home-check-list li {
    min-height: 32px;
    padding: 3px 0 3px 44px;
    line-height: 1.5;
}
.home-page .home-check-list li::before {
    content: "";
    top: 0;
    width: 32px;
    height: 32px;
    border: 1px solid #c9dfbd;
    border-radius: 10px;
    background: #edf6e7;
}
.home-page .home-check-list li::after {
    content: "";
    position: absolute;
    left: 12px;
    top: 8px;
    width: 7px;
    height: 12px;
    border: solid #2c8d1e;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}
html.dark .home-check-list li::before,
html.dark-mode .home-check-list li::before {
    border-color: #4b703d;
    background: #253b25;
}
html.dark .home-check-list li::after,
html.dark-mode .home-check-list li::after {
    border-color: #b4df99;
}

@media screen and (max-width: 1100px) {
    .wrap { padding-inline: 24px; }
    .site-brand { font-size: 1.6rem; gap: 10px; }
    .site-brand img { width: 40px; height: 40px; }
    .topbar .toolbar-card { gap: 5px; }
    .topbar .btn { font-size: .75rem; padding: 9px 12px; }
    .topbar .mode-switch { font-size: .7rem; padding: 5px; }
    .category-overview-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .home-hero-grid { gap: 24px; }
    .home-showcase { padding-inline: 0; }
    .home-hero h1 { font-size: clamp(3.2rem,6.5vw,5rem); }
    .home-benefits > div { padding-inline: 16px; }
    .home-actions .btn { padding-inline: 18px; }
    .demo-event-heading h2 { font-size: 1.23rem; }
    .demo-window-body { padding: 18px 12px 14px; }
    .demo-list { padding: 13px 10px 10px; }
    .demo-list-row { gap: 6px; }
}
@media screen and (max-width: 860px) {
    .topbar .toolbar-card { justify-content: flex-start; }
    .home-hero-grid { grid-template-columns: 1fr 1fr; }
    .home-actions { gap: 9px; }
    .home-actions .btn { font-size: .8rem; min-height: 46px; padding-inline: 14px; }
    .home-benefits > div { padding-inline: 11px; }
    .home-benefits strong { font-size: .7rem; }
    .home-benefits > div > span, .home-feature-icon { width: 45px; height: 45px; }
    .demo-event-heading { align-items: flex-start; }
    .demo-stat { padding: 9px; }
    .demo-stat small { font-size: .52rem; }
    .demo-event-heading h2 { font-size: 1.13rem; }
    .demo-row-status { display: none; }
    .demo-list-row { grid-template-columns: 34px minmax(0,1fr) 15px; }
    .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .category-overview-grid, .admin-page .category-overview-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .home-features { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .hero-content { grid-template-columns: minmax(0,1fr) auto; }
    .admin-page .grid-3 > .category .category-head { flex-direction: row; }
}
@media screen and (max-width: 760px) {
    .wrap, .home-wrap { padding: 16px 18px 100px; }
    .topbar { padding-bottom: 15px; min-height: 59px; gap: 13px; margin-bottom: 5px; }
    .site-brand { font-size: 1.65rem; }
    .site-brand img { width: 39px; height: 39px; }
    .topbar.menu-ready .header-menu { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; }
    .topbar.menu-ready .toolbar-card { display: none; }
    .topbar.menu-ready.menu-open .toolbar-card { display: flex; width: 100%; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--card-solid); gap: 8px; }
    .topbar .toolbar-card { width: 100%; justify-content: flex-start; }
    .topbar .toolbar-card .btn { min-height: 40px; }
    .home-hero { padding: 29px 0 28px; }
    .home-hero-grid { grid-template-columns: minmax(0,1fr); gap: 38px; }
    .hero-bunting { top: -8px; right: 0; width: 75%; opacity: .35; }
    .home-eyebrow { margin-bottom: 22px; font-size: 1.4rem; }
    .home-hero h1 { font-size: clamp(3.5rem,12vw,5.5rem); }
    .home-lead { max-width: 500px; font-size: 1.05rem; margin-top: 21px; }
    .home-actions { margin-top: 24px; gap: 10px; }
    .home-actions .btn { min-height: 49px; padding: 12px 19px; font-size: .85rem; }
    .home-benefits { margin-top: 29px; gap: 0; }
    .home-benefits > div { padding-inline: 20px; }
    .home-benefits > div > span, .home-feature-icon { width: 49px; height: 49px; }
    .home-benefits strong { font-size: .73rem; }
    .home-showcase { max-width: 465px; width: 100%; margin: 0 auto; padding-inline: 8px; }
    .demo-window { transform: rotate(-1.8deg); }
    .demo-window-body { padding: 21px 16px 16px; }
    .demo-event-heading h2 { font-size: 1.32rem; }
    .demo-stat { padding: 11px 12px; }
    .demo-stat small { font-size: .6rem; }
    .demo-row-status { display: inline; }
    .demo-list-row { grid-template-columns: 34px minmax(0,1fr) auto 15px; }
    .demo-preview-link { margin-top: 21px; }
    .home-section-heading { padding-top: 25px; }
    .home-feature { padding: 19px; }
    .hero { padding: 25px 0 20px; }
    .hero-content { gap: 16px; }
    .hero h1 { font-size: clamp(1.8rem,6.2vw,2.7rem); }
    .hero p { font-size: .87rem; line-height: 1.6; }
    .hero .event-date { font-size: .94rem; }
    .hero .eyebrow { font-size: .61rem; letter-spacing: .08em; }
    .statbox { min-width: 125px; padding: 15px; border-radius: 14px; }
    .statbox small { font-size: .64rem; }
    .statbox strong { font-size: 2.45rem; }
    .category-overview-grid { gap: 10px; }
    .category-overview-card { grid-template-columns: 36px minmax(0,1fr); padding: 14px 12px; gap: 9px; min-height: 105px; border-radius: 14px; }
    .category-overview-card .category-icon { width: 36px; height: 36px; }
    .category-overview-card .category-icon svg { width: 23px; height: 23px; }
    .category-overview-title strong { font-size: .82rem; }
    .category-overview-card .category-overview-status { font-size: .64rem; gap: 4px; }
    .category-overview-card .category-overview-status strong { font-size: .64rem; }
    .section-title-row { margin-top: 32px; gap: 12px; flex-wrap: wrap; }
    .section-title-row h2 { font-size: 1.4rem; }
    .section-title-row > .btn { min-height: 41px; font-size: .78rem; padding: 10px 13px; }
    .section-title-row .eyebrow { font-size: .6rem; }
    .category { padding: 17px 17px 6px; border-radius: 16px; }
    .category-title { font-size: 1rem; }
    .category-head .category-icon { width: 39px; height: 39px; }
    .category-head .category-icon svg { width: 25px; height: 25px; }
    .participant-head { gap: 10px; flex-wrap: wrap; }
    .participant-name { font-size: .94rem; }
    .participant-grip { display: none; }
    .move-actions { margin-left: auto; }
    .move-btn { width: 30px; height: 30px; }
    .label-live { display: flex; align-items: baseline; justify-content: space-between; }
    .char-counter { margin-top: 0; }
    .card { padding: 20px; }
    .floating { left: auto; right: 14px; bottom: 14px; align-items: center; gap: 8px; padding: 7px; background: var(--card-solid); border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 4px 25px rgba(26,50,28,.12); }
    .float-column { flex-direction: row; gap: 5px; }
    .floating .icon-btn { width: 36px; height: 38px; border-radius: 10px; box-shadow: none; }
    .save-float { min-width: 105px; height: 38px; border-radius: 10px; font-size: .78rem; }
    .add-float::before, .add-float::after { inset: -3px; border-radius: 13px; }
    .modal { padding: 12px; }
    .modal-card { padding: 21px; max-height: calc(100dvh - 24px); }
    .modal-card .participant-head { flex-wrap: nowrap; }
    .auth-page .hero-content { grid-template-columns: 1fr; }
    .auth-grid .login-card { padding: 23px; }
    .auth-page .topbar .btn { font-size: .7rem; padding-inline: 10px; }
    .admin-category-actions { grid-template-columns: 1fr 1fr; }
    .admin-category-actions > .btn, .admin-category-actions .admin-category-delete-form .btn { width: 100%; min-width: 0; max-width: none; }
    .site-footer { margin-top: 37px; font-size: .73rem; gap: 10px; }
    .home-bottom { grid-template-columns: 1fr; }
}
@media screen and (max-width: 440px) {
    .home-actions .btn { padding-inline: 16px; font-size: .8rem; }
    .home-features { grid-template-columns: 1fr; }
    .home-feature { display: grid; grid-template-columns: 49px minmax(0,1fr); column-gap: 14px; padding: 20px; }
    .home-feature-icon { grid-row: 1 / 3; margin: 0; }
    .home-feature h2, .home-feature p { grid-column: 2; }
    .home-feature p { margin-top: 6px; font-size: .8rem; }
    .home-benefits > div { flex: 1; min-width: 0; padding-inline: 8px; }
    .home-benefits strong { white-space: normal; }
    .demo-event-heading > div:first-child { min-width: 0; }
    .demo-event-heading h2 { font-size: 1.13rem; }
    .hero-content { gap: 10px; }
    .statbox { min-width: 107px; padding: 12px; }
    .hero .eyebrow { max-width: 170px; }
    .category-overview-title strong { font-size: .79rem; }
    .category-overview-card { grid-template-columns: 1fr; gap: 10px; align-content: start; }
    .category-overview-main { gap: 5px; }
    .category-head { align-items: flex-start; }
    .category-head .category-status { margin-left: 50px; margin-top: -5px; }
    .form-grid { grid-template-columns: 1fr; }
    .participant-head { align-items: flex-start; }
    .participant-name-with-icon { max-width: 100%; }
    .section-title-row > .btn { width: 100%; }
    .demo-overview-card { padding: 10px 8px; }
    .demo-list-row { gap: 7px; }
    .demo-row-status { font-size: .53rem; }
    .auth-page .site-brand { font-size: 1.5rem; }
}
@media screen and (max-width: 360px) {
    .hero-content { grid-template-columns: minmax(0,1fr); }
    .statbox { width: fit-content; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .add-float, .add-float::before, .add-float::after { animation: none; }
    .btn, .icon-btn, .category-overview-link { transition: none; }
}
@media print {
    .site-brand, .header-menu, .site-footer, .hero-bunting, .home-benefits, .home-actions, .home-showcase, .section-title-row, .participant-initials, .participant-grip { display: none !important; }
    .category-icon { width: 1.65rem; height: 1.65rem; background: white; box-shadow: none; border: 1px solid #ddd; }
    .category-icon svg { width: .95rem; height: .95rem; stroke-width: 2; }
    .participant-name-with-icon { display: block; }
    .event-date .ui-icon { width: 1em; height: 1em; }
    .home-hero::before { display: none; }
    .home-hero h1 { font-size: 24pt; line-height: 1.1; }
}

/* Clearer contrast in light mode; the dark palette remains independent. */
@media screen {
    html:not(.dark):not(.dark-mode) .input,
    html:not(.dark):not(.dark-mode) .textarea,
    html:not(.dark):not(.dark-mode) .select { background:#fff; border-color:#7b8c74; color:var(--text); }
    html:not(.dark):not(.dark-mode) input::placeholder,
    html:not(.dark):not(.dark-mode) textarea::placeholder { color:#5f6d59; opacity:1; }
    html:not(.dark):not(.dark-mode) .btn-soft,
    html:not(.dark):not(.dark-mode) .icon-btn,
    html:not(.dark):not(.dark-mode) .move-btn { border-color:#7b8c74; color:var(--text); }
    html:not(.dark):not(.dark-mode) .btn-primary,
    html:not(.dark):not(.dark-mode) .save-float { background:linear-gradient(120deg,#23751b,#185e14); color:#fff; }
    html:not(.dark):not(.dark-mode) .btn-primary:hover,
    html:not(.dark):not(.dark-mode) .save-float:hover { background:#185e14; }
    html:not(.dark):not(.dark-mode) .btn-danger { background:#a8322b; color:#fff; }
    html:not(.dark):not(.dark-mode) .status-green { color:#1c6819; background:#edf6e7; border-color:#719569; }
    html:not(.dark):not(.dark-mode) .status-yellow { color:#765b00; background:#fff8de; border-color:#a18a41; }
    html:not(.dark):not(.dark-mode) .status-red { color:#9d2e27; background:#fff1ee; border-color:#bb8078; }
    html:not(.dark):not(.dark-mode) .status-neutral { color:#465440; background:#e9f0e1; border-color:#8b9e82; }
    .home-eyebrow > span { flex:0 0 auto; }
}

/* Status surfaces follow the actual badge, including live participant changes. */
@media screen {
    :root { --status-surface-green:#edf6e7; --status-surface-yellow:#fff8de; --status-surface-red:#fff0ed; }
    html.dark, html.dark-mode { --status-surface-green:#253a26; --status-surface-yellow:#383421; --status-surface-red:#3d2928; }
    .category-overview-card:has(.status-green),
    .category:has(> .category-head .status-green),
    .admin-workspace .admin-category-row:has(.status-green),
    .demo-overview-card:has(.status-green),
    .demo-list-row:has(.status-green) { background:var(--status-surface-green); }
    .category-overview-card:has(.status-yellow),
    .category:has(> .category-head .status-yellow),
    .admin-workspace .admin-category-row:has(.status-yellow),
    .demo-overview-card:has(.status-yellow),
    .demo-list-row:has(.status-yellow) { background:var(--status-surface-yellow); }
    .category-overview-card:has(.status-red),
    .category:has(> .category-head .status-red),
    .admin-workspace .admin-category-row:has(.status-red),
    .demo-overview-card:has(.status-red),
    .demo-list-row:has(.status-red) { background:var(--status-surface-red); }
    .category-overview-card .category-overview-status { background:transparent !important; }
}

/* Alternating entries within each category; print layout stays unchanged. */
@media screen {
    .category { --entry-light:#f4f6f1; --entry-dark:#e4eadd; }
    .category:has(> .category-head .status-green) { --entry-light:#f1f8eb; --entry-dark:#dcecd2; }
    .category:has(> .category-head .status-yellow) { --entry-light:#fff9e7; --entry-dark:#f4e6b9; }
    .category:has(> .category-head .status-red) { --entry-light:#fff1ee; --entry-dark:#f4d5cf; }
    html:is(.dark,.dark-mode) .category { --entry-light:#263229; --entry-dark:#1b251e; }
    html:is(.dark,.dark-mode) .category:has(> .category-head .status-green) { --entry-light:#304733; --entry-dark:#223626; }
    html:is(.dark,.dark-mode) .category:has(> .category-head .status-yellow) { --entry-light:#494128; --entry-dark:#342f20; }
    html:is(.dark,.dark-mode) .category:has(> .category-head .status-red) { --entry-light:#513632; --entry-dark:#372522; }
    .category > :is(.participant-list,.dropzone) > [data-participant-id] {
        background:var(--entry-light);
        padding-inline:12px;
        border-radius:8px;
        margin-block:6px;
    }
    .category > :is(.participant-list,.dropzone) > :nth-child(even of [data-participant-id]) {
        background:var(--entry-dark);
    }
    html:not(.dark):not(.dark-mode) #addParticipantButton {
        background:linear-gradient(120deg,#23751b,#185e14) !important;
    }
    html:not(.dark):not(.dark-mode) #addParticipantButton:hover { background:#185e14 !important; }
}
