:root {
    --sun: #ffcc33;
    --sun-deep: #f3b91e;
    --ink: #24211f;
    --muted: #746e67;
    --cream: #fff9e8;
    --paper: #fffef9;
    --pink: #f15b72;
    --pink-soft: #ffe3e7;
    --mint: #2f9d78;
    --mint-soft: #dff4eb;
    --blue: #4776e6;
    --line: rgba(36, 33, 31, .12);
    --shadow: 0 20px 55px rgba(76, 57, 11, .13);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* { box-sizing: border-box; }

html { min-width: 0; background: var(--sun); }

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: clip;
    color: var(--ink);
    font-family: "DM Sans", system-ui, sans-serif;
    background:
        radial-gradient(circle at 8% 28%, rgba(255,255,255,.25) 0 4px, transparent 5px),
        radial-gradient(circle at 91% 15%, rgba(255,255,255,.22) 0 6px, transparent 7px),
        var(--sun);
}

button, input, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

.page-shell { width: min(1220px, calc(100% - 40px)); margin: 0 auto; }

.topbar {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid rgba(36,33,31,.18);
}

.brand { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; color: var(--ink); text-decoration: none; }
.brand-wordmark { --wordmark-outline: rgba(157,47,68,.74); display: block; width: 190px; height: 63px; object-fit: contain; object-position: left center; filter: drop-shadow(-.7px 0 0 var(--wordmark-outline)) drop-shadow(.7px 0 0 var(--wordmark-outline)) drop-shadow(0 -.7px 0 var(--wordmark-outline)) drop-shadow(0 .7px 0 var(--wordmark-outline)) drop-shadow(0 3px 0 rgba(36,33,31,.12)); transition: transform .18s ease; }
.brand:hover .brand-wordmark { transform: rotate(-1deg) translateY(-1px) scale(1.02); }
.brand-mascot { width: 43px; height: 43px; display: block; object-fit: contain; filter: drop-shadow(0 3px 0 rgba(36,33,31,.12)); transition: transform .22s cubic-bezier(.2,.9,.28,1.35); }
.brand:hover .brand-mascot { transform: translateY(-2px) rotate(4deg) scale(1.08); }

.top-actions, .profile-chip, .language-chip { display: flex; align-items: center; }
.top-actions { gap: 10px; }
.icon-button, .language-chip, .profile-chip { border: 1px solid rgba(36,33,31,.17); background: rgba(255,255,255,.38); cursor: pointer; transition: .2s ease; }
.icon-button:hover, .language-chip:hover, .profile-chip:hover { background: rgba(255,255,255,.7); transform: translateY(-1px); }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; font-size: 20px; }
.language-chip { height: 40px; gap: 8px; padding: 0 13px; border-radius: 20px; font-size: 13px; font-weight: 800; }
.profile-chip { gap: 10px; min-height: 52px; padding: 4px 13px 4px 5px; border-radius: 28px; text-align: left; }
.profile-copy { display: grid; }
.profile-copy strong { font-size: 13px; }
.profile-copy small { font-size: 11px; color: var(--muted); }
.mini-avatar { width: 40px; height: 40px; position: relative; display: grid; place-items: end center; overflow: hidden; border-radius: 50%; background: #f7af91; border: 2px solid var(--paper); }
.mini-hair { position: absolute; inset: -8px 3px auto; height: 24px; border-radius: 50%; background: #3d2925; }
.mini-face { position: relative; font-size: 12px; margin-bottom: 7px; }

.welcome-row { padding: 54px 2px 28px; display: flex; justify-content: space-between; align-items: end; gap: 44px; }
.eyebrow { display: block; margin-bottom: 9px; color: #815f00; font-size: 11px; font-weight: 900; letter-spacing: 1.4px; text-transform: uppercase; }
h1, h2 { font-family: Nunito, sans-serif; margin: 0; }
h1 { font-size: clamp(42px, 6vw, 72px); line-height: .92; letter-spacing: -3.4px; max-width: 700px; }
h1 em { color: var(--paper); font-style: normal; text-shadow: 2px 2px 0 var(--ink); }
.welcome-row p { max-width: 590px; margin: 20px 0 0; color: #5f4b14; font-size: 17px; line-height: 1.55; }
.welcome-actions { display: flex; gap: 10px; flex-shrink: 0; }

.button { min-height: 48px; display: inline-flex; justify-content: center; align-items: center; gap: 9px; border-radius: 15px; border: 0; padding: 0 19px; font-weight: 800; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(1px) scale(.98); }
.button-primary { background: var(--pink); color: white; box-shadow: 0 5px 0 #bd3c51, 0 13px 25px rgba(177,51,73,.2); }
.button-primary:hover { box-shadow: 0 6px 0 #bd3c51, 0 16px 25px rgba(177,51,73,.24); }
.button-ghost { background: rgba(255,255,255,.42); border: 1px solid rgba(36,33,31,.16); }
.button-dark { background: var(--ink); color: white; }
.full-width { width: 100%; }

.privacy-banner { min-height: 62px; padding: 11px 18px; margin-bottom: 16px; display: flex; align-items: center; gap: 13px; border: 1px solid rgba(36,33,31,.1); border-radius: var(--radius-lg); background: rgba(255,255,255,.56); }
.privacy-banner .privacy-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; background: var(--mint-soft); }
.privacy-banner div { display: flex; flex: 1; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; }
.privacy-banner div span { color: #6d644f; }
.privacy-banner button { border: 0; background: transparent; text-decoration: underline; font-weight: 700; font-size: 12px; cursor: pointer; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(330px, .75fr); gap: 16px; }
.dashboard-grid.is-full-list { grid-template-columns: minmax(0, 1fr); }
.dashboard-grid.is-full-list > .detail-card { display: none; }
.ranking-card, .detail-card { border: 1px solid rgba(36,33,31,.1); border-radius: var(--radius-xl); background: var(--paper); box-shadow: var(--shadow); }
.ranking-card { min-width: 0; padding: 28px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 22px; }
.card-heading h2, .detail-card h2 { font-size: 27px; letter-spacing: -.8px; }
.ranking-tools { display: flex; align-items: end; gap: 9px; }
.view-toggle { min-height: 39px; display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fff8e5; font-size: 11px; font-weight: 900; cursor: pointer; }
.view-toggle[hidden] { display: none; }
.view-toggle[aria-pressed="true"] { color: #9f2f43; background: var(--pink-soft); border-color: rgba(241,91,114,.3); }
.sort-control { display: grid; gap: 4px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .7px; }
.sort-control select { min-width: 155px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 30px 8px 10px; background: white; color: var(--ink); font-weight: 700; font-size: 12px; text-transform: none; letter-spacing: 0; }
.ex-list { min-width: 0; display: grid; gap: 9px; }
.ex-row { width: 100%; min-height: 78px; display: grid; grid-template-columns: 34px 58px minmax(100px, 1fr) auto 17px; align-items: center; gap: 13px; padding: 9px 15px 9px 11px; border: 1px solid transparent; border-radius: 18px; background: #faf7ef; text-align: left; cursor: pointer; transition: .18s ease; }
.ex-row:hover { background: #fff4d5; transform: translateX(3px); }
.ex-row.is-selected { border-color: rgba(241,91,114,.24); background: #fff0f2; }
.ex-row-full { position: relative; width: calc(100% - 14px); min-height: 116px; display: grid; grid-template-columns: minmax(175px, .8fr) minmax(0, 2.4fr) minmax(116px, .58fr); align-items: center; gap: 12px; margin-inline-start: 14px; padding: 13px 10px 13px 25px; border: 1px solid rgba(36,33,31,.08); border-radius: 20px; background: #faf7ef; transition: transform .18s ease, background .18s ease; }
.ex-row-full:hover { background: #fff8e6; transform: translateY(-1px); }
.full-ex-identity { min-width: 0; display: grid; grid-template-columns: 58px minmax(80px, 1fr); align-items: center; gap: 10px; }
.full-parameters { min-width: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 5px; }
.full-parameter { --metric-strength: 0; --metric-alpha: .3; --metric-gray: 1; --metric-saturate: .55; position: relative; min-width: 0; min-height: 68px; display: grid; place-items: center; align-content: center; gap: 2px; padding: 4px 1px; border: 0; border-radius: 13px; background: rgba(255,255,255,.7); cursor: pointer; transform-origin: center; }
.full-parameter-icon { position: relative; width: 39px; height: 39px; display: block; opacity: var(--metric-alpha); }
.full-parameter-icon img { width: 100%; height: 100%; display: block; object-fit: contain; filter: grayscale(var(--metric-gray)) saturate(var(--metric-saturate)); }
.full-parameter-icon::after { content: ""; position: absolute; inset: 0; background: var(--pink); opacity: calc(var(--metric-strength) * .82); mix-blend-mode: color; -webkit-mask: var(--metric-icon) center / contain no-repeat; mask: var(--metric-icon) center / contain no-repeat; pointer-events: none; }
.full-parameter strong { font-family: Nunito, sans-serif; font-size: 16px; line-height: 1; }
.full-score-zone { display: grid; grid-template-columns: minmax(82px, 1fr) 35px; align-items: center; gap: 7px; }
.full-average { min-height: 78px; display: grid; place-items: center; align-content: center; gap: 2px; border: 0; border-radius: 18px; color: var(--ink); background: var(--sun); cursor: pointer; transform-origin: center; }
.full-average strong { font-family: Nunito, sans-serif; font-size: 36px; line-height: .95; letter-spacing: -1.5px; }
.full-average span { color: #ba344c; font-size: 12px; letter-spacing: 0; white-space: nowrap; }
.full-row-actions { display: grid; gap: 7px; }
.full-row-actions button { width: 35px; height: 35px; display: grid; place-items: center; padding: 5px; border: 1px solid var(--line); border-radius: 11px; background: white; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.full-row-actions button:hover { background: var(--pink-soft); transform: scale(1.08) rotate(-2deg); }
.metric-tooltip { --tooltip-x: -50%; position: absolute; z-index: 8; left: 50%; bottom: calc(100% + 7px); width: max-content; max-width: min(150px, calc(100vw - 28px)); padding: 6px 9px; border-radius: 9px; color: white; background: var(--ink); box-shadow: 0 5px 12px rgba(36,33,31,.2); font-size: 10px; font-weight: 900; line-height: 1.15; opacity: 0; pointer-events: none; transform: translate(var(--tooltip-x), 7px) scale(.78); }
.metric-tooltip::after { content: ""; position: absolute; left: 50%; top: 100%; border: 5px solid transparent; border-top-color: var(--ink); transform: translateX(-50%); }
.full-parameter.is-tooltip-visible .metric-tooltip { animation: metric-tooltip-pop 1.2s cubic-bezier(.2,.86,.25,1) both; }
.is-score-boing { animation: score-boing .46s cubic-bezier(.2,.88,.28,1.35); }
.score-spark { position: fixed; z-index: 120; color: var(--sun-deep); font-style: normal; font-size: 18px; line-height: 1; pointer-events: none; text-shadow: 0 1px 0 #8c5d08; animation: score-spark-fall .85s var(--spark-delay) cubic-bezier(.18,.72,.3,1) forwards; }
@keyframes score-boing { 0% { transform: scale(1); } 38% { transform: scale(1.2) rotate(-3deg); } 68% { transform: scale(.94) rotate(2deg); } 100% { transform: scale(1); } }
@keyframes score-spark-fall { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.4) rotate(0); } 18% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--spark-x)), var(--spark-y)) scale(.8) rotate(var(--spark-r)); } }
@keyframes metric-tooltip-pop { 0% { opacity: 0; transform: translate(var(--tooltip-x),8px) scale(.72); } 18%,76% { opacity: 1; transform: translate(var(--tooltip-x),0) scale(1); } 88% { transform: translate(var(--tooltip-x),-2px) scale(1.05); } 100% { opacity: 0; transform: translate(var(--tooltip-x),-8px) scale(.9); } }
.rank { color: #8b8278; font-family: Nunito, sans-serif; font-weight: 900; text-align: center; }
.rank-first { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 10px; background: var(--sun); color: var(--ink); transform: rotate(-4deg); }
.ex-row-full .rank { position: absolute; z-index: 3; inset-inline-start: -14px; top: 17px; width: 32px; height: 32px; display: grid; place-items: center; border: 2px solid var(--paper); border-radius: 50%; color: var(--ink); background: var(--sun); box-shadow: 0 3px 0 rgba(36,33,31,.18); transform: rotate(-4deg); }
.ex-row-full .rank-first { color: white; background: var(--pink); }
.avatar { --skin: #c87954; --hair: #362420; width: 54px; height: 54px; position: relative; display: inline-block; flex-shrink: 0; overflow: hidden; border: 0; border-radius: 19px; background: #bde5ef; }
.avatar::before { content: ""; position: absolute; z-index: 1; width: 38px; height: 44px; left: 8px; top: 11px; border-radius: 48% 48% 38% 38%; background: var(--skin); }
.avatar .hair { position: absolute; z-index: 3; left: 5px; top: 3px; width: 44px; height: 24px; border-radius: 55% 52% 25% 28%; background: var(--hair); transform: rotate(-5deg); }
.avatar .hair::after { content: ""; position: absolute; right: -1px; top: 9px; width: 9px; height: 24px; border-radius: 6px; background: var(--hair); }
.avatar .face { position: absolute; z-index: 4; inset: 0; }
.avatar .face i { position: absolute; top: 29px; width: 4px; height: 5px; border-radius: 50%; background: var(--ink); }
.avatar .face i:first-child { left: 18px; }
.avatar .face i:nth-child(2) { right: 18px; }
.avatar .face b { position: absolute; left: 23px; top: 39px; width: 9px; height: 4px; border-bottom: 2px solid #7f373c; border-radius: 0 0 8px 8px; }
.mascot-avatar { display: grid; place-items: center; padding: 3px; background: var(--pink-soft); }
.mascot-avatar::before, .mascot-avatar .hair, .mascot-avatar .face, .mascot-avatar .avatar-neck { display: none; }
.mascot-avatar img { width: 112%; height: 112%; display: block; object-fit: contain; filter: drop-shadow(0 3px 2px rgba(36,33,31,.13)); }
.avatar-alex { --skin: #f0bd96; --hair: #d06e36; background: #c9d1ff; }
.avatar-alex .hair { height: 19px; border-radius: 80% 40% 20% 40%; transform: rotate(5deg); }
.avatar-taylor { --skin: #784b37; --hair: #171413; background: #ffccd5; }
.avatar-taylor .hair { left: 1px; top: -3px; width: 52px; height: 39px; border-radius: 50% 50% 35% 35%; }
.avatar-taylor .hair::before, .avatar-taylor .hair::after { content: ""; position: absolute; top: 1px; width: 15px; height: 15px; border-radius: 50%; background: var(--hair); }
.avatar-taylor .hair::before { left: -4px; }
.avatar-taylor .hair::after { right: -4px; }
.avatar-four { --skin: #f3caad; --hair: #e0b82e; background: #c6f0d9; }
.avatar-four .hair { border-radius: 20% 80% 25% 40%; }
.ex-summary { display: grid; gap: 4px; }
.ex-summary strong { font-family: Nunito, sans-serif; font-size: 17px; }
.ex-summary small { color: var(--muted); font-size: 12px; }
.score-pill { display: grid; min-width: 83px; justify-items: end; }
.score-pill strong { font-family: Nunito, sans-serif; font-size: 19px; }
.score-pill span { color: var(--sun-deep); font-size: 11px; letter-spacing: 1px; }
.score-pill span i { color: #d8d3cb; font-style: normal; }
.row-arrow { color: #a09a91; font-size: 25px; }
.limit-meter { margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--line); }
.limit-meter div { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.limit-meter div strong { color: var(--ink); }
.meter-track { height: 6px; margin: 8px 0 12px; display: block; overflow: hidden; border-radius: 10px; background: #eee9dd; }
.meter-track i { display: block; width: 30%; height: 100%; border-radius: inherit; background: var(--pink); }
.limit-meter button { border: 0; padding: 0; background: none; color: #a73649; font-size: 12px; font-weight: 800; cursor: pointer; }

.detail-card { padding: 25px; background: var(--cream); }
.detail-top { display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 15px; }
.detail-avatar { width: 72px; height: 72px; border-radius: 24px; transform: scale(1.05); }
.detail-avatar::before { width: 50px; height: 58px; left: 11px; top: 14px; }
.detail-avatar .hair { left: 7px; width: 58px; height: 31px; }
.detail-avatar .face i { top: 38px; }
.detail-avatar .face i:first-child { left: 24px; }
.detail-avatar .face i:nth-child(2) { right: 24px; }
.detail-avatar .face b { left: 31px; top: 50px; width: 11px; }
.detail-top .eyebrow { margin-bottom: 1px; }
.detail-top h2 { line-height: 1; }
.detail-top div button { border: 0; background: none; padding: 4px 0 0; color: var(--muted); font-size: 11px; text-decoration: underline; cursor: pointer; }
.more-button { align-self: start; border: 0; background: transparent; letter-spacing: 2px; cursor: pointer; }
.big-score { margin: 24px 0 17px; padding: 19px; border-radius: 21px; background: var(--sun); text-align: center; }
.big-score strong { font-family: Nunito, sans-serif; font-size: 48px; line-height: 1; letter-spacing: -2px; }
.big-score div span { color: #6f5710; font-weight: 700; }
.big-score p { margin: 5px 0 0; color: #6f5710; font-size: 12px; font-weight: 600; }
.parameter-preview { display: grid; gap: 8px; margin-bottom: 18px; }
.parameter-preview > div { min-height: 55px; display: grid; grid-template-columns: 37px 1fr auto; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 14px; background: white; }
.parameter-icon { width: 34px; height: 34px; display: grid; place-items: center; padding: 1px; border-radius: 11px; font-size: 16px; }
.icon-peace { color: var(--blue); background: #e8efff; }
.icon-heart { color: var(--pink); background: var(--pink-soft); }
.icon-compass { color: var(--mint); background: var(--mint-soft); }
.parameter-preview > div > span:nth-child(2) { display: grid; }
.parameter-preview strong { font-size: 12px; }
.parameter-preview small { color: var(--muted); font-size: 10px; }
.parameter-preview b { font-family: Nunito, sans-serif; font-size: 14px; }

footer { min-height: 80px; display: flex; justify-content: space-between; align-items: center; gap: 20px; color: #735a13; font-size: 11px; }
footer nav { display: flex; gap: 18px; }
footer a { color: inherit; }

.toast { position: fixed; z-index: 50; left: 50%; bottom: 24px; min-width: 260px; display: grid; grid-template-columns: 35px 1fr; padding: 13px 18px; border-radius: 16px; background: var(--ink); color: white; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translate(-50%, 25px); transition: .3s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast > span { grid-row: 1 / 3; align-self: center; color: var(--sun); font-size: 22px; }
.toast strong { font-size: 13px; }
.toast small { color: #d4cfca; }

.quick-dialog { width: min(470px, calc(100% - 28px)); padding: 31px; border: 1px solid rgba(36,33,31,.15); border-radius: 28px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 100px rgba(36,33,31,.32); }
.quick-dialog::backdrop { background: rgba(47,38,18,.4); backdrop-filter: blur(4px); }
.quick-dialog h2 { font-size: 35px; }
.quick-dialog > p { color: var(--muted); font-size: 14px; line-height: 1.5; }
.dialog-close { position: absolute; right: 17px; top: 14px; width: 35px; height: 35px; border: 0; border-radius: 50%; background: #f4eee2; font-size: 25px; cursor: pointer; }
.quick-dialog label { display: grid; gap: 7px; margin: 20px 0 16px; font-size: 12px; font-weight: 800; }
.quick-dialog input { width: 100%; height: 49px; border: 1px solid var(--line); border-radius: 13px; padding: 0 14px; background: white; outline: 0; }
.quick-dialog input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px var(--pink-soft); }
.dialog-avatars { display: flex; gap: 10px; margin-bottom: 22px; }
.dialog-avatars .avatar { cursor: pointer; transition: .16s ease; }
.dialog-avatars .avatar:hover, .dialog-avatars .avatar.is-picked { outline: 3px solid var(--pink); outline-offset: 2px; transform: translateY(-2px); }

@media (max-width: 900px) {
    .page-shell { width: min(100% - 28px, 720px); }
    .welcome-row { align-items: start; flex-direction: column; padding-top: 40px; gap: 24px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-grid.is-full-list > .detail-card { display: none; }
    .ex-row-full { grid-template-columns: minmax(0, 1fr) 124px; gap: 12px; }
    .full-ex-identity { grid-column: 1; grid-row: 1; }
    .full-parameters { grid-column: 1 / 3; grid-row: 2; grid-template-columns: repeat(8, minmax(44px, 1fr)); }
    .full-score-zone { grid-column: 2; grid-row: 1; }
    .full-parameter:first-child .metric-tooltip { --tooltip-x: 0; left: 0; }
    .full-parameter:last-child .metric-tooltip { --tooltip-x: 0; right: 0; left: auto; }
}

@media (max-width: 600px) {
    .page-shell { width: min(100% - 20px, 520px); }
    .topbar { min-height: 72px; }
    .brand-wordmark { width: 146px; height: 49px; }
    .brand-mascot { width: 35px; height: 35px; }
    .profile-copy, .sound-toggle { display: none; }
    .profile-chip { min-height: 42px; padding: 1px; border: 0; background: transparent; }
    .mini-avatar { width: 38px; height: 38px; }
    h1 { font-size: 44px; letter-spacing: -2.4px; }
    .welcome-row { padding-top: 31px; }
    .welcome-row p { font-size: 14px; }
    .welcome-actions { width: 100%; }
    .welcome-actions .button { flex: 1; padding-inline: 10px; }
    .privacy-banner { align-items: flex-start; }
    .privacy-banner div { display: grid; }
    .privacy-banner .vault-lock-button { display: inline-flex; }
    .home-privacy-banner { min-height: 0; align-items: center; gap: 8px; padding: 8px 10px; }
    .home-privacy-banner .privacy-icon { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 11px; }
    .home-privacy-banner div { min-width: 0; display: block; font-size: 11px; line-height: 1.25; }
    .home-privacy-banner div strong, .home-privacy-banner div span { display: block; }
    .home-privacy-banner div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .home-privacy-banner a { flex: 0 0 auto; }
    .ranking-card { padding: 20px 13px; border-radius: 22px; }
    .card-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(110px, 126px); align-items: flex-start; gap: 10px; }
    .card-heading h2 { font-size: 22px; }
    .ranking-tools { min-width: 0; align-items: stretch; flex-direction: column-reverse; }
    .demo-dashboard .ranking-tools { flex-direction: column; }
    .demo-dashboard .demo-label { align-self: flex-end; }
    .view-toggle { justify-content: center; }
    .sort-control { width: 116px; }
    .sort-control select { min-width: 0; width: 100%; }
    .ex-row { grid-template-columns: 24px 50px minmax(80px, 1fr) auto; min-height: 70px; gap: 9px; padding-inline: 7px 10px; }
    .avatar { width: 48px; height: 48px; border-radius: 16px; transform: scale(.9); }
    .row-arrow { display: none; }
    .ex-row .ex-summary small { display: -webkit-box; overflow: hidden; font-size: 9px; line-height: 1.2; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
    .score-pill { min-width: 54px; }
    .score-pill span { font-size: 8px; letter-spacing: 0; }
    .ex-row-full { width: calc(100% - 10px); grid-template-columns: minmax(0, 1fr) 88px; gap: 8px; margin-inline-start: 10px; padding: 12px 9px 12px 20px; }
    .full-ex-identity { grid-column: 1; grid-template-columns: 46px minmax(0, 1fr); gap: 7px; }
    .full-ex-identity .row-generated-avatar { width: 46px; height: 46px; }
    .full-ex-identity .mascot-avatar.row-generated-avatar { transform: none; }
    .ex-row-full .rank { inset-inline-start: -11px; top: 17px; width: 27px; height: 27px; font-size: 12px; }
    .full-ex-identity .ex-summary { min-width: 0; }
    .full-ex-identity .ex-summary strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
    .full-ex-identity .ex-summary small { display: -webkit-box; overflow: hidden; font-size: 8px; line-height: 1.15; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
    .full-parameters { grid-column: 1 / 3; grid-row: 2; grid-template-columns: repeat(4, minmax(42px, 1fr)); }
    .full-parameter:nth-child(4n+1) .metric-tooltip { --tooltip-x: 0; left: 0; right: auto; }
    .full-parameter:nth-child(4n) .metric-tooltip { --tooltip-x: 0; right: 0; left: auto; }
    .full-parameter-icon { width: 34px; height: 34px; }
    .full-score-zone { grid-column: 2; grid-row: 1; grid-template-columns: minmax(54px, 1fr) 27px; gap: 4px; }
    .full-average { min-height: 62px; }
    .full-average strong { font-size: 29px; }
    .full-average span { font-size: 9px; }
    .full-row-actions { grid-template-columns: 1fr; gap: 4px; }
    .full-row-actions button { width: 27px; height: 27px; padding: 3px; border-radius: 9px; }
    footer { align-items: flex-start; flex-direction: column; padding: 25px 3px; }
}

@media (max-width: 430px) {
    .home-privacy-banner div span { display: none; }
}

@media (max-width: 360px) {
    .ranking-card { padding-inline: 10px; }
    .card-heading { grid-template-columns: minmax(0, 1fr) 108px; }
    .sort-control { width: 108px; }
    .ex-row-full { width: calc(100% - 8px); margin-inline-start: 8px; padding-inline: 18px 7px; }
    .full-ex-identity { grid-template-columns: 42px minmax(0, 1fr); gap: 6px; }
    .full-ex-identity .row-generated-avatar { width: 42px; height: 42px; }
    .full-score-zone { grid-template-columns: minmax(50px, 1fr) 25px; }
    .full-row-actions button { width: 25px; height: 25px; }
    .full-parameter { min-height: 62px; }
    .full-parameter-icon { width: 31px; height: 31px; }
    .full-parameter strong { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
