:root {
    --bg: #0d1b1e;
    --bg-2: #132a2f;
    --panel: rgba(10, 19, 23, 0.76);
    --panel-border: rgba(230, 247, 214, 0.12);
    --text: #eef6de;
    --muted: #b0c2ab;
    --accent: #d7ff70;
    --accent-2: #ff8c5a;
    --accent-3: #8ee0ff;
    --shadow: rgba(0, 0, 0, 0.32);
    --danger: #ff8970;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: "IBM Plex Sans", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top, rgba(215, 255, 112, 0.08), transparent 32%),
        linear-gradient(140deg, var(--bg), var(--bg-2));
}

.scene {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    padding: 24px;
}

.background-glow {
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(16px);
    opacity: 0.28;
    animation: drift 12s ease-in-out infinite;
}

.background-glow-left {
    top: -120px;
    left: -80px;
    background: rgba(215, 255, 112, 0.24);
}

.background-glow-right {
    right: -80px;
    bottom: -120px;
    background: rgba(255, 140, 90, 0.22);
    animation-delay: -4s;
}

.lobby-shell {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 6px;
    max-width: 1280px;
    margin: 0 auto;
}

.screen-root,
.stat-card,
.shop-item,
.inventory-chip,
.leaderboard-row,
.modal-card,
.arena-fighter {
    background: var(--panel);
    backdrop-filter: blur(14px);
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    box-shadow: 0 24px 60px var(--shadow);
}

.status-label,
.scene-tag {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 12px;
    color: var(--accent);
}

.summary-pill,
.scene-copy,
.stat-card p,
.grow-result,
.shop-item p,
.inventory-chip,
.leaderboard-row,
.profile-mood,
.profile-line,
.modal-card p {
    color: var(--muted);
    line-height: 1.55;
}

.summary-pill {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(215, 255, 112, 0.12);
    border: 1px solid rgba(215, 255, 112, 0.2);
    white-space: nowrap;
    font-size: 13px;
}

.mobile-nav {
    display: none;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.screen-root {
    min-height: 620px;
    padding: 16px;
    overflow: hidden;
}

.screen-stage {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.85fr);
    gap: 12px;
    min-height: 640px;
}

.wiki-stage {
    position: relative;
    isolation: isolate;
    align-items: start;
}

.expedition-stat-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0;
}

.expedition-stat-strip span {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(240, 244, 223, 0.05);
    border: 1px solid rgba(240, 244, 223, 0.08);
    color: rgba(240, 244, 223, 0.82);
}

.expedition-stat-strip strong {
    color: #f0f4df;
}

.expedition-stat-button {
    display: grid;
    gap: 6px;
    text-align: left;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(240, 244, 223, 0.05);
    border: 1px solid rgba(240, 244, 223, 0.08);
    color: rgba(240, 244, 223, 0.82);
    cursor: pointer;
    transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.expedition-stat-button span {
    color: rgba(240, 244, 223, 0.72);
    padding: 0;
    border: 0;
    background: transparent;
}

.expedition-stat-button strong {
    color: #f0f4df;
}

.expedition-stat-button:hover {
    border-color: rgba(215, 255, 112, 0.26);
    background: rgba(215, 255, 112, 0.08);
    transform: translateY(-1px);
}

.expedition-stats-trigger {
    grid-column: 1 / -1;
}

.expedition-stamina-panel {
    margin: 2px 0 14px;
    padding: 8px 10px 9px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.expedition-stamina-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.expedition-stamina-head strong {
    color: var(--text);
    font-size: 14px;
}

.expedition-stamina-track {
    position: relative;
    overflow: visible;
    height: 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.expedition-stamina-fill {
    height: 100%;
    border-radius: inherit;
    background: #79df6f;
    box-shadow: 0 0 14px rgba(121, 223, 111, 0.28);
    transition: width 0.35s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.expedition-stamina-pig {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -44%);
    transition: left 0.35s ease;
    animation: stamina-pig-bob 0.9s ease-in-out infinite;
    pointer-events: none;
}

.expedition-stamina-pig-sprite {
    display: block;
    width: 60px;
    height: 60px;
    background-image: url("/static/images/pig-stamina.png?v=1");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.22));
}

.expedition-stamina-pig[data-state="tired"] {
    animation-duration: 1.2s;
}

.expedition-stamina-pig[data-state="tired"] .expedition-stamina-pig-sprite {
    background-image: url("/static/images/pig-stamina-ustal.png?v=1");
}

.expedition-stamina-eta {
    margin-top: 6px;
    text-align: right;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.25;
}

.expedition-stamina-actions {
    margin-top: 10px;
}

.expedition-energy-button {
    width: 100%;
}

@keyframes stamina-pig-bob {
    0% { transform: translate(-50%, -56%) translateY(0); }
    50% { transform: translate(-50%, -56%) translateY(-1px); }
    100% { transform: translate(-50%, -56%) translateY(0); }
}

.expedition-stats-modal-card {
    max-width: 560px;
}

.expedition-stats-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.expedition-stat-card {
    padding: 8px 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.expedition-stat-card.is-wide {
    grid-column: 1 / -1;
}

.expedition-stat-card .status-label {
    font-size: 10px;
}

.expedition-stat-card strong {
    display: block;
    margin: 4px 0 6px;
    color: var(--text);
    font-size: 15px;
}

.expedition-stat-card p {
    margin: 0;
    font-size: 12px;
    line-height: 1.35;
}

.expedition-stats-eta {
    margin-top: 8px;
    font-size: 11px;
    line-height: 1.3;
    color: var(--accent);
}

.expedition-node-stats {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
    color: rgba(240, 244, 223, 0.82);
}

.expedition-node-meta {
    color: rgba(240, 244, 223, 0.68);
    font-size: 14px;
}

.expedition-node-meta.is-good {
    color: #d6ff8a;
}

.expedition-start-button {
    margin-top: 14px;
    width: 100%;
}

.expedition-active-card {
    margin-bottom: 16px;
}

.expedition-active-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.expedition-collapse-button {
    flex: 0 0 auto;
}

.expedition-event-card {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.expedition-event-card p {
    margin: 0;
    color: rgba(244, 229, 203, 0.88);
    line-height: 1.6;
}

.expedition-event-outcome {
    margin-top: 0;
}

.expedition-active-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.expedition-active-card-overlay > .expedition-active-scroll > p:first-of-type {
    margin-top: 8px;
    margin-bottom: 8px;
}

.expedition-active-card-overlay .expedition-node-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 6px;
}

.expedition-active-card-overlay .expedition-node-stats span {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    white-space: nowrap;
}

.expedition-choice-button {
    flex: 1 1 220px;
    width: 100%;
}

.expedition-fatigue-warning {
    margin-top: 4px;
    border-color: rgba(255, 148, 112, 0.32);
    background: rgba(255, 148, 112, 0.12);
}

.expedition-resume-banner {
    margin: 0 0 14px;
}

.expedition-resume-button {
    width: 100%;
}

.expedition-active-card-overlay .expedition-active-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.expedition-active-card-overlay .expedition-active-actions > * {
    width: 100%;
}

.expedition-mobile-modal {
    display: none;
    pointer-events: none;
}

.expedition-mobile-modal-body {
    position: relative;
    z-index: 1;
    min-height: 0;
    pointer-events: none;
}

.expedition-map-board {
    position: relative;
    width: 100%;
    aspect-ratio: 1024 / 1536;
    margin: 18px 0 10px;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(240, 244, 223, 0.08);
    background:
        linear-gradient(rgba(7, 11, 9, 0.14), rgba(7, 11, 9, 0.24)),
        url("/static/images/map.png?v=1") center / cover no-repeat;
}

.expedition-map-board::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 56px 56px;
    opacity: 0.08;
}

.expedition-map-glow,
.expedition-map-fog,
.expedition-map-paths,
.expedition-map-nodes,
.expedition-map-overlay {
    position: absolute;
    inset: 0;
}

.expedition-map-overlay {
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 18px;
    pointer-events: none;
}

.expedition-map-overlay.is-blocking {
    pointer-events: auto;
}

.expedition-active-card-overlay {
    width: 100%;
    max-width: min(100%, 620px);
    margin: 0;
    pointer-events: auto;
    background: linear-gradient(180deg, rgba(10, 19, 23, 0.92), rgba(10, 19, 23, 0.86));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(14px);
}

.expedition-auto-card-overlay {
    align-self: flex-start;
}

.expedition-active-scroll {
    display: grid;
    gap: 0;
}

.expedition-map-glow {
    pointer-events: none;
    filter: blur(30px);
    opacity: 0.4;
}

.expedition-map-glow-a {
    background: radial-gradient(circle at 22% 18%, rgba(188, 255, 103, 0.14), transparent 18%);
}

.expedition-map-glow-b {
    background: radial-gradient(circle at 68% 86%, rgba(255, 214, 102, 0.16), transparent 18%);
}

.expedition-map-fog {
    pointer-events: none;
}

.expedition-map-fog-a {
    background: radial-gradient(circle at 86% 86%, rgba(6, 10, 8, 0.42), transparent 26%);
}

.expedition-map-fog-b {
    background: radial-gradient(circle at 70% 64%, rgba(6, 10, 8, 0.3), transparent 24%);
}

.expedition-path {
    position: absolute;
    height: 5px;
    transform-origin: left center;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 214, 102, 0.95), rgba(255, 198, 89, 0.92));
    box-shadow: 0 0 10px rgba(255, 196, 64, 0.2);
}

.expedition-path.is-completed {
    background: linear-gradient(90deg, rgba(118, 227, 95, 0.96), rgba(86, 204, 92, 0.92));
}

.expedition-path.is-unlocked {
    background: linear-gradient(90deg, rgba(255, 214, 102, 0.95), rgba(255, 198, 89, 0.92));
}

.expedition-path.is-hidden {
    opacity: 0;
}

.expedition-map-node {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transform: translate(-50%, -50%);
    background: transparent;
    border: 0;
    color: var(--text);
    cursor: pointer;
    padding: 0;
}

.expedition-map-node:disabled {
    cursor: default;
}

.expedition-map-node-core {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 10px;
    font-weight: 700;
    border: 2px solid rgba(255, 245, 184, 0.95);
    background: linear-gradient(180deg, #ffe784, #f7c94b);
    color: #664400;
    box-shadow: 0 0 0 3px rgba(255, 227, 120, 0.16), 0 0 14px rgba(255, 214, 102, 0.2);
}

.expedition-map-node.is-completed .expedition-map-node-core {
    border-color: rgba(212, 255, 168, 0.96);
    background: linear-gradient(180deg, #93ea6b, #4fb04b);
    color: #efffe8;
    box-shadow: 0 0 0 3px rgba(118, 227, 95, 0.14), 0 0 14px rgba(118, 227, 95, 0.2);
}

.expedition-map-node.is-unlocked .expedition-map-node-core,
.expedition-map-node.is-active .expedition-map-node-core {
    border-color: rgba(255, 245, 184, 0.95);
    background: linear-gradient(180deg, #ffe784, #f7c94b);
    color: #664400;
    box-shadow: 0 0 0 3px rgba(255, 227, 120, 0.16), 0 0 14px rgba(255, 214, 102, 0.2);
}

.expedition-map-node.is-active .expedition-map-node-core {
    box-shadow: 0 0 0 4px rgba(255, 227, 120, 0.22), 0 0 18px rgba(255, 214, 102, 0.28);
}

.expedition-map-node.is-preview .expedition-map-node-core {
    border-color: rgba(255, 255, 255, 0.96);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(228, 236, 241, 0.96));
    color: rgba(76, 88, 97, 0.92);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12), 0 0 12px rgba(255, 255, 255, 0.14);
    opacity: 0.95;
}

.expedition-map-node.is-hidden {
    opacity: 0.3;
    pointer-events: none;
}

.expedition-map-node.is-hidden .expedition-map-node-core {
    border-color: rgba(255, 245, 184, 0.36);
    background: linear-gradient(180deg, rgba(255, 231, 132, 0.38), rgba(247, 201, 75, 0.28));
    color: rgba(102, 68, 0, 0.64);
    box-shadow: none;
}

.expedition-map-hint {
    color: rgba(240, 244, 223, 0.66);
    font-size: 14px;
    margin-bottom: 10px;
}

.expedition-node-modal-card {
    max-width: 560px;
}

.expedition-node-modal-copy {
    display: grid;
    gap: 10px;
}

.expedition-node-modal-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-width: 88px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid rgba(240, 244, 223, 0.1);
}

.expedition-node-modal-badge.is-completed {
    color: #d6ff8a;
    background: rgba(188, 255, 103, 0.14);
    border-color: rgba(188, 255, 103, 0.28);
}

.expedition-node-modal-badge.is-unlocked {
    color: #ffe2a0;
    background: rgba(255, 214, 102, 0.12);
    border-color: rgba(255, 214, 102, 0.26);
}

.expedition-node-modal-badge.is-locked {
    color: rgba(240, 244, 223, 0.68);
    background: rgba(240, 244, 223, 0.08);
}

.expedition-node-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.expedition-node-modal-actions > * {
    flex: 1 1 180px;
}

.wiki-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: 28px;
    background:
        linear-gradient(rgba(7, 11, 9, 0.76), rgba(7, 11, 9, 0.76)),
        url("/static/images/wiki.png?v=1") center / cover no-repeat;
}

.wiki-stage > * {
    position: relative;
    z-index: 1;
}

.shop-stage {
    grid-template-columns: minmax(0, 1.72fr) minmax(220px, 0.42fr);
}

.admin-stage {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
}

.explore-stage {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
}

.explore-column {
    max-width: 100%;
}

.rating-stage {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    justify-items: center;
}

.rating-stage .scene-view {
    width: min(100%, 540px);
    aspect-ratio: 9 / 16;
    min-height: 0;
}

.rating-board-column {
    width: min(100%, 540px);
    margin-top: 6px;
}

.rating-board {
    display: grid;
    gap: 14px;
}

.rating-board-title {
    display: block;
    margin: 0;
    font-size: 24px;
    text-align: center;
}

.rating-board-list {
    display: grid;
    gap: 12px;
}

.scene-view {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    min-height: 100%;
    padding: 0;
    display: flex;
    align-items: flex-end;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.scene-view::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 1;
    transform-origin: center center;
}

.scene-view[data-screen="profile"]::before {
    background: url("/static/images/profile-bg.jpg");
    background-size: 108% 108%;
    background-position: center;
    animation: shop-float 10s ease-in-out infinite;
}

.scene-view[data-screen="grow"]::before {
    background:
        radial-gradient(circle at 50% 18%, rgba(255, 234, 122, 0.25), transparent 20%),
        linear-gradient(180deg, rgba(109, 156, 88, 0.28), rgba(48, 33, 13, 0.9));
}

.scene-view[data-screen="arena"]::before {
    background: url("/static/images/kolezei.jpeg");
    background-size: 108% 108%;
    background-position: center;
    animation: shop-float 10s ease-in-out infinite;
}

.scene-view[data-screen="shop"]::before {
    background: url("/static/images/market.jpeg");
    background-size: 124% 124%;
    background-position: 38% center;
    animation: shop-float 10s ease-in-out infinite;
}

.scene-view[data-screen="explore"]::before {
    background:
        radial-gradient(circle at 18% 78%, rgba(188, 255, 103, 0.12), transparent 20%),
        radial-gradient(circle at 80% 20%, rgba(255, 214, 102, 0.14), transparent 18%),
        linear-gradient(180deg, rgba(14, 24, 17, 0.96), rgba(8, 13, 10, 0.98));
    animation: none;
}

.scene-view[data-screen="rating"]::before {
    background: url("/static/images/top.png");
    background-size: cover;
    background-position: center;
    animation: shop-float 10s ease-in-out infinite;
}

.scene-view[data-screen="admin"]::before {
    background: none;
    animation: none;
}

.scene-view[data-screen="wiki"]::before {
    background:
        radial-gradient(circle at top, rgba(235, 189, 53, 0.18), transparent 42%),
        linear-gradient(145deg, rgba(18, 29, 24, 0.36), rgba(48, 26, 11, 0.24));
    animation: none;
}

.scene-view[data-screen="wiki"] {
    align-items: flex-start;
    align-self: start;
    min-height: 0;
}

.scene-overlay {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100%;
}

.scene-view[data-screen="shop"] .scene-overlay {
    position: absolute;
    inset: 0;
    min-height: 0;
    height: 100%;
}

.scene-tag {
    display: inline-flex;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.scene-heading {
    margin: 0;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1;
    font-family: "Russo One", sans-serif;
}

.menu-button {
    padding: 12px 12px;
    border: 0;
    border-radius: 14px;
    font: inherit;
    font-weight: 700;
    color: #0b130c;
    background: linear-gradient(135deg, var(--accent), #f1ffb8);
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
    box-shadow: 0 10px 24px rgba(215, 255, 112, 0.22);
}

.menu-button:hover,
.menu-button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(215, 255, 112, 0.28);
    background: linear-gradient(135deg, #f1ffb8, var(--accent));
}

.menu-button.is-active { background: linear-gradient(135deg, var(--accent-2), #ffd6b8); }

.menu-button.is-disabled,
.menu-button:disabled {
    opacity: 0.42;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.panel-column,
.leaderboard,
.shop-grid,
.explore-actions,
.inventory-grid,
.stats-grid,
.profile-lines {
    display: grid;
    gap: 14px;
}

.panel-column { align-content: start; }
.wiki-column {
    gap: 16px;
    align-self: start;
}
.stats-grid,
.inventory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.stat-card,
.shop-item,
.leaderboard-row { padding: 12px; }

.stat-card strong,
.inventory-chip strong,
.leaderboard-row strong,
.shop-item strong {
    display: block;
    color: var(--text);
    font-size: 16px;
    margin-top: 4px;
}

.inventory-chip { padding: 10px; }
.grow-action-row,
.explore-actions,
.modal-actions,
.shop-actions,
.crowd-strip { display: flex; flex-wrap: wrap; gap: 12px; }

.modal-actions {
    margin-top: 26px;
    padding-top: 6px;
}

.explore-actions {
    margin-top: 18px;
    justify-content: center;
}

.explore-progress-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}

.explore-progress-row p {
    margin: 0;
}

.scene-view[data-screen="explore"] + .panel-column .stat-card strong {
    text-align: center;
}

.wiki-hero {
    display: grid;
    align-content: start;
    gap: 14px;
    min-height: 0;
    padding: clamp(22px, 4vw, 34px);
}

.wiki-hero-copy {
    max-width: 560px;
    margin: 0;
    color: rgba(244, 229, 203, 0.88);
    line-height: 1.65;
    font-size: 1rem;
}

.wiki-card {
    display: grid;
    gap: 12px;
    background: rgba(13, 20, 16, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.wiki-card strong {
    font-size: 1.08rem;
}

.wiki-list {
    display: grid;
    gap: 10px;
}

.wiki-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.wiki-list-row span {
    color: var(--muted);
}

.wiki-list-row strong {
    margin-top: 0;
    text-align: right;
    font-size: 0.98rem;
}

.wiki-note {
    padding: 12px 14px;
    border-left: 3px solid rgba(235, 189, 53, 0.75);
    background: rgba(235, 189, 53, 0.08);
    border-radius: 12px;
    color: rgba(248, 236, 211, 0.95);
    line-height: 1.55;
}

.secondary-button,
.duration-button {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.secondary-button:hover,
.duration-button:hover {
    border-color: rgba(215, 255, 112, 0.4);
    background: rgba(215, 255, 112, 0.09);
}

.duration-button.is-ready {
    border-color: rgba(142, 224, 255, 0.34);
    background: linear-gradient(180deg, rgba(142, 224, 255, 0.2), rgba(72, 170, 202, 0.12));
    color: #e7fbff;
    box-shadow: 0 10px 22px rgba(72, 170, 202, 0.16);
}

.duration-button.is-ready:hover,
.duration-button.is-ready:focus-visible {
    border-color: rgba(142, 224, 255, 0.5);
    background: linear-gradient(180deg, rgba(142, 224, 255, 0.28), rgba(72, 170, 202, 0.18));
}

.duration-button.is-locked,
.duration-button.is-locked:disabled {
    opacity: 1;
    border-color: rgba(255, 96, 79, 0.52);
    background: linear-gradient(180deg, rgba(255, 106, 88, 0.38), rgba(176, 33, 18, 0.3));
    color: #ffe5df;
    box-shadow: 0 10px 22px rgba(176, 33, 18, 0.2);
}

.danger-button {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 96, 79, 0.52);
    background: linear-gradient(180deg, rgba(255, 106, 88, 0.38), rgba(176, 33, 18, 0.3));
    color: #ffe5df;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
    box-shadow: 0 10px 22px rgba(176, 33, 18, 0.24);
}

.danger-button:hover,
.danger-button:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(255, 96, 79, 0.68);
    background: linear-gradient(180deg, rgba(255, 106, 88, 0.5), rgba(176, 33, 18, 0.42));
    box-shadow: 0 14px 26px rgba(176, 33, 18, 0.3);
}

.danger-button:disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.explore-cancel-button {
    flex: 0 0 auto;
    white-space: nowrap;
}

.grow-result { min-height: 78px; }

.arena-lane {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: end;
}

.arena-fighter {
    position: relative;
    min-height: 190px;
    padding: 18px;
    overflow: hidden;
}

.arena-fighter::before {
    content: "";
    position: absolute;
    inset: auto auto 0 0;
    width: 140px;
    height: 140px;
    border-radius: 40px 40px 28px 28px;
    background: linear-gradient(180deg, rgba(255, 186, 203, 0.7), rgba(132, 82, 89, 0.86));
    transform: translate(22px, 14px);
}

.arena-fighter.right::before {
    left: auto;
    right: 0;
    transform: translate(-22px, 14px);
}

.fighter-label { position: relative; z-index: 1; }
.crowd-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 233, 173, 0.6);
}

.shop-item { display: grid; gap: 10px; }
.shop-topline {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
}

.item-scene,
.empty-state {
    min-height: 90px;
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    display: grid;
    place-items: center;
    text-align: center;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
}

.purchase-note { color: var(--accent); font-weight: 700; }

.shop-scene-items {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.rating-board-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(166, 95, 18, 0.26);
    background: linear-gradient(180deg, rgba(255, 232, 156, 0.2), rgba(255, 208, 96, 0.08));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
    overflow: hidden;
}

.rating-board-item.is-empty {
    border-color: rgba(153, 118, 46, 0.18);
    background: linear-gradient(180deg, rgba(255, 236, 184, 0.08), rgba(185, 133, 37, 0.05));
}

.rating-name {
    min-width: 0;
    width: auto;
    flex: 1;
    color: #885100;
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    text-shadow: none;
}

.rating-name.rank-1 {
    color: #c58a00;
    text-shadow: none;
}

.rating-name.rank-2 {
    color: #8f97a3;
    text-shadow: none;
}

.rating-name.rank-3,
.rating-name.rank-4,
.rating-name.rank-5 {
    color: #9f6531;
    text-shadow: none;
}

.shop-scene-item {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 2px 4px 3px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(8, 10, 8, 0.34);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(2px);
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
    overflow: hidden;
}

.shop-scene-item:hover,
.shop-scene-item:focus-visible {
    transform: scale(1.03);
    border-color: rgba(215, 255, 112, 0.55);
    background: rgba(10, 12, 9, 0.48);
}

.shop-scene-icon {
    position: absolute;
    inset: 4% 4% 20% 4%;
    width: 92%;
    height: 76%;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.shop-scene-icon[src$=".png"] {
    image-rendering: auto;
}

.shop-scene-icon-premium-food {
    inset: 0% 0% 14% 0%;
    width: 100%;
    height: 86%;
}

.shop-scene-icon-arena-pass {
    inset: 1% 1% 15% 1%;
    width: 98%;
    height: 84%;
}

.shop-scene-icon-compact-shield {
    inset: 4% 4% 20% 4%;
    width: 92%;
    height: 76%;
}

.shop-scene-title {
    position: relative;
    z-index: 1;
    width: 100%;
    font-size: 16px;
    font-weight: 800;
    color: #FFFFFF;
    text-align: center;
    line-height: 1.05;
    -webkit-text-stroke: 2px #5A2E0C;
    paint-order: stroke fill;
    text-shadow:
        0 1px 0 #5A2E0C,
        0 -1px 0 #5A2E0C,
        1px 0 0 #5A2E0C,
        -1px 0 0 #5A2E0C,
        1px 1px 0 #5A2E0C,
        -1px 1px 0 #5A2E0C,
        1px -1px 0 #5A2E0C,
        -1px -1px 0 #5A2E0C,
        0 3px 10px rgba(0, 0, 0, 0.35);
}

.shop-scene-price {
    position: absolute;
    z-index: 1;
    right: 4px;
    bottom: 3px;
    font-size: 20px;
    font-weight: 800;
    color: var(--accent);
    text-align: right;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.progress-shell {
    width: 100%;
    height: 18px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent-3), var(--accent));
    transition: width 0.8s linear;
}

.auto-explore-progress-block {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.auto-explore-progress-head {
    margin-top: 0;
    align-items: center;
}

.auto-explore-progress-head strong {
    color: var(--accent-2);
    font-size: 0.95rem;
    white-space: nowrap;
}

.auto-explore-progress-shell {
    height: 14px;
    background: rgba(255, 255, 255, 0.1);
}

.auto-explore-progress-bar {
    background: linear-gradient(90deg, #d9ff6b 0%, #8eff7d 52%, #8ee0ff 100%);
    box-shadow: 0 0 16px rgba(142, 224, 255, 0.24);
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 12px;
    align-items: center;
}

.rank-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(142, 224, 255, 0.12);
    color: var(--accent-3);
    font-weight: 700;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 10;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.modal.hidden { display: none; }

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 10, 0.68);
}

.modal-card {
    position: relative;
    z-index: 1;
    max-width: 620px;
    margin: min(12vh, 100px) auto 0;
    padding: 24px;
}

.admin-inventory-card,
.admin-health-card,
.admin-injury-card {
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.admin-injury-card {
    margin-top: min(6vh, 44px);
}

.modal-card h2 { margin: 8px 0 10px; }
.modal-confirm-card {
    max-width: 460px;
}

.profile-info-card {
    max-width: 560px;
}

.profile-info-head {
    margin-bottom: 8px;
}

.profile-info-head h2 {
    margin: 0;
}

.profile-info-copy {
    display: grid;
    gap: 12px;
}

.profile-info-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.profile-info-copy strong {
    color: var(--text);
}

.health-modal-card {
    max-width: 560px;
}

.health-modal-status {
    display: grid;
    gap: 10px;
}

.health-line {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    line-height: 1.55;
}

.health-line strong {
    color: var(--text);
}

.health-modal-actions {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.health-actions-note {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.modal-shop-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px;
    gap: 18px;
    align-items: center;
}

.modal-shop-copy {
    min-width: 0;
}

.modal-shop-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 170px;
    padding: 14px;
    border-radius: 18px;
    background:
        radial-gradient(circle at top, rgba(255, 221, 174, 0.24), transparent 68%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 221, 174, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.modal-item-image {
    max-width: 100%;
    width: 160px;
    height: 160px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.22));
    transform: translateY(2px);
}

.danger-text { color: var(--danger); }

.compact-profile {
    display: grid;
    gap: 8px;
}

.compact-profile-head {
    display: flex;
    align-items: start;
    justify-content: center;
    gap: 12px;
}

.compact-profile-name {
    margin: 0;
    font-size: 18px;
    text-align: center;
}

.compact-profile-mood {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
    text-align: center;
}

.profile-grow-button {
    width: 100%;
    margin-top: 2px;
}

.profile-grow-button.is-cooldown {
    opacity: 1;
    border: 1px solid rgba(255, 96, 79, 0.52);
    background: linear-gradient(180deg, rgba(255, 106, 88, 0.38), rgba(176, 33, 18, 0.3));
    color: #ffe5df;
    box-shadow: 0 10px 22px rgba(176, 33, 18, 0.24);
}

.compact-profile-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.compact-profile-item {
    padding: 7px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.compact-profile-info {
    width: 100%;
    text-align: left;
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.compact-profile-info:hover,
.compact-profile-info:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(142, 224, 255, 0.28);
    background: rgba(255, 255, 255, 0.07);
}

.compact-profile-item span {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 2px;
}

.compact-profile-item strong {
    font-size: 13px;
    margin: 0;
}

.compact-profile-action {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 8px;
    padding: 12px 14px;
    border: 0;
    border-radius: 12px;
    font: inherit;
    font-weight: 700;
    color: #0b130c;
    background: linear-gradient(135deg, var(--accent-3), #d7f8ff);
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(142, 224, 255, 0.2);
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.compact-profile-action:hover,
.compact-profile-action:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(142, 224, 255, 0.28);
    background: linear-gradient(135deg, #d7f8ff, var(--accent-3));
}

.compact-profile-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding-top: 2px;
}

.compact-profile-divider::before,
.compact-profile-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(215, 255, 112, 0.45), transparent);
}

.compact-profile-divider span {
    font-size: 14px;
    line-height: 1;
    opacity: 0.95;
}

.create-pig-card {
    align-content: start;
}

.auth-card {
    width: min(100%, 420px);
    gap: 16px;
}

.telegram-login-widget {
    min-height: 52px;
}

.create-pig-form {
    display: grid;
    gap: 8px;
}

.create-pig-label {
    font-size: 12px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.create-pig-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font: inherit;
}

.create-pig-input::placeholder {
    color: rgba(238, 246, 222, 0.45);
}

.create-pig-error {
    margin: 0;
    color: var(--danger);
    font-size: 13px;
}

.arena-card {
    display: grid;
    gap: 10px;
}

.arena-status-title {
    text-align: center;
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
}

.arena-status-value {
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
    margin-top: -4px;
    line-height: 1.15;
}

.arena-status-value.is-ready {
    color: #91f2a3;
}

.arena-status-value.is-danger {
    color: #ff8f8f;
}

.arena-status-value.is-warn {
    color: #ffbf75;
}

.arena-status-copy {
    color: var(--muted);
    line-height: 1.5;
    white-space: normal;
    text-align: center;
}

.arena-fight-button {
    width: 100%;
}

.arena-battle-window {
    min-height: 148px;
    max-height: 260px;
    overflow: auto;
    padding: 12px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
    line-height: 1.55;
    white-space: pre-wrap;
}

.arena-history-list {
    display: grid;
    gap: 8px;
}

.arena-history-row {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.arena-history-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.arena-history-main {
    color: var(--text);
    font-weight: 700;
}

.arena-history-meta {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.arena-winner {
    color: #91f2a3;
}

.arena-loser {
    color: #ff8f8f;
}

.arena-empty {
    color: var(--muted);
    font-size: 13px;
}

.arena-log-button {
    flex: 0 0 auto;
    padding: 8px 10px;
    font-size: 12px;
}

.battle-log-modal .modal-card {
    max-width: 760px;
}

.battle-log-modal-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.battle-log-modal-head h2 {
    margin: 6px 0 0;
}

.inventory-modal-head {
    margin-bottom: 10px;
}

.inventory-modal-head h2 {
    margin: -2px 0 0;
}

.battle-log-copy {
    max-height: 56vh;
    overflow: auto;
    padding: 14px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
    line-height: 1.6;
    white-space: pre-wrap;
}

.battle-log-entry,
.battle-summary-entry {
    margin-top: 10px;
}

.battle-log-entry:first-child,
.battle-summary-entry:first-child {
    margin-top: 0;
}

.battle-summary-divider {
    height: 1px;
    margin: 16px 0 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(145, 242, 163, 0.15), rgba(255, 218, 122, 0.95), rgba(255, 143, 143, 0.15));
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 0 14px rgba(255, 218, 122, 0.18);
}

.battle-summary-entry {
    padding-top: 2px;
    font-weight: 600;
}

.battle-acorns {
    color: #f6cf63;
    text-shadow: 0 0 10px rgba(246, 207, 99, 0.22);
    font-weight: 700;
}

.battle-acorns-line {
    color: #f6cf63;
}

.inventory-modal-grid {
    display: grid;
    gap: 12px;
}

.inventory-modal-item {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.inventory-modal-item.is-active {
    border-color: rgba(235, 189, 53, 0.55);
    box-shadow: 0 0 0 1px rgba(235, 189, 53, 0.22);
}

.inventory-modal-top {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.inventory-modal-top strong {
    color: var(--text);
    font-size: 16px;
}

.inventory-modal-copy {
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.55;
}

.inventory-modal-meta {
    margin-top: 10px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
}

.inventory-modal-footer {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.inventory-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
}

.inventory-toggle input {
    width: 16px;
    height: 16px;
    accent-color: #7ecf78;
}

.inventory-use-button {
    min-width: 128px;
}

.inventory-modal-grid.is-busy {
    opacity: 0.7;
    pointer-events: none;
}

.rename-modal-card {
    max-width: 520px;
}

.rename-modal-copy {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.55;
}

.rename-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font: inherit;
    outline: none;
}

.rename-input:focus {
    border-color: rgba(235, 189, 53, 0.7);
    box-shadow: 0 0 0 3px rgba(235, 189, 53, 0.14);
}

.rename-error {
    margin-top: 10px;
    color: var(--danger);
    font-size: 0.95rem;
    line-height: 1.4;
}

.rename-modal-actions {
    margin-top: 14px;
}

.admin-card + .admin-card {
    margin-top: 16px;
}

.admin-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.admin-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.admin-setting {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
}

.admin-setting input,
.admin-search-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font: inherit;
    outline: none;
}

select.admin-search-input,
select.admin-search-input option {
    color: #111;
    background: #fff;
}

.admin-setting input:focus,
.admin-search-input:focus {
    border-color: rgba(235, 189, 53, 0.7);
    box-shadow: 0 0 0 3px rgba(235, 189, 53, 0.14);
}

.admin-save-button {
    margin-top: 14px;
}

.admin-settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}

.admin-settings-actions .admin-save-button {
    margin-top: 0;
}

.admin-wipe-block {
    border-color: rgba(255, 96, 79, 0.24);
    background: linear-gradient(180deg, rgba(255, 106, 88, 0.08), rgba(255, 255, 255, 0.02));
}

.admin-wipe-card {
    max-width: 520px;
}

.admin-wipe-copy {
    margin-bottom: 12px;
}

.admin-wipe-warning {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 96, 79, 0.1);
    border: 1px solid rgba(255, 96, 79, 0.18);
    color: #ffd8d2;
    line-height: 1.5;
}

.admin-wipe-actions {
    justify-content: flex-end;
}

.admin-search-row {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.admin-results-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.admin-results-list > .arena-empty {
    grid-column: 1 / -1;
}

.admin-player-card {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-player-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.admin-player-meta {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.admin-player-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.admin-health-button {
    display: grid;
    justify-items: center;
    text-align: center;
}

.admin-health-button small {
    color: var(--muted);
    font-size: 12px;
}

.admin-inventory-actions,
.admin-inventory-status {
    display: grid;
    gap: 8px;
}

.admin-inventory-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 14px;
}

.admin-inventory-list {
    display: grid;
    gap: 8px;
}

.admin-inventory-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.admin-inventory-empty {
    color: var(--muted);
}

.admin-health-status {
    display: grid;
    gap: 10px;
}

.admin-health-line {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.admin-health-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.admin-injury-list {
    display: grid;
    gap: 10px;
}

.admin-injury-option {
    width: 100%;
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    text-align: left;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    cursor: pointer;
}

.admin-injury-option small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.admin-injury-option:hover,
.admin-injury-option:focus-visible {
    border-color: rgba(235, 189, 53, 0.5);
    box-shadow: 0 0 0 1px rgba(235, 189, 53, 0.18);
}

.admin-log-card {
    max-width: 760px;
}

.admin-log-status {
    display: grid;
    gap: 10px;
}

.admin-log-list {
    display: grid;
    gap: 12px;
    max-height: 60vh;
    overflow: auto;
}

.admin-log-entry {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-log-entry-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.admin-log-entry-time {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.admin-log-entry-summary {
    margin-top: 8px;
    color: var(--text);
    line-height: 1.5;
}

.admin-log-change-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.admin-log-change-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.admin-log-change-row span {
    color: var(--muted);
}

@keyframes drift {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(18px, 24px, 0) scale(1.08); }
}

@keyframes profile-float {
    0% {
        transform: translate3d(0, 0, 0) scale(1.03) rotate(0deg);
    }
    25% {
        transform: translate3d(-4px, 1px, 0) scale(1.04) rotate(-0.25deg);
    }
    50% {
        transform: translate3d(3px, -2px, 0) scale(1.05) rotate(0.2deg);
    }
    75% {
        transform: translate3d(-2px, 2px, 0) scale(1.04) rotate(-0.15deg);
    }
    100% {
        transform: translate3d(0, 0, 0) scale(1.03) rotate(0deg);
    }
}

@keyframes arena-float {
    0% {
        transform: translate3d(0, 0, 0) scale(1.025) rotate(0deg);
    }
    25% {
        transform: translate3d(3px, -1px, 0) scale(1.035) rotate(0.15deg);
    }
    50% {
        transform: translate3d(-3px, 2px, 0) scale(1.045) rotate(-0.18deg);
    }
    75% {
        transform: translate3d(2px, -2px, 0) scale(1.035) rotate(0.12deg);
    }
    100% {
        transform: translate3d(0, 0, 0) scale(1.025) rotate(0deg);
    }
}

@keyframes forest-float {
    0% {
        transform: translate3d(0, 0, 0) scale(1.02) rotate(0deg);
    }
    25% {
        transform: translate3d(-3px, 2px, 0) scale(1.03) rotate(-0.12deg);
    }
    50% {
        transform: translate3d(2px, -2px, 0) scale(1.04) rotate(0.16deg);
    }
    75% {
        transform: translate3d(-2px, 1px, 0) scale(1.03) rotate(-0.08deg);
    }
    100% {
        transform: translate3d(0, 0, 0) scale(1.02) rotate(0deg);
    }
}

@keyframes shop-float {
    0% {
        transform: translate3d(0, 0, 0) scale(1.02) rotate(0deg);
    }
    25% {
        transform: translate3d(2px, -1px, 0) scale(1.03) rotate(0.1deg);
    }
    50% {
        transform: translate3d(-2px, 2px, 0) scale(1.04) rotate(-0.14deg);
    }
    75% {
        transform: translate3d(1px, -2px, 0) scale(1.03) rotate(0.08deg);
    }
    100% {
        transform: translate3d(0, 0, 0) scale(1.02) rotate(0deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .scene-view[data-screen="profile"]::before,
    .scene-view[data-screen="arena"]::before,
    .scene-view[data-screen="shop"]::before,
    .scene-view[data-screen="explore"]::before {
        animation: none;
    }
}

@media (max-width: 960px) {
    .scene { padding: 18px; }
    .screen-stage,
    .shop-stage,
    .shop-grid,
    .arena-lane,
    .stats-grid,
    .inventory-grid { grid-template-columns: 1fr; }
    .leaderboard-row { grid-template-columns: 72px 1fr; }
    .expedition-map-board {
        aspect-ratio: 1024 / 1536;
    }
}

@media (max-width: 560px) {
    .scene {
        padding: 10px;
    }

    .screen-root {
        padding: 12px;
        border-radius: 18px;
    }

    .screen-root {
        min-height: 0;
    }

    .screen-stage {
        min-height: 0;
        gap: 10px;
    }

    .expedition-map-board {
        border-radius: 22px;
    }

    .expedition-mobile-modal {
        display: block;
    }

    .expedition-map-overlay {
        display: none;
    }

    .expedition-map-overlay.is-mobile-visible {
        display: flex;
    }

    .expedition-mobile-modal-body {
        min-height: 100dvh;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 18px 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .expedition-mobile-modal .modal-backdrop {
        background: transparent;
        backdrop-filter: none;
        pointer-events: none;
    }

    .expedition-mobile-modal .expedition-active-card-overlay {
        max-width: 100%;
        margin: 0;
        overflow: visible;
        box-shadow: none;
        pointer-events: auto;
    }

    .expedition-mobile-modal .expedition-auto-card-overlay {
        align-self: center;
        margin-top: 0;
        width: calc(100% - 48px);
        max-width: 320px;
    }

    .expedition-map-overlay .expedition-auto-card-overlay {
        width: calc(100% - 48px);
        max-width: 320px;
    }

    .expedition-mobile-modal .expedition-active-card-overlay > .expedition-active-scroll > p:first-of-type {
        margin-top: 2px;
        margin-bottom: 2px;
    }

    .expedition-mobile-modal .expedition-active-card-overlay .expedition-node-stats {
        margin-top: 0;
    }

    .expedition-mobile-modal .expedition-active-scroll { overflow: visible; }

    .expedition-stats-modal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .expedition-stats-modal-grid .expedition-stat-card.is-wide {
        grid-column: 1 / -1;
    }

    .scene-view {
        min-height: 260px;
        border-radius: 18px;
    }

    .scene-view[data-screen="shop"] {
        height: 350px;
        min-height: 350px;
    }

    .scene-view[data-screen="shop"]::before {
        background-size: cover;
        background-position: center top;
    }

    .scene-view[data-screen="explore"] {
        height: 350px;
        min-height: 350px;
    }

    .rating-stage .scene-view {
        width: 100%;
        aspect-ratio: auto;
        height: clamp(260px, calc(100vw * 16 / 9 - 100px), 520px);
        min-height: 0;
    }

    .mobile-nav {
        display: block;
    }

    .mobile-nav-toggle {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 14px;
        border-radius: 14px;
        border: 1px solid rgba(215, 255, 112, 0.22);
        background: rgba(10, 19, 23, 0.76);
        color: var(--text);
        font: inherit;
        font-weight: 700;
    }

    .mobile-nav-current {
        max-width: calc(100% - 32px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-nav-icon {
        font-size: 20px;
        line-height: 1;
        color: var(--accent);
    }

    .action-grid {
        display: none;
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px;
        border-radius: 16px;
        background: rgba(10, 19, 23, 0.76);
        border: 1px solid var(--panel-border);
    }

    .action-grid.is-open {
        display: grid;
    }

    .summary-pill {
        width: 100%;
        text-align: center;
        white-space: normal;
    }

    .compact-profile-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .shop-scene-item {
        padding: 4px;
        border-radius: 10px;
    }

    .rating-board-item {
        gap: 10px;
        padding: 10px 12px;
        border-radius: 12px;
    }

    .explore-progress-row {
        align-items: stretch;
        flex-direction: column;
    }

    .explore-cancel-button {
        width: 100%;
    }

    .shop-scene-icon {
        inset: 6% 5% 24% 5%;
        width: 90%;
        height: 70%;
    }

    .shop-scene-icon-premium-food {
        inset: 0% 0% 14% 0%;
        width: 100%;
        height: 92%;
    }

    .shop-scene-icon-arena-pass {
        inset: 1% 1% 15% 1%;
        width: 98%;
        height: 90%;
    }

    .shop-scene-icon-compact-shield {
        inset: 6% 5% 24% 5%;
        width: 90%;
        height: 70%;
    }

    .shop-scene-price,
    .rating-name {
        font-size: 13px;
    }

    .shop-scene-title {
        font-size: 11px;
    }

    .modal-shop-layout {
        grid-template-columns: 1fr;
    }

    .modal-shop-visual {
        min-height: 140px;
    }

    .modal-item-image {
        width: 124px;
        height: 124px;
    }

    .admin-settings-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-search-row {
        flex-direction: column;
    }

    .admin-results-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .admin-player-card {
        width: 100%;
        padding: 12px;
        border-radius: 14px;
    }

    .admin-player-head {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .admin-player-meta {
        font-size: 12px;
    }

    .admin-player-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .admin-player-actions .admin-player-action {
        width: 100%;
    }

    .admin-health-actions {
        flex-direction: column;
    }
}
