/* Still · Circles v0 — shared skin. Paper cream, italic serif mark, system sans for UI. */
:root {
  color-scheme: light;
  --paper: #F7F3EC; --paper-deep: #EFE9DF; --ink: #2C2A26; --muted: #6B6560; --faint: #A39E96;
  --line: #D9D2C6; --stone: #C4A574; --stone-deep: #A8895A; --frame: #FFFCF7; --chip: #EDE6DA;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100vh; min-height: 100dvh;
  background: radial-gradient(ellipse at 28% 0%, #fff9f0 0%, transparent 55%),
              radial-gradient(ellipse at 82% 100%, #e8dfd0 0%, transparent 50%), var(--paper);
  color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased;
  display: flex; justify-content: center;
}
.frame {
  position: relative; width: 100%; max-width: 440px; min-height: 100vh; min-height: 100dvh;
  padding: 28px 24px 32px; display: flex; flex-direction: column; gap: 18px;
}
@media (min-width: 700px) {
  body { align-items: flex-start; padding: 40px 16px; }
  .frame {
    min-height: 0; max-width: 460px; padding: 36px 36px 32px; border: 1px solid var(--line); border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,252,247,0.92), rgba(247,243,236,0.98)), var(--frame);
    box-shadow: 0 18px 48px rgba(44,42,38,0.08), 0 1px 0 rgba(255,255,255,0.7) inset;
  }
}
.brand { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mark { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.9rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.tag { font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); font-weight: 500; }
h1, h2 { font-family: var(--serif); font-weight: 500; font-style: italic; margin: 0; color: var(--ink); }
h1 { font-size: 1.6rem; line-height: 1.2; }
h2 { font-size: 1.15rem; }
p { margin: 0; line-height: 1.5; }
.lede { color: var(--muted); font-size: 0.95rem; }
.small { font-size: 0.8rem; color: var(--faint); }
.center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; }
.spacer { flex: 1; }
[hidden] { display: none !important; }

label { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 6px; letter-spacing: 0.02em; }
input[type=text] {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: rgba(255,252,247,0.8);
  border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; outline: none;
}
input[type=text]:focus { border-color: var(--stone); box-shadow: 0 0 0 3px rgba(196,165,116,0.18); }
input.emoji { width: 72px; text-align: center; font-size: 1.3rem; padding: 10px; }
.field-row { display: flex; gap: 10px; align-items: flex-end; }
.field-row > .grow { flex: 1; min-width: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  font: inherit; font-size: 1rem; padding: 15px 20px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--stone); color: #FFFCF7; text-decoration: none; transition: background .2s, opacity .2s;
}
.btn:hover { background: var(--stone-deep); }
.btn:disabled { opacity: 0.45; cursor: default; background: var(--stone); }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--paper-deep); }
.btn.soft { background: var(--chip); color: var(--ink); font-family: var(--serif); font-style: italic; }
.link { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 0.82rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); cursor: pointer; }
.link:hover { color: var(--ink); }
.err { color: #8A5A44; font-size: 0.85rem; min-height: 1.2em; }

.card {
  background: rgba(255,252,247,0.75); border: 1px solid var(--line); border-radius: 18px; padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.chip { display: inline-block; background: var(--chip); color: var(--ink); font-family: var(--serif); font-style: italic; font-size: 0.98rem; padding: 4px 14px; border-radius: 999px; }
.foot { margin-top: auto; padding-top: 12px; text-align: center; font-size: 0.75rem; color: var(--faint); }

/* Dish: identical neutral presence stones, no owner, color or order. */
.dish {
  position: relative; height: 150px; border-radius: 50%; margin: 4px 8px;
  background: radial-gradient(ellipse at 50% 40%, #FBF7F0 0%, #F1EADF 60%, #E7DED0 100%);
  box-shadow: inset 0 6px 18px rgba(44,42,38,0.08), 0 1px 0 rgba(255,255,255,0.8);
  display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 8px 10px; padding: 26px 48px;
}
.pebble {
  width: 34px; height: 25px; border-radius: 50% 50% 48% 52% / 58% 56% 44% 42%;
  background: radial-gradient(ellipse at 35% 30%, #E9E3D9 0%, #CFC6B8 45%, #ADA393 100%);
  box-shadow: 0 3px 5px rgba(44,42,38,0.18); animation: settle .9s ease-out both;
}
@keyframes settle { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.dish-empty { font-family: var(--serif); font-style: italic; color: var(--faint); font-size: 0.95rem; }

/* Stones (casual): three real stones on cream; selection = thin warm ring. */
.stones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stone {
  appearance: none; border: 0; background: none; padding: 6px; cursor: pointer; border-radius: 50%;
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center; position: relative;
}
.stone img { width: 100%; height: auto; mix-blend-mode: multiply; pointer-events: none; }
.stone::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid transparent; transition: border-color .25s; }
.stone[aria-pressed=true]::after { border-color: var(--stone); }
.stone:focus-visible { outline: none; }
.stone:focus-visible::after { border-color: var(--line); }

/* Members */
.members { list-style: none; margin: 0; padding: 0; }
.members li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 0.95rem; }
.members li:first-child { border-top: 0; }
.members .emo { width: 28px; text-align: center; font-size: 1.15rem; }
.members .you { color: var(--faint); font-size: 0.78rem; }
.members .here { width: 8px; height: 8px; border-radius: 50%; background: #BDB3A3; }

/* Invite panel */
.qr { align-self: center; background: #FFFCF7; padding: 10px; border-radius: 12px; border: 1px solid var(--line); line-height: 0; }
.qr img, .qr svg { width: 168px; height: 168px; display: block; image-rendering: pixelated; }
.linkbox { font-size: 0.78rem; color: var(--muted); word-break: break-all; background: var(--paper-deep); border-radius: 10px; padding: 10px 12px; font-family: ui-monospace, Menlo, monospace; }

/* Hold: disc only. */
.hold { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 36px; background: var(--paper); z-index: 10; }
.disc { width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #FBF6EE 0%, #EDE4D6 55%, #DCCFBC 100%); box-shadow: 0 18px 40px rgba(44,42,38,0.10), inset 0 -6px 14px rgba(44,42,38,0.06); animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.thin { width: 160px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.thin > i { display: block; height: 100%; width: 0; background: var(--stone); }

/* Notes */
.notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.notes li { font-size: 0.95rem; line-height: 1.45; }
.notes .who { font-size: 0.76rem; color: var(--faint); margin-bottom: 2px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: var(--frame); font-size: 0.85rem; padding: 10px 16px; border-radius: 999px; opacity: 0; transition: opacity .3s; pointer-events: none; z-index: 20; }
.toast.on { opacity: 0.92; }

/* Slice 2: guess + reveal */
textarea.note-in {
  width: 100%; min-height: 72px; resize: vertical; box-sizing: border-box; font: inherit; font-size: 0.95rem; line-height: 1.45;
  color: var(--ink); background: rgba(255,252,247,0.9); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; outline: none;
}
textarea.note-in:focus { border-color: var(--stone); box-shadow: 0 0 0 3px rgba(196,165,116,0.18); }
.reveal-stone { width: 132px; align-self: center; }
.reveal-stone img { width: 100%; height: auto; mix-blend-mode: multiply; display: block; }
.mini-stone { width: 28px; height: 28px; vertical-align: middle; mix-blend-mode: multiply; }
.notes .mine .who { color: var(--muted); }

/* Browser-only UX: eyebrow, My Circles, invite links, A2HS nudge */
.eyebrow { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); font-weight: 500; margin: 0; }
.inv-links { justify-content: center; gap: 12px; }
.circles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.circles a {
  display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink);
  background: rgba(255,252,247,0.75); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; transition: background .2s;
}
.circles a:hover { background: var(--paper-deep); }
.circles .c-pebble { width: 22px; height: 16px; flex: none; border-radius: 50% 50% 48% 52% / 58% 56% 44% 42%; background: radial-gradient(ellipse at 35% 30%, #E9E3D9 0%, #CFC6B8 45%, #ADA393 100%); box-shadow: 0 2px 4px rgba(44,42,38,0.16); }
.circles .c-name { font-family: var(--serif); font-style: italic; font-size: 1.12rem; }
.circles .c-status { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.circles .c-go { margin-left: auto; color: var(--faint); font-size: 1.1rem; }
.a2hs { background: rgba(239,233,223,0.6); border-style: dashed; gap: 6px; padding: 14px 18px; }
.a2hs-title { font-family: var(--serif); font-style: italic; font-size: 1.02rem; }
.a2hs-how { color: var(--muted); line-height: 1.5; }
.a2hs-how b { font-weight: 600; color: var(--ink); }
.a2hs-acts { justify-content: flex-end; margin-top: 2px; }
.a2hs-acts .btn { width: auto; padding: 9px 16px; font-size: 0.92rem; }

/* Self-only daily SMS nudge */
.nudge { gap: 10px; }
.nudge-title { font-family: var(--serif); font-style: italic; font-size: 1.05rem; margin: 0; }
.nudge-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.85rem; color: var(--muted); line-height: 1.4; cursor: pointer; }
.nudge-consent input { margin-top: 3px; flex: none; accent-color: var(--stone); }
input[type=tel] {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: rgba(255,252,247,0.8);
  border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; outline: none;
}
input[type=tel]:focus { border-color: var(--stone); box-shadow: 0 0 0 3px rgba(196,165,116,0.18); }
