/* 子屏「糖果星梦」游戏 Hub — 自 style.css 拆出 */
/* ========== 子屏「游戏」糖果星梦主页（#sub-screen-game-hub，铺满小手机 #app 视口） ========== */
.sub-screen-game-hub {
    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: rgba(86, 64, 110, 0.38);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.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: ui-rounded, 'Apple LiGothic', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background:
        radial-gradient(120% 80% at 12% 8%, rgba(255, 226, 240, 0.85) 0%, rgba(255, 226, 240, 0) 55%),
        radial-gradient(110% 75% at 92% 12%, rgba(255, 240, 196, 0.75) 0%, rgba(255, 240, 196, 0) 55%),
        radial-gradient(120% 90% at 82% 96%, rgba(214, 198, 252, 0.78) 0%, rgba(214, 198, 252, 0) 60%),
        radial-gradient(120% 90% at 14% 92%, rgba(189, 224, 254, 0.55) 0%, rgba(189, 224, 254, 0) 60%),
        linear-gradient(165deg, #fff8fb 0%, #fdeefb 45%, #f3e6fd 100%);
    border: none;
    border-radius: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    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: 2px solid rgba(165, 116, 196, 0.55);
    border-radius: 50%;
    background: linear-gradient(160deg, #ffffff 0%, #fff0f8 100%);
    color: rgba(140, 92, 168, 0.9);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 2px 3px 0 rgba(165, 116, 196, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    z-index: 3;
}

.sub-screen-game-hub__close:active {
    transform: scale(0.94);
    box-shadow: 1px 2px 0 rgba(165, 116, 196, 0.22);
}

.sub-screen-game-hub__title {
    margin: 34px 52px 8px 10px;
    font-family: 'LoveMiHuiwenMingchao', ui-rounded, 'Apple LiGothic', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: clamp(1.3rem, 5.3cqw, 1.54rem);
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #7a4c9c;
    text-shadow:
        1px 2px 0 rgba(255, 255, 255, 0.85),
        0 0 14px rgba(255, 184, 217, 0.45);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.sub-screen-game-hub__subtitle {
    margin: 0 0 clamp(12px, 3cqh, 18px) 10px;
    font-size: clamp(0.9rem, 4cqw, 1rem);
    color: rgba(120, 86, 156, 0.85);
    letter-spacing: 0.04em;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

/* 装饰图层：粉紫糖果色调，可爱手绘星星/爱心（已去白底） */
.sgh-deco-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.sgh-deco {
    position: absolute;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    object-fit: contain;
    filter:
        hue-rotate(-4deg)
        saturate(0.96)
        drop-shadow(0 2px 6px rgba(165, 116, 196, 0.22));
    opacity: 0.95;
}

.sgh-deco--star-shoot {
    top: 4%;
    right: -8%;
    width: clamp(110px, 32cqw, 150px);
    transform: rotate(-10deg);
    opacity: 0.92;
}

.sgh-deco--star-cloud {
    top: 22%;
    left: -10%;
    width: clamp(82px, 24cqw, 110px);
    transform: rotate(8deg);
    opacity: 0.88;
}

.sgh-deco--heart-glow {
    top: 6%;
    left: 4%;
    width: clamp(64px, 18cqw, 86px);
    transform: rotate(-6deg);
    opacity: 0.82;
}

.sgh-deco--stars-cluster {
    bottom: 6%;
    left: -8%;
    width: clamp(110px, 32cqw, 150px);
    transform: rotate(-8deg);
    opacity: 0.92;
}

.sgh-deco--shooting-star {
    bottom: 10%;
    right: -6%;
    width: clamp(108px, 30cqw, 140px);
    transform: rotate(14deg);
    opacity: 0.92;
}

.sgh-deco--hearts-cluster {
    top: 44%;
    right: -10%;
    width: clamp(86px, 24cqw, 116px);
    transform: rotate(-14deg);
    opacity: 0.78;
}

.sgh-deco--star-glow {
    top: 38%;
    left: -6%;
    width: clamp(78px, 22cqw, 102px);
    transform: rotate(6deg);
    opacity: 0.75;
}

.sgh-deco--party-popper {
    bottom: 32%;
    right: 2%;
    width: clamp(70px, 20cqw, 94px);
    transform: rotate(8deg);
    opacity: 0.68;
}

.sgh-deco--heart-big {
    bottom: 38%;
    left: 4%;
    width: clamp(64px, 18cqw, 84px);
    transform: rotate(-12deg);
    opacity: 0.6;
}

/* 编辑模式：长按拖拽 / 单击更换图标提示条 */
.sgh-edit-bar {
    position: relative;
    z-index: 2;
    margin: 0 0 clamp(8px, 2cqh, 12px);
    padding: 8px 12px 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1.5px dashed rgba(165, 116, 196, 0.55);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.65);
    color: #7a4c9c;
    font-size: clamp(0.72rem, 3.2cqw, 0.82rem);
    line-height: 1.3;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    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: 2px solid rgba(165, 116, 196, 0.65);
    border-radius: 999px;
    background: linear-gradient(160deg, #ffffff 0%, #ffe7f4 100%);
    color: #7a4c9c;
    font-weight: 700;
    font-size: clamp(0.72rem, 3.2cqw, 0.8rem);
    cursor: pointer;
    box-shadow: 1px 2px 0 rgba(165, 116, 196, 0.28);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.sgh-edit-bar__done:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 rgba(165, 116, 196, 0.22);
}

@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: clamp(38px, 10.5cqw, 48px);
    /* 单列≈图标 + 两行文案，略大于纯图标正方形，但整体仍为统一方块阵列（非横向长条槽） */
    --sgh-square-cell: clamp(92px, 24cqw, 108px);

    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: 10px 12px;
    justify-content: center;
    align-content: start;
    padding: 8px 0 10px;
}

.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: 12px;
    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.42);
    box-shadow:
        inset 0 0 0 1.5px rgba(165, 116, 196, 0.32),
        0 0 0 0 rgba(165, 116, 196, 0);
    background-image:
        repeating-linear-gradient(
            45deg,
            rgba(255, 184, 217, 0.18) 0,
            rgba(255, 184, 217, 0.18) 6px,
            transparent 6px,
            transparent 12px
        );
}

.sub-screen-game-hub.is-editing .sgh-grid__cell.is-drop-target {
    background: rgba(255, 220, 240, 0.65);
    box-shadow:
        inset 0 0 0 2px rgba(220, 130, 200, 0.65),
        0 0 12px rgba(255, 184, 217, 0.5);
}

/* 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: 3px;
    padding: 4px clamp(3px, 1.2cqw, 8px) 5px;
    margin: 0;
    border: none;
    border-radius: 12px;
    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.97);
    opacity: 0.88;
    box-shadow: none;
}

.sub-screen-game-hub__card--read,
.sub-screen-game-hub__card--listen,
.sgh-tile--read,
.sgh-tile--listen,
.sub-screen-game-hub__card--cinema,
.sgh-tile--cinema {
    background: transparent;
    box-shadow: none;
}

/* 编辑模式抖动 + 浮起 */
.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: 2px solid rgba(255, 184, 217, 0.75);
    outline-offset: 3px;
    border-radius: 14px;
    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:
        4px 8px 14px rgba(165, 116, 196, 0.35),
        0 0 0 3px rgba(255, 184, 217, 0.45);
    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, 6cqw, 1.55rem);
    line-height: 1;
    border-radius: 14px 16px 14px 14px;
    background: linear-gradient(160deg, #ffffff 0%, #fff2fa 100%);
    border: 2px solid rgba(165, 116, 196, 0.42);
    box-shadow:
        1px 2px 0 rgba(165, 116, 196, 0.18),
        inset 0 2px 0 rgba(255, 255, 255, 0.95);
    overflow: hidden;
    color: #7a4c9c;
    position: relative;
}

.sgh-tile__icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    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.4cqw, 0.92rem);
    font-weight: 800;
    color: #6a3d8c;
    letter-spacing: 0.03em;
    line-height: 1.2;
}

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

.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: rgba(28, 18, 38, 0.62);
}

html[data-appearance="dark"] .sub-screen-game-hub__sheet {
    background:
        radial-gradient(120% 80% at 12% 8%, rgba(120, 70, 130, 0.5) 0%, rgba(120, 70, 130, 0) 60%),
        radial-gradient(120% 90% at 82% 96%, rgba(94, 70, 145, 0.5) 0%, rgba(94, 70, 145, 0) 60%),
        linear-gradient(165deg, #2a1d3a 0%, #2c1f3e 50%, #261a36 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html[data-appearance="dark"] .sub-screen-game-hub__title {
    color: #ffd6ec;
    text-shadow: 1px 2px 0 rgba(0, 0, 0, 0.45);
}

html[data-appearance="dark"] .sub-screen-game-hub__subtitle {
    color: rgba(255, 214, 236, 0.78);
}

html[data-appearance="dark"] .sub-screen-game-hub__close {
    background: linear-gradient(160deg, #4a3360 0%, #382446 100%);
    color: #ffd6ec;
    border-color: rgba(255, 184, 217, 0.42);
    box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.42);
}

html[data-appearance="dark"] .sgh-deco {
    opacity: 0.7;
    filter:
        hue-rotate(-6deg)
        saturate(0.85)
        brightness(1.05)
        drop-shadow(0 2px 6px rgba(0, 0, 0, 0.55));
}

html[data-appearance="dark"] .sgh-edit-bar {
    background: rgba(70, 48, 92, 0.55);
    border-color: rgba(255, 184, 217, 0.42);
    color: #ffd6ec;
}

html[data-appearance="dark"] .sgh-edit-bar__done {
    background: linear-gradient(160deg, #4a3360 0%, #382446 100%);
    border-color: rgba(255, 184, 217, 0.55);
    color: #ffd6ec;
    box-shadow: 1px 2px 0 rgba(0, 0, 0, 0.42);
}

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

html[data-appearance="dark"] .sgh-tile.is-armed {
    outline-color: rgba(255, 184, 217, 0.65);
}

html[data-appearance="dark"] .sub-screen-game-hub__card-icon,
html[data-appearance="dark"] .sgh-tile__icon {
    background: linear-gradient(160deg, #5a4078 0%, #3f2a55 100%);
    border-color: rgba(255, 184, 217, 0.32);
    color: #ffd6ec;
}

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

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

html[data-appearance="dark"] .sub-screen-game-hub.is-editing .sgh-grid__cell--empty {
    background: rgba(70, 48, 92, 0.42);
    box-shadow: inset 0 0 0 1.5px rgba(255, 184, 217, 0.32);
    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;
}
