:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans JP', sans-serif;
  color: #242139;
  background: #f5f3ff;
  font-synthesis: none;
  line-height: 1.7;
  --purple: #5b36ce;
  --muted: #625e76;
  --line: #d9d4e8;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { max-width: 1320px; margin: auto; padding: 40px 28px 24px; }
.hero { max-width: 850px; padding: 16px 0 32px; }
.eyebrow, .step { color: var(--purple); font-size: .82rem; font-weight: 750; letter-spacing: .06em; }
.eyebrow { display: inline-block; background: #e8e1ff; padding: 5px 12px; border-radius: 100px; }
h1 { font-size: clamp(2rem, 5vw, 3.65rem); line-height: 1.25; letter-spacing: -.045em; margin: 20px 0 14px; }
h2 { margin: 4px 0 8px; font-size: clamp(1.15rem, 2.5vw, 1.5rem); line-height: 1.45; }
h3 { font-size: 1rem; margin: 0 0 16px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
h4 { margin: 0 0 10px; font-size: .86rem; color: var(--muted); }
p { margin: 8px 0 16px; }
.lead { font-size: 1.25rem; font-weight: 700; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.badges span { border: 1px solid var(--line); border-radius: 100px; padding: 4px 11px; background: #fff; font-size: .8rem; }
.badges span:first-child { background: #e6f8af; border-color: #c4df85; }
.notice { background: #eeebfa; border-left: 4px solid #9072db; padding: 15px 20px; border-radius: 4px 12px 12px 4px; font-size: .9rem; margin-bottom: 24px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 26px; margin-bottom: 24px; box-shadow: 0 8px 28px #3c286008; }
.section-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 12px; }
.source-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.source-grid > div, .export-grid > div, .column { min-width: 0; }
label { display: block; font-weight: 650; font-size: .9rem; margin: 10px 0 6px; }
textarea { display: block; width: 100%; max-width: 100%; border: 1px solid #b9b2ce; border-radius: 10px; padding: 13px; resize: vertical; font: .9rem/1.7 ui-monospace, 'SFMono-Regular', Consolas, monospace; color: #242139; background: #fff; min-height: 110px; tab-size: 4; }
textarea::placeholder { color: #716b81; }
textarea[readonly] { background: #f8f7fc; }
.source-grid textarea { min-height: 270px; }
button, select { font: inherit; font-size: .9rem; border: 1px solid #b9b2ce; border-radius: 9px; background: #fff; color: #342852; min-height: 44px; padding: 9px 14px; }
button { cursor: pointer; font-weight: 650; }
button:hover:not(:disabled) { border-color: var(--purple); background: #f0ebff; }
button.primary { color: #fff; background: var(--purple); border-color: var(--purple); }
button.primary:hover:not(:disabled) { background: #4828ac; }
button.quiet { background: transparent; }
button:disabled { opacity: .48; cursor: not-allowed; }
:focus-visible { outline: 3px solid #6b44db; outline-offset: 3px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.selection-box { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 22px; }
.small { font-size: .82rem; color: var(--muted); margin-top: 12px; }
#message { position: sticky; top: 8px; z-index: 1; color: #352163; background: #eee8ff; border-radius: 10px; box-shadow: 0 2px 12px #2b145514; }
#message:not(:empty) { padding: 12px 18px; border: 1px solid #c9b9f0; }
.pill, h3 span { background: #fff; border: 1px solid var(--line); border-radius: 100px; padding: 2px 10px; font-size: .8rem; white-space: nowrap; }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 22px; align-items: start; }
.column { border: 1px solid var(--line); border-radius: 14px; padding: 15px; min-height: 175px; }
.inside { background: #f1f8ed; border-top: 4px solid #588043; }
.outside { background: #fff5ed; border-top: 4px solid #be6729; }
.pending { background: #f2efff; border-top: 4px solid #8560da; }
.empty { color: var(--muted); font-size: .85rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-top: 12px; }
.excerpt { white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto; max-height: 290px; margin: 0 0 14px; font: .88rem/1.75 ui-monospace, 'SFMono-Regular', Consolas, monospace; tab-size: 4; }
.card select { width: 100%; }
.remove { margin-top: 10px; font-size: .8rem; }
.export-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.export-grid button, details button { margin-top: 10px; }
details { margin-top: 25px; border-top: 1px solid var(--line); padding-top: 18px; }
summary { cursor: pointer; color: var(--purple); font-weight: 650; padding: 8px 0; }
footer { padding: 16px 0; color: var(--muted); font-size: .85rem; text-align: center; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .board, .export-grid { grid-template-columns: 1fr; }
  .column { min-height: 120px; }
}
@media (max-width: 640px) {
  main { padding: 20px 14px; }
  .hero { padding-top: 6px; }
  .desktop-break { display: none; }
  .panel { padding: 18px; border-radius: 14px; }
  .source-grid { grid-template-columns: 1fr; gap: 14px; }
  .source-grid textarea { min-height: 220px; }
  .toolbar > button { flex: 1 1 180px; }
  #message { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
