@import url("https://fonts.googleapis.com/css2?family=Inter:wght@500;600;700;800;900&family=Noto+Sans+JP:wght@500;600;700;800;900&display=swap");

:root {
  --paper: #f2f1e9;
  --paper-warm: #fbfaf4;
  --ink: #14201d;
  --muted: #6f7a76;
  --line: #d8d8cf;
  --green: #0b9c78;
  --green-soft: #dff4eb;
  --blue: #3b74f2;
  --blue-soft: #e7eeff;
  --coral: #f46d52;
  --orange: #f39742;
  --dark: #10201b;
  --shadow: 0 18px 50px rgb(25 39 34 / 10%);
}

* { box-sizing: border-box; }

html { color-scheme: light; background: var(--paper); }

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 0 0, rgb(191 222 239 / 44%), transparent 28%),
    radial-gradient(circle at 100% 0, rgb(248 209 193 / 42%), transparent 30%),
    var(--paper);
  font-family: Inter, "Noto Sans JP", sans-serif;
}

button, a { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

.page {
  width: min(1500px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 26px 0 34px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px 24px;
  margin-bottom: 20px;
}

.hero-title { grid-column: 1 / -1; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 8px;
  color: #2a705d;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
}

.eyebrow i {
  position: relative;
  width: 21px;
  height: 18px;
}

.eyebrow i::before,
.eyebrow i::after {
  position: absolute;
  content: "";
}

.eyebrow i::before { top: 0; left: 2px; width: 17px; height: 7px; background: #efb94d; border-radius: 10px 10px 3px 3px; box-shadow: inset 0 -2px 0 rgb(177 107 31 / 18%); }
.eyebrow i::after { bottom: 0; left: 1px; width: 19px; height: 10px; background: linear-gradient(to bottom, #2ea57f 0 2px, #f46d52 2px 4px, #583b2c 4px 7px, #e9a93d 7px 10px); border-radius: 2px 2px 7px 7px; }

h1 {
  margin: 0;
  font-size: clamp(48px, 6vw, 94px);
  line-height: .92;
  letter-spacing: normal;
  font-weight: 900;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.65vw, 25px);
  font-weight: 800;
}

.lead code { color: var(--green); font-family: inherit; }

.hero-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

.support-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  color: #216c57;
  background: var(--green-soft);
  border: 1px solid #a9dfcf;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 900;
}

.support-chip--command { color: #3d5cba; background: var(--blue-soft); border-color: #bdccff; }

.studio {
  display: grid;
  grid-template-columns: minmax(360px, .72fr) minmax(600px, 1.28fr);
  align-items: stretch;
  gap: 18px;
}

.implementation-card,
.preview-card {
  overflow: hidden;
  background: rgb(251 250 244 / 94%);
  border: 1px solid #d6d6ce;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}

.panel-head--wide { padding-right: 18px; }

.panel-head > div { min-width: 0; }
.panel-head p { margin: 0 0 2px; color: #9d4f3e; font-size: 10px; font-weight: 950; letter-spacing: .12em; }
.panel-head h2 { margin: 0; font-size: clamp(18px, 1.55vw, 25px); line-height: 1.12; font-weight: 900; }

.section-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  color: white;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 900;
}

.section-mark--orange { background: var(--orange); }
.section-mark--blue { background: var(--blue); }

.mode-block { padding: 22px 20px 16px; }
.mode-copy span { display: block; margin-bottom: 4px; color: #a14d3a; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.mode-copy h3 { margin: 0 0 13px; font-size: 17px; }

.segmented {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 5px;
  background: #ecebe5;
  border: 1px solid #d7d6ce;
  border-radius: 15px;
}

.segment-indicator {
  position: absolute;
  z-index: -1;
  inset: 5px 50% 5px 5px;
  background: white;
  border-radius: 11px;
  box-shadow: 0 4px 12px rgb(26 33 30 / 12%);
  transition: translate .3s cubic-bezier(.2,.8,.2,1);
}

.segmented[data-mode="command"] .segment-indicator { translate: calc(100% - 5px) 0; }

.segmented button {
  display: grid;
  gap: 2px;
  padding: 10px 6px;
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

.segmented b { font-size: 13px; }
.segmented small { color: var(--muted); font-size: 10px; font-weight: 800; }
.segmented button[aria-pressed="true"] b { color: var(--green); }

.mode-summary { min-height: 126px; padding: 18px 20px; background: #f7f4e8; border-block: 1px solid #e2dcc6; }
.mode-summary > span { display: inline-flex; margin-bottom: 10px; padding: 5px 8px; color: #98611f; background: #f8e2bb; border-radius: 999px; font-size: 10px; font-weight: 950; letter-spacing: .09em; }
.mode-summary strong { display: block; margin-bottom: 7px; font-size: 15px; line-height: 1.4; }
.mode-summary p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; font-weight: 700; }
.mode-summary code { color: #28705d; font-weight: 900; }
.compatibility-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; margin-top: 13px; padding-top: 11px; border-top: 1px solid #ded6bb; }
.compatibility-row span { color: #8d7554; font-size: 10px; font-weight: 900; letter-spacing: .07em; }
.compatibility-row b { justify-self: start; padding: 4px 7px; color: #235f50; background: white; border: 1px solid #d9d6c9; border-radius: 6px; font: 800 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.compatibility-row em { color: #59736b; font-size: 10px; font-style: normal; font-weight: 800; }

.code-card { margin: 18px 20px 12px; overflow: hidden; color: #e9f2ee; background: var(--dark); border: 1px solid #2d3c37; border-radius: 17px; }
.code-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 7px 10px; background: #182923; border-bottom: 1px solid #314039; }
.code-toolbar > button { flex: 0 0 auto; padding: 8px 10px; color: #dff4eb; background: #2b4038; border: 0; border-radius: 8px; font-size: 10px; font-weight: 900; cursor: pointer; }
.code-tabs { display: flex; gap: 3px; padding: 3px; background: #0f1c18; border: 1px solid #33463f; border-radius: 9px; }
.code-tabs button { padding: 6px 9px; color: #82948e; background: transparent; border: 0; border-radius: 6px; font-size: 10px; font-weight: 900; cursor: pointer; }
.code-tabs button[aria-pressed="true"] { color: #17372e; background: #8ee0c7; }
.code-guide { display: flex; align-items: baseline; gap: 10px; padding: 11px 16px; background: #14251f; border-bottom: 1px solid #2b3b35; }
.code-guide > span { flex: 0 0 auto; color: #82cab6; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.code-guide p { margin: 0; color: #9fb0aa; font-size: 10px; line-height: 1.45; font-weight: 700; }
.code-guide code { color: #f5c768; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.code-card pre { min-height: 245px; max-height: 245px; margin: 0; overflow: auto; padding: 16px 18px; }
.code-card code { font: 700 12px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; }
.token-keyword { color: #74b0ff; }
.token-function { color: #f5c768; }
.token-string { color: #72d5b7; }
.token-comment { color: #81918b; }
.token-tag { color: #f8876e; }
.token-attr { color: #bfa7ff; }

.beginner-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 20px 12px; padding: 0; list-style: none; }
.beginner-steps li { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 9px; background: white; border: 1px solid #dedfd8; border-radius: 11px; }
.beginner-steps li > span { display: grid; flex: 0 0 auto; place-items: center; width: 22px; height: 22px; color: white; background: var(--blue); border-radius: 7px; font-size: 10px; font-weight: 900; }
.beginner-steps p { min-width: 0; margin: 0; }
.beginner-steps strong, .beginner-steps small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.beginner-steps strong { font-size: 10px; }
.beginner-steps small { margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 700; }

.separation-note { display: flex; align-items: flex-start; gap: 10px; margin: 0 20px 20px; padding: 13px; background: var(--green-soft); border: 1px solid #c1e9dc; border-radius: 13px; }
.separation-note > span { display: grid; flex: 0 0 auto; place-items: center; width: 22px; height: 22px; color: white; background: var(--green); border-radius: 50%; font-size: 12px; font-weight: 900; }
.separation-note p { margin: 0; color: #477064; font-size: 10px; line-height: 1.55; font-weight: 700; }
.separation-note strong { color: #195d4b; }

.preview-status { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; padding: 8px 11px; color: #325baf; background: var(--blue-soft); border-radius: 999px; font-size: 10px; font-weight: 950; letter-spacing: .07em; }
.preview-status i { width: 7px; height: 7px; background: var(--blue); border-radius: 50%; box-shadow: 0 0 0 4px rgb(59 116 242 / 14%); }

.browser-frame { margin: 18px 18px 14px; overflow: hidden; background: white; border: 1px solid #ced2cc; border-radius: 18px; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 80%); }
.browser-bar { display: flex; align-items: center; gap: 6px; height: 35px; padding: 0 12px; background: #eeeee9; border-bottom: 1px solid #d5d6d0; }
.browser-bar > span { width: 7px; height: 7px; background: #b6bbb7; border-radius: 50%; }
.browser-bar > span:first-child { background: #ef826b; }
.browser-bar > span:nth-child(2) { background: #f4c661; }
.browser-bar > span:nth-child(3) { background: #54be96; }
.browser-bar div { width: min(260px, 48%); margin: 0 auto; padding: 4px 10px; color: #8a938f; background: white; border-radius: 6px; text-align: center; font-size: 8px; font-weight: 700; }

.sample-site { min-height: 470px; background: #f7f8f4; }
.sample-header { display: flex; align-items: center; justify-content: space-between; min-height: 76px; padding: 0 24px; background: white; border-bottom: 1px solid #e1e3dd; }
.sample-logo { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
.sample-logo i { display: flex; flex-direction: column; justify-content: center; gap: 1px; width: 36px; height: 32px; filter: drop-shadow(0 5px 5px rgb(74 45 23 / 14%)); }
.sample-logo i b { display: block; align-self: center; width: 30px; }
.sample-logo i b:nth-child(1) { height: 9px; background: #efb94d; border-radius: 16px 16px 4px 4px; box-shadow: inset 0 -2px 0 rgb(177 107 31 / 16%); }
.sample-logo i b:nth-child(2) { width: 33px; height: 4px; background: #20a27b; border-radius: 50%; clip-path: polygon(0 35%, 14% 0, 28% 55%, 44% 12%, 59% 62%, 76% 8%, 100% 38%, 92% 100%, 8% 100%); }
.sample-logo i b:nth-child(3) { width: 31px; height: 5px; background: #5c3828; border-radius: 4px; box-shadow: inset 0 2px 0 rgb(255 255 255 / 10%); }
.sample-logo i b:nth-child(4) { height: 7px; background: #e9a93d; border-radius: 3px 3px 10px 10px; box-shadow: inset 0 2px 0 rgb(255 232 172 / 35%); }
.sample-logo span { font-size: 9px; line-height: 1.05; font-weight: 950; letter-spacing: .08em; }

.menu-trigger { display: flex; align-items: center; gap: 9px; padding: 10px 12px; color: white; background: var(--dark); border: 0; border-radius: 12px; cursor: pointer; box-shadow: 0 7px 16px rgb(16 32 27 / 16%); }
.menu-trigger > span { display: grid; gap: 3px; width: 17px; }
.menu-trigger i { display: block; width: 100%; height: 2px; background: white; border-radius: 99px; transition: width .2s ease; }
.menu-trigger i:nth-child(2) { width: 70%; }
.menu-trigger:hover i:nth-child(2) { width: 100%; }
.menu-trigger b { font-size: 9px; letter-spacing: .08em; }

.sample-content { display: grid; grid-template-columns: 1fr .9fr; align-items: center; gap: 30px; min-height: 394px; padding: 38px clamp(24px, 5vw, 62px); }
.sample-intro > span { color: var(--green); font-size: 9px; font-weight: 950; letter-spacing: .15em; }
.sample-intro h3 { max-width: 560px; margin: 10px 0 12px; font-size: clamp(28px, 3vw, 48px); line-height: 1.02; }
.sample-intro p { max-width: 430px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; font-weight: 700; }
.sample-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sample-grid article { display: flex; flex-direction: column; min-height: 128px; padding: 15px; background: white; border: 1px solid #daddd7; border-radius: 15px; box-shadow: 0 8px 20px rgb(22 39 33 / 6%); }
.sample-grid article:first-child { grid-column: 1 / -1; min-height: 105px; }
.sample-grid i { width: 24px; height: 24px; margin-bottom: auto; background: var(--blue-soft); border: 2px solid var(--blue); border-radius: 7px; }
.sample-grid article:nth-child(2) i { background: var(--green-soft); border-color: var(--green); border-radius: 50%; }
.sample-grid article:nth-child(3) i { background: #ffe8e1; border-color: var(--coral); rotate: 45deg; }
.sample-grid b { margin-top: 12px; font-size: 11px; }
.sample-grid span { margin-top: 3px; color: var(--muted); font-size: 8px; font-weight: 700; }

.behavior-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 18px 18px; }
.behavior-item { position: relative; min-width: 0; padding: 12px 34px 12px 12px; color: var(--ink); background: white; border: 1px solid #d9dad4; border-radius: 13px; text-align: left; cursor: pointer; transition: background .25s ease, border-color .25s ease, transform .25s ease, box-shadow .25s ease; }
.behavior-item:hover { border-color: #aebbb5; transform: translateY(-2px); box-shadow: 0 7px 16px rgb(25 39 34 / 8%); }
.behavior-item:focus-visible { outline: 3px solid rgb(59 116 242 / 34%); outline-offset: 2px; }
.behavior-item.is-active { background: var(--green-soft); border-color: #8dd5bf; }
.behavior-item.is-selected { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.behavior-item span { display: block; color: #4771d6; font-size: 10px; font-weight: 950; letter-spacing: .1em; }
.behavior-item strong { display: block; overflow: hidden; margin: 4px 0 3px; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.behavior-item small { display: block; color: var(--muted); font-size: 10px; line-height: 1.35; font-weight: 700; }
.behavior-item > i { position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; background: var(--blue-soft); border-radius: 50%; }
.behavior-item > i::before,
.behavior-item > i::after { position: absolute; top: 50%; left: 50%; width: 8px; height: 2px; content: ""; background: #4e6fc2; border-radius: 99px; translate: -50% -50%; }
.behavior-item > i::after { rotate: 90deg; }
.behavior-item.is-selected > i { background: var(--blue); }
.behavior-item.is-selected > i::before { width: 6px; height: 6px; background: white; border-radius: 50%; }
.behavior-item.is-selected > i::after { display: none; }

.behavior-detail { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(210px, .72fr); align-items: center; gap: 14px; min-height: 126px; margin: 0 18px 18px; padding: 16px; background: #eef3ff; border: 1px solid #c6d4fa; border-radius: 16px; }
.behavior-detail__mark { display: grid; place-items: center; width: 44px; height: 44px; color: white; background: var(--blue); border-radius: 14px; }
.behavior-detail__mark span { font-size: 12px; font-weight: 900; }
.behavior-detail__body > span, .behavior-detail__code > span { display: block; margin-bottom: 5px; color: #426ac8; font-size: 10px; font-weight: 950; letter-spacing: .1em; }
.behavior-detail__body h3 { margin: 0 0 5px; font-size: 15px; line-height: 1.35; }
.behavior-detail__body p { margin: 0; color: #596762; font-size: 11px; line-height: 1.55; font-weight: 700; }
.behavior-detail__body code { color: #266856; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 900; }
.behavior-detail__code { min-width: 0; padding: 12px; background: #14231e; border-radius: 11px; }
.behavior-detail__code > span { color: #80c8b3; }
.behavior-detail__code code { display: block; overflow-x: auto; color: #edf5f1; font: 700 10px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: nowrap; }

.site-menu {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(430px, 100vw);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  color: #f4f7f5;
  background: var(--dark);
  border: 0;
  border-left: 1px solid #30433c;
  opacity: 0;
  translate: 100% 0;
  transition:
    opacity .35s ease,
    translate .45s cubic-bezier(.2,.85,.2,1),
    display .45s allow-discrete,
    overlay .45s allow-discrete;
}

.site-menu[open] { opacity: 1; translate: 0 0; }

.site-menu::backdrop {
  background-color: rgb(9 17 14 / 0%);
  backdrop-filter: blur(0) saturate(1);
  cursor: pointer;
  transition:
    background-color .4s ease,
    backdrop-filter .4s ease,
    display .4s allow-discrete,
    overlay .4s allow-discrete;
}

.site-menu[open]::backdrop {
  background-color: rgb(9 17 14 / 62%);
  backdrop-filter: blur(5px) saturate(.7);
}

@starting-style {
  .site-menu[open] { opacity: 0; translate: 100% 0; }

  .site-menu[open]::backdrop {
    background-color: rgb(9 17 14 / 0%);
    backdrop-filter: blur(0) saturate(1);
  }
}

.drawer-shell { display: grid; grid-template-rows: auto 1fr auto; min-height: 100%; padding: 26px; }
.drawer-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 24px; border-bottom: 1px solid #34453f; }
.drawer-header span { color: #76cbb2; font-size: 10px; font-weight: 900; letter-spacing: .15em; }
.drawer-header h2 { margin: 4px 0 0; font-size: 42px; line-height: 1; }

.drawer-close { position: relative; width: 44px; height: 44px; background: #20342d; border: 1px solid #3b5048; border-radius: 50%; cursor: pointer; }
.drawer-close span::before,
.drawer-close span::after { position: absolute; top: 50%; left: 50%; width: 17px; height: 2px; content: ""; background: white; border-radius: 99px; }
.drawer-close span::before { rotate: 45deg; translate: -50% -50%; }
.drawer-close span::after { rotate: -45deg; translate: -50% -50%; }

.drawer-nav { display: flex; flex-direction: column; justify-content: center; }
.drawer-nav a { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 10px; padding: 20px 4px; color: white; border-bottom: 1px solid #33463f; text-decoration: none; }
.drawer-nav a:focus-visible { outline: 3px solid #6ad2b3; outline-offset: 4px; border-radius: 6px; }
.drawer-nav span { color: #6abfa5; font-size: 10px; font-weight: 900; }
.drawer-nav b { font-size: 28px; }
.drawer-nav i { color: #81a096; font-style: normal; font-size: 18px; transition: translate .2s ease; }
.drawer-nav a:hover i { translate: 4px -4px; }

.drawer-footer { display: flex; align-items: end; justify-content: space-between; padding-top: 22px; border-top: 1px solid #34453f; }
.drawer-footer p { display: flex; align-items: center; gap: 7px; margin: 0; color: #779087; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.drawer-footer kbd { padding: 5px 7px; color: white; background: #263a33; border: 1px solid #4b5c56; border-radius: 6px; box-shadow: inset 0 -2px 0 #17251f; }
.drawer-footer small { color: #6fc4aa; font-size: 10px; font-weight: 800; }

@media (max-width: 1100px) {
  .studio { grid-template-columns: 1fr; }
  .implementation-card { display: grid; grid-template-columns: minmax(300px, .82fr) minmax(340px, 1.18fr); }
  .implementation-card > .panel-head { grid-column: 1 / -1; }
  .mode-block, .mode-summary, .separation-note { grid-column: 1; }
  .code-card { grid-column: 2; grid-row: 2 / span 3; }
  .code-card pre { min-height: 320px; max-height: 320px; }
  .beginner-steps { grid-column: 1; }
}

@media (max-width: 760px) {
  .page { width: min(100% - 20px, 680px); padding-top: 18px; }
  .hero { grid-template-columns: 1fr; }
  .hero-title, .lead, .hero-actions { grid-column: 1; }
  .hero-actions { justify-content: flex-start; }
  h1 { font-size: clamp(42px, 12vw, 66px); }
  .studio { grid-template-columns: minmax(0, 1fr); }
  .implementation-card { display: block; }
  .code-card pre { min-height: 275px; max-height: 275px; }
  .beginner-steps { grid-template-columns: 1fr; }
  .sample-content { grid-template-columns: 1fr; }
  .sample-grid { display: none; }
  .behavior-grid { grid-template-columns: 1fr 1fr; }
  .behavior-detail { grid-template-columns: auto 1fr; }
  .behavior-detail__code { grid-column: 1 / -1; }
  .preview-status { display: none; }
  .site-menu { width: 100vw; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
