.bones-page {
    background:
        radial-gradient(900px 420px at 10% -10%, rgba(212, 175, 55, .16), transparent 60%),
        radial-gradient(700px 380px at 100% 0%, rgba(148, 163, 184, .18), transparent 55%),
        #f6f3ec;
}
.bones-wrap {
    width: min(1120px, calc(100% - 1.5rem));
    margin: 0 auto 4rem;
}
.bones-layout {
    width: min(1440px, calc(100% - 1.5rem));
    margin: 1.25rem auto 4rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: stretch;
}
.bones-main { min-width: 0; }
@media (min-width: 1024px) {
    .bones-layout {
        display: grid;
        grid-template-columns: 16rem minmax(0, 1fr);
        align-items: start;
        gap: 1.5rem;
    }
    .bones-layout.has-picked {
        grid-template-columns: 16rem minmax(0, 1fr) 18.5rem;
    }
}
.bones-side-nav { display: grid; gap: .25rem; }
.bones-side-nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 0 .85rem;
    border-radius: .9rem;
    color: #475569;
    font-weight: 700;
    font-size: .95rem;
}
.bones-side-nav a i { width: 1.25rem; text-align: center; color: #b8962e; }
.bones-side-nav a:hover { background: #faf7f0; color: #0f172a; }
.bones-side-nav a.is-on {
    background: rgba(212, 175, 55, .16);
    color: #0f172a;
}
.bones-picked-card {
    background: #fff;
    border: 1px solid #efe8da;
    border-radius: 1.25rem;
    box-shadow: 0 12px 40px rgba(80, 60, 20, .06);
    padding: .9rem .85rem 1rem;
}
.bones-picked-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .65rem;
}
.bones-picked-head .bones-kicker { margin: 0; }
#bone-picked-list {
    display: grid;
    gap: .4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.bones-picked-item {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-height: 48px;
    padding: .4rem .4rem .4rem .75rem;
    border-radius: .9rem;
    border: 1px solid #efe8da;
    background: #fcfbf8;
}
.bones-picked-item strong {
    display: block;
    color: #0f172a;
    font-size: .92rem;
    line-height: 1.2;
}
.bones-picked-item small {
    display: block;
    color: #94a3b8;
    font-style: italic;
}
.bones-picked-item span { min-width: 0; flex: 1; }
.bones-picked-remove {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 0;
    border-radius: .75rem;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
}
.bones-picked-remove:hover { background: #fff1f2; color: #9f1239; }
@media (max-width: 1023px) {
    .bones-picked { order: -1; }
    .bones-picked:not(.has-items) { display: none; }
    #bonesSidebar.public-section-drawer:not(.is-open) { box-shadow: none; }
}
.bones-card {
    background: #fff;
    border: 1px solid #efe8da;
    border-radius: 1.5rem;
    box-shadow: 0 12px 40px rgba(80, 60, 20, .06);
}
.bones-card + .bones-card { margin-top: 1rem; }
.bones-intro {
    display: grid;
    gap: 1rem;
    padding: 1.1rem 1.15rem;
}
@media (min-width: 800px) {
    .bones-intro { grid-template-columns: 1.4fr .8fr; align-items: center; }
}
.bones-kicker {
    color: #b8962e;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.bones-note {
    color: #64748b;
    font-size: .92rem;
    line-height: 1.5;
}
.bones-presets {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}
.bones-presets button {
    min-height: 44px;
    border-radius: 999px;
    border: 1px solid #e7e1d4;
    background: #fff;
    padding: 0 .95rem;
    font-weight: 700;
    color: #334155;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset;
}
.bones-presets button:hover,
.bones-presets button.is-on {
    border-color: #d4af37;
    background: #fff8e8;
    color: #7a6220;
}
.bones-count {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    margin-top: .85rem;
    padding: 0 .8rem;
    border-radius: 999px;
    background: #f4f0e6;
    color: #64748b;
    font-size: .84rem;
    font-weight: 800;
}
.bones-picks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .5rem;
}
.bones-picks.is-count { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 520px) {
    .bones-picks.is-count { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.bones-picks.is-mode { grid-template-columns: 1fr; }
@media (min-width: 800px) {
    .bones-picks.is-mode { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.bones-field .bones-pick {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    margin: 0;
    padding: .55rem .7rem;
    border: 1.5px solid #e4dccb;
    border-radius: .95rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(80, 60, 20, .04);
    color: #334155;
    font-size: .92rem;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.bones-field .bones-pick span { display: block; }
.bones-field .bones-pick input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}
.bones-field .bones-pick:hover { border-color: #d4af37; }
.bones-field .bones-pick:has(input:checked) {
    border-color: #d4af37;
    background: linear-gradient(180deg, #fffdf6 0%, #fff1c4 100%);
    color: #6b5420;
    box-shadow: inset 0 0 0 1px #d4af37, 0 8px 18px rgba(212, 175, 55, .16);
}
.bones-field .bones-pick:focus-within {
    outline: 2px solid #d4af37;
    outline-offset: 2px;
}
.bones-search {
    position: relative;
    margin: .15rem 1rem .35rem;
}
.bones-search i {
    position: absolute;
    left: .95rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}
.bones-search input {
    width: 100%;
    min-height: 48px;
    border-radius: 1rem;
    border: 1px solid #e7e1d4;
    background: #fbfaf7;
    padding: 0 .9rem 0 2.45rem;
}
.bones-search input:focus {
    outline: none;
    border-color: #d4af37;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, .22);
}
#bone-search-empty { padding: 0 1rem .6rem; }
.bones-save {
    display: grid;
    gap: .65rem;
    margin: 0 1.15rem 1rem;
    padding: .95rem;
    border-radius: 1.25rem;
    border: 1px solid #f0e4c4;
    background: linear-gradient(180deg, #fffaf0, #fff);
}
.bones-save input {
    width: 100%;
    min-height: 48px;
    min-width: 0;
    border-radius: 1rem;
    border: 1px solid #e7e1d4;
    background: #fff;
    padding: 0 .85rem;
}
@media (min-width: 800px) {
    .bones-save { grid-template-columns: minmax(0, 1.3fr) minmax(0, 14rem) auto; align-items: center; }
}
.bones-back {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .75rem;
    padding: 0 .95rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e7e1d4;
    font-weight: 800;
    color: #334155;
    box-shadow: 0 8px 20px rgba(80, 60, 20, .05);
}
.bones-back:hover { border-color: #d4af37; color: #7a6220; }
.bones-setup,
.bones-settings {
    display: grid;
    gap: 1rem;
    padding: 1rem 1.15rem .4rem;
}
@media (min-width: 800px) {
    .bones-settings { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.bones-settings .bones-field:has(.bones-picks) { grid-column: 1 / -1; }
.bones-field label,
.bones-field > p {
    display: block;
    font-size: .78rem;
    font-weight: 800;
    color: #64748b;
    margin-bottom: .35rem;
}
.bones-field select,
.bones-field input[type="text"],
.bones-field input[type="number"],
.bones-field input[type="datetime-local"],
.bones-field input[type="search"] {
    width: 100%;
    min-height: 48px;
    border-radius: 1rem;
    border: 1px solid #e7e1d4;
    background: #fff;
    padding: 0 .9rem;
    min-width: 0;
    max-width: 100%;
    color: #0f172a;
    font-weight: 600;
}
.bones-field select {
    appearance: none;
    min-height: 52px;
    padding-right: 3.1rem;
    border-width: 1.5px;
    font-weight: 700;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='14' fill='%23f4efe4'/%3E%3Cpath d='M9 12.2 14 17.2 19 12.2' fill='none' stroke='%23b8962e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .6rem center;
    background-size: 28px 28px;
}
.bones-field select:focus,
.bones-field input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, .22);
}
.bone-picker { padding-bottom: .4rem; }
.bone-region {
    margin: 0 .85rem .55rem;
    border: 1px solid #efe8da;
    border-radius: 1.05rem;
    background: #fff;
    overflow: hidden;
}
.bone-region summary {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: 0 .85rem;
    cursor: pointer;
    font-weight: 800;
    color: #0f172a;
    list-style: none;
    background: #fcfbf8;
    user-select: none;
}
.bone-region summary::-webkit-details-marker { display: none; }
.bone-region summary::marker { content: ""; }
.bone-region summary::before {
    content: "";
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 999px;
    background: #f3efe6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M9 12.2 14 17.2 19 12.2' fill='none' stroke='%23b8962e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 28px 28px no-repeat;
    transition: transform .15s ease, background-color .15s ease;
}
.bone-region[open] { border-color: #ead9a4; }
.bone-region[open] summary { background: #fffaf0; }
.bone-region[open] summary::before { transform: rotate(180deg); background-color: #fff1c4; }
.bone-region summary:hover { background: #fffaf0; }
.bones-region-count {
    margin-left: auto;
    min-width: 1.7rem;
    height: 1.7rem;
    padding: 0 .4rem;
    border-radius: 999px;
    background: #f3efe6;
    color: #94a3b8;
    font-size: .75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.bones-checks {
    display: grid;
    gap: .45rem;
    padding: .35rem .65rem .7rem;
}
@media (min-width: 700px) {
    .bones-checks { grid-template-columns: 1fr 1fr; }
}
.bones-check {
    position: relative;
    display: flex;
    gap: .75rem;
    align-items: center;
    min-height: 58px;
    padding: .65rem .8rem .65rem .75rem;
    border-radius: 1rem;
    border: 1px solid #efe8da;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.bones-check:hover { border-color: #e4d3a2; }
.bones-check input {
    width: 1.15rem;
    height: 1.15rem;
    accent-color: #b8962e;
    flex: 0 0 auto;
}
.bones-check strong {
    display: block;
    color: #0f172a;
    letter-spacing: -.01em;
}
.bones-check:has(input:checked) {
    border-color: #d4af37;
    background: linear-gradient(180deg, #fffdf8, #fff6df);
    box-shadow: 0 8px 18px rgba(212, 175, 55, .14);
}
.bones-check small {
    display: block;
    color: #94a3b8;
    font-style: italic;
}
.bones-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    padding: 0 1.15rem 1.15rem;
}
.bones-btn {
    min-height: 48px;
    border-radius: 1rem;
    padding: 0 1.1rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    border: 0;
}
.bones-btn-primary {
    background: linear-gradient(180deg, #e3c56a, #d4af37);
    color: #1f2937;
    box-shadow: 0 8px 20px rgba(212, 175, 55, .28);
}
.bones-btn-ghost {
    background: #fff;
    color: #334155;
    border: 1px solid #e7e1d4;
}
.bones-list-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: .9rem 1.1rem;
    border-top: 1px solid #f4efe6;
}
.bones-list-row a { font-weight: 800; color: #0f172a; }
.bones-play {
    display: grid;
    gap: 1rem;
}
@media (min-width: 1024px) {
    .bones-play { grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); align-items: start; }
}
.bones-play > * { min-width: 0; }
.bones-stage-card {
    padding: .8rem;
}
@media (min-width: 1024px) {
    .bones-stage-card { position: sticky; top: calc(var(--site-top-offset, 4rem) + 1rem); }
}
.bone-stage-scroll { overflow-x: auto; }
.bone-fig { width: 100%; height: auto; display: block; min-width: 280px; }
.bone-fig[data-view="ear"] { min-width: 0; }
.bone-fig [data-bone] { cursor: pointer; }
.bone-fig path:not([data-bone]):not(.bone-shape) { pointer-events: none; }
.bone-fig g[data-bone] path:not(.bone-shape),
.bone-fig g[data-part-of] path:not(.bone-shape) { pointer-events: auto; }
.bone-fig [data-bone]:not(.bone-shape):hover,
.bone-fig [data-bone]:not(.bone-shape):hover path,
.bone-fig [data-part-of]:not(.bone-shape):hover,
.bone-fig [data-part-of]:not(.bone-shape):hover path {
    stroke: #2563eb !important;
    stroke-width: 1.75px !important;
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}
.bone-fig [data-bone].is-hot:not(.bone-shape),
.bone-fig [data-bone].is-hot:not(.bone-shape) path,
.bone-fig [data-part-of].is-hot:not(.bone-shape),
.bone-fig [data-part-of].is-hot:not(.bone-shape) path {
    stroke: #1d4ed8 !important;
    stroke-width: 2.25px !important;
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    paint-order: fill stroke;
}
.bone-fig[data-view="ear"] > .bone-hit {
    fill: transparent;
    stroke: none;
}
.bone-fig[data-view="ear"] > .bone-hit:hover {
    fill: #bfdbfe !important;
    fill-opacity: 0.75 !important;
}
.bone-fig[data-view="ear"] > .bone-hit.is-hot:not(.bone-shape) {
    fill: #60a5fa !important;
    fill-opacity: 0.9 !important;
    stroke: #1d4ed8 !important;
    stroke-width: 5px !important;
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    paint-order: stroke fill;
}
.bone-fig [data-bone].is-ok:not(.bone-shape),
.bone-fig [data-bone].is-ok:not(.bone-shape) path,
.bone-fig [data-part-of].is-ok:not(.bone-shape),
.bone-fig [data-part-of].is-ok:not(.bone-shape) path {
    fill: #8fd4a8 !important;
    stroke: #1b4332 !important;
}
.bone-fig [data-bone].is-bad:not(.bone-shape),
.bone-fig [data-bone].is-bad:not(.bone-shape) path,
.bone-fig [data-part-of].is-bad:not(.bone-shape),
.bone-fig [data-part-of].is-bad:not(.bone-shape) path {
    fill: #f0a3a3 !important;
    stroke: #9b2226 !important;
}
.bone-fig .bone-shape {
    fill: #f7f1e4;
    stroke: #8a7760;
    stroke-width: 1.6;
    cursor: pointer;
}
.bone-fig .bone-shape.is-line {
    fill: none;
    stroke: #c3b29a;
    stroke-width: 8;
    stroke-linecap: round;
}
.bone-fig .bone-shape:hover { fill: #fff6df; }
.bone-fig .bone-shape.is-line:hover { stroke: #e6c56a; }
.bone-fig .bone-shape.is-hot { fill: #f6d98a; stroke: #b8962e; stroke-width: 2.4; }
.bone-fig .bone-shape.is-line.is-hot { fill: none; stroke: #d4af37; stroke-width: 11; }
.bone-fig .bone-shape.is-ok { fill: #b7e4c7; stroke: #2d6a4f; }
.bone-fig .bone-shape.is-line.is-ok { fill: none; stroke: #40916c; }
.bone-fig .bone-shape.is-bad { fill: #f8c9c9; stroke: #9b2226; }
.bone-fig .bone-shape.is-line.is-bad { fill: none; stroke: #c1121f; }
.bone-fig .bone-ghost { fill: rgba(148, 163, 184, .18); stroke: none; pointer-events: none; }
.bone-orient { fill: #94a3b8; font-size: 18px; font-family: inherit; pointer-events: none; }
.bones-views {
    display: flex;
    gap: .4rem;
    overflow-x: auto;
    margin-bottom: .6rem;
}
.bones-views button {
    flex: 0 0 auto;
    min-height: 44px;
    border-radius: 999px;
    border: 1px solid #e7e1d4;
    background: #fff;
    padding: 0 .75rem;
    font-weight: 700;
    font-size: .82rem;
    color: #475569;
}
.bones-views button.is-on { background: #1f2937; color: #fff; border-color: #1f2937; }
.bones-panel { padding: 1rem 1.05rem 1.15rem; }
.bones-prompt {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #0f172a;
    line-height: 1.25;
}
.bones-prompt em { font-style: italic; color: #7a6220; }
.bones-options { display: grid; gap: .45rem; margin-top: .9rem; }
.bones-options button {
    min-height: 48px;
    text-align: left;
    border-radius: 1rem;
    border: 1px solid #e7e1d4;
    background: #fff;
    padding: .55rem .8rem;
    font-weight: 750;
    font-weight: 700;
}
.bones-options button.is-ok { background: #e8f7ee; border-color: #40916c; }
.bones-options button.is-bad { background: #fdecec; border-color: #c1121f; }
.bones-hint {
    margin-top: .8rem;
    padding: .75rem .85rem;
    border-radius: 1rem;
    background: #f8fafc;
    color: #475569;
    font-size: .92rem;
    line-height: 1.45;
}
.bone-wholes {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: .45rem;
}
.bone-whole {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin: 0;
    padding: 0 .85rem;
    border-radius: 999px;
    border: 1px solid #e7d7a1;
    background: #fffaf0;
    color: #7a6220;
    font-weight: 700;
    font-size: .92rem;
    line-height: 1.2;
    cursor: pointer;
    vertical-align: middle;
}
.bone-whole:hover,
.bone-whole:focus-visible {
    border-color: #d4af37;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, .28);
}
.bones-qlist { display: grid; gap: .4rem; margin-top: .8rem; max-height: none; }
.bones-q {
    min-height: 44px;
    width: 100%;
    text-align: left;
    border-radius: .9rem;
    border: 1px solid #e7e1d4;
    background: #fff;
    padding: .45rem .7rem;
    font-weight: 700;
}
.bones-q.is-on { border-color: #d4af37; background: #fffaf0; }
.bones-q.is-ok { border-color: #40916c; }
.bones-q.is-bad { border-color: #c1121f; }
.bones-option-card {
    display: flex;
    gap: .7rem;
    align-items: flex-start;
    min-height: 44px;
    padding: .7rem .8rem;
    border-radius: 1rem;
    border: 1px solid #e7e1d4;
    background: #fff;
}
.bones-option-card:has(input:checked) { border-color: #d4af37; background: #fffaf0; }
.bones-students {
    display: grid;
    gap: .25rem;
    max-height: 16rem;
    overflow-y: auto;
    border: 1px solid #f1ebe1;
    border-radius: 1rem;
    padding: .4rem;
}
@media (max-width: 1023px) {
    .bones-stage-card { position: static; }
}
