/* Bear Creators — branding.md: Baloo 2 (600 headings, 500 buttons, 400
   body), Primary Brown actions, Warm Cream cards, Sage toggles, Off White
   page, Dark Cocoa text; status pairs always pastel + their deep ink. */
:root {
  --brown: #8C5A3C;
  --soft-brown: #A86E4B;
  --cream: #EFD5B2;
  --sage: #9BAF88;
  --page: #F8F6F2;
  --cocoa: #4A2E23;
  --deep-brown: #6B4423;
  --green-bg: #D9E5C9; --green: #3D5A28;
  --amber-bg: #F4D98A; --amber: #7A5410;
  --coral-bg: #F2B5A0; --coral: #8C3A1C;
  --blue-bg: #C8D4DC; --blue: #3E5260;
  --glass: rgba(255, 255, 255, 0.62);
  --line: rgba(74, 46, 35, 0.08);
  --radius: 22px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Baloo 2', -apple-system, system-ui, sans-serif;
  color: var(--cocoa);
  background:
    radial-gradient(1200px 600px at 10% -10%, #F3E7D3 0, transparent 60%),
    radial-gradient(900px 500px at 110% 10%, #E9EEDF 0, transparent 55%),
    var(--page);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.45;
}
[hidden] { display: none !important; }
h1, h2, h3 { font-weight: 600; margin: 0 0 6px; line-height: 1.2; }
h1 { font-size: 28px; } h2 { font-size: 22px; } h3 { font-size: 18px; }
p { margin: 0 0 10px; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; word-break: break-all; }
.muted { color: var(--deep-brown); }
.small { font-size: 13px; font-weight: 400; }
.hint { color: var(--deep-brown); font-size: 13px; margin: 6px 0 0; }
.error { color: var(--coral); font-weight: 500; min-height: 1.2em; margin: 0; }
.center { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.center-text { text-align: center; padding: 40px 0; }

.card {
  background: var(--glass);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(74, 46, 35, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 20px;
  margin-bottom: 16px;
}
.narrow { width: min(400px, 100%); display: grid; gap: 12px; }
.logo { width: 56px; height: 56px; }

label { display: grid; gap: 4px; font-weight: 500; font-size: 14px; margin-bottom: 12px; }
input, select, textarea {
  font: inherit; font-weight: 400; color: var(--cocoa);
  background: rgba(255, 255, 255, 0.8);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  border-radius: 14px; padding: 10px 12px; min-height: 44px; width: 100%;
  box-shadow: inset 0 0 0 1px var(--line);
}
input:focus, select:focus, textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--brown); }
fieldset { border: 0; padding: 0; margin: 0 0 12px; }
legend { font-weight: 500; font-size: 14px; margin-bottom: 6px; }
.prefix { display: flex; align-items: center; background: rgba(255,255,255,0.8); border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.prefix span { padding-left: 12px; color: var(--deep-brown); }
.prefix input { box-shadow: none; background: transparent; padding-left: 4px; }
.count { float: right; color: var(--deep-brown); font-weight: 400; font-size: 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .two { grid-template-columns: 1fr; } }

button, .button {
  font: inherit; font-weight: 500; cursor: pointer; border: 0;
  border-radius: 999px; min-height: 44px; padding: 0 20px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
button:disabled { opacity: 0.45; cursor: default; }
.primary { background: linear-gradient(135deg, #C9A882, var(--brown)); color: #fff; box-shadow: 0 8px 18px rgba(140, 90, 60, 0.28); }
.secondary, .button { background: rgba(255,255,255,0.75); color: var(--brown); box-shadow: inset 0 0 0 1.5px rgba(140, 90, 60, 0.25); }
.link { background: none; color: var(--brown); padding: 0 6px; min-height: 36px; }
.danger { color: var(--coral); }
.icon { background: rgba(255,255,255,0.7); width: 40px; height: 40px; min-height: 40px; padding: 0; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px; padding: 12px 20px;
  background: rgba(248, 246, 242, 0.82); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 18px; }
.brand img { width: 32px; height: 32px; }
nav { display: flex; gap: 4px; background: rgba(255,255,255,0.6); border-radius: 999px; padding: 4px; }
.tab { background: none; color: var(--cocoa); min-height: 38px; }
.tab.active { background: var(--brown); color: #fff; font-weight: 600; }
.me { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--deep-brown); font-size: 13px; }
.page { padding: 20px; max-width: 1180px; margin: 0 auto; }
.toolbar { display: flex; gap: 12px; margin-bottom: 16px; }
.toolbar input { max-width: 360px; }
.toolbar .primary { margin-left: auto; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.creator { cursor: pointer; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; margin: 0; transition: transform .12s; }
.creator:hover { transform: translateY(-2px); }
.creator .name { font-weight: 600; font-size: 17px; }
.creator .handle { color: var(--deep-brown); font-size: 13px; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.pill { font-size: 12px; font-weight: 500; border-radius: 999px; padding: 1px 10px; }
.pill.green { background: var(--green-bg); color: var(--green); }
.pill.amber { background: var(--amber-bg); color: var(--amber); }
.pill.blue { background: var(--blue-bg); color: var(--blue); }
.pill.coral { background: var(--coral-bg); color: var(--coral); }

/* The avatar exactly as the app draws it: the photo fills the circle, the
   white ring sits OUTSIDE it, and their bear overlaps bottom-right. */
.avatar { position: relative; flex: none; }
.avatar .ring { width: 100%; height: 100%; border-radius: 50%; padding: 3px; background: #fff; box-shadow: 0 6px 16px rgba(74,46,35,0.14); }
.avatar .face { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font-weight: 600; }
.avatar .face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar .bear { position: absolute; right: -2%; bottom: -2%; width: 38%; height: 38%; border-radius: 50%;
  background: var(--cream); box-shadow: 0 0 0 2.5px var(--page), 0 3px 8px rgba(74,46,35,0.18); overflow: hidden; }
.avatar .bear img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; transform: scale(1.12); }

.sheet-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(74, 46, 35, 0.32); display: grid; place-items: center; padding: 16px; }
.sheet { width: min(1120px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: var(--page); border-radius: 26px; box-shadow: 0 24px 60px rgba(74,46,35,0.3); overflow: hidden; }
.sheet-head, .sheet-foot { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { flex: 1; margin: 0; }
.sheet-foot { border-top: 1px solid var(--line); border-bottom: 0; }
.sheet-foot .error { flex: 1; }
.sheet-body { overflow: auto; padding: 20px; }
.ed-cols { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .ed-cols { grid-template-columns: 1fr; } }
.ed-side { position: sticky; top: 0; }
.photo-row { display: flex; gap: 18px; align-items: center; margin-bottom: 14px; }
.avatar-preview { width: 112px; height: 112px; }
.bears { display: flex; gap: 10px; flex-wrap: wrap; }
.bears button { width: 64px; height: 64px; padding: 4px; border-radius: 50%; background: var(--cream); box-shadow: inset 0 0 0 2px transparent; }
.bears button[aria-pressed="true"] { box-shadow: inset 0 0 0 3px var(--brown); }
.bears img { width: 100%; height: 100%; object-fit: contain; }
.toggles { display: flex; gap: 22px; flex-wrap: wrap; }
.toggle { display: flex; align-items: center; gap: 10px; margin: 0; cursor: pointer; }
.toggle input { appearance: none; width: 46px; height: 28px; min-height: 0; padding: 0; border-radius: 999px; background: rgba(74,46,35,0.14); position: relative; box-shadow: none; transition: background .15s; }
.toggle input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle input:checked { background: var(--sage); }
.toggle input:checked::after { left: 21px; }

.rows { list-style: none; margin: 10px 0 0; padding: 0; }
.rows li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.thumb { width: 48px; height: 48px; flex: none; border-radius: 12px; background: #fff; padding: 3px; }
.thumb img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 9px; }
.grow { flex: 1; min-width: 0; }
.grow .title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grow input { margin-top: 6px; min-height: 38px; padding: 6px 10px; font-size: 14px; }
.inline { display: flex; gap: 10px; }
.inline input { flex: 1; }
.stack { display: grid; gap: 8px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.swap { border: 1.5px solid rgba(255,255,255,0.9); background: rgba(255,255,255,0.5); border-radius: 18px; padding: 14px; margin-bottom: 12px; }
.swap-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: start; }
.swap-arrow { padding-top: 34px; color: var(--soft-brown); font-size: 22px; }
.side .product { display: flex; gap: 8px; align-items: center; margin-top: 6px; min-height: 48px; }
.side .product .title { font-size: 13px; line-height: 1.25; }
.swap .three { display: grid; grid-template-columns: 1fr 1fr 110px; gap: 10px; margin-top: 10px; }
@media (max-width: 640px) { .swap .three { grid-template-columns: 1fr; } }
.swap label { margin-bottom: 0; }
.swap .remove { float: right; }

/* The app preview: the creator welcome as it opens. */
.phone { background: linear-gradient(180deg, #F3E7D3, var(--page) 55%); border-radius: 28px; padding: 26px 18px 18px; text-align: center; border: 1.5px solid #fff; }
.phone .avatar { width: 116px; height: 116px; margin: 0 auto 14px; }
.phone .eyebrow { font-size: 14px; font-weight: 500; color: var(--soft-brown); }
.phone .head { font-size: 23px; font-weight: 600; line-height: 1.15; margin: 4px 0 6px; }
.phone .bio { font-size: 13.5px; color: var(--deep-brown); margin-bottom: 14px; }
.phone .paid { display: inline-block; font-size: 11.5px; font-weight: 500; background: var(--blue-bg); color: var(--blue); border-radius: 999px; padding: 1px 10px; margin-bottom: 12px; }
.phone .cta { margin-top: 14px; background: linear-gradient(135deg, #C9A882, var(--brown)); color: #fff; border-radius: 30px; padding: 12px; font-weight: 600; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 30;
  background: rgba(74,46,35,0.95); color: #fff; border-radius: 16px; padding: 12px 18px; font-weight: 500; max-width: calc(100% - 32px); }
