:root {
  --ink: #0f2744;
  --muted: #5a6b82;
  --panel: #ffffff;
  --accent: #1d4ed8;
  --accent-dark: #0b2a5b;
  --ok: #15803d;
  --bad: #b91c1c;
  --glow: rgba(37, 99, 235, 0.28);
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 20% 0%, #dbeafe 0%, transparent 55%),
    radial-gradient(900px 500px at 90% 10%, #e2e8f0 0%, transparent 50%),
    linear-gradient(180deg, #eef3f9 0%, #f7f4ee 100%);
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.lookup-panel {
  width: min(100%, 420px);
  background: var(--panel);
  border-radius: 22px;
  padding: 1.55rem 1.35rem 1.35rem;
  box-shadow: 0 22px 60px rgba(15, 39, 68, 0.16);
  position: relative;
  z-index: 1;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.85rem;
}

.brand-mark {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 0.35rem;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: lowercase;
}

h1 {
  margin: 0 0 0.55rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 4vw, 1.9rem);
  line-height: 1.15;
  color: var(--accent-dark);
  font-weight: 700;
}

.lookup-copy {
  margin: 0 0 1.15rem;
  color: var(--muted);
  line-height: 1.4;
  font-size: 0.95rem;
}

.duo {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.duo-de, .duo-en { display: block; }

label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.55rem;
  color: var(--ink);
}

.lookup-code-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 0.95rem;
}

.lookup-code-row input {
  width: 100%;
  border: 1.5px solid #d5deea;
  border-radius: 14px;
  padding: 0.85rem 0.7rem;
  font-size: 1.2rem;
  text-align: center;
  letter-spacing: 0.12em;
  outline: none;
  background: #fbfcfe;
}

.lookup-code-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.18);
}

.lookup-code-dash {
  color: #94a3b8;
  font-size: 1.4rem;
  font-weight: 700;
}

button[type="submit"], .answer-yes, .answer-no, .modal-close {
  font: inherit;
  cursor: pointer;
}

button[type="submit"] {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 0.95rem 1rem;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
}

button[type="submit"]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.lookup-message {
  margin: 0.85rem 0 0;
  color: var(--bad);
  font-size: 0.92rem;
}

.lookup-security {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.lookup-security i {
  color: var(--ok);
  font-style: normal;
}

.lookup-challenge {
  display: block;
  margin-top: 0.85rem;
}

.lookup-challenge input {
  margin-top: 0.4rem;
  width: 100%;
  border: 1.5px solid #d5deea;
  border-radius: 12px;
  padding: 0.7rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.45);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 20;
}

.detail-modal {
  width: min(100%, 440px);
  max-height: min(92vh, 820px);
  overflow: auto;
  background: #fff;
  border-radius: 20px;
  padding: 1.2rem 1.15rem 1.35rem;
  position: relative;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.modal-close {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  color: #64748b;
}

.modal-status {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin: 0.3rem 0 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
}

.modal-status.is-valid { background: #ecfdf5; color: #065f46; }
.modal-status.is-expired { background: #fef2f2; color: #991b1b; }
.modal-status > span {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: currentColor;
  color: #fff;
}
.modal-status.is-valid > span { background: var(--ok); }
.modal-status.is-expired > span { background: var(--bad); }

.verify-code-frame {
  border: 1.5px solid #dbe3ef;
  border-radius: 14px;
  padding: 0.8rem;
  text-align: center;
  margin-bottom: 0.9rem;
}

.verify-code-frame-label { display: block; color: var(--muted); font-size: 0.8rem; }
.verify-code-frame-value { display: block; font-size: 1.55rem; letter-spacing: 0.08em; margin: 0.2rem 0; }
.verify-code-frame-meta { color: var(--muted); font-size: 0.85rem; }

.modal-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 0.8rem 0 1rem;
}

.modal-details div {
  background: #f8fafc;
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
}

.modal-details dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.modal-details dd {
  margin: 0.2rem 0 0;
  font-weight: 700;
}

.tag-product-image {
  margin: 0.5rem 0 0.8rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.tag-product-image img {
  display: block;
  width: 100%;
  height: auto;
}

.works-question {
  margin-top: 0.6rem;
  padding-top: 0.8rem;
  border-top: 1px solid #eef2f7;
}

.works-question strong { display: block; margin-bottom: 0.55rem; }

.works-question > div {
  display: grid;
  gap: 0.45rem;
}

.answer-yes, .answer-no {
  border: 0;
  border-radius: 12px;
  padding: 0.75rem;
  font-weight: 650;
}

.answer-yes { background: #dcfce7; color: #166534; }
.answer-no { background: #fee2e2; color: #991b1b; }

.feedback-saved {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 12px;
  background: #f1f5f9;
}

.reason-list {
  display: grid;
  gap: 0.4rem;
  margin: 0.6rem 0;
}

.reason-list button {
  text-align: left;
  border: 1px solid #dbe3ef;
  background: #fff;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
}

.reason-list button.is-selected {
  border-color: var(--accent);
  background: #eff6ff;
}

.custom-reason {
  width: 100%;
  min-height: 4rem;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  padding: 0.65rem;
  font: inherit;
  resize: vertical;
}

.host-badge {
  margin-top: 0.85rem;
  font-size: 0.72rem;
  color: #94a3b8;
  text-align: center;
}

.design-showcase {
  margin-top: 1.15rem;
  display: grid;
  gap: 0.75rem;
}

.design-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.design-pair figure {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.design-pair img {
  display: block;
  width: 100%;
  aspect-ratio: 54 / 28.6;
  object-fit: cover;
}

.design-pair figcaption {
  padding: 0.35rem 0.45rem 0.45rem;
  font-size: 0.68rem;
  color: #64748b;
  text-align: center;
}
