body.ui-shell[data-ui-page="lounge"] {
    --lounge-art: url('/image/hinana_day.png');
    display: flex; flex-direction: column; min-height: 100svh;
    background: linear-gradient(180deg,#eaf4fb40,#edf4fa99 90%),var(--lounge-art) center top/cover fixed !important;
}
body.ui-shell[data-ui-page="lounge"].dark-mode {
    --lounge-art: url('/image/hinana_night.png');
    background-image: linear-gradient(180deg,#09142240,#091422bb 90%),var(--lounge-art) !important;
}
body[data-ui-page="lounge"] > .ui-header { flex-shrink: 0; }
.lounge-page { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); align-items: start; gap: 24px 32px; width: min(1240px,calc(100% - 48px)); margin: 32px auto 40px; color: var(--ui-text); }
.lounge-page a { color: inherit; text-decoration: none; }
.lounge-page svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.lounge-page .ui-sprite { position: absolute; width: 0; height: 0; }
.lounge-heading { grid-column: 1/-1; justify-self: start; padding: 16px 22px; border: 1px solid var(--ui-line); border-radius: 4px; background: var(--ui-panel); }
.lounge-heading h1 { margin: 0; line-height: 1; }
.lounge-heading img { display: block; width: 274px; height: auto; max-width: 100%; }
.lounge-page .lounge-arrow { width: 18px; height: 18px; margin-left: auto; color: var(--ui-muted); transition: transform .2s; }
.lounge-page a:hover .lounge-arrow { transform: translateX(4px); }
.lounge-play { display: grid; gap: 20px; min-width: 0; animation: lounge-enter .35s ease-out both; }
.lounge-gallery,.lounge-games>a { position: relative; display: block; overflow: hidden; border: 1px solid var(--ui-line); border-radius: 4px; background: var(--ui-surface); box-shadow: 0 6px 24px #14283a21; }
.lounge-gallery>img { display: block; width: 100%; height: 325px; object-fit: cover; object-position: 52% center; transition: transform .45s ease; }
.lounge-gallery:hover>img { transform: scale(1.035); }
.lounge-picture-caption { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 20px; background: var(--ui-surface); font-size: 18px; font-weight: 650; letter-spacing: -.025em; }
.lounge-gallery .lounge-picture-caption::before { content: ''; position: absolute; top: 0; left: 20px; width: 40px; height: 3px; background: var(--ui-accent); }
.lounge-games { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.lounge-games>a { min-width: 0; }
.lounge-games .lounge-picture-caption { padding: 13px 16px; font-size: 15px; }
.lounge-ticket-scene { display: grid; place-items: center; height: 140px; overflow: hidden; background: linear-gradient(135deg,#365b62,#20464f); }
.lounge-ticket { display: grid; grid-template-columns: 175fr 55fr; width: 78%; max-width: 220px; aspect-ratio: 230/88; transform: rotate(-9deg); filter: drop-shadow(0 8px 5px #0a222b55); }
.lounge-ticket svg { display: block; width: 100%; height: auto; overflow: visible; stroke: none; fill: #29454c; transition: transform .35s ease; }
.lounge-ticket .ticket-paper { fill: #f6ecd8; }
.lounge-ticket-stub .ticket-paper { fill: #e3ddca; }
.lounge-ticket text { font-family: var(--ui-font); }
.ticket-brand { font-size: 8px; font-weight: 700; letter-spacing: 1.1px; }
.ticket-name { font-size: 14px; font-weight: 750; letter-spacing: -.4px; }
.ticket-type { font-size: 10px; font-weight: 600; }
.ticket-stub-label { font-size: 6px; font-weight: 650; letter-spacing: .6px; }
.ticket-number { font-size: 25px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lounge-ticket .ticket-rule { fill: none; stroke: #29454c44; stroke-width: 1; }
.lounge-ticket .ticket-train { fill: none; stroke: #29454c; stroke-width: 1.3; }
.lounge-ticket .ticket-perforation { fill: none; stroke: #29454c70; stroke-width: 1; stroke-dasharray: 2 3; }
.lounge-ticket .ticket-barcode { fill: none; stroke: #29454c; stroke-width: 1.5; }
.lounge-ticket-stub { transform-origin: 0 88%; }
.lounge-train:is(:hover,:focus-visible,:active) .lounge-ticket-body { transform: translate(-2px,-1px) rotate(-2deg); }
.lounge-train:is(:hover,:focus-visible,:active) .lounge-ticket-stub { animation: ticket-tear .7s cubic-bezier(.22,.65,.35,1) forwards; }
@keyframes ticket-tear {
    0% { transform: none; }
    25% { transform: translate(0,-1%) rotate(5deg); }
    55% { transform: translate(6%,2%) rotate(15deg); }
    100% { transform: translate(25%,17%) rotate(24deg); }
}
.lounge-blocks { position: relative; display: block; height: 140px; overflow: hidden; background: repeating-linear-gradient(0deg,transparent 0 27px,#ffffff09 27px 28px),repeating-linear-gradient(90deg,transparent 0 27px,#ffffff09 27px 28px),#183343; }
.lounge-piece { position: absolute; display: grid; grid-template-columns: repeat(3,24px); grid-auto-rows: 24px; gap: 3px; transition: transform .3s ease; }
.lounge-piece i { display: block; border: 1px solid #ffffff60; border-radius: 2px; box-shadow: inset 0 2px #ffffff35,inset 0 -3px #0002; }
.piece-t { left: calc(50% - 58px); top: 22px; transform: rotate(-8deg); }
.piece-t i { background: #bfa1e8; }
.piece-t i:first-child { grid-column: 2; }
.piece-t i:nth-child(2) { grid-column: 1; }
.piece-l { left: calc(50% + 24px); top: 67px; transform: rotate(8deg); }
.piece-l i { background: #75cce8; }
.piece-l i:first-child { grid-column: 3; }
.piece-l i:nth-child(2) { grid-column: 1; }
.piece-square { grid-template-columns: repeat(2,24px); left: calc(50% - 80px); top: 89px; transform: rotate(-5deg); }
.piece-square i { background: #f2cf7c; }
.lounge-tetris:hover .piece-t { transform: translateY(5px) rotate(0); }
.lounge-tetris:hover .piece-l { transform: translateY(-5px) rotate(0); }
.lounge-directory { min-width: 0; display: grid; gap: 16px; animation: lounge-enter .4s ease-out both; }
.lounge-plaza { display: flex; align-items: center; gap: 16px; min-height: 88px; padding: 20px 24px; border: 1px solid #1689bb; border-radius: 4px; background: #1689bb; color: #fff !important; box-shadow: 0 6px 24px #14283a21; transition: background .18s; }
.lounge-plaza>svg:first-child { width: 31px; height: 31px; }
.lounge-plaza>span { font-size: 22px; font-weight: 650; letter-spacing: -.03em; }
.lounge-plaza .lounge-arrow { color: #fff; }
.lounge-plaza:hover { background: #11749f; }
.lounge-menu { border: 1px solid var(--ui-line); border-radius: 4px; background: var(--ui-panel); box-shadow: 0 5px 24px #14283a17; }
.lounge-group { padding: 20px 20px 16px; }
.lounge-group+.lounge-group { border-top: 1px solid var(--ui-line); }
.lounge-group h2 { margin: 0 0 10px 10px; font-size: 12px; font-weight: 600; color: var(--ui-accent); }
.lounge-group nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 14px; }
.lounge-group a { display: flex; align-items: center; gap: 11px; min-width: 0; min-height: 44px; padding: 9px 10px; border-radius: 3px; font-size: 14px; transition: background .18s,color .18s; }
.lounge-group a>svg:first-child { color: var(--ui-muted); width: 19px; height: 19px; }
.lounge-group a>.lounge-arrow { width: 14px; height: 14px; }
.lounge-group a:hover { background: var(--ui-tint); color: var(--ui-accent); }
.lounge-group a:hover>svg { color: var(--ui-accent); }
.lounge-account { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border: 1px solid var(--ui-line); border-radius: 4px; background: var(--ui-panel); box-shadow: 0 5px 24px #14283a17; }
.lounge-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lounge-avatar { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border: 1px solid var(--ui-line); border-radius: 50%; color: var(--ui-muted); font-size: 15px; font-weight: 650; overflow: hidden; }
.lounge-avatar img { width: 100%; height: 100%; object-fit: cover; }
.lounge-user>div { min-width: 0; }
.lounge-username { display: block; overflow-wrap: anywhere; font-size: 13px; font-weight: 600; }
.lounge-balance { display: block; color: var(--ui-muted); font-size: 11px; }
.lounge-balance strong { font-weight: 600; color: var(--ui-accent); }
.lounge-account nav { display: flex; align-items: center; gap: 16px; font-size: 12px; flex-shrink: 0; }
.lounge-account .lounge-shop { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--ui-line); border-radius: 3px; }
.lounge-shop>svg:first-child { width: 16px; height: 16px; color: var(--ui-accent); }
.lounge-account nav a:hover { color: var(--ui-accent); border-color: var(--ui-accent); }
body[data-ui-page="lounge"] > .ui-footer { margin: auto 0 0; flex-shrink: 0; border-top: 1px solid var(--ui-line); background: var(--ui-surface); }
@keyframes lounge-enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@media(max-width:1050px) {
    .lounge-page { gap: 20px; }
    .lounge-gallery>img { height: 295px; }
    .lounge-group { padding-inline: 12px; }
    .lounge-group nav { column-gap: 4px; }
    .lounge-group a { gap: 8px; font-size: 13px; padding-inline: 8px; }
    .lounge-group a>.lounge-arrow { display: none; }
    .lounge-games { gap: 14px; }
}
@media(max-width:760px) {
    body.ui-shell[data-ui-page="lounge"] { background-position: 35% top !important; }
    .lounge-page { display: flex; flex-direction: column; width: calc(100% - 32px); margin: 20px auto 28px; gap: 20px; }
    .lounge-heading { padding: 14px 18px; }
    .lounge-heading img { width: 230px; }
    .lounge-play,.lounge-directory { width: 100%; }
    .lounge-play { gap: 14px; }
    .lounge-gallery>img { height: auto; aspect-ratio: 1.55; }
    .lounge-picture-caption { font-size: 17px; padding: 13px 18px; }
    .lounge-ticket-scene,.lounge-blocks { height: 125px; }
    .lounge-games .lounge-picture-caption { font-size: 14px; padding: 12px 14px; }
    .lounge-directory { gap: 14px; }
    .lounge-plaza { padding: 18px 20px; min-height: 76px; }
    .lounge-plaza>span { font-size: 20px; }
    .lounge-group { padding: 18px 14px 12px; }
    .lounge-group nav { column-gap: 6px; }
    .lounge-group h2 { margin-left: 6px; }
    .lounge-group a { padding-inline: 6px; gap: 8px; font-size: 13px; }
    .lounge-group a>svg:first-child { width: 17px; height: 17px; }
    .lounge-account { padding: 16px; }
    .lounge-account nav { gap: 10px; }
    .lounge-account .lounge-shop { padding: 8px; }
}
@media(max-width:360px) {
    .lounge-group nav { grid-template-columns: minmax(0,1fr); }
    .lounge-ticket-scene,.lounge-blocks { height: 110px; }
    .lounge-account { gap: 8px; padding: 14px; }
    .lounge-avatar { width: 32px; height: 32px; }
    .lounge-heading img { width: 212px; }
}
@media(prefers-reduced-motion:reduce) { .lounge-directory,.lounge-play { animation: none; } .lounge-page * { transition: none !important; } }

@media(prefers-reduced-motion:reduce) { .lounge-train .lounge-ticket svg { animation: none !important; transform: none !important; } }
