Rebuild the UI in an Apple style with spring-driven motion

Replace the look of every page (key, lobby, create, table, range, review)
with light/dark semantic colors, translucent materials, iOS-style grouped
lists and system typography. Add fluid.js, a small spring engine with
interruptible, velocity-aware animations, and use it for draggable bottom
sheets, sliding segmented controls, a custom bet slider with rubber-banding,
swipe-to-delete in the lobby, and dealt/flipped cards. Seats and cards are
now reused between renders so animations are not cut off. Honors reduced
motion, reduced transparency and increased contrast.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
agomizi1cmandClaude Opus 5.5 committed 2026-10-21 21:44:21 +09:00
1 parent d5ef2d310f
commit c3fbfdd12e
18 files changed
+4877 -1278

No files matched your search

+179 -52
View File
@@ -1,22 +1,8 @@
/* ハンドレンジ学習(管理者専用)。基本のデザインは /assets/style.css を使う */
/* ハンドレンジ学習(管理者専用)。基本のデザインとセグメントは /assets/style.css を使う */
.range-wrap { padding-bottom: 32px; }
/* タブ */
.seg { display: flex; gap: 6px; background: var(--panel); border-radius: 12px; padding: 4px; margin: 12px 0 16px; }
.seg-btn {
flex: 1;
font: inherit;
font-size: 15px;
font-weight: 800;
border: 0;
border-radius: 9px;
padding: 10px 6px;
background: transparent;
color: var(--muted);
cursor: pointer;
.range-tabs {
margin: 0 0 16px;
}
.seg-btn.active { background: var(--panel-2); color: var(--text); }
/* レンジ表の分類ごとの色(レンジ表のデータとしての色なのでサイトの配色とは別) */
.cat-navy { --c: #20365d; --fg: #fff; }
@@ -30,57 +16,198 @@
/* レイズを受けたときの対応の枠(3bet は水色、コールは黄)。下地の色と紛れないよう内側に暗い線を添える */
.facing-3bet { --frame: #3fd4ff; }
.facing-call { --frame: #ffe23a; }
.range-cell.facing-3bet, .range-cell.facing-call { box-shadow: inset 0 0 0 3px var(--frame), inset 0 0 0 4px rgba(0, 0, 0, 0.45); }
.range-cell.facing-3bet,
.range-cell.facing-call {
box-shadow: inset 0 0 0 3px var(--frame), inset 0 0 0 4px rgba(0, 0, 0, 0.45);
}
/* 13×13 の表 */
.range-matrix { display: grid; grid-template-columns: repeat(13, 1fr); gap: 2px; }
.matrix-card {
padding: 6px;
border-radius: 16px;
background: var(--bg-2);
}
.range-matrix {
display: grid;
grid-template-columns: repeat(13, 1fr);
gap: 2px;
}
.range-cell {
aspect-ratio: 1;
position: relative;
min-width: 0;
aspect-ratio: 1;
padding: 0;
border: 0;
border-radius: 3px;
border-radius: 4px;
background: var(--c);
color: var(--fg);
font: inherit;
font-size: clamp(8px, 2.4vw, 12px);
font-weight: 800;
font-weight: 700;
letter-spacing: -0.04em;
cursor: pointer;
position: relative;
transition: transform 0.45s var(--ease-spring);
}
.range-cell:active {
transform: scale(0.9);
transition: transform 0.1s ease-out;
}
.range-cell.selected {
z-index: 1;
outline: 2px solid var(--label);
outline-offset: 1px;
transform: scale(1.12);
}
.range-cell.selected { outline: 2px solid var(--gold); outline-offset: 1px; z-index: 1; }
/* 凡例 */
.range-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.range-legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch-dot { width: 14px; height: 14px; border-radius: 4px; background: var(--c); flex: none; }
.swatch-dot.swatch-frame { background: transparent; box-shadow: inset 0 0 0 3px var(--frame); }
.range-legend {
display: flex;
flex-wrap: wrap;
gap: 6px 14px;
margin: 12px 8px 0;
color: var(--label-2);
font-size: 0.75rem;
}
.range-legend span {
display: inline-flex;
align-items: center;
gap: 6px;
}
.swatch-dot {
width: 14px;
height: 14px;
flex: none;
border-radius: 4px;
background: var(--c);
box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.2);
}
.swatch-dot.swatch-frame {
background: transparent;
box-shadow: inset 0 0 0 3px var(--frame);
}
/* 選択したハンド */
.sel-hand { font-size: 28px; font-weight: 900; line-height: 1.1; }
.sel-label { display: flex; align-items: center; gap: 8px; font-weight: 800; margin-top: 6px; }
.selected-card {
margin-top: 16px;
}
.sel-hand {
font-size: 1.75rem;
font-weight: 700;
line-height: 1.15;
letter-spacing: -0.02em;
}
.sel-label {
display: flex;
align-items: center;
gap: 8px;
margin-top: 6px;
font-weight: 600;
}
.selected-card .hint {
margin-top: 6px;
}
/* クイズ */
.quiz-progress { height: 6px; background: var(--input); border-radius: 999px; overflow: hidden; margin: 16px 0 8px; }
.quiz-progress i { display: block; height: 100%; width: 0; background: var(--green); transition: width 0.2s; }
.quiz-stats { display: flex; justify-content: center; gap: 12px; font-size: 13px; color: var(--muted); }
.quiz-hand { text-align: center; margin: 12px 0; padding: 18px 12px; }
.quiz-cards { display: flex; justify-content: center; gap: 10px; min-height: 0; }
.quiz-cards img { width: min(32%, 120px); height: auto; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4)); }
.quiz-hand-name { font-size: 40px; font-weight: 900; margin-top: 8px; line-height: 1.1; }
.quiz-answers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.quiz-answers .btn {
font-size: 15px;
padding: 12px 8px;
justify-content: flex-start;
background: var(--panel-2);
color: var(--text);
border: 2px solid transparent;
.quiz-progress {
height: 6px;
margin: 18px 0 8px;
overflow: hidden;
border-radius: 999px;
background: var(--fill-2);
}
.quiz-progress i {
display: block;
width: 0;
height: 100%;
border-radius: inherit;
background: var(--tint);
transition: width 0.5s var(--ease-spring);
}
.quiz-stats {
display: flex;
justify-content: center;
gap: 14px;
color: var(--label-2);
font-size: 0.8125rem;
font-variant-numeric: tabular-nums;
}
.quiz-hand {
margin: 14px 0;
padding: 20px 12px;
text-align: center;
}
.quiz-cards {
display: flex;
justify-content: center;
gap: 10px;
}
.quiz-cards img {
width: min(32%, 120px);
height: auto;
filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
animation: card-in 0.55s var(--ease-spring) both;
}
.quiz-cards img + img {
animation-delay: 70ms;
}
@keyframes card-in {
from {
opacity: 0;
transform: translateY(-14px) scale(0.92) rotate(-4deg);
}
}
.quiz-hand-name {
margin-top: 10px;
font-size: 2.5rem;
font-weight: 700;
line-height: 1.1;
letter-spacing: -0.025em;
}
.quiz-answers {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 8px;
}
.quiz-answers .btn {
justify-content: flex-start;
padding: 12px 12px;
background: var(--bg-2);
color: var(--label);
font-size: 0.9375rem;
box-shadow: inset 0 0 0 0 transparent;
transition: transform 0.45s var(--ease-spring), box-shadow 0.25s ease, background-color 0.25s ease;
}
.quiz-answers .btn:disabled {
opacity: 1;
}
.quiz-answers .btn.correct {
background: var(--tint-soft);
box-shadow: inset 0 0 0 2px var(--tint);
}
.quiz-answers .btn.wrong {
background: rgba(255, 59, 48, 0.12);
box-shadow: inset 0 0 0 2px var(--red);
}
.quiz-feedback {
margin-top: 12px;
padding: 12px 14px;
border-radius: 14px;
background: var(--bg-2);
font-size: 0.9375rem;
animation: fade-up 0.45s var(--ease-spring) both;
}
.quiz-feedback.good {
box-shadow: inset 0 0 0 2px var(--tint);
}
.quiz-feedback.bad {
box-shadow: inset 0 0 0 2px var(--red);
}
@media (prefers-reduced-motion: reduce) {
.quiz-cards img,
.quiz-feedback {
animation: fade-in 0.2s ease both;
}
.range-cell.selected {
transform: none;
}
}
.quiz-answers .btn:disabled { opacity: 1; }
.quiz-answers .btn.correct { border-color: var(--green); background: rgba(46, 204, 113, 0.18); }
.quiz-answers .btn.wrong { border-color: var(--red); background: rgba(255, 90, 90, 0.15); }
.quiz-feedback { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--panel); font-size: 14px; }
.quiz-feedback.good { box-shadow: inset 0 0 0 2px var(--green); }
.quiz-feedback.bad { box-shadow: inset 0 0 0 2px var(--red); }