/* ===== EgoTV_Kai · link-in-bio v0.7 (slimmer 360x792, square corners) ===== */
:root {
  --cream:   #f4efde;
  --blue:    #1428d9;
  --yellow:  #fff600;
  --lime:    #f0ff00;
  --ink:     #0f0e2a;
  --orange:  #ff5733;
  --surface: #ffffff;
  --tint:    #f0f3fe;
  --hero-bg: #e2e8fa;
  --hero-grid:#b6c2ee;
  --muted:   #6b7280;
  --label:   #80869b;
  --note-bd: #dce0f3;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: "Inter", "Noto Sans SC", system-ui, sans-serif;
  color: var(--ink);
  background-color: var(--cream);
  background-image: radial-gradient(#bcc7ee 1.3px, transparent 1.3px);
  background-size: 30px 30px;
  -webkit-font-smoothing: antialiased;
}

.stage {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* ===== Card — fixed-height slim portrait (360 x 792, square corners) ===== */
.card {
  width: 100%;
  max-width: 360px;
  height: 792px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 18px 40px -16px rgba(20, 40, 217, 0.18);

  /* hidden until the 3D model is ready, then rises in (see index.html script) */
  opacity: 0;
  transform: translateY(100px);
  transition: opacity .85s ease, transform .85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.card.is-ready {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .card { transform: none; transition: opacity .4s ease; }
}

/* ===== Hero (blueprint, fixed) — grid + 3D object only ===== */
.hero {
  position: relative;
  flex: 0 0 267px;
  background-color: var(--hero-bg);
  background-image:
    linear-gradient(to right, var(--hero-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--hero-grid) 1px, transparent 1px);
  background-size: 18px 18px;
  border-bottom: 1.5px dashed rgba(20, 40, 217, 0.5);
}

/* GLB model viewer — fills the hero, transparent over the blueprint grid */
.hero-model {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  --poster-color: transparent;
  background-color: transparent;
  cursor: grab;
}
.hero-model:active { cursor: grabbing; }
/* hide model-viewer's built-in top loading bar (the brief "scrollbar" on load) */
.hero-model::part(default-progress-bar) { display: none; }

/* user's hand-made "my cat" vector (SVG), lower-right of hero, over the model */
.hero-tag {
  position: absolute;
  right: 17px;
  bottom: 16px;
  width: 50px;
  height: auto;
  pointer-events: none;
  z-index: 2;
}

/* ===== Note area + inset note card (fills remaining height) ===== */
.note-area {
  flex: 1 1 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.note {
  flex: 1 1 auto;
  padding: 0;                       /* frame removed — content sits at note-area inset */
  display: flex;
  flex-direction: column;
  justify-content: space-between;   /* top group up, bottom group down */
}
.note-top    { display: flex; flex-direction: column; gap: 16px; }
.note-bottom { display: flex; flex-direction: column; gap: 16px; }

.pill {
  align-self: flex-start;
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.5px;
  color: #fff;
  background: var(--blue);
  padding: 3px 10px;
  border-radius: 14px;
}

.bio { display: flex; flex-direction: column; gap: 9px; }
.bio__zh   { font-family: "Noto Sans SC", sans-serif; font-size: 13px; line-height: 2.0; color: var(--muted); }
.bio__mono { font-family: "Space Mono", monospace; font-size: 11.5px; line-height: 1.65; color: var(--muted); }

.group { display: flex; flex-direction: column; gap: 8px; }
.group__label {
  font-family: "Noto Sans SC", sans-serif;
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.21px;
  color: var(--label);
}

/* button rows: left-aligned, do NOT stretch full width */
.row { display: flex; gap: 10px; justify-content: flex-start; }
/* equal-width buttons that share the row (我的频道: 3 同宽按钮) */
.row--equal .btn { flex: 1 1 0; width: auto; min-width: 0; }

/* small flat pill buttons (124 x 28) */
.btn {
  width: 124px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 9px;
  border-radius: 10px;
  background: var(--tint);
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover {
  background: #e7ecfd;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px -6px rgba(20, 40, 217, 0.35);
}
.btn__label { font-family: "Noto Sans SC", "Inter", sans-serif; font-weight: 700; font-size: 12.5px; color: var(--ink); }
.btn--store { width: auto; }   /* longer label: 商店和免费分享 */

.chip {
  flex: 0 0 auto;
  width: 12px; height: 12px;
  border-radius: 50%;
}
.chip--bili   { background: #18a5df; }
.chip--red    { background: #fe0808; }
.chip--douyin { background: #000000; }   /* 抖音黑 */
.chip--store  { background: #8262dc; }

/* ===== A — mobile reflow (phones): natural height, wrapping buttons ===== */
@media (max-width: 480px) {
  .stage { padding: 20px 14px; }
  .card  { height: auto; zoom: 0.85; }  /* hug content; 15% smaller so it fits without scrolling */
  .note  { justify-content: flex-start; gap: 24px; }
  .row   { flex-wrap: wrap; }           /* social buttons wrap if too tight */
}
