:root {
  --paper: #f3efe6;
  --panel: #fffdf8;
  --ink: #16211d;
  --muted: #6f7974;
  --line: #d7d8d0;
  --green: #08a57c;
  --green-dark: #08745a;
  --green-soft: #def5ed;
  --blue: #3f75f2;
  --blue-dark: #2859bc;
  --blue-soft: #e7eeff;
  --coral: #f36d53;
  --coral-dark: #b44735;
  --coral-soft: #ffe1d8;
  --yellow: #f2c44d;
  --yellow-soft: #fff1c7;
  --shadow: 0 22px 60px rgb(38 43 38 / 12%);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--paper); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 0 4%, rgb(8 165 124 / 14%), transparent 25%),
    radial-gradient(circle at 100% 5%, rgb(243 109 83 / 18%), transparent 28%),
    var(--paper);
  font-family: Inter, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 4px solid rgb(63 117 242 / 24%);
  outline-offset: 3px;
}

.page {
  width: min(1560px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(450px, .8fr);
  align-items: end;
  gap: 12px 28px;
  padding: 0 4px 24px;
}

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

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 9px;
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
}

.eyebrow i {
  position: relative;
  width: 27px;
  height: 20px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.eyebrow i::before, .eyebrow i::after {
  position: absolute;
  left: 4px;
  height: 2px;
  border-radius: 2px;
  content: "";
}
.eyebrow i::before { top: 5px; width: 10px; background: currentColor; }
.eyebrow i::after { right: 3px; bottom: 4px; left: auto; width: 13px; background: var(--coral); }

h1 {
  margin: 0;
  font-family: "Arial Black", Inter, sans-serif;
  font-size: clamp(48px, 5.7vw, 88px);
  line-height: .96;
  letter-spacing: normal;
}
h1 span:first-child { color: var(--coral-dark); }
h1 span:last-child { color: var(--green-dark); }

.lead {
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.35vw, 23px);
  font-weight: 800;
  line-height: 1.5;
}
.lead strong { color: var(--ink); }

.hero-actions { display: flex; justify-content: flex-end; align-items: center; gap: 9px; }
.support-badge, .utility-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-radius: 13px;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}
.support-badge { gap: 8px; padding: 0 14px; color: var(--green-dark); background: var(--green-soft); border: 1px solid #99d8c5; }
.support-badge i { width: 9px; height: 9px; background: currentColor; border-radius: 50%; box-shadow: 0 0 0 4px rgb(8 165 124 / 13%); }
.utility-button { justify-content: center; padding: 0 15px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; }
.utility-button--dark { color: #fff; background: var(--ink); border-color: var(--ink); }

.studio {
  display: grid;
  grid-template-columns: minmax(330px, .7fr) minmax(0, 1.65fr);
  gap: 18px;
  align-items: stretch;
}

.control-card, .comparison-card, .guide-card, .code-card {
  overflow: hidden;
  background: rgb(255 253 248 / 97%);
  border: 1px solid var(--line);
  border-radius: 25px;
  box-shadow: var(--shadow);
}
.control-card { grid-column: 1; grid-row: 1; }
.comparison-card { grid-column: 2; grid-row: 1; min-width: 0; }
.guide-card { grid-column: 1; grid-row: 2; }
.code-card { grid-column: 2; grid-row: 2; min-width: 0; color: #f8fbf9; background: #101a16; border-color: #101a16; }

.panel-head {
  display: flex;
  align-items: center;
  min-height: 78px;
  gap: 12px;
  padding: 16px 20px;
  background: rgb(255 253 248 / 97%);
  border-bottom: 1px solid var(--line);
}
.panel-head > div { min-width: 0; }
.panel-head p, .code-head span { margin: 0 0 3px; color: var(--coral-dark); font-size: 10px; font-weight: 900; letter-spacing: .11em; }
.panel-head h2, .code-head h2 { margin: 0; font-size: clamp(18px, 1.45vw, 25px); line-height: 1.15; }
.section-mark { display: grid; flex: 0 0 47px; width: 47px; height: 47px; place-items: center; color: #fff; border-radius: 15px; font-size: 11px; font-weight: 900; }
.section-mark--green { background: var(--green); }
.section-mark--blue { background: var(--blue); }
.section-mark--coral { background: var(--coral); }
.panel-head--comparison { padding-right: 18px; }
.same-form-badge { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; padding: 8px 11px; color: var(--blue-dark); background: var(--blue-soft); border-radius: 999px; font-size: 10px; font-weight: 900; white-space: nowrap; }
.same-form-badge i { width: 15px; height: 8px; border: 2px solid currentColor; border-radius: 50%; }

.control-section { padding: 22px 20px; border-bottom: 1px solid var(--line); }
.control-label { display: flex; justify-content: space-between; align-items: end; gap: 14px; margin-bottom: 13px; }
.control-label div { display: grid; gap: 4px; }
.control-label span, .warning-note > span { color: var(--green-dark); font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.control-label b { font-size: 16px; }
.control-label output { color: var(--green-dark); font-size: 11px; font-weight: 900; }
.sample-switch { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: #eeede7; border: 1px solid #d1d2cc; border-radius: 14px; }
.sample-switch button { z-index: 1; display: grid; gap: 2px; min-height: 59px; padding: 7px; background: transparent; border: 0; border-radius: 10px; cursor: pointer; }
.sample-switch button span { color: var(--muted); font-size: 10px; font-weight: 900; }
.sample-switch button b { font-size: 12px; }
.sample-indicator { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); background: #fff; border: 1px solid #d8d8d2; border-radius: 10px; box-shadow: 0 4px 10px rgb(35 40 36 / 9%); transition: translate .35s var(--ease); }
.sample-switch button:nth-child(2)[aria-pressed="true"] ~ .sample-indicator { translate: 100% 0; }
.control-help { margin: 9px 0 0; color: var(--muted); font-size: 10px; font-weight: 700; line-height: 1.55; }

.form-preview { margin: 20px; overflow: hidden; background: #f7f8f5; border: 1px solid var(--line); border-radius: 18px; }
.mini-browser { display: flex; align-items: center; gap: 5px; height: 31px; padding: 0 11px; background: #e8e7e1; border-bottom: 1px solid var(--line); }
.mini-browser i { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }
.mini-browser i:nth-child(2) { background: var(--yellow); }
.mini-browser i:nth-child(3) { background: var(--green); }
.mini-browser span { margin-left: auto; color: var(--muted); font-size: 10px; font-weight: 800; }
.form-preview form { display: grid; gap: 12px; padding: 17px; }
.form-preview label { display: grid; gap: 6px; }
.form-preview label span { font-size: 11px; font-weight: 900; }
.form-preview em { color: var(--coral-dark); font-size: 10px; font-style: normal; }
.form-preview input, .form-preview select { width: 100%; min-height: 43px; padding: 0 12px; color: var(--ink); background: #fff; border: 1px solid #bfc4bd; border-radius: 11px; font-size: 12px; }
.form-preview select {
  appearance: none;
  padding-right: 3em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%2316211d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 1em center;
  background-repeat: no-repeat;
  background-size: 1em auto;
}
#nativeSubmitter { min-height: 43px; color: #fff; background: var(--ink); border: 0; border-radius: 11px; font-size: 11px; font-weight: 900; }

.warning-note { margin: 0 20px 20px; padding: 16px; background: var(--yellow-soft); border: 1px solid #eac667; border-radius: 16px; }
.warning-note > span { color: #956918; }
.warning-note b { display: block; margin: 7px 0 4px; font-size: 15px; }
.warning-note code { color: var(--coral-dark); }
.warning-note p { margin: 0; color: #796b4e; font-size: 10px; font-weight: 700; }

.routes { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 18px; background-image: linear-gradient(#e8e8e3 1px, transparent 1px), linear-gradient(90deg, #e8e8e3 1px, transparent 1px); background-size: 24px 24px; }
.route { min-width: 0; padding: 17px; background: rgb(255 253 248 / 95%); border: 1px solid var(--line); border-radius: 19px; transition: border-color .3s, box-shadow .3s; }
.route--submit { border-color: #e7aa9f; }
.route--request { border-color: #9ddbc9; }
.route[data-state="bypassed"] { box-shadow: inset 0 0 0 2px rgb(243 109 83 / 22%); }
.route[data-state="blocked"], .route[data-state="success"] { box-shadow: inset 0 0 0 2px rgb(8 165 124 / 20%); }
.route > header { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.route > header span { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.route > header h3 { margin: 4px 0 0; font-size: clamp(18px, 1.6vw, 26px); }
.route > header code { padding: 7px 9px; color: var(--muted); background: #f1f1ec; border-radius: 9px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.run-button { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 48px; margin: 16px 0 12px; padding: 0 15px; color: #fff; border: 0; border-radius: 13px; cursor: pointer; font-size: 11px; font-weight: 900; }
.route--submit .run-button { background: var(--coral-dark); }
.route--request .run-button { background: var(--green-dark); }
.run-button i { font-size: 20px; font-style: normal; }
.route-line { display: flex; align-items: center; justify-content: space-around; height: 24px; margin: 0 6px; border-top: 2px solid #d6d8d2; }
.route-line i { width: 9px; height: 9px; margin-top: -11px; background: #fff; border: 2px solid #adb3ad; border-radius: 50%; transition: .25s; }
.route.is-running .route-line i { animation: routePulse .45s var(--ease) backwards; }
.route.is-running .route-line i:nth-child(2) { animation-delay: .09s; }
.route.is-running .route-line i:nth-child(3) { animation-delay: .18s; }
@keyframes routePulse { 0% { scale: .7; background: #fff; } 55% { scale: 1.45; background: var(--yellow); } 100% { scale: 1; } }
.checks { display: grid; gap: 8px; }
.checks > div { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 56px; padding: 8px 10px; background: #f6f6f1; border: 1px solid #e0e1db; border-radius: 12px; }
.checks > div > span { display: grid; width: 27px; height: 27px; place-items: center; color: var(--muted); background: #fff; border: 1px solid #d7d9d3; border-radius: 8px; font-size: 10px; font-weight: 900; }
.checks p { display: grid; gap: 2px; margin: 0; }
.checks b { font-size: 11px; }
.checks small { color: var(--muted); font-size: 10px; }
.checks strong { padding: 6px 8px; color: var(--muted); background: #e9eae5; border-radius: 8px; font-size: 10px; white-space: nowrap; }
.checks [data-tone="danger"] strong { color: var(--coral-dark); background: var(--coral-soft); }
.checks [data-tone="success"] strong { color: var(--green-dark); background: var(--green-soft); }
.checks [data-tone="neutral"] strong { color: #816721; background: var(--yellow-soft); }
.route > footer { display: flex; justify-content: space-between; align-items: center; min-height: 42px; margin-top: 11px; padding: 0 11px; color: #fff; background: var(--ink); border-radius: 11px; }
.route > footer span { font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.route-result { font-size: 11px; }
.versus { position: absolute; z-index: 2; top: 50%; left: 50%; display: grid; width: 42px; height: 42px; place-items: center; translate: -50% -50%; color: #fff; background: var(--ink); border: 4px solid var(--panel); border-radius: 50%; box-shadow: 0 7px 20px rgb(25 35 30 / 18%); }
.versus span { font-size: 10px; font-weight: 900; }

.result-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 0 18px 18px; }
.result-strip > div { display: flex; align-items: end; justify-content: space-between; gap: 8px; min-height: 58px; padding: 11px 13px; background: #fff; border: 1px solid var(--line); border-radius: 13px; }
.result-strip span { color: var(--blue-dark); font-size: 10px; font-weight: 900; }
.result-strip b { font-size: clamp(11px, 1.1vw, 16px); text-align: right; }

.panel-head--compact { min-height: 73px; }
.guide-flow { display: grid; gap: 10px; padding: 18px 18px 10px; }
.guide-flow > div { display: grid; grid-template-columns: 38px 52px minmax(0, 1fr); align-items: center; min-height: 61px; padding: 8px 11px; background: #f8f8f3; border: 1px solid var(--line); border-radius: 14px; }
.guide-flow span { display: grid; width: 33px; height: 33px; place-items: center; color: #fff; background: var(--blue); border-radius: 10px; font-size: 10px; font-weight: 900; }
.guide-flow i { position: relative; width: 37px; height: 2px; background: var(--blue); }
.guide-flow i::after { position: absolute; top: -4px; right: 0; width: 8px; height: 8px; border-top: 2px solid var(--blue); border-right: 2px solid var(--blue); rotate: 45deg; content: ""; }
.guide-flow p { display: grid; gap: 3px; margin: 0; }
.guide-flow b { font-size: 12px; }
.guide-flow small { color: var(--muted); font-size: 10px; }
.guide-answer { margin: 0 18px 18px; padding: 16px; color: var(--green-dark); background: var(--green-soft); border: 1px solid #9bd9c7; border-radius: 15px; }
.guide-answer span { font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.guide-answer p { margin: 7px 0 8px; color: var(--ink); font-size: 11px; font-weight: 700; }
.guide-answer code { font-size: 13px; font-weight: 900; }

.code-head { display: flex; justify-content: space-between; align-items: center; min-height: 73px; gap: 14px; padding: 14px 18px; border-bottom: 1px solid rgb(255 255 255 / 13%); }
.code-head span { color: var(--yellow); }
.code-head button { min-height: 40px; padding: 0 14px; color: #fff; background: var(--coral); border: 0; border-radius: 11px; cursor: pointer; font-size: 10px; font-weight: 900; }
.code-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(230px, .62fr); gap: 13px; padding: 14px; }
.code-layout pre { min-height: 252px; margin: 0; overflow: auto; padding: 19px; background: #07100c; border: 1px solid rgb(255 255 255 / 12%); border-radius: 15px; }
.code-layout pre code { color: #e5eee9; font: 700 12px/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; }
.code-layout aside { padding: 18px; background: #1c273f; border: 1px solid #35466c; border-radius: 15px; }
.code-layout aside > span { color: #9db7ff; font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.code-layout aside h3 { margin: 10px 0; font-size: 21px; line-height: 1.2; }
.code-layout aside p { margin: 0 0 14px; color: #b8c3bd; font-size: 10px; font-weight: 700; line-height: 1.6; }
.code-layout aside p code { color: #9ddbc9; }
.code-layout aside > div { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 7px; min-height: 40px; border-top: 1px solid rgb(255 255 255 / 12%); }
.code-layout aside > div b { font-size: 10px; }
.code-layout aside > div i { color: var(--yellow); font-style: normal; }
.code-layout aside > div small { color: #9db7ff; font-size: 10px; font-weight: 900; }

.toast { position: fixed; z-index: 20; right: 22px; bottom: 22px; padding: 12px 16px; color: #fff; background: var(--ink); border-radius: 12px; box-shadow: var(--shadow); opacity: 0; translate: 0 12px; pointer-events: none; font-size: 11px; font-weight: 900; transition: .25s var(--ease); }
.toast[data-visible="true"] { opacity: 1; translate: 0 0; }

@media (max-width: 1120px) {
  .hero { grid-template-columns: 1fr; }
  .hero-actions { justify-content: flex-start; flex-wrap: wrap; }
  .studio { grid-template-columns: 1fr; }
  .control-card, .comparison-card, .guide-card, .code-card { grid-column: 1; grid-row: auto; }
  .control-card { order: 1; }
  .comparison-card { order: 2; }
  .guide-card { order: 3; }
  .code-card { order: 4; }
}

@media (max-width: 700px) {
  .page { width: min(100% - 20px, 620px); padding-top: 17px; }
  .hero { gap: 10px; padding-bottom: 17px; }
  h1 { font-size: clamp(32px, 9.4vw, 48px); }
  h1 span { white-space: nowrap; }
  .support-badge { display: none; }
  .routes { grid-template-columns: 1fr; }
  .versus { top: 50%; }
  .result-strip { grid-template-columns: 1fr 1fr; }
  .code-layout { grid-template-columns: 1fr; }
  .panel-head { padding-inline: 14px; }
  .same-form-badge { display: none; }
}

@media (max-width: 440px) {
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .utility-button { width: 100%; padding-inline: 8px; }
  .checks > div { grid-template-columns: 28px minmax(0, 1fr); }
  .checks strong { grid-column: 2; justify-self: start; }
  .result-strip { grid-template-columns: 1fr; }
}

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