:root {
  --ink: #15141A;
  --ink-2: #3E3D48;
  --muted: #5B5A66;
  --line: #E6E5EC;
  --line-2: #D9D8E0;
  --ground: #FBFBFD;
  --card: #FFFFFF;
  --soft: #F1F0F5;
  --pink: #D61F5A;
  --pink-ink: #A0124A;
  --pink-soft: #FDE7EF;
  --yellow-soft: #FFF6D6;
  --yellow-line: #F0D98A;
  --radius: 18px;
  --display: "Dela Gothic One", "Hiragino Sans", "PingFang SC", sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Hiragino Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5; }
a { color: var(--ink); }
a:hover { color: #C2185B; }
img { max-width: 100%; display: block; }
h1, h2, .display { font-family: var(--display); font-weight: 400; letter-spacing: -0.3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* header */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; padding-top: 12px; padding-bottom: 12px; }
.logo { font-family: var(--display); font-size: 24px; text-decoration: none; }
.logo span { color: var(--pink); }
.main-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-weight: 700; font-size: 15px; flex: 1 1 auto; }
.main-nav a { text-decoration: none; }
.main-nav a[aria-current="page"] { color: #C2185B; }
.head-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lang-select { height: 40px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 8px; font: 700 14px var(--body); background: var(--card); color: var(--ink); }
.credit-pill { height: 40px; padding: 0 14px; border-radius: 10px; background: var(--pink-soft); color: var(--pink-ink); font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; text-decoration: none; }

/* buttons + inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1.5px solid var(--ink); background: var(--card); color: var(--ink); font: 800 15px var(--body); text-decoration: none; cursor: pointer; }
.btn:hover { color: var(--ink); background: var(--soft); }
.btn-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-dark:hover { background: #2B2A33; color: #fff; }
.btn-pink { background: var(--pink); color: #fff; border-color: var(--pink); }
.btn-pink:hover { background: #BB1A4E; color: #fff; }
.btn-big { min-height: 54px; padding: 0 28px; border-radius: 14px; font-size: 16px; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; border-width: 1px; border-color: var(--line-2); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.input, textarea.input, select.input { width: 100%; min-height: 46px; border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 14px; font: 500 15px var(--body); color: var(--ink); background: var(--card); }
textarea.input { resize: vertical; min-height: 84px; }
.input:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid #F5A3BF; outline-offset: 1px; }
.lbl { font-size: 13px; font-weight: 800; display: block; margin-bottom: 6px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--card); color: var(--ink); font: 700 14px var(--body); display: inline-flex; align-items: center; text-decoration: none; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* hero */
.hero { display: flex; flex-wrap: wrap; gap: 44px; align-items: center; padding: 64px 0 48px; }
.hero-text { flex: 1 1 460px; min-width: 0; }
.badge { display: inline-flex; padding: 6px 12px; border-radius: 999px; background: var(--pink-soft); color: var(--pink-ink); font-weight: 800; font-size: 13px; }
.hero h1 { font-size: clamp(38px, 6vw, 60px); line-height: 1.06; margin: 18px 0; }
.lead { font-size: 18px; color: #4E4D59; margin: 0 0 26px; max-width: 540px; }
.search-row { display: flex; flex-wrap: wrap; gap: 10px; max-width: 560px; }
.search-row .input { flex: 1 1 260px; min-height: 56px; border: 1.5px solid var(--ink); border-radius: 14px; font-size: 16px; }
.hero-grid { flex: 1 1 380px; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hero-tile { aspect-ratio: 1; border-radius: 22px; border: 2px solid var(--ink); overflow: hidden; position: relative; }
.hero-tile img { width: 100%; height: 100%; object-fit: cover; }
.hero-tile span { position: absolute; left: 8px; bottom: 8px; font-weight: 800; font-size: 12px; background: rgba(255,255,255,.85); padding: 2px 8px; border-radius: 6px; }

/* sections */
.section { padding: 28px 0 56px; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 34px); margin: 0; }
.dark-band { background: var(--ink); color: #fff; }
.dark-band h2 { margin: 0 0 30px; font-size: clamp(26px, 3.4vw, 34px); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; padding-bottom: 8px; }
.step { border: 1px solid #3A3944; border-radius: 20px; padding: 26px; }
.step .n { font-family: var(--display); font-size: 38px; color: #FF7AA2; }
.step h3 { font-size: 19px; margin: 12px 0 6px; }
.step p { margin: 0; color: #C9C8D3; font-size: 15px; }

/* cards */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.grid-lg { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.card:hover { color: var(--ink); border-color: var(--line-2); box-shadow: 0 2px 10px rgba(21,20,26,.06); }
.thumb { aspect-ratio: 3 / 4; background: var(--soft); position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.thumb.square { aspect-ratio: 1; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .initial { font-family: var(--display); font-size: 44px; color: rgba(21,20,26,.55); }
.thumb .tag { position: absolute; left: 10px; bottom: 10px; font-size: 11px; font-weight: 700; color: var(--ink-2); background: rgba(255,255,255,.85); padding: 3px 8px; border-radius: 6px; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.card-title { font-weight: 800; font-size: 15px; }
.card-sub { font-size: 13px; color: var(--muted); }
.checker { background-color: #fff; background-image: linear-gradient(45deg,#ECEBF1 25%,transparent 25%),linear-gradient(-45deg,#ECEBF1 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ECEBF1 75%),linear-gradient(-45deg,transparent 75%,#ECEBF1 75%); background-size: 20px 20px; background-position: 0 0,0 10px,10px -10px,-10px 0; }
.checker img { object-fit: contain; }

/* character page */
.crumbs { font-size: 14px; color: var(--muted); padding: 22px 0 18px; }
.two-col { display: flex; flex-wrap: wrap; gap: 30px; align-items: flex-start; }
.side { flex: 1 1 300px; max-width: 400px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.main-col { flex: 999 1 540px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.portrait { aspect-ratio: 3 / 4; border-radius: 24px; border: 2px solid var(--ink); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait .initial { font-family: var(--display); font-size: 80px; color: rgba(21,20,26,.5); }
.side h1 { font-size: 40px; margin: 0; line-height: 1.1; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.panel h2 { font-family: var(--body); font-weight: 800; font-size: 20px; margin: 0; letter-spacing: 0; }
.seg { display: flex; background: var(--soft); border-radius: 14px; padding: 4px; max-width: 520px; }
.seg button { flex: 1; white-space: nowrap; min-height: 44px; border: 0; border-radius: 11px; background: transparent; font: 700 14px var(--body); color: #4E4D59; cursor: pointer; padding: 0 10px; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); font-weight: 800; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.row-top { align-items: flex-start; }
.grow { flex: 1 1 260px; min-width: 0; }
.drop { min-height: 84px; width: 100%; border: 1.5px dashed #A9A8B4; border-radius: 12px; background: var(--ground); font: 700 14px var(--body); color: #4E4D59; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; padding: 10px; text-align: center; }
.drop:hover { border-color: var(--ink); }
.ref-box { flex: 0 1 230px; min-width: 200px; }
.ref-preview { display: flex; gap: 10px; align-items: center; }
.ref-preview img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.notice { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--yellow-soft); border: 1px solid var(--yellow-line); font-size: 14px; }
.error-box { padding: 12px 14px; border-radius: 12px; background: #FDECEC; color: #8E1B1B; font-size: 14px; font-weight: 700; }
.error-box:empty { display: none; }
.trait { padding: 5px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line-2); font-size: 13px; font-weight: 700; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.check input { width: 18px; height: 18px; accent-color: var(--pink); }

/* result tiles */
.result { display: flex; flex-direction: column; gap: 8px; }
.result .thumb { border-radius: 18px; border: 1px solid var(--line); }
.result-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.progress { width: 70%; height: 8px; border-radius: 4px; background: #E0DFE7; overflow: hidden; }
.progress > div { height: 100%; width: 40%; background: var(--pink); border-radius: 4px; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
.wait { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: #4E4D59; text-align: center; padding: 8px; }

/* pack page */
.sticker-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.export-list { display: flex; flex-direction: column; gap: 12px; }
.export-item { border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.export-item .spec { font-size: 12px; color: var(--muted); }

/* gallery */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 22px; }
.filters .input { width: auto; flex: 1 1 220px; }
.filters select.input { flex: 0 1 190px; }
.like-btn[aria-pressed="true"] { background: var(--pink-soft); border-color: var(--pink); color: var(--pink-ink); }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: var(--card); margin-top: 40px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; padding-top: 26px; padding-bottom: 26px; font-size: 13px; color: var(--muted); }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

.login-card { max-width: 440px; margin: 56px auto; }
.divider { text-align: center; color: var(--muted); font-size: 13px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 700; font-size: 14px; z-index: 50; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table td, .admin-table th { border-bottom: 1px solid var(--line); padding: 6px; text-align: left; vertical-align: top; }
.scroll-x { overflow-x: auto; }

@media (max-width: 640px) {
  .hero { padding-top: 36px; }
  .sticker-grid { gap: 8px; }
  .side { max-width: none; display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 4px 14px; align-items: start; }
  .side .portrait { grid-row: span 3; border-radius: 16px; border-width: 1.5px; }
  .side .portrait .initial { font-size: 40px; }
  .side h1 { font-size: 28px; }
  .side > p { font-size: 14px; }
  .crumbs { padding: 14px 0 12px; }
}

/* ── generator page (three columns) ─────────────────────────────────────── */
.wrap-wide { max-width: 1360px; }
.gen-layout { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.gen-layout > .side { flex: 1 1 260px; max-width: 320px; }
.gen-main { flex: 999 1 760px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.gen-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.gen-head h2 { font-family: var(--body); font-weight: 800; font-size: 24px; margin: 0; flex: 1 1 auto; letter-spacing: 0; }
.gen-cols { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.gen-form { flex: 1 1 380px; min-width: 0; }
.field .input:focus, .field.active .input { border: 2px solid var(--pink); box-shadow: 0 0 0 4px var(--pink-soft); outline: none; }
.field.active .drop { border: 2px dashed var(--pink); }
.sugg { flex: 1 1 320px; min-width: 0; border: 2px solid var(--ink); }
.sugg h3, .picker h3 { font-size: 21px; font-weight: 800; margin: 4px 0; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--pink-ink); }
.sugg-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.sugg-group-name { font-size: 13px; font-weight: 800; color: var(--ink-2); }
.tag-chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--card); color: var(--ink); font: 700 14px var(--body); cursor: pointer; }
.tag-chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.tag-chip.used { background: var(--soft); border-color: var(--soft); color: #6B6A75; }
.tips { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.5; }
.gen-results h3 { font-family: var(--body); font-weight: 800; font-size: 18px; margin: 0 0 12px; letter-spacing: 0; }

.pack-builder { display: flex; flex-direction: column; gap: 18px; }
.pack-builder h3 { font-family: var(--body); font-size: 18px; font-weight: 800; margin: 0; letter-spacing: 0; }
.step-note { font-weight: 600; font-size: 14px; }
.outfit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.outfit-card { min-height: 58px; padding: 8px 12px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--card); color: var(--ink); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; text-align: left; cursor: pointer; font-family: var(--body); }
.outfit-card[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.outfit-name { font-weight: 800; font-size: 14px; }
.outfit-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.outfit-card[aria-pressed="true"] .outfit-sub { color: #F5C2D3; }
.pack-cols { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.slots-panel { flex: 999 1 460px; min-width: 0; }
.slots-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.slots-head h3 { flex: 1 1 auto; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.slot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.slot-card { border: 1px solid var(--line); background: var(--card); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.slot-card.active { border: 2px solid var(--pink); background: #FFFAFC; }
.slot-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; font-size: 12px; font-weight: 800; color: var(--muted); }
.icon-btn { width: 34px; height: 34px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--card); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.slot-preview { aspect-ratio: 2 / 1; border-radius: 12px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.slot-tag { min-height: 38px; padding: 0 12px; border-radius: 999px; text-align: left; font: 700 13px var(--body); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--soft); border: 1.5px solid var(--soft); color: var(--ink); }
.slot-tag.empty { background: var(--card); border: 1.5px dashed #A9A8B4; color: var(--muted); }
.slot-tag.active { background: var(--pink-soft); border: 2px solid var(--pink); color: var(--pink-ink); }
.slot-add { min-height: 210px; border: 1.5px dashed #A9A8B4; border-radius: 16px; background: var(--ground); font: 800 15px var(--body); color: #4E4D59; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.slot-add small { font-size: 12px; font-weight: 600; color: var(--muted); }
.picker { flex: 1 1 280px; min-width: 0; border: 2px solid var(--ink); }
.gen-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; background: var(--ink); color: #fff; border-radius: 22px; padding: 20px 22px; }
.gen-bar-title { font-weight: 800; font-size: 17px; }
.gen-bar-note { font-size: 14px; color: #C9C8D3; margin-top: 2px; }
.gen-bar .btn[disabled] { background: #3A3944; border-color: #3A3944; color: #A9A8B4; opacity: 1; }
select.select-sm, .select-sm { width: auto; flex: 0 1 auto; min-height: 36px; padding: 4px 10px; font-size: 13px; font-weight: 700; }
.res-card { border: 1px solid var(--line); border-radius: 16px; padding: 8px; display: flex; flex-direction: column; gap: 6px; min-width: 0; background: var(--card); }
.res-card.selected { border: 2px solid var(--pink); background: #FFFAFC; }
.res-img { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; }
.res-img img { width: 100%; height: 100%; object-fit: contain; }
.res-img .wait { position: absolute; inset: 0; justify-content: center; background: rgba(255,255,255,.75); }
.res-check { position: absolute; left: 8px; top: 8px; width: 34px; height: 34px; border-radius: 9px; background: #fff; border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.res-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--pink); }
.res-redo { position: absolute; right: 8px; top: 8px; }
.res-meta { display: flex; justify-content: space-between; gap: 6px; font-size: 13px; }
.res-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.how-box { background: var(--soft); border-radius: 22px; padding: 20px 22px; }
.how-box h3 { font-size: 16px; margin-bottom: 8px; }
.how-box ol { margin: 0; padding-left: 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 24px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.thumb .tag.tag-top { top: 10px; bottom: auto; font-weight: 800; color: var(--ink); border-radius: 999px; }
@media (max-width: 640px) {
  .slot-grid { gap: 6px; }
  .slot-card { padding: 6px; }
  .slot-tag { font-size: 12px; padding: 0 8px; }
}

.frame-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 640px; }

/* ── accounts, presets, creators ─────────────────────────────────────────── */
.avatar { border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; font-weight: 800; color: var(--ink); line-height: 1; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); cursor: pointer; font-weight: 800; font-size: 14px; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu .user-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu .menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: 240px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 32px rgba(21,20,26,.14); padding: 8px; display: flex; flex-direction: column; }
.user-menu .menu a { padding: 10px; border-radius: 10px; text-decoration: none; font-weight: 700; font-size: 14px; }
.user-menu .menu a:hover { background: var(--soft); color: var(--ink); }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: flex; flex-direction: column; font-size: 14px; }
.menu-head span { font-size: 13px; color: var(--muted); }
.seg-links { flex: 0 0 auto; }
.seg-links a { min-height: 38px; padding: 0 14px; border-radius: 10px; display: inline-flex; align-items: center; font-weight: 700; font-size: 14px; text-decoration: none; color: #4E4D59; white-space: nowrap; }
.seg-links a[aria-current] { background: var(--card); color: var(--ink); font-weight: 800; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.card-actions { display: flex; gap: 8px; margin-top: 6px; }
.save-btn[aria-pressed="true"] { background: var(--pink-soft); border-color: var(--pink); color: var(--pink-ink); }
.pill-soft { display: inline-flex; padding: 4px 10px; border-radius: 999px; background: var(--soft); font-size: 12px; font-weight: 800; }
.byline { margin: 8px 0 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.big-sticker { border-radius: 24px; border: 1px solid var(--line); }
.settings-dl { margin: 0; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px 16px; font-size: 15px; }
.settings-dl dt { font-weight: 800; color: var(--ink-2); }
.settings-dl dd { margin: 0; overflow-wrap: anywhere; }
.preset-save { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.saved-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--pink-soft); color: var(--pink-ink); font-weight: 800; }
.saved-box a { color: var(--pink-ink); }
.preset-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.preset-open[aria-expanded="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.preset-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 12px; border-radius: 999px; background: var(--pink-soft); color: var(--pink-ink); font-size: 13px; font-weight: 800; max-width: 100%; }
.preset-chip .icon-btn { width: 26px; height: 26px; border-radius: 50%; border-color: transparent; background: transparent; color: var(--pink-ink); }
.preset-note { flex-basis: 100%; margin: 0; }
.preset-list { display: flex; flex-direction: column; gap: 12px; }
.preset-items { display: flex; flex-direction: column; gap: 8px; max-height: 560px; overflow-y: auto; }
.preset-item { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-family: var(--body); color: var(--ink); text-align: left; }
.preset-item:hover { border-color: var(--ink); }
.preset-item-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.kind-badge { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: #FFF0B8; white-space: nowrap; }
.kind-badge.sticker { background: #D7E6FF; }
.pack-form { gap: 18px; }
.pack-form .outfit-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.pack-side { align-self: flex-start; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
.pack-side #picker, .pack-side #pack-tips { display: flex; flex-direction: column; gap: 14px; }
.pack-side h3 { font-family: var(--body); font-size: 21px; font-weight: 800; margin: 4px 0; letter-spacing: 0; }
.empty-box { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 26px; border: 1.5px dashed var(--line-2); border-radius: 22px; background: var(--card); }
.toast-action { display: flex; align-items: center; gap: 12px; }
.toast-action button { min-height: 34px; padding: 0 12px; border: 1px solid #fff; border-radius: 9px; background: transparent; color: #fff; font: 800 13px var(--body); cursor: pointer; }
.creator-card { margin-top: 24px; background: var(--card); border: 2px solid var(--ink); border-radius: 26px; overflow: hidden; }
.creator-band { height: 120px; }
.creator-main { padding: 0 28px 22px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 24px; }
.creator-avatar { margin-top: -52px; }
.creator-avatar .avatar { border: 5px solid #fff; box-shadow: 0 0 0 2px var(--ink); font-family: var(--display); font-weight: 400; }
.creator-text { flex: 1 1 300px; min-width: 0; padding-top: 12px; }
.creator-text h1 { font-size: 34px; margin: 0; overflow-wrap: anywhere; }
.creator-text p { margin: 8px 0 0; max-width: 620px; }
.creator-stats { margin: 0; padding: 16px 28px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 36px; }
.creator-stats div { display: flex; align-items: baseline; gap: 6px; }
.creator-stats dd { margin: 0; font-weight: 800; font-size: 20px; }
.creator-stats dt { font-size: 14px; color: var(--muted); }
.follow-btn[aria-pressed="true"] { background: var(--card); color: var(--ink); border-color: var(--ink); }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); }
.tabs a { min-height: 44px; padding: 0 16px; display: inline-flex; align-items: center; border-bottom: 3px solid transparent; font-weight: 700; text-decoration: none; color: #4E4D59; }
.tabs a[aria-current] { border-bottom-color: var(--pink); color: var(--ink); font-weight: 800; }
.ok-box { padding: 12px 14px; border-radius: 12px; background: #E6F6EC; color: #1E6B3D; font-size: 14px; font-weight: 700; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); cursor: pointer; display: inline-block; }
.swatch:has(input:checked) { border: 3px solid var(--ink); }
.swatch:has(input:focus-visible) { outline: 3px solid #F5A3BF; outline-offset: 2px; }
.handle-input { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); overflow: hidden; }
.handle-input span { padding: 0 0 0 14px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.handle-input .input { border: 0; padding-left: 2px; min-width: 0; }
.follow-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--soft); }
.follow-row:last-child { border-bottom: 0; }
@media (max-width: 640px) {
  .user-menu .user-name { display: none; }
  .creator-main { padding: 0 18px 18px; }
  .creator-stats { padding: 14px 18px; gap: 8px 22px; }
  .settings-dl { grid-template-columns: 96px minmax(0, 1fr); }
  .handle-input span { display: none; }
}

/* endless lists + My creations */
.feed-more { text-align: center; margin-top: 28px; }
.feed-status { display: flex; justify-content: center; padding: 26px 0; }
.feed-status .progress { width: 160px; }
.me-layout { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.me-chars { flex: 1 1 240px; max-width: 280px; min-width: 0; display: flex; flex-direction: column; gap: 10px; position: sticky; top: 16px; }
.me-main { flex: 999 1 640px; min-width: 0; }
.char-list { display: flex; flex-direction: column; gap: 4px; max-height: calc(100vh - 80px); overflow-y: auto; }
.char-list a { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; text-decoration: none; border: 1.5px solid transparent; }
.char-list a:hover { background: var(--soft); color: var(--ink); }
.char-list a[aria-current] { background: var(--card); border-color: var(--ink); }
.char-thumb { width: 44px; height: 58px; border-radius: 10px; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 18px; color: rgba(21,20,26,.55); }
.char-thumb img { width: 100%; height: 100%; object-fit: cover; }
.char-thumb.all { background: var(--pink-soft); color: var(--pink-ink); font-family: var(--body); }
.char-name { flex: 1; min-width: 0; font-weight: 800; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.char-count { font-size: 13px; font-weight: 800; color: var(--muted); background: var(--soft); border-radius: 999px; padding: 2px 9px; }
@media (max-width: 900px) {
  .me-chars { max-width: none; flex-basis: 100%; position: static; }
  .char-list { flex-direction: row; overflow-x: auto; max-height: none; padding-bottom: 4px; }
  .char-list a { flex: 0 0 auto; border-color: var(--line); background: var(--card); }
  .char-name { max-width: 120px; }
}

/* collecting characters */
.char-card { position: relative; }
.star-fab { position: absolute; top: 8px; right: 8px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 1px 4px rgba(21,20,26,.18); }
.star-fab[aria-pressed="true"] { background: var(--pink); color: #fff; }
.collect-btn[aria-pressed="true"] { background: var(--pink-soft); border-color: var(--pink); color: var(--pink-ink); }
.char-card .thumb { text-decoration: none; }
.input-sm { min-height: 40px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.seg-sm { align-self: flex-start; }
.seg-sm a { min-height: 32px; padding: 0 10px; font-size: 13px; }
.char-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.char-when { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.char-star { color: var(--pink); display: inline-flex; flex-shrink: 0; }
.char-list a[hidden] { display: none; }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* create / edit character */
.new-char-card { min-height: 280px; border: 1.5px dashed #A9A8B4; border-radius: var(--radius); background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font-weight: 800; color: #4E4D59; text-align: center; padding: 16px; }
.new-char-card small { font-size: 12px; font-weight: 600; color: var(--muted); }
.cc-steps { list-style: none; margin: 18px 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cc-steps button { width: 100%; min-height: 60px; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; cursor: pointer; text-align: left; font-family: var(--body); color: var(--ink); background: var(--soft); border: 2px solid var(--soft); }
.cc-steps button[aria-current="step"] { background: var(--card); border-color: var(--ink); }
.cc-dot { width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; background: var(--card); color: var(--ink-2); }
.cc-steps button[aria-current="step"] .cc-dot { background: var(--pink); color: #fff; }
.cc-steps button.done .cc-dot { background: #1E7A46; color: #fff; }
.cc-step-text { display: flex; flex-direction: column; min-width: 0; }
.cc-step-text strong { font-size: 14px; }
.cc-step-text small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; margin-top: 18px; }
.cc-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.cc-main .panel h2 { font-family: var(--body); font-weight: 800; font-size: 22px; margin: 0; letter-spacing: 0; }
.cc-kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cc-kinds button { min-height: 80px; padding: 12px 14px; border-radius: 16px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; text-align: left; cursor: pointer; font-family: var(--body); background: var(--card); color: var(--ink); border: 1.5px solid var(--line-2); }
.cc-kinds button strong { font-size: 15px; }
.cc-kinds button small { font-size: 13px; color: var(--muted); line-height: 1.4; }
.cc-kinds button[aria-checked="true"] { background: #FFFAFC; border: 2px solid var(--pink); }
.cc-gender { min-width: 110px; }
.cc-note { margin: -6px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--soft); font-size: 14px; line-height: 1.45; }
.cc-note.cc-note-oc { background: var(--yellow-soft); }
.cc-swatches { align-items: center; }
.cc-swatch { width: 38px; height: 38px; border-radius: 50%; cursor: pointer; border: 1px solid #C9C8D3; padding: 0; }
.cc-swatch[aria-pressed="true"] { border: 3px solid var(--ink); box-shadow: 0 0 0 2px #fff inset; }
.cc-portraits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cc-portrait { display: flex; flex-direction: column; gap: 6px; padding: 6px 6px 10px; border-radius: 16px; cursor: pointer; text-align: left; font-family: var(--body); color: var(--ink); background: var(--card); border: 1px solid var(--line); }
.cc-portrait[disabled] { cursor: default; }
.cc-portrait.picked { border: 3px solid var(--pink); box-shadow: 0 0 0 4px var(--pink-soft); }
.cc-portrait-img { position: relative; aspect-ratio: 832 / 1216; border-radius: 12px; overflow: hidden; background: var(--soft); display: flex; align-items: center; justify-content: center; }
.cc-portrait-img img { width: 100%; height: 100%; object-fit: cover; }
.cc-portrait strong { font-size: 12px; }
.cc-portrait small { font-size: 12px; color: #4E4D59; line-height: 1.4; }
.cc-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 4px; }
.cc-danger { flex-direction: row; flex-wrap: wrap; align-items: center; border-color: #F2C4C4; }
.btn-danger { border-color: #B42318; color: #B42318; }
.cc-preview { flex: 1 1 300px; max-width: 360px; min-width: 0; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 16px; }
.cc-card { background: var(--card); border: 2px solid var(--ink); border-radius: 22px; overflow: hidden; }
.cc-cover { position: relative; aspect-ratio: 3 / 4; background: var(--soft) center / cover no-repeat; display: flex; align-items: center; justify-content: center; }
.cc-cover .initial { font-family: var(--display); font-size: 80px; color: rgba(21,20,26,.4); }
.cc-cover .cc-vis-tag { left: auto; right: 10px; top: 10px; bottom: auto; font-weight: 800; border-radius: 999px; }
.cc-ai { background: var(--soft); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.cc-ai code { font-size: 13px; color: var(--ink-2); line-height: 1.5; white-space: normal; word-break: break-word; }
@media (max-width: 760px) {
  .cc-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cc-portraits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cc-preview { position: static; max-width: none; }
}
.cc-cover .tag { position: absolute; left: 10px; top: 10px; font-size: 12px; font-weight: 800; background: rgba(255,255,255,.92); padding: 4px 10px; border-radius: 999px; color: var(--ink); }
.cc-cover .tag:empty { display: none; }
.cc-cover .tag.cc-vis-tag { left: auto; right: 10px; }
.cc-canon { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.quota-pill { height: 40px; padding: 0 14px; border-radius: 10px; background: var(--pink-soft); color: var(--pink-ink); font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; text-decoration: none; white-space: nowrap; }
.quota-pill:hover { color: var(--pink-ink); background: #FBD3E2; }
@media (max-width: 640px) { .quota-pill { font-size: 12px; padding: 0 10px; } }
