.tier-page {
    --tier-ink: #3b322b;
    --tier-muted: #8b7c70;
    --tier-line: #e9dfd3;
    --tier-paper: #fffdf8;
    --tier-hand: "Huninn", "Yomogi", cursive;
    color: var(--tier-ink);
}
html[lang="zh-Hans"] .tier-page { --tier-hand: "ZCOOL KuaiLe", "Huninn", sans-serif; }
html[lang="ja"] .tier-page { --tier-hand: "Yomogi", "Huninn", sans-serif; }
html[lang="ko"] .tier-page { --tier-hand: "Gaegu", sans-serif; }
.tier-page [hidden], .tier-toast[hidden] { display: none !important; }
.tier-page button { -webkit-tap-highlight-color: transparent; }
.tier-page button:focus-visible { outline: 3px solid #b45d7d; outline-offset: 4px; }
.tier-page button:disabled { cursor: default; opacity: .45; }
.tier-hero {
    overflow: hidden;
    background: radial-gradient(circle at 12% 25%, #e8efd5 0, transparent 29%), radial-gradient(circle at 90% 18%, #ffe6eb 0, transparent 30%), #fffcf5;
    border-bottom: 1px solid #eee4d9;
}
.tier-hero-inner { position: relative; max-width: 1100px; margin: auto; padding: 32px 24px 36px; text-align: center; }
.tier-eyebrow { color: #a46c7b; font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.tier-hero h1 { margin: 8px 0 10px; font: 700 clamp(30px, 4vw, 46px)/1.3 var(--tier-hand); letter-spacing: -.035em; }
.tier-subtitle { max-width: 680px; margin: auto; color: #867668; font-size: 15px; line-height: 1.8; }
.tier-doodle { position: absolute; top: 62px; font: 48px var(--tier-hand); pointer-events: none; }
.tier-doodle-left { left: 3%; color: #e9c8c9; transform: rotate(-15deg); }
.tier-doodle-right { right: 4%; color: #bed29b; transform: rotate(12deg); }
.tier-stage {
    padding: 26px 24px 48px;
    background: radial-gradient(#d7cdbf55 .8px, transparent .8px) 0 0 / 16px 16px, #f8f5ec;
}
.tier-wrap { max-width: 1140px; margin: auto; }
.tier-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.tier-toolbar > p { color: #8b7c70; font-size: 13px; line-height: 1.7; }
.tier-toolbar > p i { color: #d28b9d; margin-right: 7px; }
.tier-text-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; color: #8b7c70; font-size: 12px; font-weight: 600; transition: color .15s; }
.tier-text-button:hover:enabled { color: #b45d7d; }
.tier-grid { display: grid; grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr); align-items: start; gap: 28px; }
.tier-paper { border: 2px solid var(--tier-ink); border-radius: 22px; background: var(--tier-paper); box-shadow: 5px 6px 0 #68523d12; }
.tier-play { position: relative; padding: 25px 27px 18px; text-align: center; }
.tier-play::before {
    content: ""; position: absolute; top: -11px; left: calc(50% - 30px); width: 60px; height: 21px; background: #d3e5b9b3; transform: rotate(-4deg);
    clip-path: polygon(0 0, 7% 14%, 14% 0, 21% 14%, 28% 0, 35% 14%, 42% 0, 49% 14%, 56% 0, 63% 14%, 70% 0, 77% 14%, 84% 0, 91% 14%, 100% 0, 100% 100%, 0 100%);
}
.tier-progress-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.tier-kicker { color: var(--tier-muted); font-size: 11px; font-weight: 700; letter-spacing: .07em; }
#tierCounter { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tier-progress-track { height: 7px; border: 1.5px solid var(--tier-ink); border-radius: 6px; overflow: hidden; background: #fff; }
.tier-progress-track > span { display: block; width: 0; height: 100%; background: #ef9fba; transition: width .2s; }
.tier-character-stage { position: relative; display: flex; align-items: center; justify-content: center; height: 212px; margin: 17px 0 8px; }
.tier-character-stage::before { content: ""; position: absolute; width: 188px; height: 188px; border-radius: 48% 52% 45% 55%; background: #f8f0e4; transform: rotate(-9deg); }
.tier-character-stage img { position: relative; width: 210px; height: 190px; object-fit: contain; border-radius: 15px; }
.tier-character-doodle { position: absolute; right: 5%; top: 8px; z-index: 1; font: 34px var(--tier-hand); color: #dea1ae; transform: rotate(15deg); }
.tier-play h2 { margin: 3px 0 5px; font: 700 28px/1.25 var(--tier-hand); outline: none; overflow-wrap: anywhere; }
.tier-question { margin: 0 0 20px; font-size: 12px; color: var(--tier-muted); }
.tier-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.tier-color-S { --rank-color: #f8c7d7; --rank-ink: #8b425f; background: var(--rank-color); color: var(--rank-ink); }
.tier-color-A { --rank-color: #faddbb; --rank-ink: #90612d; background: var(--rank-color); color: var(--rank-ink); }
.tier-color-B { --rank-color: #e4edc9; --rank-ink: #657341; background: var(--rank-color); color: var(--rank-ink); }
.tier-color-C { --rank-color: #dceaf2; --rank-ink: #526e82; background: var(--rank-color); color: var(--rank-ink); }
.tier-choice { display: flex; align-items: center; gap: 10px; padding: 13px 12px; min-height: 54px; border: 1.5px solid var(--tier-ink); border-radius: 12px; box-shadow: 0 3px 0 #3b322b15; text-align: left; transition: transform .15s, box-shadow .15s; }
.tier-choice strong { font-size: 22px; line-height: 1; }
.tier-choice span { flex: 1; font-size: 12px; font-weight: 700; }
.tier-choice i { font-size: 12px; opacity: .7; }
.tier-choice:hover { transform: translateY(-2px); box-shadow: 0 5px 0 #3b322b15; }
.tier-choice[aria-pressed="true"] { outline: 2px solid var(--rank-ink); outline-offset: 3px; }
.tier-play-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.tier-key-hint { margin-top: 4px; font-size: 10px; color: #a59a8d; }
.tier-board-panel { padding: 25px 23px 18px; }
.tier-board-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 19px; }
.tier-board-heading h2 { margin-top: 3px; font: 700 26px/1.3 var(--tier-hand); }
.tier-count-pill { flex-shrink: 0; padding: 6px 10px; border: 1px solid #e4d6c9; border-radius: 20px; background: #f8f1e5; color: #8b7561; font-size: 11px; font-weight: 700; }
.tier-board { overflow: hidden; border: 1.5px solid var(--tier-ink); border-radius: 13px; }
.tier-row { display: flex; min-height: 87px; border-bottom: 1px solid #e4d9cd; }
.tier-row:last-child { border-bottom: 0; }
.tier-row-label { flex: 0 0 88px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; padding: 12px 6px; border-right: 1px solid #3b322b30; text-align: center; }
.tier-row-label strong { font-size: 27px; line-height: 1.1; }
.tier-row-label > span { font-size: 10px; font-weight: 700; line-height: 1.5; }
.tier-row-items { flex: 1; display: flex; flex-wrap: wrap; align-items: center; align-content: center; gap: 7px; min-width: 0; padding: 8px 10px; transition: background .15s; }
.tier-row.is-dragover .tier-row-items { background: #f9e8ee; }
.tier-empty { display: block; width: 100%; text-align: center; font-size: 11px; color: #b6a99b; }
.tier-mini { position: relative; width: 58px; padding: 3px; border: 1px solid #e4d9cd; border-radius: 9px; background: #fff; transition: transform .15s, border-color .15s; }
.tier-mini:hover { transform: translateY(-3px); border-color: #c3829a; }
.tier-mini img { width: 50px; height: 50px; object-fit: cover; border-radius: 6px; }
.tier-board-hint { display: flex; justify-content: center; align-items: center; gap: 7px; margin: 14px 0 18px; color: #a09386; font-size: 10px; text-align: center; }
.tier-board-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tier-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 10px 14px; border: 1.5px solid var(--tier-ink); border-radius: 11px; font-size: 12px; font-weight: 700; transition: transform .15s, background .15s; }
.tier-button:hover:enabled { transform: translateY(-2px); }
.tier-button-primary { background: #ed9bb6; color: #51313e; box-shadow: 0 3px 0 #3b322b16; }
.tier-button-primary:hover:enabled { background: #e78eac; }
.tier-button-secondary { background: #fffdf8; }
.tier-button-secondary:hover:enabled { background: #f8f0e6; }
.tier-save-note { margin-top: 13px; color: #a09386; font-size: 10px; text-align: center; line-height: 1.6; }
.tier-roster { margin-top: 28px; padding: 21px 25px 23px; border-color: #d6c8b9; border-width: 1px; box-shadow: 3px 4px 0 #68523d08; }
.tier-roster-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tier-roster-heading h2 { font: 700 21px var(--tier-hand); }
.tier-roster-heading > span { color: #9a8c7c; font-size: 11px; }
.tier-roster > p { margin-top: 5px; font-size: 11px; color: #9a8c7c; }
.tier-roster-items { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 16px 12px; margin-top: 20px; }
.tier-roster-friend { position: relative; min-width: 0; text-align: center; }
.tier-roster-photo { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 5px; border: 1.5px solid #e4d9cd; border-radius: 14px; background: #fff; transition: border-color .15s, transform .15s; }
.tier-roster-friend img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }
.tier-roster-friend:hover .tier-roster-photo { transform: translateY(-3px); border-color: #c3829a; }
.tier-roster-friend.is-current .tier-roster-photo { border: 2px solid #bd748c; box-shadow: 0 0 0 3px #f8e3ea; }
.tier-roster-name { display: block; margin-top: 7px; font-size: 10px; line-height: 1.35; overflow-wrap: anywhere; }
.tier-roster-rank { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--tier-ink); border-radius: 50%; font-size: 11px; font-weight: 700; }
.tier-roster-skipped { background: #eee9e0; color: #958474; }
.tier-footer-note { margin-top: 25px; color: #ac9b8e; font-size: 11px; text-align: center; line-height: 1.7; }
.tier-footer-note i { margin-right: 5px; color: #dba1b1; }
.tier-finish { min-height: 550px; padding: 48px 28px; text-align: center; }
.tier-finish-heart { display: block; font: 70px/1.3 var(--tier-hand); color: #d7839e; }
.tier-finish h2 { margin: 14px 0; font: 700 30px/1.3 var(--tier-hand); outline: none; }
.tier-finish p { font-size: 13px; line-height: 1.9; color: #938373; }
.tier-finish-friends { display: flex; justify-content: center; gap: 8px; margin: 30px 0; }
.tier-finish-friends img { width: 75px; height: 75px; border-radius: 50%; object-fit: cover; border: 1px solid #e9dfd3; }
.tier-toast { position: fixed; z-index: 110; bottom: 28px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 32px); width: max-content; padding: 13px 20px; border: 1px solid #5f5146; border-radius: 12px; background: #3b322bf5; box-shadow: 0 4px 20px #0002; color: #fff9ed; font-size: 13px; text-align: center; }
.tier-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.tier-noscript { padding: 20px; text-align: center; }
@media (min-width: 1100px) { .tier-play { padding-right: 33px; padding-left: 33px; } }
@media (max-width: 900px) {
    .tier-grid { gap: 20px; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
    .tier-play, .tier-board-panel { padding: 22px 18px 17px; }
    .tier-row-label { flex-basis: 68px; }
    .tier-row-items { gap: 5px; padding: 7px; }
    .tier-roster-items { grid-template-columns: repeat(8, minmax(0, 1fr)); }
    .tier-choice { padding: 13px 9px; gap: 7px; }
    .tier-choice i { display: none; }
}
@media (max-width: 700px) {
    .tier-hero-inner { padding: 26px 18px 28px; }
    .tier-eyebrow { font-size: 10px; }
    .tier-hero h1 { font-size: 30px; }
    .tier-subtitle { font-size: 12px; max-width: 420px; }
    .tier-doodle { display: none; }
    .tier-stage { padding: 17px 16px 30px; }
    .tier-toolbar { gap: 10px; margin-bottom: 17px; }
    .tier-toolbar > p { font-size: 10px; max-width: 70%; }
    .tier-toolbar > button { flex-shrink: 0; font-size: 11px; }
    .tier-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .tier-play { padding: 24px 25px 17px; }
    .tier-character-stage { height: 190px; margin-top: 14px; }
    .tier-character-stage img { width: 200px; height: 180px; }
    .tier-play h2 { font-size: 27px; }
    .tier-question { margin-bottom: 18px; }
    .tier-choice { padding: 14px; }
    .tier-choice i { display: inline; }
    .tier-play-actions { margin-top: 13px; }
    .tier-key-hint { display: none; }
    .tier-board-panel { padding: 22px 17px 17px; }
    .tier-row-label { flex-basis: 70px; }
    .tier-row { min-height: 82px; }
    .tier-mini { width: 54px; }
    .tier-mini img { width: 46px; height: 46px; }
    .tier-roster { padding: 18px 15px 20px; margin-top: 24px; }
    .tier-roster-items { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px 10px; }
    .tier-roster-name { font-size: 9px; }
    .tier-roster-photo { padding: 3px; border-radius: 10px; }
    .tier-roster-photo img { border-radius: 7px; }
    .tier-roster-heading h2 { font-size: 20px; }
    .tier-roster-heading > span { font-size: 10px; }
    .tier-finish { min-height: 0; padding: 30px 25px; }
    .tier-finish-friends { margin: 22px 0; }
}
@media (prefers-reduced-motion: reduce) { .tier-page *, .tier-toast { transition: none !important; scroll-behavior: auto !important; } }
