:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #ffffff;
  --deep: #f8f6fe;
  --line: #e5deef;
  --muted: #615970;
  --ink: #211833;
  --accent: #6333d5;
  --radius: 14px;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --sans: Inter, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 22px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--sans); }
a { color: var(--accent); text-underline-offset: .22em; }
a:hover { color: #451c9e; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .52; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
svg { width: 20px; height: 20px; flex-shrink: 0; }
.wrap { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.skip { position: absolute; z-index: 9; inset: 8px auto auto 8px; padding: 10px; background: var(--accent); color: #ffffff; transform: translateY(-150%); }
.skip:focus { transform: none; }
.topbar { border-bottom: 1px solid #e9e3f2; position: relative; z-index: 1; background: #ffffff; }
.topbar-inner { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; gap: 10px; align-items: center; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -.045em; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand em { color: var(--accent); font-style: normal; }
.brand-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--accent); color: #ffffff; box-shadow: 0 3px 8px #6433d531; }
.brand-icon svg { width: 21px; height: 21px; }
.nav { display: flex; align-items: center; gap: clamp(16px,3vw,32px); }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 13px; display: flex; align-items: center; min-height: 44px; }
.nav a:hover, .nav a[aria-current=page] { color: var(--accent); }
.nav-toggle { display: none !important; }
.hero {
  padding: 42px 0 34px;
  background: radial-gradient(ellipse at 50% 0%, #eee7ff 0%, #faf7ff 52%, #fff 95%);
  border-bottom: 1px solid #eee8f8;
}
.hero-inner { text-align: center; }
.hero h1, .guide h1 { font-size: clamp(40px,5.3vw,68px); line-height: 1.02; letter-spacing: -.068em; margin: 0; font-weight: 850; }
.hero h1 span { color: var(--accent); white-space: nowrap; }
.hero p { color: var(--muted); font-size: 17px; margin: 12px auto 0; max-width: 560px; }
.editor { border: 1px solid var(--line); background: var(--panel); border-radius: 18px; padding: 23px 25px 24px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); grid-template-areas: "entry preview" "controls preview"; column-gap: 25px; row-gap: 15px; }
.entry { grid-area: entry; }
.controls { grid-area: controls; display: grid; gap: 14px; align-content: start; }
.preview { grid-area: preview; min-width: 0; display: flex; flex-direction: column; justify-content: center; border: 1px solid #e7dcfa; border-radius: 13px; padding: 22px; background: radial-gradient(ellipse at 80% 5%, #eee5ff 0%, #f8f4ff 57%, #faf7ff 100%); }
.editor-title { display: flex; gap: 10px; align-items: center; margin: 0 0 14px; font-size: 21px; line-height: 1.2; letter-spacing: -.035em; }
.editor-title svg { color: var(--accent); }
.label, legend { font-weight: 650; font-size: 13px; color: #372a49; display: block; margin-bottom: 7px; }
.input, select, textarea { display: block; width: 100%; min-height: 46px; border: 1px solid #d8cce9; border-radius: 8px; background: #ffffff; padding: 10px 12px; color: var(--ink); }
.input::placeholder { color: #766c87; opacity: 1; }
.input:focus, textarea:focus, select:focus { border-color: var(--accent); outline: 0; box-shadow: 0 0 0 1px var(--accent); }
fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
legend { padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { border: 1px solid #ded4ec; background: #f9f7fd; color: #493c60; min-height: 44px; padding: 6px 12px; border-radius: 8px; font-weight: 650; font-size: 13px; white-space: nowrap; }
.chip:hover { border-color: #b79be7; color: #452598; }
.chip[aria-pressed=true] { background: #eee6ff; border-color: #ae8cec; color: #5424b9; }
.symbol-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.symbol-palette { margin-top: 1px; }
.symbol-palette summary, .faq summary { cursor: pointer; min-height: 44px; align-content: center; color: var(--accent); font-weight: 650; }
.symbol-palette[open] summary { margin-bottom: 7px; }
.palette-destination { display: flex; align-items: center; gap: 13px; margin-bottom: 7px; }
.palette-destination label { display: flex; align-items: center; gap: 5px; min-height: 44px; }
input[type=radio] { accent-color: var(--accent); }
.meta-label { font: 700 11px/1.4 var(--mono); letter-spacing: .12em; color: var(--accent); text-transform: uppercase; }
.preview-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.preview-top .count { color: #645677; font: 12px/1.4 var(--mono); }
.result { display: block; font-size: clamp(24px, 4vw, 37px); font-weight: 800; line-height: 1.2; letter-spacing: -.025em; margin: 13px 0 9px; min-height: 1.2em; overflow-wrap: anywhere; white-space: break-spaces; }
.empty-result { color: #625774; font-size: 22px; font-weight: 650; }
.result-note { color: #615574; font-size: 12px; margin: 0 0 15px; max-width: 370px; }
.preview-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.primary-button { border: 1px solid var(--accent); color: #ffffff; background: var(--accent); border-radius: 8px; font-size: 14px; font-weight: 800; min-height: 46px; padding: 9px 17px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; text-decoration: none; }
.primary-button:hover:not(:disabled) { background: #5125b9; color: #ffffff; }
.icon-button { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; padding: 0; border: 1px solid #e4d9f2; border-radius: 8px; background: transparent; color: #635873; }
.icon-button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.favorite[aria-pressed=true] { color: var(--accent); }
.favorite[aria-pressed=true] svg { fill: #7440e324; }
.reset { margin-left: auto; min-height: 44px; border: 0; background: transparent; color: #5a4e70; padding: 3px 6px; text-decoration: underline; text-underline-offset: .24em; font-size: 13px; }
.reset:hover { color: var(--ink); }
.ideas { margin-top: 44px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.section-head h2, .more h2, .info h2, .guide h2 { margin: 0; font-size: clamp(25px,3vw,34px); letter-spacing: -.049em; line-height: 1.12; }
.section-head p { color: var(--muted); margin: 5px 0 0; }
.search { min-width: 240px; position: relative; }
.search svg { position: absolute; left: 12px; top: 13px; color: var(--muted); }
.search input { padding-left: 39px; }
.idea-controls { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.idea-controls .chip { border-radius: 999px; }
.ideas-count { color: var(--muted); font: 12px/1.4 var(--mono); white-space: nowrap; }
.name-grid, .card-grid { padding: 0; margin: 0; list-style: none; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.name-card { display: flex; justify-content: space-between; align-items: center; gap: 7px; border: 1px solid #e8e2f0; border-radius: 10px; min-width: 0; padding: 8px 8px 8px 12px; background: #ffffff; }
.name-card:hover { border-color: #b79be7; }
.name-label { display: block; font-size: 16px; font-weight: 750; overflow-wrap: anywhere; white-space: break-spaces; }
.tag { color: var(--muted); font-size: 11px; display: block; }
.name-actions { display: flex; flex: 0 0 auto; gap: 2px; }
.name-actions .icon-button { border-color: transparent; }
.name-actions .icon-button:hover { background: #f1eaff; border-color: #c5acef; }
.name-actions svg { width: 18px; height: 18px; }
.empty { color: var(--muted); padding: 18px; border: 1px dashed var(--line); border-radius: 8px; }
.more, .info { margin-top: 52px; }
.more h2 { margin-bottom: 15px; }
.more .card-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.link-card { display: block; border: 1px solid var(--line); min-height: 115px; background: var(--panel); border-radius: 10px; padding: 14px; text-decoration: none; color: var(--ink); }
.link-card:hover { border-color: #b599e7; color: var(--ink); }
.link-card b { display: flex; gap: 5px; justify-content: space-between; align-items: start; }
.link-card svg { color: var(--accent); }
.link-card span { display: block; color: var(--muted); font-size: 13px; margin-top: 5px; }
.info, .guide-copy { max-width: 760px; }
.info p, .guide p, .guide li { color: #544b63; }
.faq { margin-top: 17px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { color: var(--ink); }
.faq p { margin: 0 0 12px; }
.footer { margin-top: 58px; border-top: 1px solid var(--line); padding: 27px 0; color: var(--muted); font-size: 13px; }
.footer-grid { display: flex; align-items: start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.footer p { margin: 6px 0 0; }
.footer-links { display: flex; gap: 5px 17px; flex-wrap: wrap; }
.footer-links a { color: #443656; min-height: 44px; display: inline-flex; align-items: center; }
.crumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; color: var(--muted); font-size: 13px; margin: 26px 0 20px; }
.guide h1 { font-size: clamp(37px,6vw,62px); margin-bottom: 15px; }
.guide .lead { font-size: 17px; max-width: 700px; margin-bottom: 25px; }
.guide h2 { margin-top: 31px; }
.guide h3 { font-size: 18px; }
.guide-copy p { max-width: 70ch; }
.guide .primary-button { margin-top: 15px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; overflow-wrap: anywhere; }
.table th { color: var(--ink); }
.table td { color: #544b63; }
.table .icon-button { border-color: #e4d9f2; }
.note { border-left: 2px solid var(--accent); background: #f5efff; padding: 10px 14px; border-radius: 0 8px 8px 0; }
.clan-form { display: grid; gap: 12px; padding: 17px; background: var(--panel); border: 1px solid var(--line); border-radius: 13px; }
.clan-form .result { font-size: 25px; }
.clan-form .primary-button { margin-top: 0; justify-self: start; }
.toast { position: fixed; bottom: max(16px,env(safe-area-inset-bottom)); right: 16px; z-index: 4; pointer-events: none; opacity: 0; border: 1px solid #c1a6ef; border-radius: 9px; color: var(--ink); background: #eee5ff; padding: 10px 14px; max-width: calc(100% - 32px); transition: opacity .15s; }
.toast.visible { opacity: 1; }
.manual { position: fixed; z-index: 5; bottom: 16px; right: 16px; width: min(420px,calc(100% - 32px)); background: var(--panel); padding: 15px; border: 1px solid var(--line); border-radius: 12px; }
.manual .reset { margin-top: 4px; }
.visually-hidden { position: absolute; height: 1px; width: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 1000px) {
  .name-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .more .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 32px); }
  .hero { padding: 28px 0 24px; }
  .hero-inner { display: block; }
  .hero h1 { font-size: clamp(35px,9vw,54px); }
  .hero p { font-size: 15px; margin-top: 11px; }
  .editor { grid-template-columns: minmax(0,1fr); grid-template-areas: "entry" "preview" "controls"; padding: 14px; gap: 14px; }
  .preview { padding: 14px; }
  .section-head { align-items: start; flex-direction: column; gap: 9px; }
  .search { width: 100%; min-width: 0; }
  .idea-controls { align-items: flex-start; flex-direction: column; gap: 7px; }
  .topbar-inner { min-height: 57px; flex-wrap: wrap; }
  .nav a { min-height: 40px; }
  .nav-toggle { display: inline-grid !important; }
  .nav { display: none; width: 100%; padding-bottom: 8px; gap: 6px 20px; flex-wrap: wrap; }
  .nav.open { display: flex; }
  .topbar-inner:has(.nav.open) { padding-top: 6px; gap: 0; }
  .ideas, .more, .info { margin-top: 34px; }
}
@media (max-width: 540px) {
  .name-grid { grid-template-columns: minmax(0,1fr); }
  .name-card { padding-block: 5px; }
  .more .card-grid { grid-template-columns: minmax(0,1fr); }
  .link-card { min-height: 0; }
  .table th, .table td { padding-inline: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
.show-more { display: block; margin: 13px auto 0; }
.show-more[hidden] { display: none; }

.style-form { max-width: 630px; margin: 22px auto 0; text-align: left; }
.style-form-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 2px 5px; }
.style-form-head .label { margin: 0; }
.style-form-head a { display: inline-flex; align-items: center; min-height: 28px; font-size: 13px; font-weight: 700; }
.style-input-wrap { position: relative; }
.style-input-wrap > svg { position: absolute; color: var(--accent); top: 18px; left: 17px; pointer-events: none; }
.style-input-wrap .input { min-height: 56px; font-size: 16px; padding: 12px 74px 12px 48px; border-color: #c7afea; box-shadow: 0 5px 22px #6134b317; }
.clear-input { position: absolute; inset: 6px 6px 6px auto; padding: 0 10px; border: 0; border-radius: 5px; color: #5630a2; background: #f6f0ff; font-weight: 650; }
.clear-input:hover { background: #ede2ff; }
.howto { margin-top: 52px; }
.howto h2 { margin: 0 0 16px; font-size: clamp(24px, 4vw, 32px); line-height: 1.15; letter-spacing: -.035em; }
.howto-steps { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.howto-step { min-width: 0; padding: 17px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.howto-step h3 { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; font-size: 18px; line-height: 1.2; }
.howto-number { display: grid; place-items: center; flex: 0 0 29px; height: 29px; color: #5624b9; background: #eee6ff; border-radius: 8px; font-weight: 800; }
.howto-image { display: grid; place-items: center; min-height: 158px; margin: 0; padding: 9px; background: #f9f6ff; border: 1px solid #ede6f5; border-radius: 10px; }
.howto-image img { display: block; max-width: 100%; height: auto; border-radius: 5px; }
.howto-step p { margin: 11px 0 0; color: var(--muted); font-size: 14px; }
.howto-tip { margin: 11px 0 0; color: #544b63; font-size: 14px; }
.gallery-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px 18px; margin-top: 20px; }
.gallery-toolbar > p { font-weight: 750; margin: 0; }
.gallery-tools { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.gallery-tools label { color: var(--muted); }
.gallery-tools select { min-height: 44px; width: auto; padding: 5px 8px; font-weight: 650; }
.gallery-tools a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 3px 7px; font-weight: 700; text-decoration: none; }
.gallery-tools a:hover { text-decoration: underline; }
.gallery-tools svg { width: 16px; height: 16px; }
.style-note { color: var(--muted); font-size: 13px; margin: 2px 0 12px; }
.style-jumps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 24px; }
.style-jumps a { color: #473759; border: 1px solid #e6dced; background: #faf7ff; border-radius: 999px; text-decoration: none; display: inline-flex; align-items: center; padding: 4px 13px; min-height: 42px; font-size: 13px; font-weight: 650; white-space: nowrap; }
.style-jumps a:hover { color: var(--accent); background: #f2e9ff; border-color: #c5abea; }
.style-section { padding: 17px 0 24px; margin-top: 8px; border-top: 1px solid #ebe5f2; scroll-margin-top: 10px; }
.style-section:target .style-section-head h2 { color: var(--accent); }
.style-section-head { display: flex; gap: 12px; align-items: center; margin: 0 0 13px; }
.style-section-head h2 { font-size: clamp(21px,3vw,29px); letter-spacing: -.045em; line-height: 1.12; margin: 0; font-weight: 800; }
.style-section-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.section-symbol { width: 43px; height: 43px; flex: 0 0 auto; border-radius: 11px; display: grid; place-items: center; }
.section-symbol.violet { background: #f0e8ff; color: #652cd0; }
.section-symbol.orange { background: #fff0de; color: #a44a13; }
.section-symbol.blue { background: #eaf0ff; color: #3155a8; }
.section-symbol.teal { background: #e4f7ef; color: #176950; }
.section-symbol.rose { background: #fce9f2; color: #a03b6c; }
.section-extra { margin-left: auto; display: flex; align-items: center; gap: 4px; flex: 0 0 auto; min-height: 44px; font-size: 13px; font-weight: 700; }
.section-extra svg { width: 15px; height: 15px; }
.style-grid { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; }
.style-card { min-width: 0; padding: 10px 11px 7px; border: 1px solid #e8e1f0; border-radius: 11px; background: #fff; box-shadow: 0 2px 7px #30205008; }
.style-card:hover { border-color: #cbb6eb; }
.style-card-top { display: flex; gap: 8px; justify-content: space-between; align-items: start; color: #655a75; font-size: 11px; }
.style-length { flex-shrink: 0; border-radius: 5px; padding: 0 5px; background: #f2edf8; color: #59496d; font: 11px/1.7 var(--mono); }
.style-value { display: block; margin: 6px 0 2px; font-size: clamp(19px,2.1vw,25px); min-height: 1.3em; font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; white-space: break-spaces; }
.style-actions { display: flex; align-items: center; justify-content: flex-end; gap: 3px; }
.style-actions .icon-button { border-color: transparent; }
.style-actions .icon-button:hover { background: #f5edff; border-color: #e6d8f9; }
.style-actions svg { width: 17px; height: 17px; }
.copy-style { display: inline-flex; gap: 5px; align-items: center; justify-content: center; border: 1px solid #dfd0fa; background: #f4edff; color: #5528bb; border-radius: 8px; font-size: 13px; font-weight: 760; min-height: 44px; min-inline-size: 100px; padding: 5px 10px; }
.copy-style:hover { background: #eadeff; border-color: #c5acef; }
.copy-style[data-copied] { background: #e5f7ee; border-color: #afdcc5; color: #176047; }
@media (prefers-reduced-motion: no-preference) {
  .copy-style { transition: background-color 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out; }
  .copy-style[data-copied] svg { animation: copy-confirm-in 160ms ease-out; }
  @keyframes copy-confirm-in { from { opacity: 0.55; } to { opacity: 1; } }
}
.style-icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.style-controls { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 9px; }
.style-range { color: var(--muted); font: 12px/1.4 var(--mono); }
.style-more { display: inline-flex; align-items: center; gap: 6px; color: #5425b5; background: #f6efff; }
.style-more svg { width: 16px; height: 16px; }
.editor-disclosure { margin: 20px 0 0; border: 1px solid #e7def2; border-radius: 12px; background: #fcfaff; }
.editor-disclosure summary { padding: 12px 16px; cursor: pointer; color: #4f269c; font-weight: 750; }
.editor-disclosure .editor { border: 0; border-radius: 0 0 12px 12px; border-top: 1px solid #e8e0f0; }
@media (max-width: 900px) {
  .style-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .howto-steps { grid-template-columns: minmax(0,1fr); }
  .howto-image { min-height: 104px; }
  .gallery-toolbar { flex-wrap: wrap; gap: 4px; margin-top: 13px; }
  .gallery-tools { flex-wrap: wrap; gap: 4px 8px; }
  .gallery-tools a { padding-inline: 3px; }
  .style-jumps { flex-wrap: nowrap; overflow-x: auto; padding: 4px 3px 8px; margin-inline: -3px; margin-bottom: 12px; }
  .style-jumps a { flex-shrink: 0; }
  .style-section-head { flex-wrap: wrap; align-items: start; gap: 9px; }
  .style-section-head > div { flex: 1; min-width: 0; }
  .section-symbol { width: 37px; height: 37px; }
  .section-extra { width: 100%; margin-left: 45px; min-height: 36px; }
  .style-grid { grid-template-columns: minmax(0,1fr); }
  .style-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; column-gap: 5px; }
  .style-card-top { grid-column: 1 / -1; }
  .style-value { margin-bottom: 4px; }
}
@media (max-width: 375px) {
  .style-card { grid-template-columns: minmax(0,1fr); }
}
