/* Remember Sticker. One bold thing per page: the yellow label-tape button. Everything else stays quiet. */

:root {
  --paper: #ffffff;
  --ink: #1d2430;
  --ink-soft: #5b6472;
  --rule: #dde1e7;
  --field: #f6f7f9;
  --tape: #ffd23f;
  --tape-edge: #e0b215;
  --ok: #1a7f4b;
  --warn: #b42318;
  --focus: #2563eb;
  --radius: 10px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15191f;
    --ink: #e8ebf0;
    --ink-soft: #a2aab6;
    --rule: #2c333d;
    --field: #1d232b;
    --tape-edge: #ffe27a;
    --ok: #4cc38a;
    --warn: #ff8a7a;
    --focus: #7aa7ff;
  }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); line-height: 1.5; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

.bar {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 40rem; margin: 0 auto; padding: 0.75rem 1rem;
}
.brand { font-weight: 700; text-decoration: none; letter-spacing: -0.01em; }
.page { max-width: 40rem; margin: 0 auto; padding: 0 1rem 3rem; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.875rem; }

.icon-button, .text-button {
  background: none; border: 0; color: inherit; cursor: pointer; padding: 0.5rem; border-radius: 8px;
  font: inherit;
}
.text-button { text-decoration: underline; padding: 0.25rem; }

/* The first-scan notice: the product explanation that also carries the Terms. */
.notice {
  border-left: 4px solid var(--tape); padding: 0.25rem 0 0.25rem 0.875rem; margin: 0.5rem 0 1rem;
}
.notice p { margin: 0 0 0.375rem; }
.notice-line { font-size: 0.875rem; color: var(--ink-soft); margin: 0.5rem 0 0; }

.note {
  display: block; width: 100%; min-height: 14rem; resize: vertical;
  font: inherit; font-size: 1.125rem; line-height: 1.55; color: var(--ink);
  background: var(--field); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 0.875rem 1rem;
}
.note-readonly { white-space: pre-wrap; overflow-wrap: anywhere; min-height: 0; }
.note-readonly:empty::before { content: "This sticker has no note yet."; color: var(--ink-soft); }

.status { font-size: 0.875rem; color: var(--ink-soft); margin: 0.375rem 0 0; min-height: 1.3em; }
.status.bad { color: var(--warn); font-weight: 600; }

.banner {
  border: 1px solid var(--warn); color: var(--warn); border-radius: var(--radius);
  padding: 0.75rem 1rem; margin: 1rem 0;
}
.banner p { margin: 0 0 0.5rem; }
.banner p:last-child { margin: 0; }

/* The button looks like a strip of label tape, because pressing it labels a moment. */
.log { margin-top: 2rem; }
.press {
  display: block; width: 100%; padding: 1.1rem 1rem; cursor: pointer;
  font: inherit; font-size: 1.375rem; font-weight: 800; letter-spacing: -0.01em; color: #1d2430;
  background: var(--tape); border: 0; border-bottom: 4px solid var(--tape-edge); border-radius: 4px;
  clip-path: polygon(0 6%, 2% 0, 98% 3%, 100% 0, 100% 94%, 98% 100%, 2% 97%, 0 100%);
}
.press:active { transform: translateY(2px); border-bottom-width: 2px; }
.press:disabled { opacity: 0.6; cursor: default; }
.press-hint { margin: 0.375rem 0 0; font-size: 0.875rem; color: var(--ink-soft); text-align: center; }

.recorded { margin-top: 1rem; padding: 0.75rem 1rem; background: var(--field); border-radius: var(--radius); }
.recorded p { margin: 0 0 0.5rem; font-weight: 600; }
.row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.row input[type="text"], .row input[type="email"] { flex: 1 1 12rem; }

.last { margin: 1.5rem 0 0.25rem; }
.last-ago { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin: 0; }
.last-when { margin: 0.125rem 0 0; color: var(--ink-soft); }
.last-note { margin: 0.25rem 0 0; }
.presses { list-style: none; padding: 0; margin: 1rem 0 0; border-top: 1px solid var(--rule); }
.presses li { padding: 0.5rem 0; border-bottom: 1px solid var(--rule); }
.presses .when { font-variant-numeric: tabular-nums; }
.presses .press-note { display: block; color: var(--ink-soft); overflow-wrap: anywhere; }

input[type="text"], input[type="email"], textarea.field {
  font: inherit; color: var(--ink); background: var(--field);
  border: 1px solid var(--rule); border-radius: 8px; padding: 0.5rem 0.75rem; width: 100%;
}
textarea.field { min-height: 8rem; resize: vertical; }
.button {
  font: inherit; font-weight: 600; cursor: pointer; border-radius: 8px; padding: 0.5rem 0.9rem;
  background: var(--ink); color: var(--paper); border: 1px solid var(--ink);
}
.button.secondary { background: transparent; color: var(--ink); border-color: var(--rule); }
.button:disabled { opacity: 0.6; cursor: default; }

label.switch { display: flex; gap: 0.75rem; align-items: center; cursor: pointer; }
label.switch input { width: 1.25rem; height: 1.25rem; }

footer.foot {
  margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--rule);
  display: flex; gap: 1rem; flex-wrap: wrap; align-items: baseline; font-size: 0.875rem; color: var(--ink-soft);
}
footer.foot .text-button { padding: 0; font-size: inherit; color: inherit; }
.ad { display: block; margin: 1.5rem auto 0; max-width: 20rem; }
.ad img { display: block; width: 100%; height: auto; }

dialog.sheet {
  width: min(32rem, calc(100% - 2rem)); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1rem 1.25rem 1.5rem; background: var(--paper); color: var(--ink);
}
dialog.sheet::backdrop { background: rgb(0 0 0 / 0.4); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.sheet-head h2 { margin: 0; font-size: 1.25rem; }
.sheet section { padding: 0.75rem 0; border-top: 1px solid var(--rule); }
.sheet section:first-child { border-top: 0; }
.sheet h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.sheet p { margin: 0 0 0.5rem; }

/* Pages outside the sticker: home, privacy, terms, My stickers. */
.prose { max-width: 38rem; }
.prose h1 { font-size: 2rem; letter-spacing: -0.02em; line-height: 1.15; }
.stack > * + * { margin-top: 0.75rem; }
.sticker-list { list-style: none; padding: 0; border-top: 1px solid var(--rule); }
.sticker-list li { border-bottom: 1px solid var(--rule); }
.sticker-list a { display: block; padding: 0.75rem 0; text-decoration: none; }
.sticker-list .title { font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
