Files
ITOSMPiano-BachToBasics/frontend/src/index.css
T
이창현 407b453871 모바일 회원 메뉴 배치를 바로잡는다
좁은 화면에서 첫 줄에는 회원 메뉴를 두고 둘째 줄에는 화면 전환과 MIDI 장치를 배치했다. 앱 이름은 모바일에서 아이콘으로 줄여 로그인과 회원가입 및 관리자 버튼이 화면 밖으로 밀리지 않게 했다. 검사: ESLint와 프런트엔드 프로덕션 빌드 통과.
2026-10-03 10:58:02 +09:00

803 lines
19 KiB
CSS

@import "tailwindcss";
/* ── Design tokens ─────────────────────────────────────────────────────────── */
:root {
/* Surfaces - full indigo palette */
--color-bg: #1a1a2e;
--color-surface: #1e1e38;
--color-surface-2: #232348;
--color-surface-3: #282858;
--color-border: #2d2d55;
--color-border-subtle: #232348;
/* Accent */
--color-accent: #9333ea;
--color-accent-hover: #a855f7;
--color-accent-subtle: rgba(147, 51, 234, 0.18);
--color-accent-subtle-border: rgba(147, 51, 234, 0.35);
--color-accent-text: #c084fc;
/* Toggle switch inactive track */
--color-toggle-off: #4a4f88;
/* Text - muted bumped to #9ca3af for WCAG AA compliance on dark surfaces */
--color-text: #e2e8f0;
--color-text-muted: #9ca3af;
--color-text-dim: #3d4070;
/* Notes canvas - slightly deeper than bg so the practice area reads as distinct */
--color-notes-bg: #141428;
--color-notes-border: #1f1f44;
/* Hands */
--color-warning: #f59e0b;
--color-warning-subtle: rgba(245, 158, 11, 0.08);
--color-warning-border: rgba(245, 158, 11, 0.22);
--color-left-hand: #9333ea;
--color-left-hand-subtle: rgba(147, 51, 234, 0.18);
--color-left-hand-subtle-border: rgba(147, 51, 234, 0.38);
--color-left-hand-text: #c084fc;
--color-right-hand: #22d3ee;
--color-right-hand-subtle: rgba(34, 211, 238, 0.14);
--color-right-hand-subtle-border: rgba(34, 211, 238, 0.32);
--color-right-hand-text: #22d3ee;
}
/* ── ITOSM 곡 보관함과 회원 관리 ───────────────────────────────────────── */
.library-open-button {
min-height: 30px;
padding: 0 12px;
border: 1px solid var(--color-border);
border-radius: 8px;
background: var(--color-accent);
color: #fff;
font-size: 12px;
font-weight: 700;
cursor: pointer;
white-space: nowrap;
}
.library-account-button {
background: var(--color-surface-2);
color: var(--color-text);
}
.library-admin-button {
background: #334155;
}
.library-overlay {
position: fixed;
inset: 0;
z-index: 1000;
display: flex;
align-items: center;
justify-content: center;
padding: 18px;
background: rgba(10, 8, 20, 0.72);
backdrop-filter: blur(8px);
}
.library-panel {
width: min(1120px, 100%);
height: min(820px, calc(100vh - 36px));
display: flex;
flex-direction: column;
overflow: hidden;
border: 1px solid var(--color-border);
border-radius: 18px;
background: var(--color-surface);
color: var(--color-text);
box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}
.library-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 18px 22px;
border-bottom: 1px solid var(--color-border);
}
.library-header > div {
display: flex;
flex-direction: column;
gap: 4px;
}
.library-header strong {
font-size: 20px;
}
.library-header span {
color: var(--color-text-muted);
font-size: 12px;
}
.library-header button,
.library-tabs button,
.library-tag-filter button,
.library-tag-row button,
.account-card button {
border: 1px solid var(--color-border);
border-radius: 8px;
background: var(--color-surface-2);
color: var(--color-text);
cursor: pointer;
}
.library-header button {
padding: 8px 14px;
}
.library-tabs {
display: flex;
gap: 6px;
padding: 10px 18px;
overflow-x: auto;
border-bottom: 1px solid var(--color-border);
}
.library-tabs button {
padding: 8px 14px;
white-space: nowrap;
}
.library-tabs button.active,
.account-mode button.active {
background: var(--color-accent);
color: #fff;
border-color: transparent;
}
.library-message {
margin: 10px 18px 0;
padding: 10px 12px;
border-radius: 8px;
background: rgba(147, 51, 234, 0.12);
color: var(--color-text);
font-size: 13px;
}
.library-body {
flex: 1;
min-height: 0;
overflow: auto;
padding: 18px;
}
.library-filters {
display: grid;
grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(120px, 1fr));
gap: 8px;
}
.library-panel input,
.library-panel select,
.library-panel textarea {
width: 100%;
min-height: 38px;
padding: 8px 10px;
border: 1px solid var(--color-border);
border-radius: 8px;
background: var(--color-surface-2);
color: var(--color-text);
font: inherit;
}
.library-tag-filter,
.library-tag-row {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.library-tag-filter {
padding: 12px 0;
}
.library-tag-filter button,
.library-tag-row button {
padding: 5px 8px;
font-size: 11px;
}
.library-tag-filter button.active {
background: var(--color-accent);
color: #fff;
}
.library-groups {
display: grid;
gap: 14px;
}
.library-group {
border: 1px solid var(--color-border);
border-radius: 14px;
overflow: hidden;
background: var(--color-surface-2);
}
.library-group-title {
display: flex;
justify-content: space-between;
gap: 14px;
padding: 14px 16px;
border-bottom: 1px solid var(--color-border);
}
.library-group-title > div {
display: flex;
flex-direction: column;
gap: 3px;
}
.library-group-title span,
.library-group-title small {
color: var(--color-text-muted);
font-size: 12px;
}
.library-variants {
display: grid;
}
.library-variant {
display: flex;
align-items: center;
justify-content: space-between;
gap: 18px;
padding: 14px 16px;
}
.library-variant + .library-variant {
border-top: 1px solid var(--color-border);
}
.library-variant-main {
min-width: 0;
}
.library-variant-main > strong {
display: block;
font-size: 14px;
}
.library-variant-main > span,
.library-variant-main > small {
display: block;
margin-top: 3px;
color: var(--color-text-muted);
font-size: 11px;
}
.library-variant-main p {
margin: 7px 0;
font-size: 12px;
line-height: 1.5;
}
.library-variant-actions {
width: 150px;
display: flex;
flex-direction: column;
gap: 7px;
flex: 0 0 auto;
}
.library-variant-actions button,
.upload-form button {
min-height: 38px;
border: 0;
border-radius: 8px;
cursor: pointer;
}
.library-panel .primary {
background: var(--color-accent);
color: #fff;
font-weight: 700;
}
.library-empty {
padding: 48px;
text-align: center;
color: var(--color-text-muted);
}
.upload-form {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 13px;
max-width: 820px;
margin: 0 auto;
}
.upload-form h3,
.upload-form p,
.upload-form .wide {
grid-column: 1 / -1;
}
.upload-form p {
margin: -4px 0 4px;
color: var(--color-text-muted);
font-size: 12px;
}
.upload-form label,
.account-card label {
display: flex;
flex-direction: column;
gap: 6px;
color: var(--color-text-muted);
font-size: 12px;
}
.account-sections {
max-width: 720px;
margin: 0 auto;
display: grid;
gap: 14px;
}
.account-card {
max-width: 520px;
margin: 0 auto;
padding: 20px;
border: 1px solid var(--color-border);
border-radius: 14px;
background: var(--color-surface-2);
}
.account-card h3 {
margin: 0 0 8px;
}
.account-card p {
color: var(--color-text-muted);
font-size: 12px;
line-height: 1.5;
}
.account-card form {
display: grid;
gap: 12px;
}
.account-card button {
min-height: 38px;
padding: 0 14px;
}
.account-mode {
display: flex;
gap: 6px;
margin-bottom: 16px;
}
.account-mode button {
flex: 1;
}
.danger-zone {
border-color: rgba(220, 38, 38, 0.45);
}
.library-panel .danger {
background: #b91c1c;
color: #fff;
border: 0;
}
.admin-users {
display: grid;
gap: 10px;
}
.admin-users > p {
margin: 0 0 8px;
color: var(--color-text-muted);
font-size: 12px;
}
.admin-user-row {
display: grid;
grid-template-columns: minmax(180px, 2fr) repeat(3, minmax(110px, 1fr));
gap: 8px;
align-items: center;
padding: 12px;
border: 1px solid var(--color-border);
border-radius: 10px;
}
.admin-user-row > div {
display: flex;
flex-direction: column;
gap: 3px;
}
.admin-user-row span {
color: var(--color-text-muted);
font-size: 11px;
}
@media (max-width: 760px) {
.b2b-header {
height: 82px !important;
align-items: flex-start !important;
padding: 6px 8px !important;
}
.b2b-brand-name {
display: none;
}
.b2b-layout-tabs {
left: 8px !important;
bottom: 6px;
transform: none !important;
}
.b2b-layout-tabs button {
padding-left: 8px !important;
padding-right: 8px !important;
}
.b2b-header-actions {
gap: 3px !important;
}
.b2b-midi-device {
position: absolute;
right: 8px;
bottom: 6px;
}
.library-open-button {
padding: 0 8px;
font-size: 11px;
}
.library-account-button {
max-width: 82px;
overflow: hidden;
text-overflow: ellipsis;
}
.library-overlay {
padding: 0;
}
.library-panel {
width: 100%;
height: 100dvh;
border: 0;
border-radius: 0;
}
.library-header {
padding: 13px 14px;
}
.library-header strong {
font-size: 17px;
}
.library-body {
padding: 12px;
}
.library-filters {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.library-filters input {
grid-column: 1 / -1;
}
.library-variant {
align-items: stretch;
flex-direction: column;
gap: 12px;
}
.library-variant-actions {
width: 100%;
display: grid;
grid-template-columns: 1fr 1fr;
}
.upload-form {
grid-template-columns: 1fr;
}
.upload-form h3,
.upload-form p,
.upload-form .wide {
grid-column: auto;
}
.admin-user-row {
grid-template-columns: 1fr 1fr;
}
.admin-user-row > div {
grid-column: 1 / -1;
}
}
[data-theme="light"] {
/* Surfaces */
--color-bg: #ffffff;
--color-surface: #ffffff;
--color-surface-2: #f5f7fb;
--color-surface-3: #eaecf4;
--color-border: #dde1ea;
--color-border-subtle: #eaecf4;
/* Accent */
--color-accent: #5e61f0; /* was #6366f1, darkened to pass WCAG AA contrast */
--color-accent-hover: #4f46e5;
--color-accent-subtle: rgba(94, 97, 240, 0.12);
--color-accent-subtle-border: rgba(94, 97, 240, 0.3);
--color-accent-text: #4f46e5;
/* Toggle switch inactive track */
--color-toggle-off: #c1c9d6;
/* Text */
--color-text: #0f172a;
--color-text-muted: #64748b;
--color-text-dim: #94a3b8;
/* Hands */
--color-warning: #d97706;
--color-warning-subtle: rgba(217, 119, 6, 0.08);
--color-warning-border: rgba(217, 119, 6, 0.22);
--color-left-hand: #3b82f6;
--color-left-hand-subtle: rgba(59, 130, 246, 0.12);
--color-left-hand-subtle-border: rgba(59, 130, 246, 0.3);
--color-left-hand-text: #1d4ed8;
--color-right-hand: #ef4444;
--color-right-hand-subtle: rgba(239, 68, 68, 0.1);
--color-right-hand-subtle-border: rgba(239, 68, 68, 0.28);
--color-right-hand-text: #dc2626;
/* Notes canvas - cooler, slightly darker than chrome to create a
"stage vs UI" separation that mirrors what dark mode does with
#141428 content vs #1E1E38 chrome. #EEF1FA has the same blue-indigo
undertone as the dark palette and reads as white at a glance while
still being visibly distinct from the #FFFFFF header/transport. */
--color-notes-bg: #eef1fa;
--color-notes-border: #d4d9ee;
}
/* ── Reset ─────────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html,
body,
#root {
height: 100%;
background: var(--color-bg);
color: var(--color-text);
font-family:
"Space Grotesk",
system-ui,
-apple-system,
sans-serif;
-webkit-font-smoothing: antialiased;
overflow: hidden;
}
/* ── Typography scale ──────────────────────────────────────────────────────── */
.text-label {
font-size: 11px;
font-weight: 500;
letter-spacing: 0.04em;
color: var(--color-text-muted);
}
/* ── Inputs & selects ──────────────────────────────────────────────────────── */
select,
input[type="range"] {
font-family: inherit;
}
select {
appearance: none;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M0 0l6 7 6-7z' fill='%2364748b'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 10px center;
padding-right: 28px !important;
}
[data-theme="dark"] select {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M0 0l6 7 6-7z' fill='%239ca3af'/%3E%3C/svg%3E");
}
/* ── Settings panel rows ───────────────────────────────────────────────────── */
.settings-row:hover {
background: var(--color-surface-2);
}
/* ── Scrollbar ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
width: 5px;
height: 5px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: var(--color-surface-3);
border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--color-border);
}
/* ── Range slider - fully custom ───────────────────────────────────────────── */
/* Remove native appearance so our pseudo-element CSS actually takes effect.
Each slider sets --fill-pct via inline style (computed from value/min/max)
so the gradient draws the correct filled/unfilled split. */
input[type="range"] {
-webkit-appearance: none;
appearance: none;
background: transparent;
cursor: pointer;
outline: none;
}
/* Thumb - WebKit/Blink */
input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
width: 14px;
height: 14px;
border-radius: 50%;
background: var(--color-accent);
cursor: pointer;
margin-top: -5.5px; /* center on 3px track: -(14-3)/2 */
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
transition:
background 0.12s,
box-shadow 0.12s;
}
input[type="range"]:hover::-webkit-slider-thumb {
background: var(--color-accent-hover);
box-shadow: 0 0 0 4px var(--color-accent-subtle);
}
/* Track - WebKit/Blink (uses --fill-pct for filled/unfilled split) */
input[type="range"]::-webkit-slider-runnable-track {
height: 3px;
border-radius: 99px;
background: linear-gradient(
to right,
var(--color-accent) var(--fill-pct, 0%),
var(--color-border) var(--fill-pct, 0%)
);
}
/* Thumb - Firefox */
input[type="range"]::-moz-range-thumb {
width: 14px;
height: 14px;
border-radius: 50%;
background: var(--color-accent);
border: none;
cursor: pointer;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
input[type="range"]:hover::-moz-range-thumb {
background: var(--color-accent-hover);
box-shadow: 0 0 0 4px var(--color-accent-subtle);
}
/* Track - Firefox */
input[type="range"]::-moz-range-track {
height: 3px;
border-radius: 99px;
background: var(--color-border);
}
input[type="range"]::-moz-range-progress {
height: 3px;
border-radius: 99px;
background: var(--color-accent);
}
/* ── Transport buttons ─────────────────────────────────────────────────────── */
/* Shared base for all icon/action buttons in the transport bar */
.t-btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 5px;
height: 32px;
min-width: 32px;
padding: 0 8px;
border-radius: 7px;
background: var(--color-surface-2);
color: var(--color-text-muted);
border: 1px solid var(--color-border);
cursor: pointer;
transition:
background 0.12s,
opacity 0.12s;
flex-shrink: 0;
font-size: 12px;
font-family: inherit;
}
.t-btn:hover:not(:disabled) {
background: var(--color-surface-3);
color: var(--color-text);
}
.t-btn:disabled {
opacity: 0.55;
cursor: default;
}
/* Primary play/pause button - circular, accent-colored */
.t-btn.primary {
background: var(--color-accent);
border-color: transparent;
width: 40px;
height: 40px;
min-width: 40px;
padding: 0;
border-radius: 50%;
color: white;
box-shadow: 0 0 18px rgba(147, 51, 234, 0.5);
}
.t-btn.primary:hover:not(:disabled) {
background: var(--color-accent-hover);
box-shadow: 0 0 24px rgba(147, 51, 234, 0.65);
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
/* ── AlphaTab host ─────────────────────────────────────────────────────────── */
.at-surface svg {
display: block;
}
/* ── AlphaTab playback cursor ─────────────────────────────────────────────── */
/* Beat cursor - thin accent-colored vertical bar following playhead */
.at-cursor-beat {
background: rgba(147, 51, 234, 0.65);
border-radius: 1px;
}
/* Bar cursor - the "spotlight" highlight on the current measure. Slightly more
prominent than a hairline so it's easy to track while following along. */
.at-cursor-bar {
background: rgba(147, 51, 234, 0.16);
border-radius: 2px;
}
/* Selection overlay */
.at-selection div {
background: rgba(147, 51, 234, 0.2);
}
/* ── Dark-mode sheet music inversion ──────────────────────────────────────── */
/* Filter is applied only to SVG elements (the actual music notation), NOT to
the container. This way:
- Black staff lines/noteheads to white (readable on dark background)
- The container's background (--color-bg dark gray) shows through transparent SVG areas
- Cursor/selection divs (.at-cursor-beat etc.) are NOT SVGs, so they keep their
natural purple accent colors - no pre-inversion math needed. */
[data-theme="dark"] .sheet-dark-invert svg {
filter: invert(1);
}
.b2b-shell {
height: 100vh;
height: 100dvh;
touch-action: manipulation;
}
@media (max-width: 768px) {
.b2b-header {
height: 82px !important;
align-items: flex-start !important;
padding-top: 6px;
}
.b2b-header > div:nth-of-type(2) {
top: auto !important;
bottom: 5px;
width: calc(100% - 16px);
justify-content: center;
}
.b2b-header > div:nth-of-type(2) button {
padding-left: 9px !important;
padding-right: 9px !important;
}
.b2b-transport {
padding-left: 8px !important;
padding-right: 8px !important;
}
.b2b-status {
display: none !important;
}
.t-btn {
min-width: 40px;
height: 40px;
}
}
@media (max-height: 520px) and (orientation: landscape) {
.b2b-header {
height: 44px !important;
align-items: center !important;
padding-top: 0;
}
.b2b-header > a > span {
display: none;
}
.b2b-header > div:nth-of-type(2) {
top: 50% !important;
bottom: auto;
width: auto;
}
}