Initial commit: private Texas Hold'em ring game site (lobby + table stub)
- 6-digit access key gate with long-lived HttpOnly cookie, brute-force limits - Lobby with saved player name and live table list - Table creation (name, starting stack, blinds, blind timer) - Table play screen stub (seats, button/SB/BB, phase, blinds, timer) - Security hardening: strict CSP, origin checks, host pinning, input sanitizing Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
b2c91062f1
22 files changed
+3450
No files matched your search
@@ -0,0 +1,514 @@
|
||||
:root {
|
||||
--bg: #24493b;
|
||||
--bg-deep: #1b3a2e;
|
||||
--panel: #1a2620;
|
||||
--panel-2: #26332c;
|
||||
--input: #303a35;
|
||||
--line: #3a4a42;
|
||||
--text: #f2f5f3;
|
||||
--muted: #9fb2a8;
|
||||
--felt: #2ecc71;
|
||||
--felt-dark: #23a85b;
|
||||
--gold: #f6c744;
|
||||
--orange: #f0a43a;
|
||||
--blue: #4a90e2;
|
||||
--green: #2ecc71;
|
||||
--red: #ff5a5a;
|
||||
--radius: 14px;
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
|
||||
html, body {
|
||||
margin: 0;
|
||||
min-height: 100%;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", "Segoe UI", sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
body { min-height: 100dvh; }
|
||||
|
||||
.wrap {
|
||||
max-width: 480px;
|
||||
margin: 0 auto;
|
||||
padding: 24px 16px 40px;
|
||||
}
|
||||
|
||||
h1, h2, h3 { margin: 0; }
|
||||
|
||||
.logo {
|
||||
text-align: center;
|
||||
font-weight: 900;
|
||||
line-height: 0.95;
|
||||
letter-spacing: -0.02em;
|
||||
font-size: 48px;
|
||||
margin: 28px 0 32px;
|
||||
}
|
||||
.logo small {
|
||||
display: block;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.3em;
|
||||
color: var(--gold);
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 18px;
|
||||
font-weight: 800;
|
||||
margin: 28px 0 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.section-title .sub { font-size: 12px; font-weight: 600; color: var(--muted); }
|
||||
|
||||
label, .label {
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
color: var(--muted);
|
||||
margin: 18px 0 8px;
|
||||
}
|
||||
|
||||
input[type="text"], input[type="number"], input[type="tel"] {
|
||||
width: 100%;
|
||||
font: inherit;
|
||||
font-size: 18px;
|
||||
color: var(--text);
|
||||
background: var(--input);
|
||||
border: 2px solid transparent;
|
||||
border-radius: 10px;
|
||||
padding: 14px 16px;
|
||||
outline: none;
|
||||
transition: border-color 0.15s;
|
||||
}
|
||||
input:focus { border-color: var(--felt); }
|
||||
input:disabled { opacity: 0.4; }
|
||||
input.invalid { border-color: var(--red); }
|
||||
|
||||
.row { display: flex; gap: 10px; align-items: center; }
|
||||
.row > * { flex: 1; min-width: 0; }
|
||||
|
||||
.btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
font: inherit;
|
||||
font-size: 17px;
|
||||
font-weight: 800;
|
||||
border: 0;
|
||||
border-radius: 10px;
|
||||
padding: 14px 18px;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
transition: transform 0.06s, filter 0.15s, opacity 0.15s;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.btn:active:not(:disabled) { transform: scale(0.97); }
|
||||
.btn:disabled { opacity: 0.4; cursor: default; }
|
||||
.btn-orange { background: var(--orange); }
|
||||
.btn-blue { background: var(--blue); }
|
||||
.btn-green { background: var(--green); }
|
||||
.btn-dark { background: var(--panel-2); color: var(--text); }
|
||||
.btn-ghost { background: transparent; color: var(--muted); border: 2px solid var(--line); }
|
||||
.btn-block { width: 100%; }
|
||||
.btn-sm { font-size: 14px; padding: 9px 14px; border-radius: 8px; }
|
||||
|
||||
.icon-btn {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
border-radius: 50%;
|
||||
border: 2px solid rgba(255, 255, 255, 0.15);
|
||||
background: rgba(0, 0, 0, 0.18);
|
||||
color: var(--text);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
font-size: 18px;
|
||||
text-decoration: none;
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.divider { height: 1px; background: var(--line); margin: 24px 0; }
|
||||
|
||||
.error-text { color: var(--red); font-size: 14px; min-height: 20px; margin-top: 10px; }
|
||||
.hint { color: var(--muted); font-size: 12px; margin-top: 6px; }
|
||||
|
||||
.card {
|
||||
background: var(--panel);
|
||||
border-radius: var(--radius);
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
/* ---------- 鍵入力 ---------- */
|
||||
.key-inputs { display: flex; gap: 6px; justify-content: center; margin: 8px 0 4px; }
|
||||
.key-inputs input {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
max-width: 52px;
|
||||
height: 60px;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
font-size: 28px;
|
||||
font-weight: 800;
|
||||
}
|
||||
.shake { animation: shake 0.35s; }
|
||||
@keyframes shake {
|
||||
20%, 60% { transform: translateX(-8px); }
|
||||
40%, 80% { transform: translateX(8px); }
|
||||
}
|
||||
|
||||
/* ---------- ロビー ---------- */
|
||||
.table-list { display: flex; flex-direction: column; gap: 10px; }
|
||||
.table-item {
|
||||
background: var(--panel);
|
||||
border-radius: var(--radius);
|
||||
padding: 14px 14px 14px 16px;
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
align-items: center;
|
||||
}
|
||||
.table-item .info { flex: 1; min-width: 0; }
|
||||
.table-item .name {
|
||||
font-weight: 800;
|
||||
font-size: 17px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.table-item .meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px 12px;
|
||||
font-size: 13px;
|
||||
color: var(--muted);
|
||||
margin-top: 6px;
|
||||
}
|
||||
.table-item .meta b { color: var(--text); font-weight: 700; }
|
||||
.table-item .meta .gold { color: var(--gold); }
|
||||
|
||||
.badge {
|
||||
display: inline-block;
|
||||
font-size: 11px;
|
||||
font-weight: 800;
|
||||
letter-spacing: 0.05em;
|
||||
padding: 3px 8px;
|
||||
border-radius: 999px;
|
||||
background: var(--panel-2);
|
||||
color: var(--muted);
|
||||
vertical-align: 2px;
|
||||
margin-left: 6px;
|
||||
}
|
||||
.badge.live { background: rgba(46, 204, 113, 0.18); color: var(--green); }
|
||||
.badge.paused { background: rgba(255, 90, 90, 0.15); color: var(--red); }
|
||||
|
||||
.empty {
|
||||
text-align: center;
|
||||
color: var(--muted);
|
||||
padding: 32px 16px;
|
||||
border: 2px dashed var(--line);
|
||||
border-radius: var(--radius);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/* ---------- テーブル作成 ---------- */
|
||||
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
|
||||
.topbar h1 { font-size: 20px; flex: 1; }
|
||||
|
||||
.switch-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 22px;
|
||||
font-weight: 800;
|
||||
font-size: 17px;
|
||||
}
|
||||
.switch { position: relative; width: 52px; height: 30px; flex: none; }
|
||||
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
|
||||
.switch span {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: var(--input);
|
||||
border-radius: 999px;
|
||||
cursor: pointer;
|
||||
transition: background 0.2s;
|
||||
}
|
||||
.switch span::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
left: 3px;
|
||||
top: 3px;
|
||||
background: #ddd;
|
||||
border-radius: 50%;
|
||||
transition: transform 0.2s, background 0.2s;
|
||||
}
|
||||
.switch input:checked + span { background: var(--green); }
|
||||
.switch input:checked + span::before { transform: translateX(22px); background: #fff; }
|
||||
.switch input:focus-visible + span { outline: 2px solid var(--gold); }
|
||||
|
||||
.unit-input { position: relative; }
|
||||
.unit-input input { padding-right: 56px; }
|
||||
.unit-input .unit {
|
||||
position: absolute;
|
||||
right: 16px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: var(--muted);
|
||||
font-weight: 700;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.schedule {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.schedule span {
|
||||
font-size: 12px;
|
||||
background: var(--panel);
|
||||
color: var(--muted);
|
||||
padding: 4px 8px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
.schedule span b { color: var(--gold); font-weight: 700; }
|
||||
|
||||
/* ---------- プレイ画面 ---------- */
|
||||
.table-page { display: flex; flex-direction: column; min-height: 100dvh; }
|
||||
.table-page .wrap { padding-top: 16px; padding-bottom: 0; flex: 1; display: flex; flex-direction: column; width: 100%; }
|
||||
|
||||
.table-header { display: flex; align-items: center; gap: 12px; }
|
||||
.table-header h1 {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
font-size: 22px;
|
||||
font-weight: 800;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.icon-btn.leave { color: var(--red); border-color: rgba(255, 90, 90, 0.35); }
|
||||
|
||||
.host-controls { display: flex; justify-content: center; gap: 8px; margin: 16px 0 12px; flex-wrap: wrap; }
|
||||
.host-controls .btn { border-radius: 999px; padding: 10px 16px; font-size: 14px; }
|
||||
|
||||
.level-bar {
|
||||
background: var(--panel);
|
||||
border-radius: var(--radius);
|
||||
padding: 12px 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
.level-bar .lv { color: var(--gold); font-weight: 800; }
|
||||
.level-bar .blinds { font-weight: 800; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.level-bar .timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 18px; }
|
||||
.level-bar .timer.warn { color: var(--orange); }
|
||||
.level-bar .timer.paused { color: var(--red); }
|
||||
.level-sub { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin: 6px 4px 0; }
|
||||
|
||||
.felt-area {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
min-height: 400px;
|
||||
margin: 8px 0;
|
||||
}
|
||||
.felt {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
width: 62%;
|
||||
height: 72%;
|
||||
transform: translate(-50%, -50%);
|
||||
border-radius: 999px;
|
||||
background: radial-gradient(ellipse at center, var(--felt) 0%, var(--felt-dark) 100%);
|
||||
box-shadow: 0 0 0 14px rgba(46, 204, 113, 0.18), inset 0 0 40px rgba(0, 0, 0, 0.15);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 4px;
|
||||
}
|
||||
.pot-label { font-weight: 900; color: rgba(0, 0, 0, 0.3); letter-spacing: 0.1em; font-size: 14px; }
|
||||
.pot {
|
||||
font-size: 40px;
|
||||
font-weight: 900;
|
||||
color: var(--gold);
|
||||
text-shadow: 0 3px 0 rgba(0, 0, 0, 0.3);
|
||||
line-height: 1;
|
||||
}
|
||||
.phase {
|
||||
margin-top: 8px;
|
||||
background: rgba(0, 0, 0, 0.18);
|
||||
color: #fff;
|
||||
font-weight: 900;
|
||||
letter-spacing: 0.08em;
|
||||
font-size: 13px;
|
||||
padding: 5px 14px;
|
||||
border-radius: 999px;
|
||||
}
|
||||
.hand-no { font-size: 11px; color: rgba(0, 0, 0, 0.45); font-weight: 700; margin-top: 2px; }
|
||||
|
||||
.seat {
|
||||
position: absolute;
|
||||
transform: translate(-50%, -50%);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 92px;
|
||||
transition: left 0.3s, top 0.3s;
|
||||
}
|
||||
.avatar {
|
||||
width: 58px;
|
||||
height: 58px;
|
||||
border-radius: 50%;
|
||||
background: #3b4a5c;
|
||||
border: 3px solid #8a96a3;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
}
|
||||
.avatar svg { width: 28px; height: 28px; fill: #fff; }
|
||||
.seat.me .avatar { background: #d35400; border-color: var(--gold); }
|
||||
.seat.offline .avatar { opacity: 0.45; }
|
||||
.nameplate {
|
||||
margin-top: -10px;
|
||||
background: rgba(10, 30, 20, 0.88);
|
||||
border-radius: 10px;
|
||||
padding: 4px 8px;
|
||||
min-width: 84px;
|
||||
max-width: 92px;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
}
|
||||
.nameplate .pname {
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.nameplate .pstack { font-size: 13px; font-weight: 800; color: var(--gold); }
|
||||
.chip-marker {
|
||||
position: absolute;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border-radius: 50%;
|
||||
font-size: 11px;
|
||||
font-weight: 900;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 2px solid #222;
|
||||
}
|
||||
.chip-marker.dealer { background: #fff; color: #111; top: -4px; right: -8px; }
|
||||
.blind-marker {
|
||||
position: absolute;
|
||||
top: -4px;
|
||||
left: -10px;
|
||||
font-size: 10px;
|
||||
font-weight: 900;
|
||||
padding: 2px 5px;
|
||||
border-radius: 6px;
|
||||
color: #111;
|
||||
}
|
||||
.blind-marker.sb { background: #7fd3ff; }
|
||||
.blind-marker.bb { background: var(--gold); }
|
||||
.host-mark { position: absolute; bottom: -2px; right: -6px; font-size: 14px; }
|
||||
.offline-tag { font-size: 10px; color: var(--muted); }
|
||||
|
||||
.spectator-note {
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
color: var(--muted);
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.action-bar {
|
||||
background: #161c19;
|
||||
padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
|
||||
}
|
||||
.action-bar .inner { max-width: 480px; margin: 0 auto; }
|
||||
.my-stack {
|
||||
text-align: center;
|
||||
font-size: 28px;
|
||||
font-weight: 900;
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
}
|
||||
.my-stack .wallet { color: var(--gold); font-size: 22px; }
|
||||
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
|
||||
.actions .btn { background: #555; color: #bbb; font-size: 18px; }
|
||||
|
||||
.modal-backdrop {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 16px;
|
||||
z-index: 10;
|
||||
}
|
||||
.modal { background: var(--bg-deep); border-radius: var(--radius); padding: 20px; width: 100%; max-width: 380px; }
|
||||
.modal h2 { font-size: 18px; margin-bottom: 4px; }
|
||||
|
||||
.toast {
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
bottom: 160px;
|
||||
transform: translateX(-50%);
|
||||
background: rgba(0, 0, 0, 0.85);
|
||||
color: #fff;
|
||||
padding: 10px 16px;
|
||||
border-radius: 10px;
|
||||
font-size: 14px;
|
||||
z-index: 20;
|
||||
pointer-events: none;
|
||||
max-width: calc(100% - 32px);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.center-message { text-align: center; padding: 60px 16px; color: var(--muted); }
|
||||
.center-message h2 { color: var(--text); margin-bottom: 12px; }
|
||||
|
||||
.conn-lost {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: var(--red);
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
padding: 6px;
|
||||
z-index: 30;
|
||||
}
|
||||
|
||||
[hidden] { display: none !important; }
|
||||
|
||||
/* ---------- ユーティリティ(CSP で style 属性を使わないため) ---------- */
|
||||
.text-center { text-align: center; }
|
||||
.mt-4 { margin-top: 4px; }
|
||||
.mt-8 { margin-top: 8px; }
|
||||
.mt-12 { margin-top: 12px; }
|
||||
.key-title { font-size: 18px; text-align: center; }
|
||||
.key-hint { text-align: center; margin: 6px 0 16px; }
|
||||
.slash { flex: none !important; color: var(--muted); font-weight: 800; }
|
||||
label.switch { margin: 0; display: inline-block; }
|
||||
.link-gold { color: var(--gold); }
|
||||
.host-spacer { height: 12px; }
|
||||
Reference in new issue
Block a user