/* Person Picker */
.tool-textarea--short { min-height: 92px; }
.name-count { color: var(--color-deep-warm); }
.warn-text { color: var(--color-coral-text); font-weight: 700; }

.never-add { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.never-word { font-weight: 700; font-size: .9rem; color: var(--color-muted-brown); white-space: nowrap; }
@media (max-width: 420px) {
    .never-add { grid-template-columns: 1fr; }
    .never-word { text-align: center; }
}
.chip--stale { opacity: .6; border-style: dashed; }
#never-list { margin-top: 4px; }

.extras { margin: var(--space-md) 0; }
.extras summary {
    cursor: pointer; font-weight: 700; min-height: var(--target-min);
    display: flex; align-items: center; color: var(--color-deep-warm);
}
.extras[open] summary { margin-bottom: var(--space-sm); }
.tool-card .btn-primary { margin-top: var(--space-sm); }

.seg--mini { margin-bottom: var(--space-md); }
.seg--mini .seg-btn { font-size: .9rem; min-height: var(--target-min); }

.link-list { list-style: none; padding: 0; margin: 0 0 var(--space-md); display: grid; gap: 6px; }
.link-list li {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 6px 6px 6px 14px; border: 2px solid var(--color-soft-gray); border-radius: var(--radius-md);
    background: var(--color-cream);
}
.link-list li.sent { border-color: var(--color-sage); background: var(--color-sage-soft); }
.link-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.pass-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.pass-btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 72px; padding: 10px; cursor: pointer;
    background: var(--color-yolk-soft); color: var(--color-ink);
    border: var(--line) solid var(--color-ink); border-radius: var(--radius-md); box-shadow: var(--pop-sm);
    font-family: var(--font-display); font-weight: 800; font-size: 1.05rem;
}
.pass-btn span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pass-btn small { font-family: var(--font-family); font-weight: 600; font-size: .8125rem; color: var(--color-muted-brown); }
.pass-btn.seen { background: var(--color-sage-soft); }
.pass-btn:active { transform: translate(2px, 2px); box-shadow: var(--pop-press); }

.organizer { margin-top: var(--space-lg); border-top: 2px dashed var(--color-soft-gray); padding-top: var(--space-md); }
.organizer summary { cursor: pointer; font-weight: 700; min-height: var(--target-min); display: flex; align-items: center; }
.pair-list { margin: var(--space-md) 0; padding-left: 1.4em; display: grid; gap: 4px; }
.redraw-row { margin-top: var(--space-md); justify-content: center; }

/* the reveal */
.reveal-view { max-width: var(--w-focus); margin: 6vh auto 0; text-align: center; }
.reveal-card { padding: 28px 22px; }
.reveal-card h1 { margin-bottom: 4px; }
.reveal-event { font-weight: 700; color: var(--color-deep-warm); margin: 0 0 var(--space-md); }
.reveal-kicker { font-weight: 700; margin: 0; color: var(--color-muted-brown); }
.reveal-name {
    font-family: var(--font-display); font-weight: 800; color: var(--color-ink);
    font-size: clamp(34px, 10vw, 52px); line-height: 1.1; margin: 8px 0 var(--space-md);
    overflow-wrap: anywhere; animation: pop-in .5s var(--transition-bounce, ease) both;
}
@keyframes pop-in { from { transform: scale(.6) rotate(-4deg); } to { transform: none; } }
.reveal-facts { list-style: none; padding: 12px; margin: 0 0 var(--space-md); background: var(--color-yolk-soft); border-radius: var(--radius-md); text-align: left; display: grid; gap: 4px; }
.reveal-bad { color: var(--color-coral-text); font-weight: 700; }

.sheet {
    position: fixed; inset: 0; z-index: 40;
    background: rgba(34, 30, 26, .55);
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.sheet-card {
    width: 100%; max-width: var(--w-focus); text-align: center;
    background: var(--color-warm-white); border: var(--line) solid var(--color-ink);
    border-radius: var(--radius-lg); box-shadow: var(--pop-lg); padding: 26px 20px;
}
.sheet-card h2 { margin: 0 0 6px; color: var(--color-ink); overflow-wrap: anywhere; }

/* the hat */
.hat {
    text-align: center; padding: 28px 12px; border-radius: var(--radius-lg);
    background: var(--color-eggshell); border: 2px dashed var(--color-warm-gray); margin-bottom: var(--space-sm);
}
.hat-emoji { font-size: 56px; display: block; }
.hat-name {
    font-family: var(--font-display); font-weight: 800; color: var(--color-ink);
    font-size: clamp(26px, 7vw, 44px); line-height: 1.15; margin: 8px 0 0; min-height: 1.2em; overflow-wrap: anywhere;
}
.hat.spinning .hat-emoji { animation: wobble .3s ease-in-out infinite; }
.hat.landed { background: var(--color-yolk-soft); border: var(--line) solid var(--color-ink); }
.hat.landed .hat-name { animation: pop-in .45s var(--transition-bounce, ease) both; }
@keyframes wobble { 0%,100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
.history-title { font-size: 1rem; margin: var(--space-md) 0 6px; }
.history { margin: 0; padding-left: 1.4em; columns: 2; }

/* teams */
.teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: var(--space-md); }
.team { border: var(--line) solid var(--color-ink); border-radius: var(--radius-md); padding: 12px 14px; box-shadow: var(--pop-sm); }
.team h3 { margin: 0 0 6px; font-size: 1.1rem; color: var(--color-ink); display: flex; justify-content: space-between; gap: 8px; }
.team h3 span { font-family: var(--font-family); font-size: .85rem; color: var(--color-muted-brown); }
.team { min-width: 0; }
.team ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.team.drop-ok { outline: 3px dashed var(--color-ink); outline-offset: 2px; }
.member { display: flex; align-items: center; gap: 4px; }
.member-name {
    flex: 1 1 auto; min-width: 0; min-height: 40px; text-align: left; cursor: grab;
    font: inherit; font-weight: 700; color: var(--color-deep-warm);
    background: rgba(255,255,255,.55); border: 2px solid transparent; border-radius: var(--radius-sm, 8px);
    padding: 6px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.member-name:hover { border-color: var(--color-warm-gray); }
.member-name[aria-pressed="true"] { border-color: var(--color-ink); background: var(--color-warm-white); box-shadow: var(--pop-sm); }
.member.dragging { opacity: .4; }
.member-pin {
    flex: 0 0 auto; width: 40px; min-height: 40px; cursor: pointer; font-size: 1rem;
    background: transparent; border: 2px solid transparent; border-radius: var(--radius-sm, 8px);
    filter: grayscale(1); opacity: .45;
}
.member-pin:hover { opacity: .8; }
.member-pin[aria-pressed="true"] { filter: none; opacity: 1; border-color: var(--color-ink); background: var(--color-warm-white); }
.team-move {
    width: 100%; margin-top: 8px; min-height: 40px; cursor: pointer;
    font: inherit; font-weight: 800; color: var(--color-ink);
    background: var(--color-warm-white); border: 2px dashed var(--color-ink); border-radius: var(--radius-sm, 8px);
}
.team-move[hidden] { display: none; }
@media print {
    .member-pin, .team-move { display: none; }
    .member-name { background: none; border: 0; padding: 2px 0; white-space: normal; overflow: visible; overflow-wrap: anywhere; }
}
.team--0 { background: var(--color-yolk-soft); }
.team--1 { background: var(--color-sage-soft); }
.team--2 { background: var(--color-coral-soft); }
.team--3 { background: var(--color-halo-soft); }
.team--4 { background: var(--color-plum-soft); }
.team--5 { background: var(--color-apricot-soft); }

@media print {
    .organizer { border: 0; margin: 0; padding: 0; }
    .tool-head, #santa-summary, .redraw-row, #santa-done > h2, .notice { display: none !important; }
    .organizer .pair-list:not([hidden]) { display: block !important; font-size: 13pt; }
    .link-list, .pass-grid, #santa-links, #santa-pass { display: none !important; }
}

#mode-title { overflow-wrap: anywhere; }
.title-presets { margin-top: 8px; }
.chip-btn { cursor: pointer; padding: 4px 12px; min-height: var(--target-min); color: var(--color-ink); font: inherit; font-weight: 700; font-size: .9rem; }
.chip-btn:hover { background: var(--color-yolk-soft); }
.chip-btn[aria-pressed="true"] { background: var(--color-yolk); }
