Files
joke-app/apps/web/src/styles/global.css
EJClaw 13974181e7 컴퓨터 플레이어 + GPU 로컬 모델(gemma3:4b): 생각 중/입력 중 표시, 성격대로 채팅·도발·심리전, 바퀴벌레 포커 블러핑, 마피아 대사
- ai/llm.ts: Ollama 클라이언트(동시 2개·대기열·시간 제한·연속 실패 시 쉬기), 꺼져 있으면 예전처럼 조용히 둔다
- ai/lines.ts: 성격 5가지(도발·허세·차분·수다·소심)×말투(존댓말/반말), 한 줄 정리(외국어·AI 말·욕·링크 거르기)
- ai/brain.ts: 수 두기 전 생각 중… → 가끔 입력 중…(타자 시간) → 채팅 → 수, 사람 수에 반응, 이름 부르면 대답, 시작·끝 한마디
  바퀴벌레 포커: 진실/블러핑과 건네는 말을 모델이 정함. 마피아: 계획한 대사를 모델이 자기 말로(직업 주장은 버림)
- RoomView.botActivity + 화면 표시(상태 줄, 채팅 칸), AI_URL/AI_MODEL 설정, /healthz에 ai 통계
- 테스트: 클라이언트·정리·방 동작(가짜 모델), 실제 GPU 모델 브라우저 E2E(e2e/ai.e2e.ts)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 03:37:04 +09:00

1533 lines
30 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* Design tokens: docs/07-ui-ux.md §2 */
:root {
--bg: #f7f5f0;
--surface: #ffffff;
--surface-2: #efece4;
--text: #1c1e21;
--text-sub: #4a4f57;
--border: #d9d5cb;
--primary: #2563eb;
--primary-press: #1d4fd0;
--primary-text: #ffffff;
--primary-soft: #dbe7ff;
--success: #15803d;
--success-soft: #dcfce7;
--warning: #b45309;
--warning-soft: #fef3c7;
--danger: #b91c1c;
--danger-soft: #fee2e2;
--felt: #1f6b4a;
--wood: #e3b76b;
--wood-line: #7a5a22;
--focus: #f59e0b;
--shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
--radius: 12px;
--radius-lg: 16px;
--tap: 48px;
--btn-h: 56px;
color-scheme: light;
}
:root[data-theme='dark'] {
--bg: #16181d;
--surface: #20232a;
--surface-2: #2a2e37;
--text: #f2f3f5;
--text-sub: #b8bcc4;
--border: #3a3f4a;
--primary: #5b8def;
--primary-press: #4a7de0;
--primary-text: #0b1020;
--primary-soft: #1e2a44;
--success: #4ade80;
--success-soft: #133222;
--warning: #fbbf24;
--warning-soft: #3a2c0c;
--danger: #f87171;
--danger-soft: #3d1717;
--felt: #17513a;
--wood: #b98c45;
--wood-line: #4a3612;
--shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
:root[data-theme='auto'] {
--bg: #16181d;
--surface: #20232a;
--surface-2: #2a2e37;
--text: #f2f3f5;
--text-sub: #b8bcc4;
--border: #3a3f4a;
--primary: #5b8def;
--primary-press: #4a7de0;
--primary-text: #0b1020;
--primary-soft: #1e2a44;
--success: #4ade80;
--success-soft: #133222;
--warning: #fbbf24;
--warning-soft: #3a2c0c;
--danger: #f87171;
--danger-soft: #3d1717;
--felt: #17513a;
--wood: #b98c45;
--wood-line: #4a3612;
--shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
color-scheme: dark;
}
}
/* Font scale setting: 보통 / 크게 / 아주 크게. Everything else is in rem. */
html {
font-size: 106.25%; /* 17px */
}
html[data-font-scale='large'] {
font-size: 127.5%;
}
html[data-font-scale='xlarge'] {
font-size: 148.75%;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
body {
margin: 0;
background: var(--bg);
color: var(--text);
font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
font-weight: 500;
line-height: 1.5;
-webkit-font-smoothing: antialiased;
-webkit-tap-highlight-color: transparent;
word-break: keep-all;
overflow-wrap: anywhere;
}
h1,
h2,
h3 {
margin: 0;
font-weight: 700;
line-height: 1.3;
}
h1 {
font-size: 1.65rem;
}
h2 {
font-size: 1.3rem;
}
h3 {
font-size: 1.1rem;
}
p {
margin: 0;
}
button,
input,
select {
font: inherit;
color: inherit;
}
:focus-visible {
outline: 3px solid var(--focus);
outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
transition-duration: 0.01ms !important;
}
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
/* ---------- layout ---------- */
.page {
max-width: 960px;
margin: 0 auto;
padding: 16px 16px calc(120px + env(safe-area-inset-bottom));
display: flex;
flex-direction: column;
gap: 20px;
}
.stack {
display: flex;
flex-direction: column;
gap: 12px;
}
.row {
display: flex;
gap: 8px;
align-items: center;
flex-wrap: wrap;
}
.card {
background: var(--surface);
border-radius: var(--radius-lg);
box-shadow: var(--shadow);
padding: 16px;
}
.muted {
color: var(--text-sub);
}
.small {
font-size: 0.9rem;
}
/* ---------- buttons ---------- */
.btn {
min-height: var(--btn-h);
min-width: var(--tap);
padding: 0 20px;
border-radius: var(--radius);
border: 2px solid transparent;
font-size: 1.06rem;
font-weight: 700;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
transition: transform 0.08s ease, background 0.15s ease;
text-decoration: none;
user-select: none;
}
.btn:active:not(:disabled) {
transform: scale(0.98);
}
.btn:disabled {
opacity: 0.45;
cursor: not-allowed;
}
.btn-primary {
background: var(--primary);
color: var(--primary-text);
}
.btn-primary:hover:not(:disabled) {
background: var(--primary-press);
}
.btn-secondary {
background: var(--surface);
color: var(--text);
border-color: var(--border);
}
.btn-soft {
background: var(--primary-soft);
color: var(--text);
}
.btn-danger {
background: var(--surface);
color: var(--danger);
border-color: var(--danger);
}
.btn-success {
background: var(--success);
color: #fff;
}
.btn-block {
width: 100%;
}
.btn-sm {
min-height: var(--tap);
padding: 0 14px;
font-size: 0.95rem;
}
.btn-ghost {
background: transparent;
color: var(--text);
min-height: var(--tap);
padding: 0 12px;
}
/* ---------- inputs ---------- */
.input {
min-height: var(--btn-h);
width: 100%;
border-radius: var(--radius);
border: 2px solid var(--border);
background: var(--surface);
padding: 0 16px;
font-size: 1.1rem;
}
.input:focus {
border-color: var(--primary);
outline: none;
}
.field-error {
color: var(--danger);
font-size: 0.95rem;
}
label.field {
display: flex;
flex-direction: column;
gap: 6px;
font-weight: 700;
}
.segmented {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.segmented button {
min-height: var(--tap);
padding: 0 14px;
border-radius: 999px;
border: 2px solid var(--border);
background: var(--surface);
cursor: pointer;
font-weight: 600;
}
.segmented button[aria-pressed='true'] {
border-color: var(--primary);
background: var(--primary-soft);
font-weight: 700;
}
/* ---------- top bar ---------- */
.topbar {
position: sticky;
top: 0;
z-index: 20;
background: var(--bg);
display: flex;
align-items: center;
gap: 8px;
min-height: 56px;
padding: 4px 8px;
padding-top: calc(4px + env(safe-area-inset-top));
border-bottom: 1px solid var(--border);
}
.topbar-title {
flex: 1;
font-weight: 700;
font-size: 1.05rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* ---------- bottom action bar ---------- */
.bottom-bar {
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 15;
background: color-mix(in srgb, var(--bg) 92%, transparent);
backdrop-filter: blur(6px);
border-top: 1px solid var(--border);
padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
.bottom-bar-inner {
max-width: 960px;
margin: 0 auto;
display: flex;
gap: 8px;
}
.bottom-bar-inner > * {
flex: 1;
}
/* ---------- banners & toasts ---------- */
.conn-banner {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 50;
background: var(--warning);
color: #fff;
text-align: center;
padding: 8px 12px;
padding-top: calc(8px + env(safe-area-inset-top));
font-weight: 700;
}
.toasts {
position: fixed;
top: calc(var(--site-h) + env(safe-area-inset-top));
left: 50%;
transform: translateX(-50%);
z-index: 60;
display: flex;
flex-direction: column;
gap: 8px;
width: min(92vw, 420px);
pointer-events: none;
}
.toast {
background: var(--text);
color: var(--bg);
border-radius: var(--radius);
padding: 12px 16px;
font-weight: 600;
box-shadow: var(--shadow);
animation: toast-in 0.2s ease;
}
.toast.error {
background: var(--danger);
color: #fff;
}
@keyframes toast-in {
from {
opacity: 0;
transform: translateY(-8px);
}
}
/* ---------- sheets / modals ---------- */
.sheet-backdrop {
position: fixed;
inset: 0;
z-index: 40;
background: rgba(0, 0, 0, 0.45);
display: flex;
align-items: flex-end;
justify-content: center;
animation: fade 0.15s ease;
}
@media (min-width: 720px) {
.sheet-backdrop {
align-items: center;
}
}
.sheet {
background: var(--surface);
width: min(100%, 520px);
max-height: 88vh;
overflow: auto;
border-radius: 20px 20px 0 0;
padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
display: flex;
flex-direction: column;
gap: 16px;
animation: sheet-up 0.2s ease;
}
@media (min-width: 720px) {
.sheet {
border-radius: 20px;
}
}
@keyframes sheet-up {
from {
transform: translateY(24px);
opacity: 0;
}
}
@keyframes fade {
from {
opacity: 0;
}
}
/* ---------- avatar ---------- */
.avatar {
border-radius: 50%;
flex: none;
display: inline-flex;
align-items: center;
justify-content: center;
color: #fff;
font-weight: 700;
overflow: hidden;
}
.avatar img {
width: 100%;
height: 100%;
object-fit: cover;
}
.badge {
display: inline-flex;
align-items: center;
gap: 4px;
border-radius: 999px;
padding: 2px 10px;
font-size: 0.85rem;
font-weight: 700;
background: var(--surface-2);
}
.badge.success {
background: var(--success-soft);
color: var(--success);
}
.badge.warning {
background: var(--warning-soft);
color: var(--warning);
}
.dot {
width: 10px;
height: 10px;
border-radius: 50%;
display: inline-block;
}
/* Icon + small label stacked (keeps text with icons but saves width on phones). */
.icon-btn {
min-width: var(--tap);
min-height: var(--tap);
padding: 2px 8px;
border: 0;
background: transparent;
color: var(--text);
cursor: pointer;
display: inline-flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 0;
border-radius: var(--radius);
font-size: 1.25rem;
line-height: 1.1;
position: relative;
}
.icon-btn .lbl {
font-size: 0.7rem;
font-weight: 700;
color: var(--text-sub);
}
.icon-btn .badge {
position: absolute;
top: 0;
right: 0;
padding: 0 6px;
font-size: 0.7rem;
}
.sheet:focus {
outline: none;
}
.board-wrap {
position: relative;
width: 100%;
max-width: min(100%, calc(100vh - 300px));
min-width: min(100%, 320px);
align-self: center;
}
/* =====================================================================
PC-first layout (docs/07-ui-ux.md §3). Breakpoints: ≥1100 PC, 720–1099 tablet, <720 phone.
===================================================================== */
.page {
max-width: 1280px;
padding: 24px 24px 48px;
}
@media (max-width: 719px) {
.page {
padding: 16px 16px calc(120px + env(safe-area-inset-bottom));
}
}
.site-header {
position: sticky;
top: 0;
z-index: 30;
height: 64px;
background: var(--surface);
border-bottom: 1px solid var(--border);
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}
.site-header-inner {
max-width: 1280px;
height: 100%;
margin: 0 auto;
padding: 0 24px;
display: flex;
align-items: center;
gap: 20px;
}
.site-logo {
display: flex;
align-items: center;
gap: 10px;
font-weight: 800;
font-size: 1.15rem;
color: var(--text);
text-decoration: none;
white-space: nowrap;
}
.site-nav {
display: flex;
gap: 4px;
}
.site-nav a {
padding: 8px 14px;
border-radius: 10px;
color: var(--text-sub);
font-weight: 700;
text-decoration: none;
}
.site-nav a:hover {
background: var(--surface-2);
color: var(--text);
}
.site-nav a.active {
color: var(--primary);
background: var(--primary-soft);
}
.theme-toggle {
margin-left: auto;
width: 42px;
height: 42px;
flex: none;
border: 2px solid var(--border);
border-radius: 999px;
background: transparent;
font-size: 1.2rem;
line-height: 1;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
}
.theme-toggle:hover {
background: var(--surface-2);
}
.header-user {
display: flex;
align-items: center;
gap: 8px;
padding: 4px 10px 4px 4px;
border-radius: 999px;
text-decoration: none;
color: var(--text);
font-weight: 700;
}
.header-user:hover {
background: var(--surface-2);
}
button.header-user {
border: 0;
background: transparent;
font: inherit;
cursor: pointer;
}
.header-login {
padding: 0 18px;
min-height: 42px;
border: 2px solid var(--primary);
color: var(--primary);
}
.header-login:hover {
background: var(--primary-soft);
}
.header-user-name {
max-width: 160px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.account-menu {
position: relative;
}
.account-menu-list {
position: absolute;
right: 0;
top: calc(100% + 6px);
min-width: 168px;
padding: 6px;
display: flex;
flex-direction: column;
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
z-index: 40;
}
.account-menu-list button {
min-height: var(--tap);
padding: 0 14px;
border: 0;
border-radius: 8px;
background: transparent;
color: var(--text);
font: inherit;
font-weight: 700;
text-align: left;
cursor: pointer;
}
.account-menu-list button:hover,
.account-menu-list button:focus-visible {
background: var(--surface-2);
}
@media (max-width: 1099px) {
.site-nav {
display: none;
}
}
@media (max-width: 719px) {
.site-header {
height: 56px;
}
.site-header-inner {
padding: 0 12px;
gap: 8px;
}
.site-logo .full {
display: none;
}
.site-logo {
flex: 1;
}
.header-user-name {
max-width: 96px;
}
}
/* Site header height, used by the sticky room bar and the viewport-fitting game layout.
Inside a room the room bar is the only top bar (docs/07 §3.4): one bar, not two. */
:root {
--site-h: 64px;
}
@media (max-width: 719px) {
:root {
--site-h: 56px;
}
}
:root.in-room {
--site-h: 0px;
}
.in-room .site-header {
display: none;
}
/* Room bar under the site header */
.room-bar {
position: sticky;
top: var(--site-h);
z-index: 25;
height: 52px;
background: var(--bg);
border-bottom: 1px solid var(--border);
}
.room-bar-inner {
max-width: 1600px;
height: 100%;
margin: 0 auto;
padding: 0 24px;
display: flex;
align-items: center;
gap: 12px;
}
@media (max-width: 719px) {
.room-bar-inner {
padding: 0 8px;
}
}
/* Two-column page (lobby, home) */
.two-col {
display: grid;
grid-template-columns: minmax(0, 1fr) 400px;
gap: 24px;
align-items: start;
}
@media (max-width: 1099px) {
.two-col {
grid-template-columns: minmax(0, 1fr);
}
}
/* Game screen: board + right panel, fits the viewport height on PC */
.game-layout {
max-width: 1600px;
margin: 0 auto;
padding: 16px 24px;
display: grid;
grid-template-columns: minmax(0, 1fr) 380px;
gap: 20px;
height: calc(100vh - var(--site-h) - 52px);
min-height: 560px;
}
.game-main {
min-width: 0;
min-height: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 12px;
}
.game-side {
min-height: 0;
display: flex;
flex-direction: column;
gap: 12px;
overflow: auto;
}
.game-side .chat-panel {
flex: 1;
min-height: 220px;
}
@media (max-width: 1099px) {
.game-layout {
grid-template-columns: minmax(0, 1fr);
height: auto;
padding: 12px;
}
}
.board-wrap {
max-width: min(100%, calc(100vh - var(--site-h) - 52px - 120px));
width: 100%;
}
@media (max-width: 1099px) {
.board-wrap {
max-width: min(100%, 720px);
}
}
/* Chat panel (inline on PC) */
.chat-panel {
display: flex;
flex-direction: column;
gap: 8px;
background: var(--surface);
border-radius: var(--radius-lg);
box-shadow: var(--shadow);
padding: 12px;
}
.chat-list {
flex: 1;
min-height: 120px;
max-height: 360px;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 6px;
}
.game-side .chat-list {
max-height: none;
}
.chat-line {
font-size: 0.95rem;
line-height: 1.4;
}
.chat-line strong {
margin-right: 6px;
}
/* One line of quick reactions; the rest scrolls sideways instead of stacking rows. */
.emote-row {
display: flex;
flex-wrap: nowrap;
overflow-x: auto;
scrollbar-width: none;
gap: 4px;
}
.emote-row button {
flex: none;
white-space: nowrap;
}
.emote-row button {
border: 1px solid var(--border);
background: var(--bg);
border-radius: 999px;
padding: 4px 10px;
cursor: pointer;
font-size: 0.9rem;
}
.emote-row button:hover {
background: var(--surface-2);
}
/* Bottom bar only floats on phones; on wider screens it renders inline. */
@media (min-width: 720px) {
.bottom-bar.inline-wide {
position: static;
background: none;
backdrop-filter: none;
border: 0;
padding: 0;
}
.bottom-bar.inline-wide .bottom-bar-inner {
max-width: none;
}
}
/* Hover affordances (mouse) */
@media (hover: hover) {
.btn-secondary:hover:not(:disabled) {
background: var(--surface-2);
}
.game-card:hover {
transform: translateY(-2px);
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
}
.game-card {
transition: transform 0.12s ease, box-shadow 0.12s ease;
text-decoration: none;
color: inherit;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
gap: 6px;
padding: 18px 10px 16px;
}
/* Game picker tiles: icon, name, one meta line (docs/07 §3.3). */
.game-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
gap: 12px;
}
.game-card-icon {
font-size: 2.4rem;
line-height: 1.1;
}
.game-card-name {
font-size: 1.05rem;
word-break: keep-all;
}
.game-card-meta {
font-size: 0.85rem;
color: var(--text-sub);
}
.game-tabs {
flex-wrap: nowrap;
overflow-x: auto;
scrollbar-width: none;
}
.game-tabs button {
flex: none;
}
@media (max-width: 719px) {
.game-grid {
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 8px;
}
.game-card {
padding: 14px 4px 12px;
}
.game-card-icon {
font-size: 2rem;
}
.game-card-name {
font-size: 0.95rem;
}
.game-card-meta {
font-size: 0.75rem;
}
/* 방 만들기 full width, the two smaller actions side by side. */
.home-actions {
grid-template-columns: 1fr 1fr;
gap: 10px;
}
.home-action {
min-height: 0;
padding: 14px 16px;
}
.home-action.primary {
grid-column: 1 / -1;
}
.home-action-icon {
font-size: 1.6rem;
margin-bottom: 4px;
}
.home-action-title {
font-size: 1.1rem;
}
.home-action-sub {
font-size: 0.85rem;
}
}
.phone-only {
display: none;
}
@media (max-width: 719px) {
.phone-only {
display: initial;
}
.wide-only {
display: none !important;
}
}
/* Admin: sidebar layout */
.admin-layout {
max-width: 1280px;
margin: 0 auto;
display: grid;
grid-template-columns: 220px minmax(0, 1fr);
gap: 24px;
padding: 24px;
}
.admin-side {
position: sticky;
top: 88px;
align-self: start;
display: flex;
flex-direction: column;
gap: 4px;
}
.admin-side a {
padding: 12px 16px;
border-radius: 10px;
color: var(--text);
text-decoration: none;
font-weight: 700;
}
.admin-side a:hover {
background: var(--surface-2);
}
.admin-side a.active {
background: var(--primary);
color: var(--primary-text);
}
@media (max-width: 899px) {
.admin-layout {
grid-template-columns: minmax(0, 1fr);
padding: 12px;
}
.admin-side {
position: static;
flex-direction: row;
overflow-x: auto;
}
.admin-side a {
white-space: nowrap;
}
}
.data-table {
width: 100%;
border-collapse: collapse;
background: var(--surface);
border-radius: var(--radius-lg);
overflow: hidden;
box-shadow: var(--shadow);
}
.data-table th,
.data-table td {
padding: 10px 14px;
text-align: left;
border-bottom: 1px solid var(--border);
vertical-align: middle;
}
.data-table th {
background: var(--surface-2);
font-size: 0.9rem;
color: var(--text-sub);
}
.data-table tr:last-child td {
border-bottom: 0;
}
.data-table tr.clickable {
cursor: pointer;
}
.data-table tr.clickable:hover td {
background: var(--surface-2);
}
/* Page sub-header (TopBar) sits under the site header and scrolls with the page. */
.topbar {
position: static;
max-width: 1280px;
margin: 0 auto;
background: transparent;
border-bottom: 0;
padding: 12px 16px 0;
min-height: 0;
}
@media (min-width: 720px) {
.bottom-bar.sticky-save {
position: sticky;
bottom: 0;
left: auto;
right: auto;
border: 1px solid var(--border);
border-radius: var(--radius-lg);
padding: 12px;
}
.bottom-bar.sticky-save .bottom-bar-inner {
max-width: none;
}
}
.room-bar-inner > *,
.room-bar-inner .btn {
white-space: nowrap;
flex-shrink: 0;
}
/* Room bar buttons: icon + label inline on PC, icon over a small label on phones (no ⋯ menu). */
.rb-btn {
gap: 6px;
position: relative;
}
@media (max-width: 719px) {
.room-bar-inner {
gap: 2px;
}
.room-bar .rb-game {
display: none;
}
.room-bar .btn-sm {
padding: 0 8px;
}
.room-bar .rb-btn {
flex-direction: column;
gap: 0;
padding: 2px 6px;
min-width: 46px;
line-height: 1.1;
}
.room-bar .rb-ico {
font-size: 1.1rem;
}
.room-bar .rb-lbl {
font-size: 0.72rem;
font-weight: 700;
}
.room-bar .rb-badge {
position: absolute;
top: 0;
right: 0;
padding: 0 5px;
font-size: 0.7rem;
}
}
.schema-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 16px 24px;
align-items: start;
}
.schema-grid > .schema-group {
grid-column: 1 / -1;
}
.schema-group > .schema-grid,
.schema-group {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.schema-group > legend {
grid-column: 1 / -1;
}
/* Replay (docs/09 §8): read-only board, step controls in the side panel (PC) or a bottom bar (phone/tablet) */
.replay-readonly {
display: contents;
}
/* Prompts that waited on a live player (무르기·무승부 요청, 뱅! 선택 창…) can't be answered in a replay: don't let them cover the screen. */
.replay-readonly .sheet-backdrop,
.replay-readonly .bg-modal-back {
display: none;
}
.replay-readonly button,
.replay-readonly [role='button'],
.replay-readonly svg {
cursor: default;
}
.replay-controls {
display: flex;
flex-direction: column;
gap: 8px;
width: 100%;
background: var(--surface);
border-radius: var(--radius-lg);
box-shadow: var(--shadow);
padding: 12px;
}
.bottom-bar .replay-controls {
box-shadow: none;
background: none;
padding: 0;
}
.replay-count {
font-size: 1.1rem;
font-variant-numeric: tabular-nums;
}
.replay-desc {
margin: 0;
min-height: 1.4em;
}
.replay-slider {
width: 100%;
height: 36px;
margin: 0;
accent-color: var(--primary);
}
.replay-buttons {
display: grid;
grid-template-columns: repeat(5, minmax(0, 1fr));
gap: 6px;
}
.replay-buttons .btn {
min-width: 0;
min-height: 60px;
padding: 0 4px;
flex-direction: column;
gap: 2px;
font-size: 0.95rem;
line-height: 1.1;
}
.replay-buttons .btn span {
font-size: 1.2rem;
}
.game-layout.replay-narrow {
padding-bottom: calc(240px + env(safe-area-inset-bottom));
}
.my-games {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
}
.my-game {
display: flex;
align-items: center;
gap: 12px;
padding: 12px 0;
border-top: 1px solid var(--border);
}
.my-game:first-child {
border-top: 0;
padding-top: 0;
}
/* Home: 큰 버튼 3개 + 탭 (docs/07 §3.3) */
.home-actions {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 16px;
}
.home-action {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 4px;
min-height: 132px;
padding: 20px 22px;
border: 2px solid var(--border);
border-radius: var(--radius-lg);
background: var(--surface);
color: var(--text);
font: inherit;
text-align: left;
cursor: pointer;
box-shadow: var(--shadow);
transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.home-action:disabled {
opacity: 0.6;
cursor: default;
}
.home-action.primary {
background: var(--primary);
border-color: var(--primary);
color: var(--primary-text);
}
.home-action-icon {
font-size: 2.2rem;
line-height: 1;
margin-bottom: auto;
}
.home-action-title {
font-size: 1.3rem;
font-weight: 800;
}
.home-action-sub {
font-size: 0.95rem;
color: var(--text-sub);
}
.home-action.primary .home-action-sub {
color: inherit;
}
@media (hover: hover) {
.home-action:hover:not(:disabled) {
transform: translateY(-2px);
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
}
@media (max-width: 719px) {
.home-actions {
grid-template-columns: 1fr 1fr;
gap: 10px;
}
.home-action.primary {
grid-column: 1 / -1;
min-height: 96px;
}
.home-action {
min-height: 108px;
padding: 16px;
}
}
/* Login page (docs/07 §3.2): big Discord button, guest below */
.btn-discord {
min-height: 68px;
font-size: 1.2rem;
background: #5865f2;
border-color: #5865f2;
color: #fff;
}
.btn-discord:hover {
background: #4752c4;
}
.login-divider {
display: flex;
align-items: center;
gap: 12px;
color: var(--text-sub);
font-size: 0.95rem;
}
.login-divider::before,
.login-divider::after {
content: '';
flex: 1;
border-top: 1px solid var(--border);
}
/* Player name that opens the record card (room) */
.name-btn {
background: none;
border: 0;
padding: 0;
margin: 0;
font: inherit;
color: inherit;
cursor: pointer;
text-align: left;
text-decoration: underline dotted;
text-underline-offset: 4px;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
vertical-align: bottom;
}
.name-btn:hover {
text-decoration-style: solid;
}
.record-grid {
display: grid;
grid-template-columns: repeat(5, minmax(0, 1fr));
gap: 6px;
}
.record-cell {
display: flex;
flex-direction: column;
align-items: center;
gap: 2px;
padding: 10px 4px;
border-radius: var(--radius);
background: var(--surface-2);
}
.record-cell strong {
font-size: 1.3rem;
}
.guest-warning {
margin: 0;
padding: 10px 12px;
border-radius: var(--radius);
background: var(--warning-soft);
color: var(--text);
text-align: left;
}
.data-table.compact th,
.data-table.compact td {
padding: 8px 8px;
}
/* Settings: label and choices on one line (wraps under on narrow screens). */
.setting-row {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 6px 12px;
padding: 6px 0;
border-top: 1px solid var(--border);
}
.setting-row:first-of-type {
border-top: 0;
}
.setting-row .segmented {
gap: 6px;
}
/* 참여자가 보는 게임 설정(보기 전용): 고른 값은 또렷하게, 나머지는 흐리게. 눌러도 안 바뀐다는 게 보이도록. */
.options-view :disabled {
cursor: default;
color: inherit;
opacity: 0.5;
}
.options-view [aria-pressed='true']:disabled,
.options-view :is(input, select, textarea):disabled {
opacity: 1;
}
/* =====================================================================
PC 정리 (2026-10-09, "PC버전을 좀더"): 넓은 화면에서 한 줄 화면을 1,200px로 늘리지 않는다.
===================================================================== */
/* 읽기·입력 화면(게임 소개, 코드로 참여, 규칙)은 가운데 좁은 칸, 설정은 중간 폭 두 칸. */
.page.narrow,
.topbar.narrow {
max-width: 768px;
}
.page.mid,
.topbar.mid {
max-width: 1080px;
}
.topbar.narrow,
.topbar.mid {
padding-left: 24px;
padding-right: 24px;
}
@media (max-width: 719px) {
.topbar.narrow,
.topbar.mid {
padding-left: 16px;
padding-right: 16px;
}
}
/* 설정(/me): PC는 왼쪽 프로필·계정, 오른쪽 설정·기록. 휴대폰은 한 줄, 계정 버튼은 맨 아래. */
.me-side,
.me-main {
display: contents;
}
.me-account {
order: 1;
}
@media (min-width: 1100px) {
.me-page {
display: grid;
grid-template-columns: 340px minmax(0, 1fr);
gap: 24px;
align-items: start;
}
.me-side,
.me-main {
display: flex;
flex-direction: column;
gap: 20px;
min-width: 0;
}
.me-side {
position: sticky;
top: calc(var(--site-h) + 16px);
}
}
/* 홈: 제목과 종류 탭은 한 줄, 큰 버튼 3개는 낮은 가로 카드(아이콘 왼쪽). 1440×900에서 게임 26개가 한 화면에. */
.game-grid-head {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 12px 20px;
}
.game-grid-head > .game-tabs {
min-width: 0;
max-width: 100%;
}
@media (min-width: 720px) {
.home-action {
min-height: 0;
display: grid;
grid-template-columns: auto 1fr;
grid-template-rows: auto auto;
column-gap: 14px;
row-gap: 0;
align-items: center;
padding: 16px 20px;
}
.home-action-icon {
grid-row: 1 / 3;
margin-bottom: 0;
font-size: 2rem;
}
.home-action-title {
font-size: 1.2rem;
}
.game-card {
padding: 14px 10px 12px;
gap: 4px;
}
.game-card-icon {
font-size: 2.1rem;
}
}
/* 게임 고르기 창: PC에서는 두 줄로 나란히. */
.picker-list {
display: flex;
flex-direction: column;
gap: 8px;
}
@media (min-width: 720px) {
.picker-list {
display: grid;
grid-template-columns: 1fr 1fr;
}
}
/* 대기실(PC): 초대 카드는 한 줄(코드 왼쪽, 버튼 오른쪽), 시작 버튼은 자리 아래 가운데. */
@media (min-width: 1100px) {
.invite-card {
display: grid;
grid-template-columns: auto minmax(0, 1fr);
grid-template-areas: 'label buttons' 'code buttons';
align-items: center;
column-gap: 24px;
row-gap: 0;
text-align: left !important;
padding: 16px 20px;
}
.invite-label {
grid-area: label;
}
.invite-code {
grid-area: code;
font-size: 2.6rem !important;
}
.invite-buttons {
grid-area: buttons;
}
.lobby .bottom-bar.inline-wide .bottom-bar-inner {
max-width: 420px;
width: 100%;
margin: 0 auto;
}
.lobby .guest-warning {
text-align: center;
}
}
/* 방 막대(마우스): 버튼을 40px로 낮춰 52px 막대 안에 여유를 둔다. 터치 기기는 48px 그대로. */
@media (min-width: 720px) and (hover: hover) and (pointer: fine) {
.room-bar .btn {
min-height: 40px;
}
}
/* Computers' visible activity (docs/06 §12.1) */
.bot-activity { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--text-sub); padding: 2px 4px; }
.bot-activity > span { display: inline-flex; align-items: center; gap: 4px; }
.bot-dots::after { content: '…'; display: inline-block; width: 1.2em; animation: bot-dots 1.2s steps(4, end) infinite; overflow: hidden; vertical-align: bottom; }
@keyframes bot-dots { 0% { width: 0; } 100% { width: 1.2em; } }
@media (prefers-reduced-motion: reduce) { .bot-dots::after { animation: none; } }