﻿:root {
  font-family: system-ui, sans-serif;
  color: #f5f5f4;
  background: #171717;
  color-scheme: dark;
  font-synthesis: none;
  line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; }
main {
  max-width: 960px;
  margin: auto;
  padding: 24px max(16px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.page-header, .toolbar, .actions { display: flex; align-items: center; gap: 12px; }
.page-header, .toolbar { justify-content: space-between; }
.page-header { padding-bottom: 20px; border-bottom: 1px solid #404040; }
h1 { font-size: 22px; line-height: 1.25; margin: 0; font-weight: 650; }
h2 { font-size: 18px; line-height: 1.35; margin: 0 0 20px; font-weight: 650; }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
input, button { font: inherit; color: inherit; border: 1px solid #737373; border-radius: 6px; min-height: 48px; }
input { display: block; width: 100%; min-width: 0; padding: 10px 12px; background: #262626; }
input::placeholder { color: #a3a3a3; }
button { padding: 10px 16px; background: #262626; cursor: pointer; touch-action: manipulation; font-weight: 600; }
button:hover { background: #333333; }
button[type=submit] { background: #e7e5e4; color: #1c1917; border-color: #e7e5e4; }
button[type=submit]:hover { background: #d6d3d1; }
button:disabled { opacity: .5; cursor: wait; }
input:focus-visible, button:focus-visible { outline: 3px solid #5eead4; outline-offset: 3px; }
.quiet { border-color: transparent; background: transparent; white-space: nowrap; }
.panel { padding: 24px; border: 1px solid #404040; border-radius: 8px; background: #262626; }
#login { max-width: 420px; margin: 32px auto; }
.help { color: #bdbdbd; margin: -4px 0 24px; }
#login button { width: 100%; margin-top: 20px; }
#login #use-passkey { margin-top: 0; background: #e7e5e4; color: #1c1917; }
#login .passkey-help { margin: 12px 0 24px; }
.remember-choice { display: flex; align-items: center; gap: 12px; min-height: 48px; margin: 12px 0 0; font-weight: 400; }
.remember-choice input { width: 20px; min-height: 20px; height: 20px; flex-shrink: 0; accent-color: #e7e5e4; }
#passkey-settings { border-top: 1px solid #404040; margin-top: 24px; padding-top: 12px; }
#passkey-settings summary { padding: 12px 0; cursor: pointer; min-height: 48px; }
#passkey-settings .help { font-size: 14px; margin: 8px 0 16px; }
#passkey-management button { width: 100%; margin-bottom: 12px; }
summary:focus-visible { outline: 3px solid #5eead4; outline-offset: 3px; }
#workspace { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; margin-top: 24px; align-items: start; }
.fields { display: grid; gap: 16px; }
.quantity-spinner { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; gap: 8px; }
.quantity-spinner button { padding: 0; font-size: 24px; }
#quantity { text-align: center; font-variant-numeric: tabular-nums; appearance: textfield; -moz-appearance: textfield; }
#quantity::-webkit-inner-spin-button, #quantity::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.editor-actions { margin-top: 20px; flex-wrap: wrap; }
.editor-actions button { flex: 1 1 auto; }
.toolbar { margin-bottom: 20px; }
.toolbar h2 { margin: 0; }
#message:empty { display: none; }
#message { padding: 12px 16px; margin: 16px 0; background: #351d25; color: #fda4af; border-left: 3px solid #fda4af; overflow-wrap: anywhere; }
#summary { color: #bdbdbd; font-size: 14px; margin: 16px 0; }
ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid #404040; }
li { padding: 16px 0; border-bottom: 1px solid #404040; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
li strong { font-size: 16px; font-variant-numeric: tabular-nums; }
li p { margin: 4px 0 0; color: #bdbdbd; font-size: 14px; }
li .actions { gap: 8px; flex-shrink: 0; }
li button { padding-inline: 14px; }
.danger { color: #fda4af; border-color: #85404d; }
.danger:hover { background: #351d25; }
#empty { padding: 24px 0; color: #bdbdbd; text-align: center; border-bottom: 1px solid #404040; }
dialog { width: 360px; max-width: calc(100% - 32px); border: 1px solid #737373; border-radius: 8px; padding: 24px; color: inherit; background: #262626; }
dialog::backdrop { background: #000a; }
dialog form { margin: 0; }
dialog .actions { justify-content: flex-end; margin-top: 24px; }
[hidden] { display: none !important; }
@media (max-width: 700px) {
  #workspace { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .fields { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .panel { padding: 20px 16px; }
  .editor-actions button[type=submit] { flex-grow: 2; }
  h1 { font-size: 20px; }
}
@media (max-width: 360px) {
  .page-header { align-items: flex-start; gap: 8px; }
  li { flex-wrap: wrap; gap: 12px; }
  li .actions { width: 100%; }
  li button { flex: 1; }
}

