:root {
  color-scheme: dark;
  --bg: #0e1620;
  --surface: #17212b;
  --surface-raised: #1d2935;
  --surface-soft: #202d39;
  --line: rgba(219, 234, 248, .09);
  --text: #f3f6f8;
  --muted: #94a3b1;
  --blue: #70b7f3;
  --blue-strong: #459bdf;
  --gold: #f5c86b;
  --pink: #ef9ec7;
  --green: #65d6aa;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(800px 450px at 50% -220px, rgba(65, 143, 198, .24), transparent 72%),
    linear-gradient(180deg, #111c27, var(--bg) 440px);
  font-size: 14px;
  line-height: 1.45;
}
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid #81c8ff; outline-offset: 3px; }
a { color: inherit; }
.app-frame { width: min(1150px, 100%); margin: 0 auto; padding: 0 26px 30px; }
.topbar { display: flex; align-items: center; gap: 15px; height: 74px; }
.back-link {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.035);
  color: #bac7d2;
  font-size: 30px;
  line-height: 1;
  text-decoration: none;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 12px; color: white; background: linear-gradient(145deg, #72c8ff, #328cd3); box-shadow: 0 7px 20px rgba(46, 145, 214, .23); font-size: 20px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 13px; letter-spacing: -.01em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.mode-pill { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; padding: 8px 11px; border: 1px solid rgba(245, 200, 107, .2); border-radius: 999px; color: #e8cb91; background: rgba(245, 200, 107, .065); font-size: 9px; font-weight: 800; letter-spacing: .09em; }
.mode-pill span { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px rgba(245, 200, 107, .6); }
main { display: grid; gap: 17px; }
.profile-hero { position: relative; display: flex; min-height: 218px; align-items: center; justify-content: space-between; gap: 20px; overflow: hidden; padding: 34px 36px; border: 1px solid rgba(127, 178, 214, .15); border-radius: 25px; background: linear-gradient(115deg, #1b3345 0%, #1a2a39 48%, #1a2532 100%); box-shadow: 0 18px 45px rgba(0,0,0,.17); }
.hero-glow { position: absolute; width: 320px; height: 320px; border: 1px solid rgba(123, 192, 239, .09); border-radius: 50%; pointer-events: none; }
.hero-glow--one { top: -212px; right: 8%; box-shadow: 0 0 0 35px rgba(111, 182, 229, .025), 0 0 0 72px rgba(111, 182, 229, .02); }
.hero-glow--two { right: 10%; bottom: -270px; width: 230px; height: 230px; border-color: rgba(245, 200, 107, .12); }
.profile-main { position: relative; z-index: 1; display: flex; align-items: center; gap: 20px; min-width: 0; }
.avatar { display: grid; width: 90px; height: 90px; flex: 0 0 auto; place-items: center; border: 3px solid rgba(255,255,255,.74); border-radius: 50%; color: #fff; background: linear-gradient(145deg, #69b6e9, #347cac); box-shadow: 0 8px 26px rgba(0,0,0,.2); font-size: 37px; font-weight: 750; }
.profile-copy { min-width: 0; }
.profile-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.eyebrow { margin: 0; color: #89bfe5; font-size: 9px; font-weight: 850; letter-spacing: .15em; }
.identity-badge { display: inline-flex; align-items: center; padding: 4px 8px; border: 1px solid rgba(219,234,248,.13); border-radius: 999px; color: #becbd5; background: rgba(255,255,255,.055); font-size: 10px; font-weight: 700; }
.identity-badge.is-verified { border-color: rgba(101,214,170,.25); color: #a2e9cc; background: rgba(101,214,170,.09); }
.identity-badge.is-error { border-color: rgba(245,200,107,.25); color: #f3d390; background: rgba(245,200,107,.08); }
h1 { margin: 8px 0 2px; font-size: clamp(25px, 4vw, 34px); letter-spacing: -.045em; line-height: 1.15; }
.profile-handle { margin: 0; color: #a7bac9; font-size: 12px; }
.identity-status { max-width: 570px; margin: 12px 0 0; color: #95aab8; font-size: 11px; line-height: 1.5; }
.hero-caption { position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; max-width: 255px; padding: 13px 15px; border: 1px solid rgba(206,228,245,.1); border-radius: 15px; background: rgba(9,19,29,.28); }
.caption-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: var(--gold); background: rgba(245,200,107,.12); font-size: 18px; }
.hero-caption strong, .hero-caption small { display: block; }
.hero-caption strong { font-size: 11px; }
.hero-caption small { margin-top: 3px; color: #a0b2c0; font-size: 10px; line-height: 1.4; }
.disclosure { display: flex; align-items: flex-start; gap: 11px; padding: 13px 16px; border: 1px solid rgba(245,200,107,.18); border-radius: 14px; color: #dac99e; background: rgba(245,200,107,.055); }
.disclosure-icon { display: grid; width: 19px; height: 19px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(245,200,107,.54); border-radius: 50%; color: var(--gold); font-family: Georgia, serif; font-size: 12px; font-weight: 700; }
.disclosure p { margin: 0; font-size: 11px; line-height: 1.55; }
.disclosure strong { color: #f2dda9; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.stat-card { display: grid; grid-template-columns: 35px minmax(0,1fr); gap: 2px 11px; align-items: center; min-height: 89px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg, rgba(29,41,53,.96), rgba(22,32,43,.95)); }
.stat-icon { display: grid; width: 35px; height: 35px; grid-row: 1 / span 3; place-items: center; border-radius: 11px; font-size: 18px; }
.stat-icon--blue { color: #96d0f7; background: rgba(112,183,243,.12); }
.stat-icon--gold { color: var(--gold); background: rgba(245,200,107,.11); }
.stat-icon--pink { color: var(--pink); background: rgba(239,158,199,.12); }
.stat-label { color: #9eacb9; font-size: 10px; }
.stat-card strong { font-size: 15px; letter-spacing: -.02em; }
.stat-card small { color: #778796; font-size: 9px; line-height: 1.4; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.58fr) minmax(280px, .82fr); align-items: start; gap: 15px; }
.panel { min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: 19px; background: rgba(23,33,43,.94); box-shadow: 0 12px 35px rgba(0,0,0,.13); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.section-heading h2 { margin: 5px 0 0; font-size: 20px; letter-spacing: -.035em; }
.section-copy { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.catalog-count { margin-top: 4px; padding: 6px 9px; border: 1px solid rgba(112,183,243,.13); border-radius: 999px; color: #a9cbed; background: rgba(112,183,243,.07); font-size: 10px; white-space: nowrap; }
.catalog-tools { margin-top: 17px; }
.search-box { display: flex; height: 39px; align-items: center; gap: 9px; padding: 0 11px; border: 1px solid rgba(219,234,248,.08); border-radius: 11px; color: #718291; background: #121c26; }
.search-box > span { font-size: 22px; line-height: 1; }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 11px; }
.search-box input::placeholder { color: #70808e; }
.search-box:focus-within { border-color: rgba(112,183,243,.52); }
.category-list { display: flex; gap: 6px; overflow-x: auto; margin: 12px -2px 15px; padding: 0 2px 3px; scrollbar-width: thin; }
.category-button { padding: 7px 11px; border: 1px solid transparent; border-radius: 9px; color: #93a2af; background: transparent; cursor: pointer; font-size: 10px; white-space: nowrap; transition: .18s ease; }
.category-button:hover { color: var(--text); background: rgba(255,255,255,.045); }
.category-button.is-active { border-color: rgba(112,183,243,.16); color: #bfdef6; background: rgba(112,183,243,.1); }
.gift-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; }
.gift-card { position: relative; min-width: 0; overflow: hidden; padding: 12px 10px 10px; border: 1px solid rgba(219,234,248,.075); border-radius: 14px; background: linear-gradient(155deg, rgba(32,45,57,.82), rgba(26,38,49,.82)); transition: border-color .18s ease, transform .18s ease, background .18s ease; }
.gift-card:hover { transform: translateY(-2px); border-color: rgba(112,183,243,.24); }
.gift-card.is-selected { border-color: rgba(112,183,243,.66); background: linear-gradient(155deg, rgba(42,76,99,.62), rgba(27,47,62,.9)); box-shadow: inset 0 0 0 1px rgba(112,183,243,.13), 0 7px 18px rgba(34,112,165,.08); }
.gift-art { display: grid; height: 69px; place-items: center; border-radius: 10px; background: radial-gradient(circle at 50% 55%, var(--gift-glow, rgba(112,183,243,.17)), transparent 72%); font-size: 39px; filter: drop-shadow(0 5px 7px rgba(0,0,0,.18)); }
.gift-name { overflow: hidden; margin: 8px 0 2px; font-size: 11px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.gift-tag { display: block; overflow: hidden; color: #8698a6; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.select-button { width: 100%; margin-top: 9px; padding: 7px 6px; border: 1px solid rgba(219,234,248,.09); border-radius: 8px; color: #b9c7d2; background: rgba(255,255,255,.035); cursor: pointer; font-size: 9px; font-weight: 700; transition: .18s ease; }
.select-button:hover { border-color: rgba(112,183,243,.35); color: white; background: rgba(112,183,243,.1); }
.gift-card.is-selected .select-button { border-color: rgba(112,183,243,.2); color: #bfe1fb; background: rgba(112,183,243,.11); }
.gift-empty { grid-column: 1 / -1; padding: 28px 12px; color: var(--muted); text-align: center; font-size: 12px; }
.selection-panel { display: flex; align-items: center; gap: 11px; margin-top: 14px; padding: 11px; border: 1px solid rgba(112,183,243,.18); border-radius: 13px; background: rgba(58,123,166,.09); }
.selection-panel[hidden] { display: none; }
.selected-artwork { display: grid; width: 43px; height: 43px; flex: 0 0 auto; place-items: center; border-radius: 11px; background: rgba(112,183,243,.11); font-size: 24px; }
.selected-copy { display: grid; min-width: 0; gap: 3px; }
.selected-copy .eyebrow { font-size: 8px; }
.selected-copy strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.selected-copy small { color: #91a3b1; font-size: 9px; }
.primary-button { margin-left: auto; padding: 9px 12px; border: 1px solid rgba(123,198,247,.24); border-radius: 9px; color: #e9f6ff; background: linear-gradient(135deg, #4b9fd8, #3386c4); box-shadow: 0 5px 13px rgba(40,124,180,.18); cursor: pointer; font-size: 10px; font-weight: 750; transition: .18s ease; white-space: nowrap; }
.primary-button:hover { filter: brightness(1.09); transform: translateY(-1px); }
.collection-panel { position: sticky; top: 16px; }
.collection-heading { align-items: center; }
.collection-count { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid rgba(239,158,199,.15); border-radius: 10px; color: #f0b1d0; background: rgba(239,158,199,.09); font-size: 11px; font-weight: 800; }
.collection-intro { margin: 10px 0 14px; color: var(--muted); font-size: 10px; }
.collection-grid { display: grid; gap: 8px; }
.collection-empty { padding: 25px 14px; border: 1px dashed rgba(219,234,248,.13); border-radius: 13px; color: #91a2b0; text-align: center; }
.empty-art { margin-bottom: 7px; color: #d9bf7e; font-size: 26px; }
.collection-empty strong { display: block; color: #c6d0d9; font-size: 11px; }
.collection-empty p { margin: 5px 0 0; font-size: 10px; }
.collection-item { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 9px; border: 1px solid rgba(219,234,248,.075); border-radius: 12px; background: rgba(255,255,255,.025); }
.collection-art { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 10px; background: rgba(245,200,107,.09); font-size: 24px; }
.collection-item-copy { min-width: 0; }
.collection-item-copy strong, .collection-item-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.collection-item-copy strong { font-size: 10px; }
.collection-item-copy small { margin-top: 3px; color: #8e9eaa; font-size: 9px; }
.collection-actions { display: grid; gap: 4px; }
.mini-button { padding: 5px 7px; border: 1px solid transparent; border-radius: 7px; color: #a9bac7; background: rgba(255,255,255,.045); cursor: pointer; font-size: 9px; white-space: nowrap; }
.mini-button:hover { background: rgba(255,255,255,.1); color: white; }
.mini-button.is-featured { color: #f2d696; background: rgba(245,200,107,.1); }
.remove-button { color: #d49baa; }
.collection-footnote { display: flex; align-items: center; gap: 7px; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); color: #8295a4; font-size: 9px; }
.collection-footnote span { color: #a4bdd1; font-size: 13px; }
.page-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 3px; color: #718391; font-size: 9px; }
.page-footer a { color: #9bbbd2; text-decoration: none; }
.page-footer a:hover { color: white; }
.toast-region { position: fixed; z-index: 10; right: 20px; bottom: 20px; display: grid; gap: 8px; width: min(350px, calc(100vw - 32px)); pointer-events: none; }
.toast { padding: 12px 14px; border: 1px solid rgba(112,183,243,.22); border-radius: 12px; color: #e3edf4; background: rgba(25,39,51,.97); box-shadow: 0 12px 30px rgba(0,0,0,.3); font-size: 11px; animation: toast-in .2s ease-out; }
.toast.is-warning { border-color: rgba(245,200,107,.28); color: #eedcae; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 840px) {
  .content-grid { grid-template-columns: minmax(0, 1fr); }
  .collection-panel { position: static; }
  .collection-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hero-caption { max-width: 220px; }
}
@media (max-width: 600px) {
  .app-frame { padding: 0 13px 20px; }
  .topbar { height: 62px; gap: 9px; }
  .back-link { width: 34px; height: 34px; }
  .brand-mark { width: 33px; height: 33px; }
  .brand strong { font-size: 11px; }
  .brand small { font-size: 9px; }
  .mode-pill { gap: 6px; padding: 7px 8px; font-size: 8px; letter-spacing: .04em; }
  main { gap: 12px; }
  .profile-hero { min-height: auto; flex-direction: column; align-items: stretch; gap: 15px; padding: 20px 17px; border-radius: 19px; }
  .profile-main { gap: 13px; align-items: flex-start; }
  .avatar { width: 67px; height: 67px; border-width: 2px; font-size: 27px; }
  .profile-copy { padding-top: 3px; }
  h1 { font-size: 25px; }
  .profile-handle { font-size: 10px; line-height: 1.45; }
  .identity-status { margin-top: 8px; font-size: 10px; }
  .hero-caption { max-width: none; padding: 10px 12px; }
  .caption-icon { width: 30px; height: 30px; }
  .disclosure { gap: 9px; padding: 11px 12px; }
  .disclosure p { font-size: 10px; }
  .stats-grid { grid-template-columns: 1fr; gap: 8px; }
  .stat-card { min-height: 69px; padding: 10px 12px; }
  .stat-card small { font-size: 9px; }
  .panel { padding: 15px; border-radius: 16px; }
  .section-heading h2 { font-size: 18px; }
  .catalog-count { font-size: 9px; }
  .gift-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .gift-card { padding: 10px 9px 9px; }
  .gift-art { height: 59px; font-size: 35px; }
  .selection-panel { align-items: start; flex-wrap: wrap; }
  .selected-copy { padding-top: 3px; }
  .primary-button { width: 100%; margin-left: 0; }
  .collection-grid { grid-template-columns: 1fr; }
  .page-footer { align-items: flex-start; flex-direction: column; gap: 5px; padding: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
