:root { /* ── One Dark Pro palette ── */ /* Surfaces: layered dark greys built around One Dark's #282c34 base */ --bg: #282c34; --surface: #2f343f; --surface-hover: #3a3f4b; --surface-sunken: #21252b; --border: #3e4451; --border-light: #4b5263; /* Text */ --text: #abb2bf; --text-muted: #5c6370; /* Accent — purple (One Dark Pro signature) */ --accent: #c678dd; --accent-hover: #d292e8; --accent-active: #b561d0; --accent-glow: rgba(198, 120, 221, 0.28); --accent-soft: rgba(198, 120, 221, 0.12); --on-accent: #21252b; /* dark text on the bright accent — WCAG AA (5.3:1) */ /* Semantic */ --danger: #e06c75; --danger-soft: rgba(224, 108, 117, 0.12); --success: #98c379; --warning: #e5c07b; /* Radii */ --radius: 12px; --radius-sm: 8px; --radius-xs: 6px; /* Elevation */ --shadow: 0 12px 40px rgba(0, 0, 0, 0.5); --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35); /* Motion */ --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1); --transition-spring: 220ms cubic-bezier(0.16, 1, 0.3, 1); /* Typography */ --font-mono: 'SF Mono', 'Fira Code', 'JetBrains Mono', ui-monospace, monospace; } * { margin: 0; padding: 0; box-sizing: border-box; } [x-cloak] { display: none !important; } html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; } .app { display: flex; flex-direction: column; height: 100vh; max-width: 780px; margin: 0 auto; padding: 0 16px; } /* ── Header ── */ header { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; gap: 12px; flex-shrink: 0; } header h1 { font-size: 16px; font-weight: 600; letter-spacing: -0.3px; } .page-nav { display: flex; align-items: center; gap: 6px; } .page-nav .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); cursor: pointer; transition: background var(--transition); } .page-nav .dot:hover { background: var(--text-muted); } .page-nav .dot.active { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); } .header-actions { display: flex; gap: 8px; } .icon-btn { background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); width: 32px; height: 32px; border-radius: var(--radius-xs); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all var(--transition); font-size: 14px; } .icon-btn:hover { background: var(--surface-hover); border-color: var(--border-light); color: var(--text); } /* ── Grid ── */ main { flex: 1; display: flex; align-items: center; justify-content: center; flex-direction: column; } .deck-grid { display: grid; gap: 8px; padding: 20px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); width: 100%; max-width: 525px; contain: layout style; } .deck-selector { display: flex; gap: 4px; margin-bottom: 8px; align-self: stretch; } .deck-btn { flex: 1; padding: 6px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-xs); color: var(--text-muted); font-size: 11px; font-weight: 600; font-family: inherit; cursor: pointer; transition: all var(--transition); text-align: center; } .deck-btn:hover { color: var(--text); border-color: var(--border-light); } .deck-btn.active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); } .key-btn { aspect-ratio: 1; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-sunken); cursor: pointer; overflow: hidden; position: relative; transition: all var(--transition); padding: 8px; display: flex; align-items: center; justify-content: center; width: 100%; min-width: 0; min-height: 0; } .key-btn:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 4px 16px var(--accent-glow); transform: scale(1.04); z-index: 1; } .key-btn:active { transform: scale(0.97); } .key-btn img { width: 100%; height: 100%; object-fit: cover; } .key-btn.empty { border-color: var(--border-light); } .key-btn.empty:hover { opacity: 0.5; border-color: var(--border-light); box-shadow: none; } .key-label { position: absolute; bottom: 3px; left: 4px; right: 4px; font-size: 9px; color: rgba(255, 255, 255, 0.75); text-align: center; text-shadow: 0 1px 2px rgba(0,0,0,0.8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; line-height: 1; } .fa-preview { font-size: 34px; color: #fff; } /* ── Modal ── */ .modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 100; display: flex; align-items: center; justify-content: center; animation: fadeIn 150ms ease; } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } .modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; width: 360px; max-width: calc(100vw - 32px); box-shadow: var(--shadow); animation: slideUp 200ms cubic-bezier(0.16, 1, 0.3, 1); max-height: 85vh; overflow-y: auto; } @keyframes slideUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } } .modal h3 { font-size: 15px; font-weight: 600; margin-bottom: 16px; letter-spacing: -0.2px; } .preview-box { width: 100px; height: 100px; margin: 0 auto 16px; border-radius: var(--radius-xs); overflow: hidden; border: 1px solid var(--border); position: relative; background: var(--surface-sunken); cursor: pointer; } .preview-box img { width: 100%; height: 100%; object-fit: cover; } .preview-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.5); opacity: 0; transition: opacity var(--transition); border-radius: var(--radius-xs); } .preview-box:hover .preview-overlay { opacity: 1; } .preview-overlay i { font-size: 24px; color: #fff; } .form-group { margin-bottom: 12px; } .form-group label { display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; } .form-group input, .form-group select { width: 100%; padding: 9px 11px; background: var(--surface-sunken); border: 1px solid var(--border); border-radius: var(--radius-xs); color: var(--text); font-size: 13px; font-family: inherit; outline: none; transition: border-color var(--transition), box-shadow var(--transition), background var(--transition); } .form-group input:hover, .form-group select:hover { border-color: var(--border-light); } .form-group input:focus, .form-group select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); } .form-group input::placeholder { color: var(--text-muted); opacity: 0.7; } .form-group select { cursor: pointer; -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' fill='none' stroke='%235c6370' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; } /* ── Custom dropdown ── Inline-expand pattern: the menu lives in normal document flow, so it can never be clipped by an ancestor with overflow:auto (e.g. the modal). Reusable across every