.seating-page { width: min(960px, 100%); margin: 24px auto; padding: 0 16px; box-sizing: border-box; }
.seating-back { display: inline-block; margin-bottom: 20px; color: var(--text-primary); }
.seating-game { box-sizing: border-box; width: min(920px, 100%); margin: 0 auto 24px; padding: 28px; background: var(--card-bg); color: var(--text-primary); border: 1px solid var(--border-light); border-radius: 24px; box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.1); }
.seating-game * { box-sizing: border-box; }
.seating-heading { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.seating-eyebrow { margin: 0 0 8px; color: var(--text-primary); font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.seating-eyebrow span { font-size: 10px; opacity: .6; letter-spacing: .16em; }
.seating-heading h1, .seating-heading h2 { margin: 0; padding: 0; border: 0; color: var(--text-strong); font-size: clamp(25px, 4vw, 36px); letter-spacing: .04em; line-height: 1.4; }
.seating-intro { margin: 10px 0 0; font-size: 14px; line-height: 1.8; }
.seating-week-badge { padding: 8px 12px; background: var(--surface-neutral-strong); border-radius: 20px; font-size: 11px; }
.seating-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 20px; font-size: 12px; }
.seating-meta p { margin: 0; }
.seating-count { white-space: nowrap; }
.seating-count strong { font-size: 22px; color: var(--text-strong); }
.seating-summary { margin: 12px 0 16px; font-size: 14px; font-weight: 600; line-height: 1.7; }
.seating-room { position: relative; padding: 160px 8% 34px; border-radius: 16px; background-color: #c59865; background-position: center; background-size: 100% 100%; background-repeat: no-repeat; overflow: hidden; border: 1px solid #b58e63; }
.seating-room.is-background-ready { background-image: url('../images/classroom.webp'); }
.seating-game [hidden] { display: none !important; }
.seating-full-badge {
    position: absolute; left: 14px; top: 14px; z-index: 3; isolation: isolate;
    max-width: calc(100% - 28px); padding: 10px 18px; overflow: hidden;
    border: 2px solid #fff1a6; border-radius: 12px;
    color: #513005; background: linear-gradient(120deg, #b77a21, #f6d76a 22%, #fff4b5 45%, #e9bd45 70%, #bd8126);
    font-size: clamp(20px, 2.7vw, 28px); line-height: 1.4; letter-spacing: .035em;
    text-shadow: 0 1px 0 #fff5c9; pointer-events: none;
    box-shadow: inset 0 1px 0 #fffbe5, inset 0 -2px 5px #91560955, 0 3px 10px #69450966, 0 0 16px #ffd45caa;
    animation: seating-gold-glow 3.6s ease-in-out infinite alternate;
}
.seating-full-badge span { position: relative; z-index: 1; }
.seating-full-badge::before {
    content: ''; position: absolute; top: -50%; bottom: -50%; left: -75%; width: 50%;
    background: linear-gradient(90deg, transparent, #fffef0bb, transparent);
    transform: skewX(-20deg); animation: seating-gold-shine 4.8s ease-in-out infinite;
}
.seating-full-badge::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 7% 18%, #fff 0 1px, transparent 3px), radial-gradient(circle at 94% 75%, #fff 0 1px, transparent 3px), radial-gradient(circle at 76% 12%, #fff 0 1px, transparent 2px);
}
@keyframes seating-gold-shine {
    0%, 20% { transform: translateX(0) skewX(-20deg); }
    65%, 100% { transform: translateX(500%) skewX(-20deg); }
}
@keyframes seating-gold-glow {
    to { box-shadow: inset 0 1px 0 #fffbe5, inset 0 -2px 5px #91560955, 0 3px 10px #69450966, 0 0 24px #ffe17bcc; }
}
@media (prefers-reduced-motion: reduce) {
    .seating-full-badge, .seating-full-badge::before { animation: none; }
}
.seating-grid { display: grid; grid-template-columns: repeat(5, minmax(44px, 1fr)); gap: 22px 14px; }
.seating-position { min-width: 0; }
.seating-seat { position: relative; display: block; width: 100%; min-width: 44px; height: 100px; min-height: 44px; padding: 0; border: 2px solid transparent; border-radius: 12px; background: transparent; color: #493522; text-decoration: none; font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.seating-seat::before { content: ''; position: absolute; width: 88%; height: 37px; top: 8px; left: 6%; border: 2px solid #87613d; border-radius: 6px; background: repeating-linear-gradient(0deg, #e5bb80 0 7px, #dfb275 8px 9px); box-shadow: 0 4px 0 #9b754d, 0 9px 8px #5a3b252b; }
.seating-seat::after { content: ''; position: absolute; z-index: 0; width: 40%; height: 22px; left: 30%; top: 61px; border: 2px solid #765538; border-radius: 5px; background: #b58d59; box-shadow: 0 4px 0 #7b5c3d; }
.seating-seat:hover { background: #fff7dd3d; border-color: #fff2ca; }
.seating-seat:focus-visible, .seating-refresh:focus-visible { outline: 3px solid #3158b0; outline-offset: 2px; }
.seating-seat[disabled] { cursor: wait; }
.seating-seat.is-unavailable { cursor: default; opacity: .65; }
.seating-seat.is-mine { border-color: #fff4d3; background: #fff4d34d; box-shadow: 0 0 0 2px #64543a; }
.seating-desk-name { position: absolute; top: 13px; left: 10%; width: 80%; line-height: 20px; text-align: center; z-index: 1; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seating-avatar, .seating-placeholder { position: absolute; width: 52px; height: 52px; top: 43px; left: calc(50% - 26px); border: 2px solid #fff7e9; border-radius: 50%; object-fit: cover; z-index: 2; box-shadow: 0 2px 6px #553f2a55; background: #eae1d1; }
.seating-placeholder { display: grid; place-items: center; color: #5a6259; font-size: 20px; font-weight: 700; }
.seating-battle-people { position: absolute; z-index: 2; top: 43px; left: 50%; width: min(108px, 100%); height: 64px; transform: translateX(-50%); }
.seating-battle-people .seating-avatar, .seating-battle-people .seating-placeholder { top: 0; left: 0; width: 52px; max-width: 70%; height: auto; aspect-ratio: 1; font-size: 20px; }
.seating-battle-people > :last-child { top: 12px; right: 0; left: auto; }
.seating-seat.is-battling .seating-desk-name { white-space: normal; line-height: 12px; word-break: break-all; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: #7e2424; }
.seating-battle-result { padding: 12px; border: 1px solid var(--border-light); border-radius: 12px; font-size: 13px; line-height: 1.8; white-space: pre-line; }
.seating-dialog { width: min(440px, calc(100% - 24px)); box-sizing: border-box; padding: 24px; border: 1px solid var(--border-light); border-radius: 20px; background: var(--surface-neutral); color: var(--text-primary); box-shadow: 0 16px 50px #0005; }
.seating-dialog::backdrop { background: #0008; }
.seating-dialog h2 { margin: 0 0 16px; font-size: 22px; color: var(--text-strong); }
.seating-dialog-info { white-space: pre-line; line-height: 1.8; }
.seating-dialog-profiles { display: grid; gap: 16px; margin: 16px 0; }
.seating-dialog-profiles .user-plate-link { min-width: 0; margin: 0; padding: 0; text-decoration: none; }
.seating-dialog-profiles .user-plate { margin-bottom: 0; }
.seating-plate-role { display: block; margin-bottom: 8px; color: var(--text-primary); font-size: 12px; }
.seating-challenge, .seating-hands button { padding: 12px 16px; min-height: 48px; border: 1px solid var(--form-border-color); border-radius: 12px; background: var(--surface-neutral-strong); color: var(--text-strong); font: inherit; cursor: pointer; }
.seating-challenge { display: block; width: 100%; margin-bottom: 18px; }
.seating-challenge:disabled { opacity: .55; cursor: default; }
.seating-hands { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.seating-hands button { flex: 1; display: grid; place-content: center; gap: 4px; padding: 12px 8px; white-space: nowrap; }
.seating-dialog button:focus-visible, .seating-dialog a:focus-visible { outline: 3px solid #3158b0; outline-offset: 3px; }
.seating-notice { min-height: 24px; margin-top: 12px; font-size: 13px; line-height: 1.7; }
.seating-notice.is-error { color: var(--error-text); }
.seating-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 12px; font-size: 13px; }
.seating-controls a { color: var(--text-primary); text-decoration: underline; text-underline-offset: 4px; padding: 10px 0; }
.seating-refresh, .seating-login { display: inline-block; min-height: 44px; padding: 12px 16px; border: 1px solid var(--form-border-color); border-radius: 12px; background: var(--surface-neutral); color: var(--text-strong); font: inherit; font-size: 13px; text-decoration: none; cursor: pointer; }
.seating-rules { border-top: 1px solid var(--border-light); margin-top: 20px; padding-top: 12px; font-size: 12px; line-height: 1.8; }
.seating-rules p { margin: 4px 0; }
@media (max-width: 600px) {
    .seating-page { padding: 0 8px; margin-top: 16px; }
    .seating-game { padding: 16px 8px; border-radius: 16px; }
    .seating-heading, .seating-meta, .seating-summary, .seating-controls, .seating-notice, .seating-rules { margin-left: 6px; margin-right: 6px; }
    .seating-room { padding: 105px 6px 20px; border-radius: 10px; }
    .seating-grid { gap: 14px 4px; }
    .seating-seat { height: 82px; border-radius: 8px; }
    .seating-seat::before { top: 6px; height: 28px; width: 94%; left: 3%; border-width: 1px; }
    .seating-seat::after { top: 45px; height: 18px; width: 58%; left: 21%; border-width: 1px; }
    .seating-desk-name { top: 9px; left: 5%; width: 90%; font-size: 9.5px; line-height: 11px; white-space: normal; word-break: break-all; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
    .seating-avatar, .seating-placeholder { width: 40px; height: 40px; top: 35px; left: calc(50% - 20px); }
    .seating-full-badge { max-width: calc(100% - 16px); font-size: 18px; left: 8px; top: 8px; padding: 8px 12px; }
    .seating-battle-people { top: 35px; width: min(68px, 100%); height: 56px; }
    .seating-battle-people .seating-avatar, .seating-battle-people .seating-placeholder { width: 32px; max-width: none; font-size: 16px; }
    .seating-battle-people > :last-child { top: 24px; }
    .seating-dialog { padding: 18px; }
    .seating-intro { font-size: 12px; }
    .seating-meta { font-size: 11px; }
}
