web-tuner/frontend/dist/layout.css

1179 lines
21 KiB
CSS

:root {
--bg-base: #131314;
--bg-surface: #1e1f20;
--bg-overlay: #282a2c;
--bg-input: #1e1f20;
--text-primary: #e3e3e3;
--text-secondary: #c4c7c5;
--text-subtle: #8e918f;
--accent: #8ab4f8;
--accent-hover: #aecbfa;
--accent-dim: rgba(138, 180, 248, 0.12);
--border: #444746;
--border-light: #333638;
--radius: 0.75rem;
--radius-sm: 0.5rem;
--transition: 150ms ease;
}
*, *::before, *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: var(--bg-base);
color: var(--text-primary);
overflow: hidden;
height: 100vh;
-webkit-font-smoothing: antialiased;
}
/* --- Header (titlebar drag region) --- */
.header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 1rem 0 5rem;
background: var(--bg-base);
border-bottom: 1px solid var(--border-light);
height: 2.75rem;
--wails-draggable: drag;
-webkit-user-select: none;
user-select: none;
}
.header h1 {
font-size: 0.875rem;
font-weight: 500;
color: var(--text-primary);
}
.header-actions {
display: flex;
align-items: center;
gap: 0.5rem;
--wails-draggable: no-drag;
}
.audio-sliders {
display: flex;
align-items: center;
gap: 0.375rem;
}
.audio-sliders label {
font-size: 0.6875rem;
color: var(--text-subtle);
user-select: none;
}
.audio-sliders input[type="range"] {
width: 4rem;
height: 0.25rem;
-webkit-appearance: none;
appearance: none;
background: var(--border);
border-radius: 0.125rem;
outline: none;
cursor: pointer;
}
.audio-sliders input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
width: 0.75rem;
height: 0.75rem;
border-radius: 50%;
background: var(--accent);
cursor: pointer;
}
.audio-sliders input[type="range"]::-webkit-slider-thumb:hover {
background: var(--accent-hover);
}
.audio-sliders select {
font-size: 0.6875rem;
padding: 0.25rem 1.25rem 0.25rem 0.375rem;
background-position: right 0.375rem center;
}
.header-actions select,
.header-actions button {
font: inherit;
font-size: 0.8125rem;
font-weight: 500;
padding: 0.375rem 0.75rem;
border-radius: var(--radius-sm);
border: 1px solid var(--border);
background: var(--bg-surface);
color: var(--text-secondary);
cursor: pointer;
transition: all var(--transition);
-webkit-appearance: none;
appearance: none;
}
.header-actions select {
padding-right: 1.75rem;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238e918f'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 0.625rem center;
}
.header-actions button:hover,
.header-actions select:hover {
background: var(--bg-overlay);
border-color: var(--text-subtle);
}
/* --- App Shell --- */
.app-shell {
display: flex;
height: calc(100vh - 2.75rem);
}
/* --- Sidebar --- */
.sidebar {
width: 20%;
min-width: 17rem;
background: var(--bg-base);
border-right: 1px solid var(--border-light);
display: flex;
flex-direction: column;
overflow-y: auto;
}
.nav-links {
display: flex;
flex-direction: column;
padding: 0.5rem 0;
}
.nav-link {
padding: 0.5rem 1rem;
font-size: 0.875rem;
font-weight: 500;
color: var(--text-subtle);
cursor: pointer;
border: none;
background: none;
text-align: left;
font-family: inherit;
border-left: 0.1875rem solid transparent;
transition: all var(--transition);
}
.nav-link:hover {
color: var(--text-secondary);
background: var(--bg-surface);
}
.nav-link.active {
color: var(--accent);
border-left-color: var(--accent);
background: var(--bg-surface);
}
/* --- Sidebar Sections --- */
.sidebar-section {
padding: 1rem 1.25rem;
border-top: 1px solid var(--border-light);
}
.sidebar-section h3 {
font-size: 0.6875rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--text-subtle);
margin-bottom: 0.625rem;
}
/* --- Config Panel --- */
.config-panel label {
display: block;
font-size: 0.75rem;
color: var(--text-subtle);
margin-bottom: 0.1875rem;
margin-top: 0.5rem;
}
.config-panel label:first-of-type {
margin-top: 0;
}
.config-panel select,
.config-panel input[type="number"] {
width: 100%;
font-family: inherit;
font-size: 0.8125rem;
padding: 0.375rem 0.5rem;
border-radius: var(--radius-sm);
border: 1px solid var(--border);
background: var(--bg-input);
color: var(--text-primary);
outline: none;
transition: all var(--transition);
-webkit-appearance: none;
appearance: none;
}
.config-panel select {
padding-right: 1.75rem;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238e918f'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 0.5rem center;
}
.config-panel select:focus,
.config-panel input[type="number"]:focus {
border-color: var(--text-secondary);
}
.tuning-grid {
display: flex;
flex-wrap: wrap;
gap: 0.25rem;
margin-top: 0.25rem;
}
.tuning-grid select {
width: 3rem;
font-size: 0.75rem;
padding: 0.25rem;
text-align: center;
padding-right: 0.25rem;
background-image: none;
}
.config-actions {
display: flex;
gap: 0.375rem;
margin-top: 0.625rem;
}
.config-actions button {
flex: 1;
font-family: inherit;
font-size: 0.75rem;
font-weight: 500;
padding: 0.375rem 0;
border-radius: var(--radius-sm);
border: 1px solid var(--border);
background: var(--bg-surface);
color: var(--text-secondary);
cursor: pointer;
transition: all var(--transition);
}
.config-actions button:hover {
background: var(--bg-overlay);
border-color: var(--text-subtle);
}
.config-actions .btn-apply {
background: var(--accent-dim);
border-color: var(--accent);
color: var(--accent);
}
.config-actions .btn-apply:hover {
background: rgba(138, 180, 248, 0.2);
}
/* --- Main Content --- */
.main-content {
flex: 1;
overflow: hidden;
padding: 1rem;
}
.view {
display: none;
height: 100%;
}
.view.active {
display: flex;
flex-direction: column;
}
#view-tuner {
overflow: auto;
}
#view-chords,
#view-shapes {
overflow-y: auto;
}
/* --- Filter Bar --- */
.filter-bar {
margin-bottom: 1rem;
}
.filter-row {
display: flex;
flex-wrap: wrap;
gap: 0.25rem;
margin-bottom: 0.375rem;
}
.filter-pill {
font-family: inherit;
font-size: 0.75rem;
padding: 0.25rem 0.625rem;
border-radius: 0.875rem;
border: 1px solid var(--border);
background: var(--bg-surface);
color: var(--text-subtle);
cursor: pointer;
transition: all var(--transition);
}
.filter-pill:hover {
border-color: var(--text-subtle);
color: var(--text-secondary);
}
.filter-pill.active {
background: var(--accent-dim);
border-color: var(--accent);
color: var(--accent);
}
/* --- Chord Grid --- */
#chord-container {
display: flex;
flex-wrap: wrap;
gap: 1.5rem;
}
/* --- Fretboard (structural) --- */
.fretboard {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 0;
margin-left: 0.5rem;
position: relative;
width: fit-content;
}
.fret-row {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: stretch;
gap: 0;
}
.fret {
width: 2.1rem;
height: 1.6rem;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
font-size: 1rem;
text-align: center;
line-height: 1.6rem;
font-weight: bold;
position: relative;
}
.fret[data-dot]::after {
content: '';
width: 0.55rem;
height: 0.55rem;
border-radius: 50%;
display: block;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.fret[muted] {
font-weight: bold;
font-size: 1rem;
display: flex;
align-items: center;
justify-content: center;
}
.alternatives {
margin-top: 1rem;
}
.alternatives h3 {
font-size: 1rem;
margin-bottom: 0.5rem;
}
.alternatives-container {
display: flex;
gap: 2rem;
flex-wrap: wrap;
}
.alternative-fretboard {
margin-inline: 1.8rem;
}
.alternative-fretboard .fret {
width: 1.8rem;
height: 1.3rem;
}
.barre-line {
position: absolute;
border-radius: 5rem;
pointer-events: none;
z-index: 2;
width: 1rem;
left: 0;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
font-size: 0.7rem;
font-family: sans-serif;
font-weight: bold;
transform: translateX(calc(50% - 1.1rem));
}
/* --- Shape Explorer --- */
.shapes-section label {
display: block;
font-size: 0.75rem;
color: var(--text-subtle);
margin-bottom: 0.25rem;
margin-top: 0.5rem;
}
.shapes-section select,
.shapes-section input[type="text"] {
width: 100%;
font-family: inherit;
font-size: 0.8125rem;
padding: 0.375rem 0.5rem;
border-radius: var(--radius-sm);
border: 1px solid var(--border);
background: var(--bg-input);
color: var(--text-primary);
outline: none;
transition: all var(--transition);
-webkit-appearance: none;
appearance: none;
}
.shapes-section select {
padding-right: 1.75rem;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238e918f'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 0.5rem center;
}
.shapes-section select:focus,
.shapes-section input[type="text"]:focus {
border-color: var(--text-secondary);
}
.set-selector-row {
display: flex;
gap: 0.375rem;
margin-bottom: 0.5rem;
}
.set-selector-row select {
flex: 1;
min-width: 0;
}
.set-selector-row .btn-small {
flex: 0;
padding: 0.375rem 0.5rem;
}
.shape-list {
display: flex;
flex-direction: column;
gap: 0.25rem;
max-height: 16rem;
overflow-y: auto;
margin-bottom: 0.5rem;
}
.shape-item {
display: flex;
align-items: center;
gap: 0.375rem;
padding: 0.375rem 0.5rem;
border-radius: var(--radius-sm);
font-size: 0.8125rem;
cursor: pointer;
border: 1px solid transparent;
transition: all var(--transition);
}
.shape-item:hover {
background: var(--bg-surface);
}
.shape-item.selected {
background: var(--accent-dim);
border-color: rgba(138, 180, 248, 0.25);
}
.shape-item .shape-name {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: var(--text-secondary);
}
.shape-item .shape-frets {
font-size: 0.6875rem;
color: var(--text-subtle);
flex-shrink: 0;
}
.shape-item .shape-actions {
display: flex;
gap: 0.125rem;
flex-shrink: 0;
}
.shape-item .shape-actions button {
font-family: inherit;
font-size: 0.6875rem;
padding: 0.1875rem 0.5rem;
border-radius: 0.25rem;
border: 1px solid var(--border);
background: var(--bg-surface);
color: var(--text-subtle);
cursor: pointer;
transition: all var(--transition);
}
.shape-item .shape-actions button:hover {
background: var(--bg-overlay);
color: var(--text-primary);
}
.shape-editor-actions {
display: flex;
gap: 0.375rem;
}
.btn-small {
font-family: inherit;
font-size: 0.75rem;
font-weight: 500;
padding: 0.375rem 0.625rem;
border-radius: var(--radius-sm);
border: 1px solid var(--border);
background: var(--bg-surface);
color: var(--text-secondary);
cursor: pointer;
flex: 1;
transition: all var(--transition);
}
.btn-small:hover {
background: var(--bg-overlay);
border-color: var(--text-subtle);
}
.shape-editor {
margin-top: 0.375rem;
padding: 0.625rem;
border: 1px solid var(--border-light);
border-radius: var(--radius-sm);
background: var(--bg-surface);
}
.shape-fret-inputs {
display: flex;
gap: 0.3125rem;
margin-top: 0.375rem;
}
.shape-fret-inputs input {
flex: 1;
min-width: 0;
font-family: inherit;
font-size: 0.75rem;
padding: 0.375rem;
text-align: center;
border-radius: var(--radius-sm);
border: 1px solid var(--border);
background: var(--bg-input);
color: var(--text-primary);
outline: none;
transition: all var(--transition);
}
.shape-fret-inputs input:focus {
border-color: var(--text-secondary);
}
.shape-editor-btns {
display: flex;
gap: 0.25rem;
margin-top: 0.375rem;
}
.voicing-row {
display: flex;
gap: 0.3125rem;
}
.voicing-row input {
flex: 1;
min-width: 0;
font-family: inherit;
font-size: 0.75rem;
padding: 0.375rem;
text-align: center;
border-radius: var(--radius-sm);
border: 1px solid var(--border);
background: var(--bg-input);
color: var(--text-primary);
outline: none;
transition: all var(--transition);
}
.voicing-row input:focus {
border-color: var(--text-secondary);
}
.voicing-row input:disabled {
opacity: 0.3;
cursor: not-allowed;
}
.tuning-card {
background: var(--bg-surface);
border: 1px solid var(--border-light);
border-radius: var(--radius);
padding: 0.75rem 1rem;
margin-bottom: 0.625rem;
}
.tuning-card-header {
display: flex;
align-items: center;
justify-content: space-between;
cursor: pointer;
user-select: none;
}
.tuning-card-header h3 {
font-size: 0.9375rem;
font-weight: 500;
color: var(--text-primary);
margin: 0;
}
.compat-star {
color: #f5c542;
margin-left: 0.375rem;
font-size: 1rem;
}
.tuning-card.high-compat {
border-color: rgba(245, 197, 66, 0.35);
}
.tuning-card-header .tuning-stats {
font-size: 0.75rem;
color: var(--text-subtle);
white-space: nowrap;
}
.tuning-card-header .tuning-notes {
font-size: 0.8125rem;
color: var(--text-subtle);
}
.tuning-card-header .expand-icon {
font-size: 0.75rem;
color: var(--text-subtle);
transition: transform var(--transition);
}
.tuning-card.expanded .expand-icon {
transform: rotate(90deg);
}
.tuning-card-body {
display: none;
margin-top: 0.75rem;
padding-top: 0.75rem;
border-top: 1px solid var(--border-light);
}
.tuning-card.expanded .tuning-card-body {
display: block;
}
.companion-grid {
display: flex;
flex-wrap: wrap;
gap: 1.25rem;
}
.companion-item {
text-align: center;
cursor: pointer;
transition: background var(--transition);
}
.companion-item:hover {
background: var(--bg-overlay);
border-radius: var(--radius-sm);
}
[data-fingering] {
cursor: pointer;
}
.companion-item .companion-label {
font-size: 0.8125rem;
font-weight: 500;
color: var(--text-secondary);
margin-bottom: 0.25rem;
}
.companion-item .companion-chord {
font-size: 0.6875rem;
color: var(--text-subtle);
margin-bottom: 0.375rem;
}
.companion-item .companion-notes {
font-size: 0.625rem;
color: var(--text-subtle);
}
.density-explanation {
font-size: 0.8rem;
color: var(--text-subtle);
margin-bottom: 0.75rem;
line-height: 1.4;
}
.finger-count {
display: inline-block;
font-size: 0.625rem;
font-weight: 600;
color: var(--text-subtle);
background: var(--bg-overlay);
border-radius: 0.25rem;
padding: 0.0625rem 0.3rem;
margin-left: 0.375rem;
vertical-align: middle;
}
.btn-load-more {
display: block;
width: 100%;
padding: 0.625rem;
margin-top: 0.5rem;
font-size: 0.8125rem;
font-weight: 500;
font-family: inherit;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
background: var(--bg-surface);
color: var(--text-secondary);
cursor: pointer;
transition: all var(--transition);
}
.btn-load-more:hover {
background: var(--bg-overlay);
color: var(--text-primary);
}
/* --- Loading --- */
.loading {
color: var(--text-subtle);
padding: 2rem;
text-align: center;
font-size: 0.875rem;
}
/* --- Scrollbar --- */
::-webkit-scrollbar {
width: 0.5rem;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: var(--border-light);
border-radius: 0.25rem;
}
::-webkit-scrollbar-thumb:hover {
background: var(--border);
}
/* --- Sets Editor --- */
.sets-editor {
display: flex;
flex-direction: column;
height: 100%;
}
.sets-editor-header {
display: flex;
align-items: center;
gap: 1rem;
padding-bottom: 0.75rem;
border-bottom: 1px solid var(--border-light);
margin-bottom: 0.75rem;
}
.sets-editor-header h2 {
font-size: 1rem;
font-weight: 500;
color: var(--text-primary);
}
.sets-editor-body {
display: flex;
flex: 1;
min-height: 0;
gap: 1rem;
}
.sets-editor-list {
width: 14rem;
flex-shrink: 0;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.sets-editor-detail {
flex: 1;
overflow-y: auto;
}
.se-set-item {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.375rem;
padding: 0.5rem 0.625rem;
border-radius: var(--radius-sm);
font-size: 0.8125rem;
cursor: pointer;
border: 1px solid transparent;
transition: all var(--transition);
}
.se-set-item:hover {
background: var(--bg-surface);
}
.se-set-item.selected {
background: var(--accent-dim);
border-color: rgba(138, 180, 248, 0.25);
}
.se-set-name {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: var(--text-secondary);
}
.se-set-badges {
display: flex;
gap: 0.25rem;
flex-shrink: 0;
}
.se-badge {
font-size: 0.625rem;
font-weight: 600;
padding: 0.125rem 0.375rem;
border-radius: 0.25rem;
background: var(--bg-overlay);
color: var(--text-subtle);
}
.se-badge-density {
background: var(--accent-dim);
color: var(--accent);
}
.se-btn-new-set {
margin-top: 0.5rem;
}
.se-detail-header {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 0.75rem;
}
.se-detail-header h3 {
font-size: 0.9375rem;
font-weight: 500;
color: var(--text-primary);
flex: 1;
}
.se-shape-list {
display: flex;
flex-direction: column;
gap: 0.375rem;
}
.se-shape-row {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.375rem 0.5rem;
border-radius: var(--radius-sm);
border: 1px solid var(--border-light);
background: var(--bg-surface);
}
.se-mini-fb {
flex-shrink: 0;
}
.se-shape-info {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 0.125rem;
}
.se-shape-name {
font-size: 0.8125rem;
color: var(--text-secondary);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.se-shape-name.se-auto-name {
font-style: italic;
color: var(--text-subtle);
}
.se-shape-frets {
font-size: 0.6875rem;
color: var(--text-subtle);
}
.se-shape-actions {
display: flex;
gap: 0.25rem;
flex-shrink: 0;
}
.se-shape-actions .btn-small {
flex: 0;
padding: 0.25rem 0.5rem;
font-size: 0.6875rem;
}
.se-btn-danger {
border-color: #c0392b !important;
color: #e74c3c !important;
}
.se-btn-danger:hover {
background: rgba(231, 76, 60, 0.15) !important;
}
.se-btn-add-shape {
margin-top: 0.75rem;
}
/* shape editor */
.se-editor-header {
display: flex;
align-items: center;
gap: 0.75rem;
margin-bottom: 0.75rem;
}
.se-editor-header h3 {
font-size: 0.9375rem;
font-weight: 500;
color: var(--text-primary);
}
.se-editor-name-row {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 1rem;
}
.se-editor-name-row label {
font-size: 0.75rem;
color: var(--text-subtle);
flex-shrink: 0;
}
.se-editor-name-input {
font-family: inherit;
font-size: 0.8125rem;
padding: 0.375rem 0.5rem;
border-radius: var(--radius-sm);
border: 1px solid var(--border);
background: var(--bg-input);
color: var(--text-primary);
outline: none;
width: 14rem;
transition: all var(--transition);
}
.se-editor-name-input:focus {
border-color: var(--text-secondary);
}
.se-auto-label {
font-size: 0.75rem;
font-style: italic;
color: var(--text-subtle);
}
/* clickable fretboard grid */
.se-clickable-fb {
overflow-x: auto;
padding-bottom: 0.5rem;
}
.se-fb-grid {
display: flex;
flex-direction: column;
gap: 0;
width: fit-content;
}
.se-fb-header-row {
display: flex;
}
.se-fb-fret-num {
width: 2.5rem;
text-align: center;
font-size: 0.625rem;
color: var(--text-subtle);
padding-bottom: 0.25rem;
}
.se-fb-row {
display: flex;
}
.se-fb-label {
width: 4.5rem;
font-size: 0.6875rem;
color: var(--text-subtle);
display: flex;
align-items: center;
flex-shrink: 0;
padding-right: 0.25rem;
}
.se-fb-cell {
width: 2.5rem;
height: 2rem;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
border: 1px solid var(--border-light);
font-size: 0.75rem;
font-weight: 600;
transition: background var(--transition);
position: relative;
}
.se-fb-cell:hover {
background: var(--bg-overlay);
}
.se-fb-nut {
border-right: 3px solid var(--text-subtle);
}
.se-fb-cell.se-dot-active::after {
content: '';
width: 0.75rem;
height: 0.75rem;
border-radius: 50%;
background: var(--accent);
display: block;
}
.se-fb-cell.se-muted {
color: #e74c3c;
font-weight: 700;
}
.se-fb-cell.se-open {
color: var(--text-secondary);
font-weight: 600;
}
/* --- Print --- */
@media print {
.header, .sidebar {
display: none !important;
}
.app-shell {
display: block;
height: auto;
}
.main-content {
overflow: visible;
padding: 0;
}
.filter-bar {
display: none;
}
#chord-container {
gap: 0.75rem;
}
.chord-card {
break-inside: avoid;
page-break-inside: avoid;
}
body {
overflow: visible;
height: auto;
background: #fff;
color: #000;
}
}