/* Brass, enamel and leather instrument console. */
:root {
  color-scheme: dark;
  --amber: #e2be78;
  --amber-dim: #c4a16b;
  --amber-glow: #c6924033;
  --green: #9cbb8a;
  --yellow: #efd28f;
  --alarm: #ec7861;
  --alarm-glow: #c8493655;
  --panel: #171b19;
  --text: #e3d4b7;
  --text-dim: #b9a88c;
  --border: #766044;
}
* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 50% 0, #6b573233, transparent 65%),
    repeating-linear-gradient(90deg, #ffffff02 0 1px, transparent 1px 4px),
    repeating-linear-gradient(0deg, #00000016 0 1px, transparent 1px 4px), #171b19;
  color: var(--text);
  font-family: 'Courier New', monospace;
}
#app { max-width: 1440px; margin: auto; padding: 40px 40px 20px; }
header { text-align: center; padding: 12px 0 36px; }
.header-panel { position: relative; display: flex; align-items: center; justify-content: center; gap: 30px; }
.header-copy { padding: 0 16px; }
.header-eyebrow { color: var(--amber-dim); font-size: .65rem; letter-spacing: .3em; margin-bottom: 12px; }
h1 { color: #eed7a5; font-family: Georgia, 'Times New Roman', serif; font-weight: normal; font-size: clamp(2rem, 5vw, 3.6rem); letter-spacing: .13em; text-shadow: 0 2px 1px #000; }
.header-subtitle { font-size: .65rem; letter-spacing: .24em; color: var(--text-dim); margin-top: 12px; }
.header-rivets { display: flex; flex: 1; gap: 8px; align-items: center; border-top: 1px solid #8e7448; border-bottom: 1px solid #8e744840; height: 7px; }
.header-rivets:last-child { flex-direction: row-reverse; }
.rivet { width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #efd291, #83603b 55%, #241e16); box-shadow: 0 1px 3px #000; }
.header-rivets .rivet:not(:first-child) { display: none; }
main { padding: 28px 0 32px; border-top: 1px solid #8c74444d; }
.console-caption { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 24px; font-size: .62rem; letter-spacing: .18em; color: var(--text-dim); }
#timer-grid { display: flex; flex-wrap: wrap; gap: 28px; justify-content: center; margin-bottom: 32px; }
.timer-card {
  position: relative; width: 320px; max-width: 100%; padding: 24px 22px 26px; border: 1px solid #bc9558; border-radius: 15px;
  background: linear-gradient(135deg, #b49156 0%, #665035 3%, #262923 4%, #32352c 45%, #1e231f 96%, #85623b 97%, #c3a069);
  box-shadow: inset 0 0 0 5px #302b20, inset 0 0 0 6px #a0824c88, 0 14px 28px #0006;
}
.timer-card::before, .timer-card::after { content: ''; position: absolute; bottom: 10px; width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(135deg, #c5a369 43%, #3b2e1e 45% 55%, #967344 57%); box-shadow: 0 1px 2px #000; }
.timer-card::before { left: 11px; } .timer-card::after { right: 11px; }
.timer-name-row { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.timer-name-input { min-width: 0; width: 100%; padding: 9px 6px; border: 1px solid #b79a62; border-radius: 3px; background: linear-gradient(110deg, #b18d52, #ead09b 48%, #b59159); color: #30271b; font-family: Georgia, serif; font-weight: bold; font-size: .82rem; letter-spacing: .12em; text-align: center; text-transform: uppercase; box-shadow: 0 2px 4px #0007, inset 0 0 0 2px #5f482b55; }
.delete-btn { width: 30px; height: 30px; flex-shrink: 0; background: #1b211d; border: 1px solid #756346; border-radius: 50%; color: #cbb58c; cursor: pointer; }
.delete-btn:hover { color: #ffad94; border-color: var(--alarm); }
.gauge-container { display: flex; justify-content: center; margin-bottom: 18px; }
.gauge-container svg { width: 246px; height: auto; max-width: 100%; filter: drop-shadow(0 6px 5px #0008); }
.duration-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 20px; padding: 12px 0; border-top: 1px solid #ae8b4f45; border-bottom: 1px solid #ae8b4f45; }
.duration-label, .duration-unit { font-size: .62rem; letter-spacing: .12em; color: var(--text-dim); }
.duration-input { width: 65px; padding: 6px 4px; text-align: center; background: #151b17; border: 1px solid #806c4a; border-radius: 3px; color: #f0d29a; font: .8rem 'Courier New', monospace; box-shadow: inset 0 2px 5px #0008; }
.controls { display: flex; gap: 7px; }
.panel-btn { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 9px 12px; font: bold .65rem 'Courier New', monospace; letter-spacing: .06em; border: 1px solid #9a8053; border-radius: 4px; color: #e8d6ae; background: linear-gradient(#414136, #292e27); box-shadow: inset 0 1px #ffffff18, 0 3px 0 #12150f, 0 4px 6px #0004; cursor: pointer; transition: filter .15s, transform .15s; }
.controls .panel-btn { flex: 1; padding: 9px 5px; }
.panel-btn:hover:not(:disabled) { filter: brightness(1.2); }
.panel-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 1px 4px #0008; }
.panel-btn:disabled { cursor: not-allowed; }
.start-btn { background: linear-gradient(#48604a, #2a3d2e); border-color: #7a926a; color: #e0ebcb; }
.pause-btn { background: linear-gradient(#705d35, #473b26); color: #f3dc9e; }
.reset-btn { color: #cfccb8; }
.rec-btn { min-height: 30px; padding: 6px 8px; background: linear-gradient(#624035, #3e2923); border-color: #9c7156; color: #f0b59a; font-size: .6rem; }
.rec-btn.recording { color: #ffd6c2; border-color: var(--alarm); animation: rec-blink 1s ease-in-out infinite; }
.add-timer-panel { display: flex; justify-content: center; align-items: center; gap: 16px; flex-wrap: wrap; padding: 10px 0; }
.add-btn { color: #302718; background: linear-gradient(115deg, #ae874c, #e7c98d, #b78e51); border-color: #d3af6b; padding: 14px 27px; font-size: .73rem; }
.btn-icon { font-size: 1.2rem; line-height: 1; }
.io-btn { color: #c2b596; background: #1d241f; border-color: #665c44; padding: 11px 16px; }
footer { border-top: 1px solid #8c74444d; padding: 20px 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.status-bar { display: flex; align-items: center; gap: 10px; font-size: .63rem; letter-spacing: .14em; color: #c6b999; }
.status-dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px #9cbb8a66; }
.status-dot.active { animation: rec-blink 1.5s ease-in-out infinite; }
.footer-mark { font-size: .6rem; letter-spacing: .13em; color: var(--text-dim); }
:focus-visible { outline: 2px solid #f3d69d; outline-offset: 4px; }
.timer-card.alarm { animation: alarm-pulse 1.4s ease-in-out infinite; }
@keyframes alarm-pulse { 50% { border-color: var(--alarm); box-shadow: inset 0 0 0 5px #302b20, inset 0 0 0 6px #bd634b, 0 0 25px var(--alarm-glow); } }
@keyframes rec-blink { 50% { box-shadow: 0 0 10px currentColor; } }
@media (max-width: 600px) {
  #app { padding: 24px 16px 12px; }
  .header-panel { gap: 8px; }
  .header-copy { padding: 0; }
  .header-eyebrow { font-size: .5rem; letter-spacing: .18em; }
  .header-subtitle { font-size: .53rem; letter-spacing: .12em; }
  .console-caption { font-size: .53rem; letter-spacing: .07em; }
  .timer-card { width: 340px; }
  .add-timer-panel { gap: 9px; }
  .add-btn { padding: 13px 14px; }
  .io-btn { padding: 11px 10px; font-size: .6rem; }
  footer { flex-direction: column; align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
