/* 子屏「糖果星梦」游戏 Hub — 自 style.css 拆出 */
/* ========== 子屏「游戏」糖果星梦主页（#sub-screen-game-hub，铺满小手机 #app 视口） ========== */
.sub-screen-game-hub {
    --sgh-ink: #000000;
    --sgh-paper: #ffffff;
    --sgh-red: #ff6b6b;
    --sgh-teal: #4ecdc4;
    --sgh-yellow: #ffe66d;
    --sgh-mint: #95e1d3;
    --sgh-pink: #f38181;
    --sgh-brutal-shadow: 4px 4px 0 rgba(0, 0, 0, 1);
    --sgh-brutal-shadow-lg: 8px 8px 0 rgba(0, 0, 0, 1);
    position: absolute;
    inset: 0;
    z-index: 100140;
    padding: 0;
    box-sizing: border-box;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.sub-screen-game-hub.is-visible {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

/* 从全屏子模块返回时瞬时显示，避免出现一帧 hub 仍未展开、露出子屏底图 */
.sub-screen-game-hub.sub-screen-game-hub--instant {
    transition: none !important;
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.sub-screen-game-hub.sub-screen-game-hub--instant .sub-screen-game-hub__sheet {
    transition: none !important;
    transform: scale(1);
    opacity: 1;
}

.sub-screen-game-hub__backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(circle at 12% 10%, rgba(255, 230, 109, 0.46) 0%, rgba(255, 230, 109, 0.46) 12%, transparent 13%),
        radial-gradient(circle at 88% 18%, rgba(78, 205, 196, 0.42) 0%, rgba(78, 205, 196, 0.42) 10%, transparent 11%),
        rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.sub-screen-game-hub__sheet {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: auto;
    height: auto;
    max-width: none;
    margin: 0;
    padding:
        calc(12px + env(safe-area-inset-top, 0))
        max(8px, env(safe-area-inset-right, 0px))
        calc(14px + env(safe-area-inset-bottom, 0))
        max(8px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: Inter, ui-rounded, system-ui, -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.055) 1px, transparent 1px),
        linear-gradient(180deg, rgba(0, 0, 0, 0.055) 1px, transparent 1px),
        radial-gradient(circle at 12% 12%, rgba(255, 107, 107, 0.86) 0%, rgba(255, 107, 107, 0.86) 7%, transparent 7.5%),
        radial-gradient(circle at 90% 10%, rgba(78, 205, 196, 0.82) 0%, rgba(78, 205, 196, 0.82) 8%, transparent 8.6%),
        radial-gradient(circle at 78% 92%, rgba(255, 230, 109, 0.9) 0%, rgba(255, 230, 109, 0.9) 11%, transparent 11.8%),
        radial-gradient(circle at 4% 88%, rgba(149, 225, 211, 0.82) 0%, rgba(149, 225, 211, 0.82) 9%, transparent 9.7%),
        linear-gradient(165deg, #ffffff 0%, #fff7d6 44%, #ffe2e2 100%);
    background-size:
        22px 22px,
        22px 22px,
        auto,
        auto,
        auto,
        auto,
        auto;
    border: none;
    border-radius: 0;
    box-shadow: inset 0 0 0 4px var(--sgh-ink);
    transform: scale(0.97);
    transform-origin: center center;
    opacity: 0.94;
    transition:
        transform 0.4s cubic-bezier(0.22, 1, 0.32, 1),
        opacity 0.35s ease;
}

.sub-screen-game-hub.is-visible .sub-screen-game-hub__sheet {
    transform: scale(1);
    opacity: 1;
}

.sub-screen-game-hub__close {
    position: absolute;
    top: 12px;
    right: max(8px, env(safe-area-inset-right, 0px));
    width: 40px;
    height: 40px;
    border: 3px solid var(--sgh-ink);
    border-radius: 14px;
    background: var(--sgh-paper);
    color: var(--sgh-ink);
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--sgh-brutal-shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    z-index: 3;
}

.sub-screen-game-hub__close:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 1);
}

.sub-screen-game-hub__title {
    width: fit-content;
    max-width: calc(100% - 66px);
    margin: 34px 52px 8px 10px;
    padding: 6px 14px 7px;
    font-family: Inter, ui-rounded, system-ui, -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: clamp(1.32rem, 5.3vw, 1.62rem);
    font-size: clamp(1.32rem, 5.3cqw, 1.62rem);
    font-weight: 900;
    letter-spacing: 0.08em;
    color: var(--sgh-ink);
    text-shadow: none;
    background: var(--sgh-yellow);
    border: 3px solid var(--sgh-ink);
    border-radius: 18px 18px 6px 18px;
    box-shadow: var(--sgh-brutal-shadow);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.sub-screen-game-hub__subtitle {
    width: fit-content;
    max-width: calc(100% - 20px);
    margin: 0 0 clamp(12px, 3vh, 18px) 10px;
    margin: 0 0 clamp(12px, 3cqh, 18px) 10px;
    padding: 6px 12px;
    font-size: clamp(0.86rem, 3.8vw, 0.98rem);
    font-size: clamp(0.86rem, 3.8cqw, 0.98rem);
    font-weight: 800;
    color: var(--sgh-ink);
    letter-spacing: 0.03em;
    background: rgba(255, 255, 255, 0.92);
    border: 2px solid var(--sgh-ink);
    border-radius: 999px;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 1);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

/* 编辑模式：长按拖拽 / 单击更换图标提示条 */
.sgh-edit-bar {
    position: relative;
    z-index: 2;
    margin: 0 0 clamp(8px, 2vh, 12px);
    margin: 0 0 clamp(8px, 2cqh, 12px);
    padding: 8px 12px 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 3px solid var(--sgh-ink);
    border-radius: 16px;
    background: var(--sgh-mint);
    color: var(--sgh-ink);
    font-size: clamp(0.72rem, 3.2vw, 0.82rem);
    font-size: clamp(0.72rem, 3.2cqw, 0.82rem);
    font-weight: 800;
    line-height: 1.3;
    box-shadow: var(--sgh-brutal-shadow);
    flex-shrink: 0;
    animation: sghEditBarPop 0.28s cubic-bezier(0.22, 1, 0.32, 1);
}

.sgh-edit-bar[hidden] {
    display: none !important;
}

.sgh-edit-bar__hint {
    flex: 1 1 auto;
    min-width: 0;
}

.sgh-edit-bar__done {
    flex-shrink: 0;
    padding: 5px 14px;
    border: 3px solid var(--sgh-ink);
    border-radius: 999px;
    background: var(--sgh-paper);
    color: var(--sgh-ink);
    font-weight: 900;
    font-size: clamp(0.72rem, 3.2vw, 0.8rem);
    font-size: clamp(0.72rem, 3.2cqw, 0.8rem);
    cursor: pointer;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 1);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.sgh-edit-bar__done:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 rgba(0, 0, 0, 1);
}

@keyframes sghEditBarPop {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 游乐场网格：正方形格（与高宽比与图标块一致缩放），自上而下排列直至铺满标题/副标题/编辑条之下的区域（可纵向滚动）；不再使用整行拉长的矩形格 */
.sub-screen-game-hub__cards {
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    /* 与下方 .sgh-tile__icon 使用同源 clamp，保证格与图标视觉比例锁住 */
    --sgh-icon-box: 75px;
    /* 单列≈图标 + 两行文案，略大于纯图标正方形，但整体仍为统一方块阵列（非横向长条槽） */
    --sgh-square-cell: 104px;

    flex: 1 1 auto;
    align-self: stretch;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;

    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--sgh-square-cell)), 1fr));
    gap: 13px 12px;
    justify-content: center;
    align-content: start;
    padding: 8px 4px 14px 0;
}

@supports (width: 1cqw) {
    .sub-screen-game-hub__cards {
        --sgh-icon-box: 75px;
        --sgh-square-cell: 104px;
    }
}

.sub-screen-game-hub__cards::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.sgh-grid__cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    width: 100%;
    max-width: var(--sgh-square-cell);
    aspect-ratio: 1;
    border-radius: 18px;
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

.sgh-grid__cell--empty {
    background: transparent;
}

/* 编辑模式时空槽位浅显出来 */
.sub-screen-game-hub.is-editing .sgh-grid__cell--empty {
    background: rgba(255, 255, 255, 0.68);
    box-shadow:
        inset 0 0 0 3px rgba(0, 0, 0, 0.82),
        4px 4px 0 rgba(0, 0, 0, 0.18);
    background-image:
        repeating-linear-gradient(
            45deg,
            rgba(255, 107, 107, 0.18) 0,
            rgba(255, 107, 107, 0.18) 6px,
            transparent 6px,
            transparent 12px
        );
}

.sub-screen-game-hub.is-editing .sgh-grid__cell.is-drop-target {
    background: var(--sgh-yellow);
    box-shadow:
        inset 0 0 0 3px var(--sgh-ink),
        var(--sgh-brutal-shadow);
}

/* tile：落在正方形槽内居中，宽高随格收缩，避免出现半格宽的横向长条 */
.sub-screen-game-hub__card,
.sgh-tile {
    position: relative;
    flex: 0 1 auto;
    width: 100%;
    max-width: var(--sgh-square-cell);
    box-sizing: border-box;
    height: auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    text-align: center;
    color: inherit;
    font: inherit;
    appearance: none;
    -webkit-appearance: none;
    transition: transform 0.18s ease, opacity 0.18s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.sub-screen-game-hub__card:active,
.sgh-tile:active {
    transform: scale(0.96);
    opacity: 0.94;
    box-shadow: none;
}

.sub-screen-game-hub__card--read,
.sgh-tile--read { background: transparent; }

.sub-screen-game-hub__card--listen,
.sgh-tile--listen { background: transparent; }

.sub-screen-game-hub__card--cinema,
.sgh-tile--cinema { background: transparent; }

.sub-screen-game-hub__card--friend-assistant,
.sgh-tile--friend-assistant { background: transparent; }

.sub-screen-game-hub__card--draw-guess,
.sgh-tile--draw-guess { background: transparent; }

/* 编辑模式抖动 + 浮起 */
.sub-screen-game-hub.is-editing .sgh-tile {
    animation: sghTileWiggle 0.42s ease-in-out infinite alternate;
}

.sub-screen-game-hub.is-editing .sgh-grid__cell:nth-child(2n) .sgh-tile {
    animation-delay: 0.12s;
}

@keyframes sghTileWiggle {
    from { transform: rotate(-1.6deg); }
    to   { transform: rotate(1.6deg); }
}

.sgh-tile.is-armed {
    box-shadow: none;
    outline: 3px dashed var(--sgh-red);
    outline-offset: 4px;
    border-radius: 18px;
    transform: none;
    animation: none !important;
}

.sgh-tile.is-dragging {
    z-index: 30;
    pointer-events: none;
    opacity: 0.95;
    transform: scale(1.05) rotate(-2deg);
    box-shadow:
        var(--sgh-brutal-shadow-lg),
        0 0 0 4px rgba(255, 230, 109, 0.75);
    outline: none;
    animation: none !important;
    transition: none;
}

.sub-screen-game-hub__card-icon,
.sgh-tile__icon {
    flex-shrink: 0;
    width: var(--sgh-icon-box);
    height: var(--sgh-icon-box);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.25rem, 6vw, 1.55rem);
    font-size: clamp(1.25rem, 6cqw, 1.55rem);
    line-height: 1;
    border-radius: 18px;
    background: var(--sgh-paper);
    border: 3px solid var(--sgh-ink);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 1);
    overflow: hidden;
    color: var(--sgh-ink);
    position: relative;
}

.sgh-tile--read .sgh-tile__icon { background: var(--sgh-red); }
.sgh-tile--listen .sgh-tile__icon { background: var(--sgh-yellow); }
.sgh-tile--cinema .sgh-tile__icon { background: var(--sgh-teal); }
.sgh-tile--friend-assistant .sgh-tile__icon { background: var(--sgh-pink); }
.sgh-tile--draw-guess .sgh-tile__icon { background: var(--sgh-mint); }

.sgh-tile__icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    display: block;
}

.sgh-tile__icon-img[hidden] {
    display: none;
}

.sub-screen-game-hub__card-label,
.sgh-tile__label {
    width: 100%;
    font-size: clamp(0.8rem, 3.4vw, 0.92rem);
    font-size: clamp(0.8rem, 3.4cqw, 0.92rem);
    font-weight: 900;
    color: var(--sgh-ink);
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.sub-screen-game-hub__card-hint,
.sgh-tile__hint {
    width: 100%;
    margin: 0;
    padding: 0 clamp(2px, 1vw, 4px);
    padding: 0 clamp(2px, 1cqw, 4px);
    font-size: clamp(0.62rem, 2.5vw, 0.7rem);
    font-size: clamp(0.62rem, 2.5cqw, 0.7rem);
    color: rgba(0, 0, 0, 0.68);
    line-height: 1.3;
    font-weight: 700;
}

.sgh-tile__upload {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

/* 好友助手 */
.sgh-friend-assistant {
    position: absolute;
    inset: 0;
    z-index: 100180;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
    font-family: ui-rounded, 'Apple LiGothic', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

.sgh-friend-assistant.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.sgh-fa-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(34, 42, 50, 0.34);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.sgh-fa-panel {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
    background:
        radial-gradient(100% 70% at 12% 0%, rgba(206, 246, 229, 0.9) 0%, rgba(206, 246, 229, 0) 55%),
        radial-gradient(100% 72% at 92% 100%, rgba(255, 222, 236, 0.78) 0%, rgba(255, 222, 236, 0) 58%),
        linear-gradient(180deg, #fbfffd 0%, #f5f7fb 100%);
    color: #1f2a32;
    transform: translateY(8px);
    transition: transform 0.24s ease;
}

.sgh-friend-assistant.is-visible .sgh-fa-panel {
    transform: translateY(0);
}

.sgh-fa-header {
    flex: 0 0 auto;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: calc(8px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 8px max(12px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
    border-bottom: 1px solid rgba(31, 42, 50, 0.09);
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.sgh-fa-header h3 {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    text-align: center;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: 0;
}

.sgh-fa-icon-btn {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.64);
    color: #26333c;
    font-size: 23px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.sgh-fa-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px max(14px, env(safe-area-inset-right, 0px)) 14px max(14px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
}

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

.sgh-fa-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    margin: 0 0 12px;
}

.sgh-fa-field span,
.sgh-fa-label {
    font-size: 13px;
    line-height: 1.25;
    font-weight: 800;
    color: #31414b;
    letter-spacing: 0;
}

.sgh-fa-field input,
.sgh-fa-field select,
.sgh-fa-field textarea,
.sgh-fa-custom-tag input,
.sgh-fa-result {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid rgba(49, 65, 75, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.88);
    color: #1f2a32;
    font: inherit;
    font-size: 14px;
    line-height: 1.45;
    letter-spacing: 0;
    outline: none;
}

.sgh-fa-field input,
.sgh-fa-field select,
.sgh-fa-custom-tag input {
    height: 42px;
    padding: 9px 11px;
}

.sgh-fa-field textarea,
.sgh-fa-result {
    padding: 11px 12px;
    resize: vertical;
}

.sgh-fa-field input:focus,
.sgh-fa-field select:focus,
.sgh-fa-field textarea:focus,
.sgh-fa-custom-tag input:focus,
.sgh-fa-result:focus {
    border-color: rgba(7, 193, 96, 0.72);
    box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.12);
}

.sgh-fa-field--full {
    margin-top: 12px;
}

.sgh-fa-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 10px;
}

.sgh-fa-chip {
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid rgba(49, 65, 75, 0.13);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    color: #34444f;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0;
    cursor: pointer;
}

.sgh-fa-chip.is-selected {
    border-color: rgba(7, 193, 96, 0.45);
    background: rgba(7, 193, 96, 0.12);
    color: #057f42;
}

.sgh-fa-custom-tag {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 8px;
    margin-bottom: 12px;
}

.sgh-fa-custom-tag button {
    height: 42px;
    border: 1px solid rgba(7, 193, 96, 0.35);
    border-radius: 8px;
    background: rgba(7, 193, 96, 0.1);
    color: #057f42;
    font-size: 22px;
    line-height: 1;
    font-weight: 800;
    cursor: pointer;
}

.sgh-fa-status {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.45;
}

.sgh-fa-status.is-loading {
    background: rgba(7, 193, 96, 0.1);
    color: #057f42;
}

.sgh-fa-status.is-error {
    background: rgba(220, 64, 64, 0.1);
    color: #b42323;
}

.sgh-fa-footer {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 10px;
    padding: 12px max(14px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
    border-top: 1px solid rgba(31, 42, 50, 0.09);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.sgh-fa-secondary,
.sgh-fa-primary {
    min-width: 0;
    min-height: 44px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0;
    cursor: pointer;
}

.sgh-fa-secondary {
    border: 1px solid rgba(49, 65, 75, 0.14);
    background: rgba(255, 255, 255, 0.78);
    color: #31414b;
}

.sgh-fa-primary {
    border: 1px solid rgba(7, 193, 96, 0.2);
    background: #07c160;
    color: #fff;
}

.sgh-fa-primary:disabled,
.sgh-fa-secondary:disabled {
    opacity: 0.58;
    cursor: default;
}

.sgh-fa-preview-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sgh-fa-preview-name {
    flex: 0 0 auto;
    font-size: 15px;
    line-height: 1.25;
    font-weight: 800;
    color: #1f2a32;
}

.sgh-fa-result {
    flex: 1 1 auto;
    min-height: 320px;
    white-space: pre-wrap;
}

@media (max-width: 360px) {
    .sgh-fa-fields {
        grid-template-columns: 1fr;
    }
}

/* 暗色模式：保持粉紫色调，但底色加深成深紫夜空感 */
html[data-appearance="dark"] .sub-screen-game-hub__backdrop {
    background:
        radial-gradient(circle at 12% 10%, rgba(255, 230, 109, 0.26) 0%, rgba(255, 230, 109, 0.26) 12%, transparent 13%),
        radial-gradient(circle at 88% 18%, rgba(78, 205, 196, 0.24) 0%, rgba(78, 205, 196, 0.24) 10%, transparent 11%),
        rgba(0, 0, 0, 0.48);
}

html[data-appearance="dark"] .sub-screen-game-hub__sheet {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        radial-gradient(circle at 12% 12%, rgba(255, 107, 107, 0.54) 0%, rgba(255, 107, 107, 0.54) 7%, transparent 7.5%),
        radial-gradient(circle at 90% 10%, rgba(78, 205, 196, 0.5) 0%, rgba(78, 205, 196, 0.5) 8%, transparent 8.6%),
        radial-gradient(circle at 78% 92%, rgba(255, 230, 109, 0.46) 0%, rgba(255, 230, 109, 0.46) 11%, transparent 11.8%),
        linear-gradient(165deg, #151515 0%, #25201a 44%, #2b1717 100%);
    background-size:
        22px 22px,
        22px 22px,
        auto,
        auto,
        auto,
        auto;
    box-shadow: inset 0 0 0 4px #000;
}

html[data-appearance="dark"] .sub-screen-game-hub__title {
    color: #000;
    background: #ffe66d;
    text-shadow: none;
}

html[data-appearance="dark"] .sub-screen-game-hub__subtitle {
    color: #000;
    background: rgba(255, 255, 255, 0.94);
}

html[data-appearance="dark"] .sub-screen-game-hub__close {
    background: #fff;
    color: #000;
    border-color: #000;
    box-shadow: var(--sgh-brutal-shadow);
}

html[data-appearance="dark"] .sgh-edit-bar {
    background: #95e1d3;
    border-color: #000;
    color: #000;
}

html[data-appearance="dark"] .sgh-edit-bar__done {
    background: #fff;
    border-color: #000;
    color: #000;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 1);
}

html[data-appearance="dark"] .sub-screen-game-hub__card,
html[data-appearance="dark"] .sgh-tile {
    border: none;
    color: #000;
    box-shadow: none;
    background: transparent;
}

html[data-appearance="dark"] .sub-screen-game-hub__card--read,
html[data-appearance="dark"] .sgh-tile--read { background: transparent; }

html[data-appearance="dark"] .sub-screen-game-hub__card--listen,
html[data-appearance="dark"] .sgh-tile--listen { background: transparent; }

html[data-appearance="dark"] .sub-screen-game-hub__card--cinema,
html[data-appearance="dark"] .sgh-tile--cinema { background: transparent; }

html[data-appearance="dark"] .sub-screen-game-hub__card--friend-assistant,
html[data-appearance="dark"] .sgh-tile--friend-assistant { background: transparent; }

html[data-appearance="dark"] .sub-screen-game-hub__card--draw-guess,
html[data-appearance="dark"] .sgh-tile--draw-guess { background: transparent; }

html[data-appearance="dark"] .sgh-tile.is-armed {
    outline-color: #ff6b6b;
}

html[data-appearance="dark"] .sub-screen-game-hub__card-icon,
html[data-appearance="dark"] .sgh-tile__icon {
    border-color: #000;
    color: #000;
}

html[data-appearance="dark"] .sgh-tile--read .sgh-tile__icon { background: #ff6b6b; }
html[data-appearance="dark"] .sgh-tile--listen .sgh-tile__icon { background: #ffe66d; }
html[data-appearance="dark"] .sgh-tile--cinema .sgh-tile__icon { background: #4ecdc4; }
html[data-appearance="dark"] .sgh-tile--friend-assistant .sgh-tile__icon { background: #f38181; }
html[data-appearance="dark"] .sgh-tile--draw-guess .sgh-tile__icon { background: #95e1d3; }

html[data-appearance="dark"] .sub-screen-game-hub__card-label,
html[data-appearance="dark"] .sgh-tile__label {
    color: #000;
}

html[data-appearance="dark"] .sub-screen-game-hub__card-hint,
html[data-appearance="dark"] .sgh-tile__hint {
    color: rgba(0, 0, 0, 0.68);
}

html[data-appearance="dark"] .sub-screen-game-hub.is-editing .sgh-grid__cell--empty {
    background: rgba(255, 255, 255, 0.46);
    box-shadow:
        inset 0 0 0 3px rgba(0, 0, 0, 0.9),
        4px 4px 0 rgba(0, 0, 0, 0.42);
    background-image:
        repeating-linear-gradient(
            45deg,
            rgba(255, 184, 217, 0.16) 0,
            rgba(255, 184, 217, 0.16) 6px,
            transparent 6px,
            transparent 12px
        );
}

html[data-appearance="dark"] .sgh-fa-backdrop {
    background: rgba(16, 18, 24, 0.58);
}

html[data-appearance="dark"] .sgh-fa-panel {
    background:
        radial-gradient(100% 70% at 12% 0%, rgba(33, 94, 76, 0.46) 0%, rgba(33, 94, 76, 0) 58%),
        radial-gradient(100% 72% at 92% 100%, rgba(96, 50, 82, 0.5) 0%, rgba(96, 50, 82, 0) 58%),
        linear-gradient(180deg, #171d23 0%, #1d222b 100%);
    color: #edf5f2;
}

html[data-appearance="dark"] .sgh-fa-header,
html[data-appearance="dark"] .sgh-fa-footer {
    background: rgba(28, 34, 42, 0.82);
    border-color: rgba(255, 255, 255, 0.08);
}

html[data-appearance="dark"] .sgh-fa-header h3,
html[data-appearance="dark"] .sgh-fa-field span,
html[data-appearance="dark"] .sgh-fa-label,
html[data-appearance="dark"] .sgh-fa-preview-name {
    color: #edf5f2;
}

html[data-appearance="dark"] .sgh-fa-icon-btn,
html[data-appearance="dark"] .sgh-fa-secondary,
html[data-appearance="dark"] .sgh-fa-chip,
html[data-appearance="dark"] .sgh-fa-field input,
html[data-appearance="dark"] .sgh-fa-field select,
html[data-appearance="dark"] .sgh-fa-field textarea,
html[data-appearance="dark"] .sgh-fa-custom-tag input,
html[data-appearance="dark"] .sgh-fa-result {
    background: rgba(38, 46, 56, 0.86);
    border-color: rgba(255, 255, 255, 0.12);
    color: #edf5f2;
}

html[data-appearance="dark"] .sgh-fa-chip.is-selected {
    border-color: rgba(83, 220, 150, 0.54);
    background: rgba(83, 220, 150, 0.16);
    color: #8af0bd;
}

html[data-appearance="dark"] .sgh-fa-custom-tag button {
    border-color: rgba(83, 220, 150, 0.4);
    background: rgba(83, 220, 150, 0.14);
    color: #8af0bd;
}

html[data-appearance="dark"] .sgh-fa-status.is-loading {
    background: rgba(83, 220, 150, 0.14);
    color: #8af0bd;
}

html[data-appearance="dark"] .sgh-fa-status.is-error {
    background: rgba(255, 100, 100, 0.14);
    color: #ffb0b0;
}
