:root {
    --cream: #fffdf9;
    --coral: #ff6f61;
    --coral-ink: #fff;
    --lavender: #a99be8;
    --mint: #bfe8d4;
    --ink: #24242a;
    --muted: #77747a;
    --card: #ffffff;
    --line: rgba(36, 36, 42, 0.08);
    --shadow: 0 10px 30px rgba(36, 36, 42, 0.06);
    --radius: 18px;
    --font: "DM Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.45;
}

body.d16 {
    min-height: 100dvh;
}

a { color: var(--ink); }

h1 {
    margin: 0 0 0.35rem;
    font-size: 1.85rem;
    line-height: 1.12;
    letter-spacing: -0.03em;
    font-weight: 700;
}

h2 {
    margin: 1.4rem 0 0.5rem;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

p { margin: 0.4rem 0; }

.d16-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem 0.35rem;
}

.d16-mark {
    font-weight: 700;
    letter-spacing: -0.04em;
    text-decoration: none;
    font-size: 1.05rem;
}

.d16-top__side {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.d16-top__side a { color: var(--muted); text-decoration: none; }
.d16-top__side a:hover { color: var(--ink); }

.d16-inline { margin: 0; }

.d16-textbtn,
.d16-chip {
    border: 0;
    background: var(--card);
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--line);
}

.d16-chip:hover { border-color: var(--coral); color: var(--coral); }

.d16-sheet {
    width: min(440px, 100%);
    margin: 0 auto;
    padding: 0.6rem 1.15rem 3rem;
}

.d16-land { padding-top: 8vh; }

.d16-kicker {
    margin: 0 0 0.45rem;
    color: var(--lavender);
    font-weight: 600;
    font-size: 0.92rem;
}

.d16-lead {
    color: var(--muted);
    font-size: 1.05rem;
    margin-bottom: 1.1rem;
}

.d16-note { color: var(--muted); font-size: 0.92rem; }

.d16-cardpad {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem 1.05rem;
    margin: 1rem 0;
}

.d16-form { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.6rem; }
.d16-form label { font-size: 0.85rem; color: var(--muted); margin-top: 0.45rem; }

.d16-form input,
.d16-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink);
    border-radius: 14px;
    padding: 0.85rem 0.9rem;
    font: inherit;
    box-shadow: var(--shadow);
}

.d16-form textarea { resize: vertical; }

.d16-form select {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink);
    border-radius: 14px;
    padding: 0.85rem 0.9rem;
    font: inherit;
    box-shadow: var(--shadow);
}

.d16-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 0.7rem;
    padding: 0.75rem 1.1rem;
    border: 0;
    border-radius: 14px;
    background: var(--coral);
    color: var(--coral-ink);
    font: inherit;
    font-weight: 650;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.d16-btn[disabled] { opacity: 0.4; cursor: default; }

.d16-btn--ghost {
    background: var(--card);
    color: var(--ink);
    border: 1px solid var(--line);
    box-shadow: none;
}

.d16-stack .d16-btn { width: 100%; }

.d16-check {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    margin: 0.8rem 0 0.2rem;
}

.d16-alert {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.7rem 0.85rem;
    margin: 0.6rem 0;
}

.d16-alert--ok { background: var(--mint); border-color: transparent; }

.d16-match {
    background: var(--mint);
    border-radius: 16px;
    padding: 0.9rem 1rem;
    font-weight: 650;
    font-weight: 600;
    animation: d16-in 0.45s ease;
}

@keyframes d16-in {
    from { opacity: 0; transform: translateY(6px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

.d16-day {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0.4rem 0.95rem 0.8rem;
    margin: 0.7rem 0;
}

.d16-day summary {
    cursor: pointer;
    font-weight: 650;
    font-weight: 600;
    padding: 0.55rem 0;
}

.d16-list { list-style: none; margin: 0.3rem 0 0; padding: 0; }
.d16-list__item {
    padding: 0.7rem 0;
    border-top: 1px solid var(--line);
}
.d16-list a { color: var(--coral); font-weight: 600; text-decoration: none; }

.d16-stage {
    margin: 0;
    color: var(--lavender);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.d16-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
}

.d16-result em {
    flex: 0 0 auto;
    font-style: normal;
    font-weight: 700;
    color: var(--coral);
    font-size: 0.88rem;
}

.d16-day h2 {
    margin: 0.85rem 0 0.15rem;
    font-size: 0.95rem;
}

.d16-person {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 0.85rem;
    align-items: start;
    margin-top: 0.4rem;
}

.d16-person img {
    width: 92px;
    height: 116px;
    object-fit: cover;
    border-radius: 18px;
    background: #f3efe9;
    display: block;
}

.d16-person h1 {
    font-size: 1.35rem;
    margin-bottom: 0.15rem;
}

.d16-person .d16-pills { margin: 0.45rem 0; }

.d16-person .d16-pill {
    border: 1px solid var(--line);
}

.d16-person .d16-pill--family { border-color: transparent; }

.d16-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.55rem 0.8rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 253, 249, 0.94);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(10px);
}

.d16-nav a {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    text-decoration: none;
    color: var(--muted);
    font-weight: 650;
    font-weight: 600;
    font-size: 0.86rem;
    padding: 0.45rem 0.35rem;
    border-radius: 999px;
}

.d16-nav a.is-on {
    background: var(--ink);
    color: #fff;
}

body:has(.d16-nav) .d16-sheet {
    padding-bottom: calc(5.2rem + env(safe-area-inset-bottom, 0px));
}

.d16-meta { color: var(--muted); }

.d16-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.d16-tags span {
    background: rgba(169, 155, 232, 0.22);
    color: var(--ink);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.82rem;
}

.d16-thread { display: flex; flex-direction: column; gap: 0.4rem; margin: 0.8rem 0; }
.d16-bubble {
    align-self: flex-start;
    max-width: 85%;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0.65rem 0.8rem;
}
.d16-bubble.is-mine {
    align-self: flex-end;
    background: var(--coral);
    color: #fff;
    border-color: transparent;
}

body.is-play {
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

body.is-play .d16-top { flex: 0 0 auto; padding-bottom: 0; }

.d16-play {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0 0.7rem 0.45rem;
}

.d16-playhead { flex: 0 0 auto; padding: 0 0.25rem 0.25rem; }
.d16-playhead h1 { font-size: 1.35rem; }
.d16-sub { margin: 0; color: var(--muted); font-size: 0.92rem; }

.d16-steps {
    display: flex;
    gap: 0.35rem;
    list-style: none;
    margin: 0 0 0.45rem;
    padding: 0;
}

.d16-steps li {
    display: flex;
    align-items: center;
}

.d16-steps li span {
    min-width: 1.85rem;
    height: 1.85rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--card);
    color: var(--muted);
    border: 1px solid var(--line);
    font-size: 0.78rem;
    font-weight: 650;
    font-weight: 600;
}

.d16-steps li.is-now span {
    background: var(--coral);
    color: #fff;
    border-color: transparent;
}

.d16-steps li.is-done span {
    background: var(--mint);
    color: var(--ink);
    border-color: transparent;
}

.d16-steps li + li::before {
    content: "";
    width: 0.45rem;
    height: 1px;
    background: var(--line);
    margin-right: 0.35rem;
}

.d16-board {
    flex: 1 1 auto;
    min-height: 0;
    container-type: size;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

.d16-board:has(.is-detail) {
    align-items: flex-start;
    justify-content: center;
}

.d16-grid {
    --cols: 4;
    --rows: 4;
    --gap: 0.4rem;
    display: grid;
    gap: var(--gap);
    grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
    grid-template-rows: repeat(var(--rows), minmax(0, 1fr));
    aspect-ratio: var(--cols) / var(--rows);
    width: min(100cqw, calc(100cqh * var(--cols) / var(--rows)));
    height: min(100cqh, calc(100cqw * var(--rows) / var(--cols)));
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.d16-grid.is-leaving {
    opacity: 0;
    transform: translateY(8px);
}

.d16-grid.is-detail {
    width: min(100%, 520px);
    height: auto;
    max-height: none;
    aspect-ratio: auto;
    overflow: visible;
    align-self: flex-start;
    grid-template-rows: none;
    grid-auto-rows: max-content;
}

.d16-card {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    background: #f4efe8;
    color: var(--ink);
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(36, 36, 42, 0.05);
    transition: transform 0.22s ease, opacity 0.22s ease, filter 0.22s ease, box-shadow 0.22s ease;
}

.d16-card.is-picked {
    box-shadow: 0 0 0 2px var(--coral), 0 8px 18px rgba(255, 111, 97, 0.18);
    transform: scale(0.985);
}

.d16-card.is-rest {
    opacity: 0.38;
    filter: saturate(0.35);
    pointer-events: none;
}

.d16-card__photo,
.d16-card__photo img,
.d16-card__empty {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.d16-card__photo img,
.d16-card__empty {
    object-fit: cover;
    display: block;
}

.d16-card__empty { background: #f3eee7; }

.d16-rank {
    position: absolute;
    top: 0.35rem;
    left: 0.35rem;
    z-index: 2;
    min-width: 1.45rem;
    height: 1.45rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: var(--coral);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.45rem;
    text-align: center;
}

.d16-grid.is-detail .d16-card {
    position: relative;
    height: auto;
    aspect-ratio: 3 / 4;
    min-height: 0;
    display: block;
    background: #f4efe8;
    border: 0;
    overflow: hidden;
}

.d16-grid.is-detail .d16-card__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.d16-card__overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 2.4rem 0.7rem 0.75rem;
    background: linear-gradient(to top, rgba(36, 36, 42, 0.78) 0%, rgba(36, 36, 42, 0.35) 58%, rgba(36, 36, 42, 0) 100%);
    color: #fff;
    text-align: left;
}

.d16-card__overlay strong {
    font-size: 1.05rem;
    font-weight: 650;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.d16-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.d16-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 253, 249, 0.94);
    color: var(--ink);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
}

.d16-pill em {
    font-style: normal;
    font-weight: 600;
    color: var(--muted);
}

.d16-pill--family {
    background: rgba(191, 232, 212, 0.96);
}

.d16-onphoto {
    font-size: 0.78rem;
    color: rgba(255, 253, 249, 0.92);
}

.d16-card__overlay .d16-tags span {
    background: rgba(255, 253, 249, 0.22);
    color: #fff;
}

.d16-card__overlay .d16-bio {
    color: rgba(255, 253, 249, 0.92);
    font-size: 0.78rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.d16-board:has(.is-eight) {
    align-items: center;
    overflow: hidden;
}

@container (min-width: 960px) {
    .d16-grid.is-eight {
        --cols: 4 !important;
        --rows: 2 !important;
    }
}

.d16-grid.is-eight .d16-card__overlay {
    padding-top: 1.6rem;
}

.d16-grid.is-eight .d16-card__overlay strong {
    font-size: 0.95rem;
}

.d16-grid.is-eight .d16-pill {
    font-size: 0.68rem;
}

.d16-board:has(.is-finale) {
    align-items: flex-start;
    justify-content: center;
    overflow: auto;
}

.d16-grid.is-finale {
    width: min(100%, 920px);
    height: auto;
    max-height: none;
    aspect-ratio: auto;
    align-self: flex-start;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-rows: max-content;
    --gap: 0.9rem;
}

@media (min-width: 860px) {
    .d16-grid.is-finale {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

.d16-grid.is-finale .d16-card {
    height: auto;
    display: flex;
    flex-direction: column;
    background: var(--card);
    border-radius: 22px;
    font: inherit;
    color: inherit;
    text-align: left;
}

.d16-grid.is-finale .d16-card__photo {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 4;
    max-height: 38vh;
    flex: 0 0 auto;
}

.d16-grid.is-finale .d16-card__photo img,
.d16-grid.is-finale .d16-card__empty {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.d16-card__sheet {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.95rem 1rem 1.1rem;
    text-align: left;
    background: #fff;
    color: var(--ink);
}

.d16-card__sheet strong {
    font-size: 1.28rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.d16-place {
    color: var(--muted);
    font-size: 0.9rem;
}

.d16-card__sheet .d16-pill {
    border: 1px solid var(--line);
}

.d16-card__sheet .d16-pill--family {
    border-color: transparent;
}

.d16-rubric {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    width: 100%;
    margin-top: 0.2rem;
}

.d16-rubric > em {
    font-style: normal;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--lavender);
}

.d16-card__sheet .d16-bio {
    color: var(--ink);
    font-size: 0.92rem;
    line-height: 1.45;
    display: block;
}

.d16-card__sheet .d16-tags span {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    background: rgba(169, 155, 232, 0.2);
    color: var(--ink);
    font-weight: 600;
}

.d16-card__sheet .d16-tags svg {
    width: 14px;
    height: 14px;
    color: #7d70c4;
    flex: 0 0 auto;
}

.d16-dock {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.35rem 0.15rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
}

.d16-hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.d16-dock .d16-btn { width: 100%; margin-top: 0.15rem; }

body.is-play .d16-alert { margin: 0 0.2rem 0.3rem; }

.d16-sheet--profile {
    width: min(980px, 100%);
}

.d16-profile {
    display: grid;
    gap: 1.15rem;
    margin-top: 0.4rem;
}

.d16-portrait {
    position: relative;
    width: min(100%, 280px);
    margin: 0 auto;
    aspect-ratio: 4 / 5;
    border-radius: 28px;
    overflow: hidden;
    background:
        linear-gradient(160deg, rgba(169, 155, 232, 0.35), rgba(191, 232, 212, 0.55)),
        #f3efe9;
    box-shadow: var(--shadow);
}

.d16-portrait img,
.d16-portrait__empty {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.d16-portrait [hidden] { display: none !important; }

.d16-portrait__bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    padding: 2.2rem 0.8rem 0.85rem;
    background: linear-gradient(to top, rgba(36, 36, 42, 0.55), rgba(36, 36, 42, 0));
}

.d16-file {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.d16-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 44px;
    margin: 0;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(36, 36, 42, 0.16);
}

.d16-upload svg {
    width: 16px;
    height: 16px;
}

.d16-file:focus-visible + .d16-portrait__bar .d16-upload,
.d16-upload:focus-visible {
    outline: 2px solid var(--coral);
    outline-offset: 3px;
}

.d16-profile__card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 1rem 1rem 1.15rem;
}

.d16-fields {
    display: grid;
    gap: 0.85rem;
}

.d16-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.d16-field-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.d16-field-head span {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--ink);
}

.d16-field > label,
.d16-field-head > label,
.d16-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.d16-profile input[type="text"],
.d16-profile input[type="number"],
.d16-profile textarea,
.d16-profile select {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--cream);
    color: var(--ink);
    border-radius: 14px;
    padding: 0.8rem 0.9rem;
    font: inherit;
}

.d16-profile select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2377747A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    padding-right: 2.4rem;
}

.d16-profile select[hidden] { display: none !important; }

.d16-range {
    width: 100%;
    height: 28px;
    margin: 0.15rem 0 0;
    accent-color: #FF6F61;
    background: transparent;
}

.d16-range-scale {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.75rem;
}

.d16-profile textarea { resize: vertical; min-height: 140px; }

.d16-profile input[type="text"]:focus,
.d16-profile input[type="number"]:focus,
.d16-profile textarea:focus,
.d16-profile select:focus {
    outline: none;
    border-color: var(--lavender);
    box-shadow: 0 0 0 3px rgba(169, 155, 232, 0.35);
    background: #fff;
}

.d16-section {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 1.15rem 0 0.55rem;
}

.d16-section h2 { margin: 0; }

.d16-picks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.d16-ipill {
    position: relative;
    margin: 0;
}

.d16-ipill input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.d16-ipill span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 40px;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--cream);
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.d16-ipill svg {
    width: 15px;
    height: 15px;
    color: #7d70c4;
    flex: 0 0 auto;
}

.d16-ipill input:checked + span {
    background: var(--ink);
    color: #fff;
    border-color: transparent;
}

.d16-ipill input:checked + span svg { color: var(--mint); }

.d16-ipill input:focus-visible + span {
    box-shadow: 0 0 0 3px rgba(169, 155, 232, 0.55);
}

.d16-ipill input:disabled + span {
    opacity: 0.38;
    cursor: default;
}

.d16-savebar {
    position: sticky;
    top: 0.55rem;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    margin: 0 0 1rem;
    padding: 0.7rem 0.75rem 0.7rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 253, 249, 0.94);
    box-shadow: 0 8px 24px rgba(36, 36, 42, 0.06);
}

.d16-savebar strong {
    display: block;
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.d16-savebar .d16-note { margin: 0.12rem 0 0; }

.d16-savebar .d16-btn {
    margin-top: 0;
    flex: 0 0 auto;
    min-width: 128px;
}

.d16-fold {
    margin: 1.15rem 0 0.15rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.d16-fold summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 52px;
    padding: 0.7rem 1rem;
    cursor: pointer;
    list-style: none;
    font-weight: 700;
}

.d16-fold summary::-webkit-details-marker { display: none; }

.d16-fold summary::after {
    content: "";
    width: 8px;
    height: 8px;
    margin-left: 0.15rem;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg) translateY(-2px);
    flex: 0 0 auto;
}

.d16-fold[open] summary::after {
    transform: rotate(-135deg) translateY(-1px);
}

.d16-fold__count {
    margin-left: auto;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 650;
}

.d16-fold .d16-picks {
    padding: 0 0.85rem 0.95rem;
}

.d16-ipill--icon span {
    min-height: 48px;
    padding: 0.22rem 0.9rem 0.22rem 0.22rem;
    gap: 0.55rem;
    font-size: 0.95rem;
}

.d16-ipill--icon svg {
    width: 32px;
    height: 32px;
    color: #fff;
}

.d16-ipill--icon input:checked + span svg { color: #fff; }

@media (min-width: 860px) {
    .d16-profile {
        grid-template-columns: 280px minmax(0, 1fr);
        align-items: start;
        gap: 1.5rem;
    }

    .d16-profile__side {
        position: sticky;
        top: 1rem;
    }

    .d16-portrait {
        width: 100%;
        margin: 0;
    }

    .d16-fields--split {
        grid-template-columns: 1fr 1fr;
    }

    .d16-field--wide { grid-column: 1 / -1; }

    .d16-profile__save .d16-btn {
        width: auto;
        min-width: 220px;
        margin-top: 0;
    }
}
