:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #17191f;
  --muted: #6d7480;
  --line: #e3e5ea;
  --red: #ed1629;
  --green: #19a35b;
  --green-soft: #eaf8f0;
  --shadow: 0 12px 32px rgba(17, 20, 28, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

.page {
  width: min(100% - 28px, 680px);
  margin: 0 auto;
  padding: 18px 0 44px;
}

.header,
.queue-card,
.note-card,
.copy-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.header {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #fff;
  background: var(--red);
  font-size: 13px;
  font-weight: 850;
}

.brand strong {
  font-size: 18px;
}

.picker,
.note-picker {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.picker select,
.note-picker select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  outline: 0;
}

.picker select:focus,
.note-picker select:focus {
  border-color: var(--red);
}

.queue-card {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px 16px;
}

.queue-card p {
  margin: 0;
  color: #303640;
  font-size: 14px;
  line-height: 1.55;
}

.note-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 14px;
  padding: 14px;
}

.note-card img {
  width: 112px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
}

.note-card p {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 14px;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: clamp(24px, 5vw, 34px);
  line-height: 1.18;
  letter-spacing: 0;
}

.copy-card {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
}

.copy-button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-areas:
    "num title"
    "num desc";
  gap: 4px 12px;
  align-items: center;
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  text-align: left;
  color: var(--ink);
  background: #fff;
}

.copy-button span {
  grid-area: num;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  background: #202531;
  font-size: 17px;
  font-weight: 850;
}

.copy-button strong {
  grid-area: title;
  font-size: 20px;
}

.copy-button small {
  grid-area: desc;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.copy-button-primary {
  border-color: rgba(237, 22, 41, 0.32);
  background: #fff6f7;
}

.copy-button-primary span {
  background: var(--red);
}

.copy-button.is-done {
  border-color: #bce7cf;
  background: var(--green-soft);
}

.copy-button.is-done span {
  background: var(--green);
}

.next-button {
  min-height: 52px;
  border: 1px solid #202531;
  border-radius: 8px;
  color: #fff;
  background: #202531;
  font-size: 17px;
  font-weight: 850;
}

.next-button:disabled {
  border-color: #cfd3dc;
  color: #808792;
  background: #eef0f4;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 20;
  min-width: 150px;
  padding: 12px 16px;
  border-radius: 8px;
  color: #fff;
  background: #151922;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(14px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 560px) {
  .page {
    width: min(100% - 20px, 680px);
    padding-top: 10px;
  }

  .header {
    grid-template-columns: 1fr;
  }

  .note-card {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .note-card img {
    width: 84px;
  }

  .copy-button {
    min-height: 78px;
  }
}
