:root {
  color-scheme: light;
  --page: #f8f6fc;
  --white: #fff;
  --ink: #1e1730;
  --muted: #62596f;
  --line: #e7e0ef;
  --soft: #f8f6fb;
  --accent: #6440ce;
  --accent-hover: #5332b6;
  --accent-soft: #efe8ff;
  --radius: 20px;
  font-family: Inter, "Hiragino Sans", "Yu Gothic", Meiryo, system-ui, sans-serif;
  color: var(--ink);
  background: var(--page);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 280px; }
a { color: inherit; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .4; }
button, input, a { touch-action: manipulation; }
:focus-visible { outline: 3px solid #956df5; outline-offset: 3px; }
h1, h2, p { margin: 0; }
.shell { width: min(100% - 64px, 1160px); margin-inline: auto; }
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-weight: 900; font-size: 17px; letter-spacing: -.045em; text-decoration: none; white-space: nowrap; }
.brand-icon { width: 32px; height: 32px; border-radius: 10px; margin-right: 4px; background: var(--accent); display: grid; place-items: center; }
.brand-icon::before { content: ''; width: 15px; height: 20px; background: #fff; clip-path: polygon(49% 3%, 97% 3%, 65% 38%, 91% 38%, 17% 100%, 34% 54%, 7% 54%); }
.brand-play { padding: 3px 6px; border-radius: 4px; color: #5732be; background: var(--accent-soft); font-size: 11px; letter-spacing: .06em; }
.header-inner nav { display: flex; align-items: center; gap: 25px; }
.header-inner nav a, .site-link { font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.header-inner a:hover { color: var(--accent); }
.site-link { display: inline-flex; align-items: center; gap: 7px; }
.site-link span { color: var(--accent); }

.intro { position: relative; padding: 43px 0 34px; isolation: isolate; overflow: hidden; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--accent); font-size: 12px; font-weight: 900; letter-spacing: .17em; }
.eyebrow span { height: 8px; width: 8px; border-radius: 2px; transform: rotate(45deg); background: var(--accent); }
.intro h1 { margin-top: 12px; font-size: clamp(30px, 4.5vw, 51px); letter-spacing: -.065em; font-weight: 900; line-height: 1.25; }
.title-suffix { display: inline-block; white-space: nowrap; }
.title-accent { color: var(--accent); }
.intro > p:last-of-type { margin-top: 10px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.intro-art { position: absolute; z-index: -1; right: 20px; bottom: 11px; width: 235px; height: 145px; color: #ad91f7; pointer-events: none; }
.intro-art i { position: absolute; inset: 39px 11px; border: 1px solid #dacafc; border-radius: 50%; transform: rotate(-26deg); }
.intro-art i:nth-child(2) { transform: rotate(-42deg); }
.intro-art i:nth-child(3) { transform: rotate(-58deg); }
.intro-art b { position: absolute; top: 14px; right: 34px; font-weight: 400; font-size: 27px; }
.intro-art b:last-child { top: 94px; right: 168px; font-size: 15px; }
.notice { padding: 12px 16px; border: 1px solid var(--line); background: var(--white); border-radius: 10px; margin-bottom: 16px; }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: 22px; align-items: start; }
.editor { display: grid; gap: 16px; min-width: 0; }
.card { min-width: 0; padding: 22px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 3px 13px #29124907; }
.section-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.section-head h2 { font-size: 18px; letter-spacing: -.035em; font-weight: 850; line-height: 1.35; }
.section-head p { margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.section-icon { flex: 0 0 39px; height: 39px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font: 800 20px/1 system-ui, sans-serif; }
.fields { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1fr) minmax(0, 1.35fr); gap: 13px; margin-top: 19px; }
.fields label { min-width: 0; display: block; font-size: 12px; font-weight: 800; white-space: nowrap; }
.name-field, .tagline-field { grid-column: 1 / -1; }
.required { color: var(--accent); font-size: 10px; margin-left: 4px; }
input { color: var(--ink); border: 1px solid var(--line); background: var(--soft); border-radius: 9px; min-width: 0; min-height: 42px; padding: 9px 12px; font-size: 14px; letter-spacing: .01em; }
input::placeholder { color: #70667d; }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fields input { width: 100%; display: block; margin-top: 6px; }
.fields input[type="date"] { min-width: 0; display: block; }

.artist-count { margin-left: auto; align-self: flex-start; white-space: nowrap; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--accent); background: var(--accent-soft); border-radius: 100px; padding: 5px 10px; font-weight: 800; }
.search-field { position: relative; margin-top: 18px; }
.search-field input { width: 100%; padding-inline-start: 38px; }
.search-icon { position: absolute; top: 13px; left: 14px; width: 13px; height: 13px; border: 2px solid #7d6a99; border-radius: 50%; pointer-events: none; }
.search-icon::after { content: ''; position: absolute; width: 6px; top: 10px; left: 8px; height: 2px; transform: rotate(45deg); background: #7d6a99; border-radius: 2px; }
.search-status, .lineup-hint { color: var(--muted); font-size: 12px; line-height: 1.55; }
.search-status:not(:empty) { margin-top: 8px; }
.search-results { list-style: none; padding: 0; margin: 9px 0 0; border: 1px solid var(--line); border-radius: 11px; overflow: auto; max-height: 270px; }
.search-results li + li { border-top: 1px solid var(--line); }
.search-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 45px; padding: 9px 11px; border: 0; background: var(--white); text-align: left; color: var(--ink); }
.search-result:focus-visible { outline-offset: -3px; }
.search-result:not(:disabled):hover { background: var(--accent-soft); }
.search-result strong { display: block; overflow-wrap: anywhere; }
.search-result small { display: block; margin-top: 3px; color: var(--muted); }
.search-result > span:last-child { flex: none; color: var(--accent); font-size: 14px; }
.custom-entry { margin: 6px 0 11px; }
.text-button { border: 0; color: var(--accent); font-size: 12px; font-weight: 800; min-height: 36px; background: transparent; padding: 5px 0; white-space: nowrap; }
.text-button span { margin-inline-end: 2px; font-size: 14px; }
.text-button:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }
.custom-form { display: flex; align-items: stretch; gap: 8px; margin-top: 2px; }
.custom-form input { flex: 1; }
.small-button { border: 1px solid var(--line); background: var(--white); color: var(--accent); border-radius: 8px; padding: 8px 13px; font-size: 13px; font-weight: 800; }
.small-button:hover { background: var(--accent-soft); }
.lineup-empty { display: flex; justify-content: center; align-items: center; gap: 8px; min-height: 56px; border: 1px dashed #d9cdea; background: #fcfaff; border-radius: 10px; color: var(--muted); font-size: 12px; text-align: center; padding: 8px; }
.lineup-empty span { color: #8c67de; font-size: 17px; }
.lineup { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lineup-hint { margin-bottom: 8px; }
.lineup li { display: flex; align-items: center; gap: 7px; min-height: 45px; border: 1px solid var(--line); background: var(--soft); border-radius: 9px; padding: 4px 6px; }
.lineup li[data-drag-over] { outline: 2px solid var(--accent); }
.lineup-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 750; }
.drag-handle { color: #7d6a99; padding: 4px; cursor: grab; user-select: none; touch-action: none; }
.lineup-actions { display: flex; gap: 3px; }
.lineup-actions button { padding: 0; width: 32px; min-height: 34px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: var(--white); font-size: 15px; }
.lineup-actions button:not(:disabled):hover, .lineup-actions [aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }

.templates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.templates button, .formats button { color: var(--muted); background: var(--white); border: 1px solid var(--line); border-radius: 9px; font-size: 12px; font-weight: 800; }
.templates button { min-height: 43px; padding: 6px; display: flex; justify-content: center; align-items: center; gap: 7px; }
.templates .swatch { flex: 0 0 20px; height: 20px; border-radius: 5px; }
.templates button[aria-pressed="true"], .formats button[aria-pressed="true"], .mobile-switch button[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); border-color: #c6acf7; }
.templates button:hover, .formats button:hover { border-color: #a27ce7; }
.preview { position: sticky; top: 14px; }
.preview-head { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.sample-button span { margin: 0; }
.preview-design { display: none; }
.formats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 15px 0 12px; }
.formats button { padding: 6px; min-height: 35px; }
.stage { --poster-width: 320px; min-width: 0; min-height: 433px; position: relative; display: grid; place-items: center; padding: 16px 12px; border: 1px solid #ded3ed; border-radius: 13px; overflow: hidden; background-color: #ece6f6; background-image: radial-gradient(#bdaed177 1px, transparent 1px), radial-gradient(ellipse at 50% 55%, #eee8f8, transparent 74%); background-size: 17px 17px, cover; }
.stage[data-format="square"] { --poster-width: 355px; }
.stage[data-format="story"] { --poster-width: 225px; }
#poster { display: block; width: min(100%, var(--poster-width)); height: auto; box-shadow: 0 11px 25px #2b194844; background: #171025; }
.stage-sample { position: absolute; top: 9px; left: 9px; z-index: 1; border: 1px solid #d6c5ed; border-radius: 5px; padding: 3px 6px; color: #593b8f; background: #faf7ff; font-weight: 800; font-size: 10px; }
.primary-button { border: 1px solid transparent; background: var(--accent); color: #fff; border-radius: 10px; min-height: 46px; padding: 8px 13px; font-size: 14px; font-weight: 850; }
.primary-button:hover { background: var(--accent-hover); }
#download { width: 100%; margin-top: 13px; }
.download-icon { display: inline-block; border-bottom: 1px solid currentColor; line-height: .85; margin-right: 5px; font-size: 17px; }
.share-actions { display: flex; gap: 7px; margin-top: 7px; }
.share-actions > * { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 5px; text-align: center; text-decoration: none; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--white); font-size: 12px; font-weight: 750; white-space: nowrap; }
.share-actions > *:hover { color: var(--accent); background: var(--accent-soft); }
.share-actions span { font-size: 15px; }
.draft-note { margin-top: 9px; text-align: center; color: var(--muted); font-size: 11px; }
.mobile-switch { display: none; }

dialog { width: min(100% - 36px, 410px); color: var(--ink); padding: 22px; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 40px #1b103733; }
dialog::backdrop { background: #1b103780; }
dialog h2 { font-size: 17px; }
dialog p { margin-block: 8px 16px; line-height: 1.6; color: var(--muted); font-size: 13px; }
dialog form { display: flex; gap: 8px; justify-content: end; }
.how-to { padding: 37px 0 36px; scroll-margin-top: 12px; }
.how-to h2 { font-size: 23px; margin-bottom: 12px; }
.how-to ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 28px; margin: 0; padding-left: 20px; }
.how-to li::marker { color: var(--accent); font-weight: 850; }
.how-to strong { font-size: 14px; }
.how-to li p, .poster-note { color: var(--muted); font-size: 13px; line-height: 1.65; }
.poster-note { margin-top: 18px; }
.poster-note + .poster-note { margin-top: 4px; }
.site-footer { border-top: 1px solid var(--line); background: var(--white); }
.play-footer-ad { width: min(336px, calc(100% - 24px)); min-height: 1px; margin: 16px auto; }
.play-footer-ad .adsbygoogle { display: block; }
.footer-inner { min-height: 64px; color: var(--muted); }
.footer-inner .brand { font-size: 14px; }
.footer-inner small { font-size: 11px; }
.toast { position: fixed; z-index: 10; bottom: 16px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 28px); border-radius: 10px; padding: 10px 15px; color: #fff; background: #29203c; box-shadow: 0 8px 22px #25143a46; font-size: 13px; pointer-events: none; }
.toast:empty { display: none; }
.visually-hidden { position: absolute; height: 1px; width: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.home { min-height: calc(100vh - 134px); display: grid; align-items: center; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 40px; padding-block: 50px; }
.home h1 { margin-block: 11px; font-size: clamp(43px, 5.8vw, 79px); letter-spacing: -.07em; line-height: .98; }
.home h1 em { color: var(--accent); font-style: normal; }
.home > div > p:not(.eyebrow) { color: var(--muted); line-height: 1.7; }
.home-tool { display: block; border: 1px solid var(--line); border-radius: 17px; background: var(--white); padding: 20px; margin-top: 27px; text-decoration: none; }
.home-tool strong { display: block; font-size: 24px; margin: 7px 0; }
.home-tool.home-tool-power { margin-top: 12px; background: #211937; border-color: #3f2e60; color: #f4ecff; }
.home-tool.home-tool-power:hover { border-color: #9270cf; }
.home-tool.home-tool-power .eyebrow { color: #e4fc9e; }
.home-tool.home-tool-power > span:last-child { color: #c9badf; }
.home-tool.home-tool-power b { color: #e4fc9e; }
.home-tool.home-tool-gacha { margin-top: 12px; border-color: #d0e58a; background: #f2ffc9; }
.home-tool.home-tool-gacha:hover { border-color: var(--accent); }
.home-tool > span:last-child { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.home-tool b { color: var(--accent); font-size: 21px; }
.home-tool:hover { border-color: var(--accent); }
.home-art { border-radius: 20px; overflow: hidden; display: block; box-shadow: 0 13px 32px #2d1d4933; background: #171025; }
.home-art img { width: 100%; height: auto; display: block; }

@media (max-width: 1000px) {
  .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .venue-field { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .shell { width: calc(100% - 30px); }
  .header-inner { min-height: 57px; gap: 10px; }
  .header-inner nav { gap: 13px; }
  .header-inner nav a, .site-link { font-size: 11px; }
  .brand { font-size: 15px; gap: 5px; }
  .brand-icon { width: 27px; height: 27px; border-radius: 8px; margin-right: 2px; }
  .brand-icon::before { transform: scale(.78); }
  .brand-play { font-size: 9px; padding: 3px 4px; }
  .intro { padding: 29px 0 20px; }
  .intro h1 { margin-top: 9px; font-size: clamp(30px, 7.8vw, 44px); }
  .intro > p:last-of-type { font-size: 13px; margin-top: 8px; text-wrap: balance; }
  .intro-art { right: -95px; bottom: -28px; opacity: .65; transform: scale(.8); }
  .workspace { display: block; }
  .editor { gap: 12px; }
  .card { border-radius: 15px; padding: 16px; }
  .mobile-switch { position: sticky; top: 4px; z-index: 3; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 12px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); }
  .mobile-switch button { color: var(--muted); background: transparent; min-height: 39px; border: 1px solid transparent; border-radius: 7px; font-size: 13px; font-weight: 800; }
  .workspace:not([data-view="preview"]) .preview { display: none; }
  .workspace[data-view="preview"] .editor { display: none; }
  .preview { position: static; }
  #design-card { display: none; }
  .preview-design { display: block; }
  .formats { margin-top: 8px; }
  .stage { min-height: 330px; --poster-width: 285px; }
  .stage[data-format="square"] { --poster-width: 303px; }
  .stage[data-format="story"] { --poster-width: 201px; }
  .lineup-actions button { min-width: 35px; min-height: 38px; }
  input { font-size: 16px; min-height: 44px; }
  .how-to { padding-block: 25px; }
  .how-to ol { grid-template-columns: 1fr; gap: 11px; }
  .home { grid-template-columns: 1fr; padding-block: 34px; gap: 24px; }
}

@media (max-width: 355px) {
  .shell { width: calc(100% - 22px); }
  .card { padding: 12px; }
  .header-inner nav { gap: 7px; }
  .intro h1 { font-size: 28px; }
  .section-head { gap: 8px; }
  .section-head h2 { font-size: 16px; }
  .section-icon { flex-basis: 33px; height: 33px; }
  .lineup-actions button { width: 30px; min-width: 30px; }
  .drag-handle { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
