/* 子屏游戏 · 你画我猜（独立样式） */
.draw-guess-game {
    position: absolute;
    inset: 0;
    z-index: 100190;
    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;
    color: #25323a;
}

.draw-guess-game.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.dg-shell {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background:
        linear-gradient(155deg, rgba(255, 248, 239, 0.98) 0%, rgba(239, 251, 248, 0.98) 48%, rgba(250, 241, 255, 0.98) 100%);
    overflow: hidden;
}

.dg-header {
    flex: 0 0 auto;
    min-height: 56px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 70px;
    align-items: center;
    gap: 6px;
    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(37, 50, 58, 0.09);
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.dg-header h3 {
    margin: 0;
    min-width: 0;
    text-align: center;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 850;
    letter-spacing: 0;
}

.dg-icon-btn,
.dg-text-btn {
    min-width: 0;
    height: 38px;
    border: 1px solid rgba(37, 50, 58, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    color: #26333c;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    letter-spacing: 0;
}

.dg-icon-btn {
    width: 38px;
    font-size: 24px;
    line-height: 1;
}

.dg-text-btn {
    padding: 0 10px;
    font-size: 13px;
}

.dg-header-spacer {
    width: 38px;
    height: 38px;
}

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

.dg-main--setup,
.dg-main--result {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dg-band,
.dg-word-band,
.dg-canvas-zone,
.dg-chat-zone,
.dg-winner-band,
.dg-rank-list,
.dg-history-band {
    border: 1px solid rgba(37, 50, 58, 0.09);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 10px 24px rgba(56, 74, 83, 0.08);
}

.dg-band {
    padding: 12px;
    box-sizing: border-box;
}

.dg-band-title,
.dg-chat-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.25;
    color: rgba(37, 50, 58, 0.68);
}

.dg-band-title strong,
.dg-chat-title strong {
    color: #25323a;
    font-size: 15px;
}

.dg-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px;
    gap: 8px;
    margin-bottom: 10px;
}

.dg-search-row input,
.dg-search-row button,
.dg-options-band select {
    width: 100%;
    min-width: 0;
    height: 40px;
    box-sizing: border-box;
    border: 1px solid rgba(37, 50, 58, 0.13);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    color: #25323a;
    font: inherit;
    font-size: 14px;
    letter-spacing: 0;
    outline: none;
}

.dg-search-row input {
    padding: 0 11px;
}

.dg-search-row button {
    font-weight: 800;
    cursor: pointer;
}

.dg-friend-list {
    display: grid;
    gap: 8px;
    max-height: 46cqh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.dg-friend-list::-webkit-scrollbar { width: 0; height: 0; display: none; }

.dg-friend-row {
    width: 100%;
    min-width: 0;
    min-height: 54px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 32px;
    align-items: center;
    gap: 10px;
    padding: 7px 8px;
    box-sizing: border-box;
    border: 1px solid rgba(37, 50, 58, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.62);
    color: inherit;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.dg-friend-row.is-selected {
    border-color: rgba(44, 159, 143, 0.42);
    background: rgba(223, 250, 245, 0.82);
}

.dg-friend-avatar,
.dg-score-avatar,
.dg-chat-avatar,
.dg-rank-avatar,
.dg-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 auto;
    border-radius: 10px;
    background: linear-gradient(145deg, #ffe6ef 0%, #dff7f2 100%);
    color: #31535c;
    font-weight: 850;
    line-height: 1;
}

.dg-friend-avatar,
.dg-chat-avatar {
    width: 42px;
    height: 42px;
}

.dg-friend-avatar img,
.dg-score-avatar img,
.dg-chat-avatar img,
.dg-rank-avatar img,
.dg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dg-friend-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dg-friend-main strong,
.dg-rank-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    line-height: 1.15;
}

.dg-friend-main small,
.dg-history-row small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(37, 50, 58, 0.58);
    font-size: 12px;
    line-height: 1.2;
}

.dg-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(44, 159, 143, 0.12);
    color: #1d7d72;
    font-weight: 900;
}

.dg-options-band {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.dg-options-band label {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 800;
    color: #31414b;
}

.dg-footer {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 12px max(12px, env(safe-area-inset-right, 0px)) max(14px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
    border-top: 1px solid rgba(37, 50, 58, 0.09);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.dg-footer--play {
    grid-template-columns: minmax(0, 0.66fr) minmax(0, 0.66fr) minmax(0, 1.28fr);
}

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

.dg-primary {
    border: 1px solid rgba(44, 159, 143, 0.22);
    background: #2c9f8f;
    color: #fff;
}

.dg-secondary {
    border: 1px solid rgba(37, 50, 58, 0.13);
    background: rgba(255, 255, 255, 0.78);
    color: #25323a;
}

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

.dg-main--play {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
}

.dg-score-strip {
    flex: 0 0 auto;
    display: flex;
    gap: 7px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 1px;
}

.dg-score-strip::-webkit-scrollbar {
    display: none;
}

.dg-score-chip {
    flex: 0 0 auto;
    min-width: 88px;
    max-width: 126px;
    height: 42px;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    padding: 5px 8px 5px 5px;
    box-sizing: border-box;
    border-radius: 8px;
    border: 1px solid color-mix(in srgb, var(--dg-chip, #8bd3dd) 48%, transparent);
    background: color-mix(in srgb, var(--dg-chip, #8bd3dd) 22%, white);
}

.dg-score-chip.is-user {
    border-color: rgba(242, 183, 5, 0.38);
    background: rgba(255, 247, 218, 0.9);
}

.dg-score-avatar {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 12px;
}

.dg-score-chip span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 800;
}

.dg-score-chip strong {
    font-size: 14px;
}

.dg-word-band {
    flex: 0 0 auto;
    min-height: 46px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    box-sizing: border-box;
}

.dg-word-band span,
.dg-word-band small {
    font-size: 12px;
    color: rgba(37, 50, 58, 0.62);
    white-space: nowrap;
}

.dg-word-band strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    font-size: 18px;
    line-height: 1.2;
    color: #26333c;
}

.dg-word-band button,
.dg-word-btn {
    height: 30px;
    padding: 0 9px;
    border: 1px solid rgba(37, 50, 58, 0.12);
    border-radius: 8px;
    background: #fff;
    color: #25323a;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.dg-word-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.dg-play-layout {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(290px, 52cqh) minmax(180px, 1fr);
    gap: 10px;
}

.dg-canvas-zone {
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 8px;
    box-sizing: border-box;
}

.dg-canvas-wrap {
    position: relative;
    flex: 1 1 auto;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    border: 1px dashed rgba(37, 50, 58, 0.18);
    background:
        linear-gradient(45deg, rgba(44, 159, 143, 0.05) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(44, 159, 143, 0.05) 25%, transparent 25%),
        #fffdf8;
    background-size: 18px 18px;
}

/* 画布右下角·小线性图标发送猜图按钮 */
.dg-canvas-send {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 11px 0 9px;
    border: 1px solid rgba(44, 159, 143, 0.5);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #1d7d72;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px rgba(44, 159, 143, 0.22);
}

.dg-canvas-send svg {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
}

.dg-canvas-send.is-busy {
    color: rgba(37, 50, 58, 0.5);
    border-color: rgba(37, 50, 58, 0.18);
    cursor: default;
}

.dg-canvas-send.is-busy svg {
    animation: dg-spin 0.9s linear infinite;
}

@keyframes dg-spin {
    to { transform: rotate(360deg); }
}

.dg-canvas-wrap canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    touch-action: none;
    cursor: crosshair;
}

.dg-toolbar {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 50px 40px minmax(76px, 0.62fr);
    gap: 8px;
    align-items: center;
    padding-top: 8px;
}

.dg-tool-undo {
    font-size: 18px;
    line-height: 1;
    padding: 0;
}

.dg-tool-group {
    min-width: 0;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    touch-action: pan-x;
    cursor: grab;
    scroll-behavior: auto;
}

.dg-tool-group:active {
    cursor: grabbing;
}

.dg-tool-group::-webkit-scrollbar {
    display: none;
}

.dg-swatch {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border: 2px solid rgba(255, 255, 255, 0.92);
    border-radius: 8px;
    background: var(--dg-swatch);
    box-shadow: 0 0 0 1px rgba(37, 50, 58, 0.12);
    cursor: pointer;
}

.dg-swatch.is-active {
    box-shadow: 0 0 0 2px #26333c;
}

.dg-tool-btn {
    height: 34px;
    border: 1px solid rgba(37, 50, 58, 0.13);
    border-radius: 8px;
    background: #fff;
    color: #25323a;
    font: inherit;
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
}

.dg-tool-btn.is-active {
    background: #26333c;
    color: #fff;
}

.dg-size {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    color: rgba(37, 50, 58, 0.68);
    font-size: 12px;
    font-weight: 800;
}

.dg-size input {
    min-width: 0;
}

.dg-chat-zone {
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 10px;
    box-sizing: border-box;
}

.dg-reaction-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding-right: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.dg-reaction-list::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.dg-chat-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    -webkit-touch-callout: none;
}

.dg-chat-row.is-user {
    flex-direction: row-reverse;
}

.dg-chat-row.is-grouped {
    margin-top: -4px;
}

.dg-chat-av {
    flex: 0 0 auto;
    width: 40px;
}

.dg-chat-avatar {
    width: 40px;
    height: 40px;
}

.dg-chat-col {
    min-width: 0;
    max-width: 78%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.dg-chat-row.is-user .dg-chat-col {
    align-items: flex-end;
}

.dg-chat-name {
    margin: 0 2px 4px;
    font-size: 12px;
    line-height: 1.2;
    color: rgba(37, 50, 58, 0.62);
    font-weight: 800;
}

.dg-bubble-quote {
    max-width: 100%;
    margin-bottom: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(37, 50, 58, 0.07);
    color: rgba(37, 50, 58, 0.6);
    font-size: 11px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dg-chat-bubble {
    min-width: 0;
    max-width: 100%;
    border: 1px solid color-mix(in srgb, var(--dg-bubble, #ffb6b9) 58%, transparent);
    border-radius: 10px;
    background: color-mix(in srgb, var(--dg-bubble, #ffb6b9) 27%, white);
    padding: 8px 10px;
    box-sizing: border-box;
}

.dg-chat-row.is-correct .dg-chat-bubble {
    border-color: rgba(44, 159, 143, 0.45);
    background: rgba(225, 250, 245, 0.92);
}

.dg-bubble-action {
    display: block;
    margin-bottom: 2px;
    color: rgba(37, 50, 58, 0.6);
    font-size: 12px;
    line-height: 1.4;
    font-style: italic;
}

.dg-bubble-main {
    display: block;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 13px;
    line-height: 1.45;
}

.dg-bubble-trans {
    display: block;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px dashed rgba(37, 50, 58, 0.18);
    color: rgba(37, 50, 58, 0.62);
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 12px;
    line-height: 1.4;
}

.dg-bubble-edited {
    display: inline-block;
    margin-top: 4px;
    color: rgba(37, 50, 58, 0.42);
    font-size: 10px;
}

.dg-bubble-emoji {
    display: block;
    max-width: 110px;
    max-height: 110px;
    border-radius: 6px;
}

.dg-chat-meta {
    margin: 4px 2px 0;
    color: rgba(37, 50, 58, 0.55);
    font-size: 11px;
    line-height: 1.25;
}

.dg-feed-tip {
    align-self: center;
    margin: 2px auto;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(37, 50, 58, 0.06);
    color: rgba(37, 50, 58, 0.5);
    font-size: 11px;
}

.dg-multi-check {
    flex: 0 0 auto;
    align-self: center;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1.5px solid rgba(44, 159, 143, 0.5);
    color: #1d7d72;
    font-size: 12px;
    font-weight: 900;
}

.dg-chat-row.is-selected .dg-chat-bubble {
    outline: 2px solid rgba(44, 159, 143, 0.6);
    outline-offset: 1px;
}

.dg-typing {
    display: inline-flex;
    gap: 4px;
    padding: 3px 2px;
}

.dg-typing i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(37, 50, 58, 0.4);
    animation: dg-typing 1s infinite ease-in-out;
}

.dg-typing i:nth-child(2) { animation-delay: 0.16s; }
.dg-typing i:nth-child(3) { animation-delay: 0.32s; }

@keyframes dg-typing {
    0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-3px); }
}

.dg-chat-multi {
    display: inline-flex;
    gap: 6px;
}

.dg-mini-btn {
    height: 26px;
    padding: 0 10px;
    border: 1px solid rgba(37, 50, 58, 0.14);
    border-radius: 7px;
    background: #fff;
    color: #25323a;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.dg-msg-menu {
    position: fixed;
    z-index: 100210;
    display: none;
    flex-direction: row;
    gap: 2px;
    padding: 4px;
    background: #4c4c4c;
    border-radius: 9px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38);
    font-family: inherit;
    -webkit-user-select: none;
    user-select: none;
}

.dg-msg-menu.is-open {
    display: flex;
}

.dg-msg-menu__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 52px;
    padding: 8px 10px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
}

.dg-msg-menu__item:hover {
    background: rgba(255, 255, 255, 0.12);
}

.dg-msg-menu__item:active {
    background: rgba(255, 255, 255, 0.22);
}

.dg-msg-menu__ico {
    font-size: 17px;
    line-height: 1;
}

.dg-msg-menu__txt {
    letter-spacing: 0.5px;
}

/* ===== 底部聊天输入栏（接收 / 表情 / 输入框 / 发送） ===== */
.dg-composer {
    display: block;
    padding: 8px max(10px, env(safe-area-inset-right, 0px)) max(10px, env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px));
}

.dg-quote-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
    padding: 5px 8px 5px 10px;
    border-radius: 8px;
    background: rgba(37, 50, 58, 0.07);
    color: rgba(37, 50, 58, 0.7);
    font-size: 12px;
}

.dg-quote-bar span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dg-quote-x {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: rgba(37, 50, 58, 0.1);
    color: #25323a;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

.dg-composer-row {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.dg-composer-icon,
.dg-composer-send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(37, 50, 58, 0.13);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.86);
    color: #31414b;
    cursor: pointer;
}

.dg-composer-icon.is-active {
    border-color: rgba(44, 159, 143, 0.5);
    background: rgba(223, 250, 245, 0.85);
    color: #1d7d72;
}

.dg-composer-icon:disabled {
    opacity: 0.5;
    cursor: default;
}

.dg-composer-send {
    width: auto;
    min-width: 44px;
    padding: 0 12px;
    border-color: rgba(44, 159, 143, 0.3);
    background: #2c9f8f;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 850;
}

.dg-composer-input {
    width: 100%;
    min-width: 0;
    height: 40px;
    box-sizing: border-box;
    padding: 0 12px;
    border: 1px solid rgba(37, 50, 58, 0.14);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    color: #25323a;
    font: inherit;
    font-size: 14px;
    outline: none;
}

.dg-emoji-panel {
    display: none;
    margin-top: 8px;
    max-height: 0;
    overflow: hidden;
}

.dg-emoji-panel.is-open {
    display: block;
    max-height: 220px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid rgba(37, 50, 58, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.7);
    padding: 8px;
}

.dg-emoji-cat {
    margin: 4px 2px 6px;
    font-size: 12px;
    font-weight: 800;
    color: rgba(37, 50, 58, 0.6);
}

.dg-emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
    gap: 6px;
    margin-bottom: 6px;
}

.dg-emoji-item {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.65);
    cursor: pointer;
}

.dg-emoji-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.dg-emoji-empty {
    padding: 18px 10px;
    text-align: center;
    color: rgba(37, 50, 58, 0.5);
    font-size: 12px;
}

.dg-empty {
    padding: 18px 10px;
    color: rgba(37, 50, 58, 0.56);
    text-align: center;
    font-size: 13px;
    line-height: 1.45;
}

.dg-empty--chat {
    margin: auto 0;
}

.dg-winner-band {
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: center;
}

.dg-winner-band span,
.dg-winner-band small {
    color: rgba(37, 50, 58, 0.62);
    font-size: 13px;
}

.dg-winner-band strong {
    font-size: 24px;
    line-height: 1.2;
    color: #2c9f8f;
}

.dg-rank-list {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dg-rank-row,
.dg-history-row {
    min-height: 48px;
    display: grid;
    grid-template-columns: 28px 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    box-sizing: border-box;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.62);
}

.dg-rank-row.is-winner {
    background: rgba(255, 245, 209, 0.9);
}

.dg-rank-no {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(242, 183, 5, 0.18);
    color: #9b7200;
    font-weight: 900;
    font-size: 12px;
}

.dg-rank-avatar {
    width: 38px;
    height: 38px;
    border-radius: 8px;
}

.dg-rank-row strong {
    font-size: 17px;
    color: #25323a;
}

.dg-history-band {
    padding: 10px;
}

.dg-history-row {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    min-height: 38px;
    margin-top: 6px;
    font-size: 13px;
}

.dg-history-row span {
    color: rgba(37, 50, 58, 0.62);
}

.dg-history-row strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sgh-tile--draw-guess .sgh-tile__icon {
    border-color: rgba(44, 159, 143, 0.42);
    background: linear-gradient(160deg, #fffdf8 0%, #e2fbf6 100%);
    color: #1d7d72;
}

html[data-appearance="dark"] .sgh-tile--draw-guess .sgh-tile__icon {
    border-color: rgba(88, 214, 198, 0.4);
    background: linear-gradient(160deg, #244d4d 0%, #382f52 100%);
    color: #d9fff8;
}

@media (min-height: 760px) {
    .dg-play-layout {
        grid-template-rows: minmax(330px, 54cqh) minmax(200px, 1fr);
    }
}

@media (max-width: 360px) {
    .dg-header {
        grid-template-columns: 38px minmax(0, 1fr) 58px;
    }

    .dg-options-band {
        grid-template-columns: 1fr;
    }

    .dg-footer--play {
        grid-template-columns: 0.62fr 0.62fr 1.36fr;
    }

    .dg-word-band {
        grid-template-columns: auto minmax(0, 1fr) auto auto;
        gap: 6px;
    }

    .dg-word-band small {
        display: none;
    }

    .dg-word-btn {
        padding: 0 7px;
    }

    .dg-composer-row {
        gap: 6px;
    }

    .dg-composer-icon,
    .dg-composer-send {
        width: 36px;
        height: 36px;
    }

    .dg-composer-send {
        width: auto;
        min-width: 40px;
    }
}

html[data-appearance="dark"] .draw-guess-game {
    color: #edf7f4;
}

html[data-appearance="dark"] .dg-shell {
    background: linear-gradient(155deg, #1f2729 0%, #1b2b2e 48%, #2a2331 100%);
}

html[data-appearance="dark"] .dg-header,
html[data-appearance="dark"] .dg-footer {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(24, 31, 34, 0.76);
}

html[data-appearance="dark"] .dg-band,
html[data-appearance="dark"] .dg-word-band,
html[data-appearance="dark"] .dg-canvas-zone,
html[data-appearance="dark"] .dg-chat-zone,
html[data-appearance="dark"] .dg-winner-band,
html[data-appearance="dark"] .dg-rank-list,
html[data-appearance="dark"] .dg-history-band {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(29, 39, 43, 0.74);
    box-shadow: none;
}

html[data-appearance="dark"] .dg-icon-btn,
html[data-appearance="dark"] .dg-text-btn,
html[data-appearance="dark"] .dg-search-row input,
html[data-appearance="dark"] .dg-search-row button,
html[data-appearance="dark"] .dg-options-band select,
html[data-appearance="dark"] .dg-tool-btn,
html[data-appearance="dark"] .dg-word-band button,
html[data-appearance="dark"] .dg-word-btn,
html[data-appearance="dark"] .dg-mini-btn,
html[data-appearance="dark"] .dg-composer-icon,
html[data-appearance="dark"] .dg-composer-input,
html[data-appearance="dark"] .dg-secondary {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: #edf7f4;
}

html[data-appearance="dark"] .dg-composer-send {
    border-color: rgba(44, 159, 143, 0.4);
    background: #2c9f8f;
    color: #fff;
}

html[data-appearance="dark"] .dg-composer-icon.is-active {
    border-color: rgba(88, 214, 198, 0.5);
    background: rgba(44, 159, 143, 0.22);
    color: #d9fff8;
}

html[data-appearance="dark"] .dg-canvas-send {
    background: rgba(29, 39, 43, 0.9);
    border-color: rgba(88, 214, 198, 0.5);
    color: #d9fff8;
}

html[data-appearance="dark"] .dg-emoji-panel.is-open {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(29, 39, 43, 0.7);
}

html[data-appearance="dark"] .dg-emoji-item {
    background: rgba(255, 255, 255, 0.06);
}

html[data-appearance="dark"] .dg-quote-bar,
html[data-appearance="dark"] .dg-bubble-quote,
html[data-appearance="dark"] .dg-feed-tip {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(237, 247, 244, 0.7);
}

html[data-appearance="dark"] .dg-band-title strong,
html[data-appearance="dark"] .dg-chat-title strong,
html[data-appearance="dark"] .dg-word-band strong,
html[data-appearance="dark"] .dg-header h3,
html[data-appearance="dark"] .dg-rank-row strong {
    color: #edf7f4;
}

html[data-appearance="dark"] .dg-friend-row,
html[data-appearance="dark"] .dg-rank-row,
html[data-appearance="dark"] .dg-history-row {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
}

html[data-appearance="dark"] .dg-friend-row.is-selected {
    border-color: rgba(88, 214, 198, 0.48);
    background: rgba(44, 159, 143, 0.22);
}

html[data-appearance="dark"] .dg-canvas-wrap {
    border-color: rgba(255, 255, 255, 0.14);
}

html[data-appearance="dark"] .dg-chat-bubble {
    color: #1f2a32;
}
