/* src/style.css */
:root {
  --bg:#f7f5f3;
  --surface:#fff;
  --ink:#2b2623;
  --sub:#6f6761;
  --line:#e4ded8;
  --accent:#c15f3c;
  --accent-ink:#fff;
  --soft:#faece5;
  --panel:#2b2623;
  --panel-ink:#f3ede8;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --bg:#171413;
    --surface:#211d1b;
    --ink:#ede7e2;
    --sub:#a39a93;
    --line:#35302c;
    --accent:#d97a57;
    --accent-ink:#1a0f0a;
    --soft:#33231c;
    --panel:#0f0d0c;
  }
}
:root[data-theme=dark] {
  --bg:#171413;
  --surface:#211d1b;
  --ink:#ede7e2;
  --sub:#a39a93;
  --line:#35302c;
  --accent:#d97a57;
  --accent-ink:#1a0f0a;
  --soft:#33231c;
  --panel:#0f0d0c;
}
* {
  box-sizing: border-box;
}
html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    14px/1.7 "Hiragino Sans",
    "Noto Sans JP",
    "Yu Gothic",
    system-ui,
    sans-serif;
}
main {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 16px 56px;
}
h1 {
  font-size: 20px;
  margin: 0 0 2px;
  letter-spacing: .02em;
}
.lead {
  color: var(--sub);
  font-size: 12.5px;
  margin: 0 0 8px;
}
section {
  margin-top: 26px;
}
h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  margin: 0 0 12px;
}
h2 i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 12px/1 system-ui, sans-serif;
}
.lbl {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--sub);
  margin: 14px 0 6px;
}
.ic {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
  color: var(--accent);
}
.dd {
  position: relative;
}
.dd-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.dd-btn .dd-t {
  flex: 1;
}
.dd-btn .chev {
  color: var(--sub);
  transition: transform .15s;
}
.dd-btn[aria-expanded=true] {
  border-color: var(--accent);
}
.dd-btn[aria-expanded=true] .chev {
  transform: rotate(180deg);
}
.dd-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.dd-list {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: min(60vh, 380px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.dd-list[hidden] {
  display: none;
}
.dd-list button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.dd-list button:hover {
  background: var(--soft);
}
.dd-list button[aria-selected=true] {
  background: var(--soft);
  color: var(--accent);
  font-weight: 700;
}
.dd-list button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.field {
  margin: 0 0 14px;
}
label.l {
  display: block;
  font-weight: 700;
  font-size: 13px;
}
.hint {
  display: block;
  color: var(--sub);
  font-size: 12px;
  font-weight: 400;
  margin-bottom: 4px;
}
textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  resize: none;
  overflow: hidden;
}
textarea::placeholder {
  color: var(--sub);
  opacity: .65;
}
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  margin: 18px 0 0;
  padding: 0 14px;
}
summary {
  cursor: pointer;
  padding: 12px 0;
  font-weight: 700;
  font-size: 13px;
}
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
details[open] summary {
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.out {
  background: var(--panel);
  color: var(--panel-ink);
  border-radius: 14px;
  padding: 16px;
}
pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0 0 14px;
  font: inherit;
  font-size: 13px;
  line-height: 1.8;
}
.copy {
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.copy:focus-visible {
  outline: 2px solid var(--panel-ink);
  outline-offset: 2px;
}
.note {
  color: var(--sub);
  font-size: 12px;
  margin-top: 16px;
}
.dd.plain .dd-btn,
.dd.plain .dd-list button[aria-selected=true] {
  font-weight: 400;
}
@media (min-width: 900px) {
  main {
    max-width: 1080px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    column-gap: 40px;
    align-items: start;
    padding-top: 36px;
  }
  h1,
  .lead {
    grid-column: 1/-1;
  }
  main > section:nth-of-type(1),
  main > section:nth-of-type(2) {
    grid-column: 1;
  }
  main > section:nth-of-type(3) {
    grid-column: 2;
    grid-row: 3/span 2;
    position: sticky;
    top: calc(24px + env(safe-area-inset-top, 0px));
  }
  pre {
    max-height: calc(100vh - 230px);
    overflow-y: auto;
  }
}
