@font-face {
  font-family: "Boldonse";
  src: url("assets/fonts/Boldonse-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-primary: #000000;
  --bg-secondary: #0d0e0c;
  --bg-card: #171815;
  --panel: #20211d;
  --paper: #f4f0e5;
  --text-primary: #f4f0e5;
  --text-secondary: #aaa99f;
  --accent-primary: #ff5a36;
  --accent-secondary: #d7ff3f;
  --line: #45463f;
  --chamfer: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

* { box-sizing: border-box; }

html, body {
  width: 600px;
  height: 600px;
  margin: 0;
  overflow: hidden;
  background: var(--bg-primary);
}

body {
  color: var(--text-primary);
  font-family: "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
  font-size: 16px;
}

button { font: inherit; }

.app-shell {
  width: 600px;
  height: 600px;
  padding: 8px;
}

.screen {
  width: 584px;
  height: 584px;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid var(--line);
  background: var(--bg-secondary);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
}

.screen::after {
  content: "";
  position: absolute;
  top: 0;
  right: 22px;
  width: 72px;
  height: 5px;
  background: var(--accent-primary);
  pointer-events: none;
}

.app-header {
  height: 76px;
  flex: 0 0 76px;
  padding: 11px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--line);
  background: #10110f;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--accent-primary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.17em;
}

h1 {
  margin: 0;
  font-family: "Boldonse", Impact, sans-serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.035em;
}

.status-cluster {
  max-width: 210px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.status-mark {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  border: 3px solid var(--accent-secondary);
  transform: rotate(45deg);
}

.bank-strip {
  height: 96px;
  flex: 0 0 96px;
  padding: 4px 8px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  border-bottom: 2px solid var(--line);
  background: #121310;
}

.focusable {
  min-height: 88px;
  border: 2px solid var(--line);
  color: var(--text-primary);
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background-color 120ms ease, color 120ms ease;
}

.focusable:focus {
  z-index: 3;
  outline: none;
  border-color: var(--paper);
  box-shadow: inset 0 0 0 4px var(--accent-primary);
  transform: scale(0.955);
}

.focusable:active { transform: scale(0.9); }

.bank-button {
  height: 88px;
  min-width: 0;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  background: var(--panel);
  clip-path: var(--chamfer);
  text-align: left;
}

.bank-button span {
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.bank-button strong {
  margin-top: 7px;
  max-width: 100%;
  overflow: hidden;
  font-family: "Boldonse", Impact, sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.bank-button.is-selected {
  border-color: var(--paper);
  background: var(--accent-primary);
  color: #090a08;
  box-shadow: inset 0 -7px 0 #090a08;
}

.bank-button.is-selected span { color: #4d160c; }

.pad-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 6px;
  padding: 7px 8px 8px;
}

.pad {
  --pad-color: var(--accent-primary);
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 9px 9px 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  overflow: hidden;
  background: var(--bg-card);
  clip-path: var(--chamfer);
  text-align: left;
}

.pad::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--pad-color);
}

.pad-key {
  position: absolute;
  top: 11px;
  left: 10px;
  min-width: 24px;
  padding-bottom: 2px;
  border-bottom: 2px solid var(--pad-color);
  color: var(--paper);
  font-size: 11px;
  font-weight: 900;
}

.pad-icon {
  position: absolute;
  top: 16px;
  right: 12px;
  color: var(--pad-color);
  font-size: 34px;
  line-height: 1;
}

.pad-name {
  max-width: 100%;
  overflow: hidden;
  font-family: "Boldonse", Impact, sans-serif;
  font-size: 13px;
  line-height: 1.02;
  letter-spacing: -0.045em;
  white-space: nowrap;
}

.pad.is-long .pad-name { font-size: 11px; }

.pad-kind {
  margin-top: 6px;
  color: var(--pad-color);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.11em;
}

.pad.is-playing {
  border-color: var(--paper);
  background: var(--pad-color);
  color: #090a08;
}

.pad.is-playing .pad-icon,
.pad.is-playing .pad-kind,
.pad.is-playing .pad-key { color: #090a08; border-color: #090a08; }

.toast {
  position: fixed;
  top: 28px;
  left: 50%;
  z-index: 20;
  max-width: 536px;
  padding: 14px 24px;
  border: 2px solid var(--paper);
  background: var(--accent-primary);
  color: #090a08;
  clip-path: var(--chamfer);
  font-weight: 900;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -16px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.toast.visible { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; }
}
