:root {
  color-scheme: light;
  --paper: #f8f3e9;
  --ink: #3c403a;
  --muted: #8c8c7d;
  --line: #e1dccf;
  --green: #467258;
  --pink: #efc9bd;
  --cream: #fffdf7;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; line-height: 1.6; }
button, select, input { font: inherit; }
button, a, select, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .5; }
button:focus-visible, select:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #345a43; outline-offset: 4px; }
a { color: inherit; }
.page-shell { max-width: 1272px; margin: auto; padding: 0 36px; }
.site-header { min-height: 87px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.home-link { display: inline-flex; min-height: 44px; align-items: center; gap: 10px; text-decoration: none; font-size: 12px; font-weight: 650; }
.home-link > span { font-size: 23px; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 750; letter-spacing: .03em; }
.brand-dumpling { position: relative; width: 22px; height: 20px; background: #c7d8b5; border: 2px solid #81a27b; border-radius: 47% 47% 40% 40%; transform: rotate(-6deg); }
.brand-dumpling::before, .brand-dumpling::after { content: ''; position: absolute; width: 2px; height: 3px; top: 7px; background: #55734f; border-radius: 2px; }
.brand-dumpling::before { left: 5px; } .brand-dumpling::after { right: 5px; }
.header-note { font-size: 11px; color: #969780; letter-spacing: .12em; }
main { max-width: 1112px; margin: auto; }
.hero { display: flex; justify-content: space-between; align-items: center; gap: 28px; padding: 35px 0 30px; }
.eyebrow { margin: 0 0 11px; color: #7c9472; font-size: 10px; letter-spacing: .12em; font-weight: 650; }
.eyebrow > span { color: #c09162; margin-right: 8px; font-size: 17px; }
h1 { font-size: clamp(29px, 3.6vw, 43px); line-height: 1.45; letter-spacing: -.05em; margin: 0; font-weight: 800; }
h1 > span { color: #5b7e5f; }
.intro { margin: 11px 0 0; color: var(--muted); font-size: 12px; line-height: 1.9; }
.mobile-break { display: none; }
.hero-note { flex-shrink: 0; width: 136px; height: 99px; border: 1px solid #d9cfbd; border-radius: 50%; display: flex; align-items: center; justify-content: center; gap: 8px; transform: rotate(8deg); color: #9a9d83; }
.hero-note > span { font-size: 9px; letter-spacing: .14em; line-height: 1.8; }
.hero-note > i { font-size: 30px; color: #bda880; font-style: normal; }
.notice { padding: 12px 16px; border-radius: 12px; background: #fff0d5; border: 1px solid #e8d1a5; color: #7c6335; font-size: 12px; margin-bottom: 13px; }
.notice p { margin: 0; } .notice p + p { margin-top: 6px; }
.creation-layout { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.studio-card { min-width: 0; background: #e8e9d9; border: 1px solid #dadcc7; border-radius: 25px; padding: 20px 23px 18px; }
.studio-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 10px; color: #92967b; }
.studio-tag { padding: 4px 10px; background: #f5f4e9; border-radius: 20px; color: #7b8e6d; font-size: 10px; }
.stage { position: relative; width: 100%; max-width: 385px; aspect-ratio: 1; margin: 3px auto -7px; isolation: isolate; }
.stage::before { content: ''; position: absolute; inset: 13% 7% 12%; border: 1px dashed #c9cdb5; border-radius: 50%; z-index: -1; }
.stage::after { content: '✧'; position: absolute; right: 5%; top: 18%; color: #b8bc9c; font-size: 31px; z-index: -1; transform: rotate(10deg); }
.character-svg { display: block; width: 100%; height: auto; overflow: visible; }
.character-heading { display: flex; justify-content: center; align-items: center; gap: 13px; text-align: center; }
.character-heading h2 { font-size: 19px; margin: 0; letter-spacing: -.02em; }
.character-heading > span { color: #b0b799; font-size: 15px; }
.character-desc { text-align: center; margin: 7px 0 18px; color: #8b947c; font-size: 10px; line-height: 1.8; }
.studio-actions { display: grid; grid-template-columns: 1.35fr 1fr; gap: 9px; }
.studio-actions > button { min-height: 48px; border: 1px solid #537957; border-radius: 11px; font-size: 12px; padding: 8px; font-weight: 650; }
.studio-actions > button > span { display: inline-block; font-size: 20px; margin-right: 6px; vertical-align: -1px; }
.mutate-button { background: #577c5c; color: #fffdf3; box-shadow: 0 3px 0 #3f6245; }
.collect-button { background: #faf8ec; border-color: #d0d6bf !important; }
.status { min-height: 36px; margin: 13px 3px 0; color: #819273; font-size: 10px; line-height: 1.8; text-align: center; }
.parts-panel { min-width: 0; background: var(--cream); border: 1px solid #e4dfd2; border-radius: 23px; padding: 23px; }
.parts-heading { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 20px; }
.section-kicker { margin: 0 0 7px; color: #a1a088; font-size: 9px; letter-spacing: .13em; }
.parts-heading h2 { margin: 0; font-size: 20px; letter-spacing: -.03em; }
#lock-count { font-size: 9px; color: #9ba28c; white-space: nowrap; }
.traits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 13px; }
.trait { min-width: 0; }
.trait-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.trait-heading label { font-size: 11px; font-weight: 650; }
.trait-index { color: #b4b19e; font: 10px ui-monospace, monospace; margin-right: 6px; }
.trait-controls { display: flex; gap: 6px; }
.trait select { width: 100%; min-width: 0; min-height: 45px; background: #f6f5eb; border: 1px solid #e0dfd0; color: #69775f; border-radius: 9px; padding: 7px 9px; font-size: 11px; }
.lock-button { flex: 0 0 44px; min-width: 44px; min-height: 45px; border: 1px solid #e0dfd0; border-radius: 9px; background: #f9f7ee; color: #aaa995; font-size: 11px; padding: 6px 3px; }
.lock-button[aria-pressed="true"] { background: #e0ead5; color: #4e7152; border-color: #adc19e; font-weight: 650; }
.parts-note { font-size: 9px; color: #a2a28b; line-height: 1.9; margin: 17px 0 18px; }
.work-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border-top: 1px solid #e8e3d8; padding-top: 18px; }
.work-actions button, .share-button { min-height: 44px; border-radius: 10px; border: 1px solid #dfddcf; background: transparent; color: #68775e; font-size: 11px; font-weight: 600; padding: 8px; }
.work-actions button > span, .share-button > span { font-size: 16px; margin-right: 5px; }
.share-button { display: block; width: 100%; margin-top: 8px; background: #f2f0e5; }
.share-status { text-align: center; font-size: 9px; color: #a3a18e; line-height: 1.8; margin: 10px 0 0; }
.manual-link { margin-top: 10px; padding: 11px; border: 1px solid #dedbcf; border-radius: 10px; background: #f7f5eb; }
.manual-link label { display: block; font-size: 11px; margin-bottom: 6px; color: #829075; }
.manual-link input { min-height: 44px; min-width: 0; width: 100%; border-radius: 6px; border: 1px solid #dddacd; background: #fffdf7; color: var(--ink); font-size: 12px; padding: 8px; }
.collection-section { margin-top: 36px; border-top: 1px solid var(--line); padding-top: 27px; }
.collection-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 21px; }
.collection-heading h2 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
#collection-count { font-size: 10px; font-weight: 400; margin-left: 13px; letter-spacing: .08em; color: #a1a38c; white-space: nowrap; }
.collection-heading > p { margin: 0; font-size: 10px; color: #a0a08d; text-align: right; line-height: 1.8; }
.collection { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.empty-collection { grid-column: 1/-1; margin: 0; padding: 31px 18px; border: 1px dashed #d0d4ba; border-radius: 17px; text-align: center; color: #a2a88e; font-size: 12px; }
.empty-collection > span { font-size: 25px; vertical-align: -3px; margin-right: 9px; }
.collection-card { min-width: 0; border: 1px solid #e1dece; border-radius: 18px; background: #f3f1e4; overflow: hidden; padding: 12px 16px 15px; }
.collection-art { max-width: 194px; width: 100%; margin: -5px auto -8px; }
.collection-card h3 { font-size: 12px; text-align: center; margin: 0 0 12px; }
.card-actions { display: flex; justify-content: center; gap: 8px; }
.card-actions button { min-height: 44px; border-radius: 9px; padding: 8px 13px; font-size: 10px; border: 1px solid #dbdcc9; background: #fffdf3; }
.card-actions .delete-button { color: #aa8e7a; background: transparent; }
.page-footer { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin: 27px 0 30px; color: #a6a58e; font-size: 10px; }
.page-footer p { margin: 0; }
.page-footer p:last-child { text-align: right; font-size: 9px; }
dialog { width: min(435px, calc(100% - 36px)); max-height: calc(100% - 36px); border: 1px solid #dcd7c8; border-radius: 21px; background: #fffdf5; padding: 28px; color: var(--ink); box-shadow: 0 24px 80px #31382e30; }
dialog::backdrop { background: #313b2d66; backdrop-filter: blur(4px); }
dialog h2 { margin: 0 0 10px; font-size: 22px; }
dialog > p:not(.section-kicker) { font-size: 12px; color: #8b927a; line-height: 1.9; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.dialog-actions button { min-height: 46px; padding: 8px; background: #f2f2e6; border: 1px solid #d9dec9; border-radius: 10px; font-size: 12px; }
#confirm-change { color: #fffdf5; background: #577c5c; border-color: #577c5c; }
@media (hover: hover) { button:hover { filter: brightness(.98); } a:hover { color: var(--green); } }
@media (max-width: 1100px) {
  .page-shell { padding: 0 25px; }
  .creation-layout { gap: 18px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .studio-card { padding: 18px 19px; }
  .parts-panel { padding: 20px; }
  .parts-heading { align-items: flex-start; }
  .parts-heading h2 { font-size: 18px; }
  .traits { gap: 13px 10px; }
  .trait select { padding-left: 6px; padding-right: 5px; }
  .parts-heading { flex-wrap: wrap; gap: 6px; }
  .studio-actions { grid-template-columns: 1fr; }
  .character-heading h2 { font-size: 16px; }
  .character-heading { gap: 8px; }
}
@media (min-width: 651px) and (max-width: 920px) {
  .creation-layout { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .traits { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .parts-heading h2 { font-size: 17px; }
  .parts-note { font-size: 9px; }
  .parts-panel { padding: 18px; }
  .studio-card { padding: 18px 16px; }
  .studio-heading > span:last-child { display: none; }
  .collection { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .page-shell { padding: 0 18px; }
  .site-header { min-height: 72px; gap: 10px; }
  .home-link { font-size: 11px; gap: 6px; }
  .wordmark { font-size: 13px; }
  .header-note { display: none; }
  .hero { padding: 25px 0 22px; }
  .hero-note { display: none; }
  .eyebrow { font-size: 9px; margin-bottom: 10px; }
  h1 { font-size: 31px; max-width: 330px; line-height: 1.45; }
  h1 > span { display: block; }
  .intro { font-size: 11px; margin-top: 10px; }
  .mobile-break { display: block; }
  .creation-layout { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .studio-card { padding: 16px 17px; border-radius: 22px; }
  .studio-heading { font-size: 9px; }
  .studio-tag { font-size: 9px; }
  .stage { max-width: 315px; margin-top: -1px; margin-bottom: -1px; }
  .character-heading h2 { font-size: 18px; }
  .character-desc { font-size: 9px; margin-bottom: 16px; }
  .studio-actions { grid-template-columns: 1.4fr 1fr; gap: 8px; }
  .studio-actions > button { font-size: 11px; min-height: 47px; padding: 8px 5px; }
  .studio-actions > button > span { font-size: 17px; margin-right: 4px; }
  .status { font-size: 10px; min-height: 36px; }
  .parts-panel { padding: 20px 18px; border-radius: 21px; }
  .parts-heading { flex-wrap: nowrap; gap: 10px; margin-bottom: 19px; align-items: center; }
  .parts-heading h2 { font-size: 19px; }
  .traits { gap: 15px 12px; }
  .trait-heading label { font-size: 11px; }
  .trait select { font-size: 11px; min-height: 46px; }
  .lock-button { min-height: 46px; }
  .parts-note { font-size: 10px; margin-top: 17px; }
  .work-actions button, .share-button { font-size: 12px; min-height: 46px; }
  .share-status { font-size: 10px; }
  .collection-section { margin-top: 29px; padding-top: 25px; }
  .collection-heading { display: block; margin-bottom: 17px; }
  .collection-heading h2 { font-size: 21px; }
  .collection-heading > p { margin-top: 10px; text-align: left; }
  .collection { gap: 11px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collection-card { padding: 9px 10px 12px; border-radius: 15px; }
  .collection-card h3 { font-size: 10px; min-height: 32px; margin-bottom: 10px; line-height: 1.6; }
  .card-actions { flex-direction: column; gap: 6px; }
  .card-actions button { min-height: 44px; padding: 7px; font-size: 10px; }
  .empty-collection { font-size: 11px; padding: 26px 12px; }
  .empty-collection > span { margin-right: 6px; }
  .page-footer { display: block; font-size: 10px; margin-top: 24px; }
  .page-footer p:last-child { text-align: left; font-size: 9px; margin-top: 9px; }
  dialog { padding: 24px; }
  dialog h2 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
