:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.4;
  background: #f4f7fb;
  color: #1d293d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: #4f6b95;
}

h1,
h2,
p {
  margin-top: 0;
}

.intro,
.helper {
  color: #5e6d84;
}

.panel {
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  margin-top: 18px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.panel-header,
.inline-form,
.field.compact {
  display: flex;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
}

.inline-form {
  flex-wrap: wrap;
}

.field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

input,
select,
textarea,
button {
  font: inherit;
  border-radius: 10px;
  border: 1px solid #cdd6e3;
  padding: 10px 12px;
}

button {
  background: #1d5ddf;
  color: #fff;
  border: none;
  cursor: pointer;
}

button:hover {
  background: #174ebd;
}

.pill-list,
.trade-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 12px 0 0;
  list-style: none;
}

.pill,
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  background: #edf3ff;
  color: #2854a8;
  font-size: 0.9rem;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.progress-label {
  font-family: "Courier New", Courier, monospace;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #1d293d;
}

.progress-counts {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.8rem;
  color: #4f6b95;
}

.progress-bar-wrap {
  margin: 10px 0 6px;
  height: 8px;
  background: #e4eaf3;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: #1d293d;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.progress-footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.progress-extras {
  font-size: 0.8rem;
  color: #1a7a3a;
  font-family: "Courier New", Courier, monospace;
}

.progress-pct {
  font-size: 0.8rem;
  color: #4f6b95;
  font-family: "Courier New", Courier, monospace;
}

.progress-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.bulk-stick-form {
  display: flex;
  gap: 6px;
  flex: 1;
  min-width: 200px;
}

.bulk-stick-input {
  flex: 1;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.8rem;
  padding: 7px 10px;
  border: 1px solid #d0daea;
  border-radius: 8px;
  min-width: 0;
}

.btn-secondary {
  background: #f1f5fb;
  color: #1d293d;
  border: 1px solid #d0daea;
  font-size: 0.8rem;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: "Courier New", Courier, monospace;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-secondary:hover {
  background: #e2eaf5;
  border-color: #adbdd4;
}

.sticker-section {
  margin-top: 20px;
}

details > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

details > summary::-webkit-details-marker {
  display: none;
}

.section-header {
  color: #1d293d;
  padding: 10px 16px 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Courier New", Courier, monospace;
  font-weight: 700;
  letter-spacing: 0.05em;
  border: 1px solid #c8d4e4;
  border-bottom: none;
  background:
    linear-gradient(#1d293d, #1d293d) bottom left / var(--section-progress, 0%) 3px no-repeat,
    linear-gradient(#e4eaf3, #e4eaf3) bottom / 100% 3px no-repeat;
}

.section-header::after {
  content: "▶";
  font-size: 0.7rem;
  opacity: 0.35;
  margin-left: 8px;
}

details[open] > .section-header::after {
  content: "▼";
}


.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-pagenum {
  font-size: 0.8rem;
  opacity: 0.55;
  min-width: 1.8em;
  text-align: right;
  flex-shrink: 0;
}

.section-name {
  font-size: 1rem;
  text-transform: uppercase;
}

.sort-toggle {
  font-size: 0.8rem;
  padding: 6px 10px;
  flex-shrink: 0;
  align-self: flex-end;
}

.section-stats {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-stat-sticked {
  font-size: 0.85rem;
  opacity: 0.9;
}

.section-stat-have {
  font-size: 0.75rem;
  opacity: 0.7;
}

.section-stat-extra {
  font-size: 0.75rem;
  color: #1a7a3a;
}

.section-range {
  font-size: 0.75rem;
  opacity: 0.45;
}

.sticker-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 8px;
  padding: 10px 0 4px;
}

.sticker-cards--album {
  grid-template-columns: repeat(4, 1fr) 24px repeat(4, 1fr);
  grid-template-rows: repeat(3, auto);
}

.album-gutter {
  grid-column: 5;
  grid-row: 1 / span 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.album-gutter::after {
  content: "";
  display: block;
  width: 1px;
  height: 100%;
  background: #e4eaf3;
}

.album-placeholder {
  border-radius: 6px;
  background: #f4f7fb;
  border: 2px dashed #e4eaf3;
  min-height: 100px;
}

.sticker-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-radius: 6px;
  padding: 12px 10px 10px;
  background: #fff;
  font-family: "Courier New", Courier, monospace;
  border: 2px dashed #c8d4e4;
  gap: 4px;
}

.sticker-card--have {
  border: 2px solid #1d5ddf;
}

.sticker-card--sticked {
  border: 3px solid #1d293d;
}

.sticker-card--extra {
  border: 2px solid #1a7a3a;
}

.card-code {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
  color: #1d293d;
}

.sticker-card--extra .card-code {
  color: #1a7a3a;
}

.card-name {
  font-size: 0.7rem;
  color: #5e6d84;
  line-height: 1.25;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sticker-card--extra .card-name {
  color: #2a8a4a;
}

.card-count {
  font-size: 0.85rem;
  font-weight: 700;
  color: #4f6b95;
  min-height: 1.2em;
}

.card-count--empty {
  min-height: 1.2em;
}

.sticker-card--extra .card-count {
  color: #1a7a3a;
}

.card-controls {
  display: flex;
  gap: 6px;
  width: 100%;
  margin-top: 4px;
}

.card-btn {
  flex: 1;
  padding: 7px 4px;
  font-size: 1.05rem;
  line-height: 1;
  border-radius: 8px;
  border: 1px solid #d0daea;
  background: #f1f5fb;
  color: #1d293d;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}

.card-btn:hover {
  background: #e2eaf5;
  border-color: #adbdd4;
}

.card-btn--stick {
  width: 100%;
  height: 38px;
  flex-shrink: 0;
  padding: 0 4px;
  font-size: 0.85rem;
  font-family: inherit;
  background: #f1f5fb;
  color: #4f6b95;
  border: 1px solid #d0daea;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

.card-btn--stick:hover:not(:disabled) {
  background: #e2eaf5;
  border-color: #adbdd4;
}

.card-btn--stick-active {
  background: #edf3ff;
  color: #2854a8;
  border-color: #b8cdf5;
  font-weight: 500;
}

.card-btn--stick-active:hover:not(:disabled) {
  background: #dce8ff;
}

.card-btn--stick:disabled,
.card-btn--minus:disabled {
  opacity: 0.35;
  cursor: default;
}


.card-status {
  font-size: 0.68rem;
  color: #6d7a90;
  letter-spacing: 0.02em;
  margin-top: 2px;
}

.sticker-card--extra .card-status {
  color: #1a7a3a;
}


.status {
  margin-top: 18px;
}

.muted {
  color: #6d7a90;
}

code {
  background: #f1f5fb;
  padding: 2px 6px;
  border-radius: 6px;
}

@media (max-width: 700px) {
  .panel-header,
  .inline-form {
    align-items: stretch;
    flex-direction: column;
  }
}
