:root {
  color-scheme: light;
  font-family: "Aptos", "Segoe UI", system-ui, sans-serif;
  background: #f4f5ef;
  color: #1b3329;
  --muted: #4d6558;
  --line: #d8e2d4;
  --surface: #fcfdf8;
  --accent: #284d3e;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
a:focus-visible { outline: 3px solid #397045; outline-offset: 4px; }

.skip-link { position: absolute; top: 8px; left: 8px; z-index: 3; background: var(--surface); padding: 8px 12px; translate: 0 -150%; }
.skip-link:focus { translate: 0 0; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner, .shell { width: min(1210px, 100%); margin-inline: auto; padding-inline: clamp(18px, 4.3vw, 56px); }
.header-inner { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; text-decoration: none; font-size: 22px; font-weight: 750; letter-spacing: -.055em; }
.brand-mark { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 9px; color: #d8eb98; background: var(--accent); }
.brand-twin { color: #50705b; }
.header-inner nav { display: flex; align-items: center; gap: 17px; }
.home-link { font-size: 13px; font-weight: 700; text-decoration: none; }
.home-link:hover { text-decoration: underline; }
.primary-link { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 8px; min-height: 42px; padding: 8px 14px; background: var(--accent); color: #fff; text-decoration: none; white-space: nowrap; font-weight: 720; font-size: 13px; }
.primary-link:hover { background: #37644f; }

.shell { padding-block: 42px 60px; }
.intro { border-bottom: 1px solid var(--line); margin-bottom: 27px; padding-bottom: 29px; }
.eyebrow { margin: 0 0 9px; color: var(--muted); font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .14em; }
.intro h1 { margin: 0; font-size: clamp(2.35rem, 6vw, 4.85rem); line-height: 1.02; letter-spacing: -.073em; }
.intro-summary { max-width: 56ch; margin: 12px 0 0; color: var(--muted); line-height: 1.55; font-size: clamp(.95rem, 1.6vw, 1.1rem); }
.tutorial-tools { display: grid; grid-template-columns: minmax(0, 500px) minmax(0, 250px); align-items: start; gap: 12px; margin-top: 22px; }
.tutorial-tools label { display: block; margin-bottom: 6px; font-size: .84rem; font-weight: 750; }
.tutorial-tools input { width: 100%; min-width: 0; min-height: 44px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: inherit; font: inherit; }
.tutorial-tools :is(input, summary, button):focus-visible { outline: 3px solid #397045; outline-offset: 3px; }
.search-field { position: relative; }
.search-field svg { position: absolute; top: 13px; left: 11px; pointer-events: none; color: var(--muted); }
.search-field input { padding-left: 38px; }
.search-results { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.search-results p, .share-panel p { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.search-results ul { list-style: none; margin: 0; padding: 0; max-height: 345px; overflow: auto; }
.search-results li { margin-top: 7px; }
.search-results a { display: block; padding: 7px 8px; text-decoration: none; border-radius: 6px; font-size: .91rem; font-weight: 740; }
.search-results a:hover, .search-results a:focus-visible { background: #eaf1e3; outline-offset: -2px; }
.search-results span { display: block; margin-top: 2px; color: var(--muted); font-size: .81rem; font-weight: 450; line-height: 1.4; }
.search-results mark { background: #dcebbd; color: inherit; }
.tutorial-share { margin-top: 22px; }
.tutorial-share summary, .share-panel button { width: fit-content; min-height: 44px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--accent); font: inherit; font-size: .85rem; font-weight: 740; cursor: pointer; }
.tutorial-share summary:hover, .share-panel button:hover { background: #eaf1e3; }
.share-panel { margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.share-panel input { font-size: .84rem; }
.share-panel button { display: block; margin-top: 7px; min-height: 38px; padding-block: 8px; }
.share-panel button[hidden] { display: none; }
.share-panel p:not(:empty) { margin-top: 7px; }

.guide { display: grid; grid-template-columns: minmax(190px, 228px) minmax(0, 1fr); align-items: start; gap: clamp(26px, 4.8vw, 65px); }
.contents { position: sticky; top: 22px; align-self: start; padding: 14px 15px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.contents p { font-weight: 760; margin: 0 0 10px; }
.contents ol { padding-left: 21px; margin: 0; }
.contents li { padding-left: 1px; color: var(--muted); font-size: .83rem; line-height: 1.35; }
.contents li + li { margin-top: 8px; }
.contents a { display: block; padding: 3px 0; font-weight: 650; text-decoration: none; }
.contents a:hover { text-decoration: underline; color: #264e3d; }

.chapters { min-width: 0; }
.chapters section { scroll-margin-top: 18px; }
.chapters section + section { border-top: 1px solid var(--line); margin-top: 37px; padding-top: 30px; }
h2 { margin: 0 0 10px; font-size: clamp(1.48rem, 3vw, 2.35rem); line-height: 1.14; letter-spacing: -.045em; }
h3 { margin: 0 0 7px; font-size: 1.13rem; letter-spacing: -.025em; }
.chapters p, .chapters li { color: var(--muted); font-size: .99rem; line-height: 1.62; }
.chapters p { margin: 0 0 17px; }
.chapters strong { color: #254235; }
.chapters .image-tip { margin: 0; font-size: .84rem; }
.steps { padding-left: 22px; margin: 0 0 17px; }
.steps li + li { margin-top: 7px; }

.shot { margin: 17px 0 20px; border: 1px solid var(--line); background: var(--surface); border-radius: 11px; overflow: hidden; }
.shot-link { display: block; width: 100%; cursor: zoom-in; border: 0; padding: 0; background: transparent; }
.shot-link:focus-visible { outline: 3px solid #397045; outline-offset: -4px; }
.shot img { display: block; width: 100%; height: auto; background: #eaf0e4; }
.shot figcaption { padding: 9px 12px; font-size: .82rem; line-height: 1.42; color: var(--muted); border-top: 1px solid var(--line); }
.phone-example { display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, 270px); align-items: center; gap: 23px; padding: 16px; background: #eaf1e6; border: 1px solid var(--line); border-radius: 10px; }
.phone-example .shot, .phone-example p { margin: 0; }
.phone-example p + p, .chapters .phone-example + p { margin-top: 12px; }
.phone-example .steps { margin-bottom: 0; }

table { width: 100%; border-collapse: collapse; table-layout: fixed; color: var(--muted); background: var(--surface); font-size: .86rem; }
caption { text-align: left; padding-bottom: 6px; color: #253f34; font-weight: 750; }
th, td { text-align: left; vertical-align: top; border: 1px solid var(--line); padding: 9px 10px; overflow-wrap: break-word; }
thead th { background: #e9f0e3; color: #254235; }
th:first-child { width: 26%; }
kbd { background: #eaf0e5; border: 1px solid var(--line); border-radius: 3px; padding: 0 3px; font: .87em ui-monospace, monospace; white-space: nowrap; }

.closing { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 19px; }

#screenshot-viewer { width: min(95%, 1370px); padding: 0; max-height: 95vh; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
#screenshot-viewer::backdrop { background: #152e24b5; }
.viewer-header { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.viewer-header h2 { margin: 0; font-size: clamp(.94rem, 2.3vw, 1.25rem); }
.viewer-header form { margin: 0; }
.viewer-header button { padding: 6px 10px; min-height: 36px; background: #edf3e9; color: var(--accent); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; font-family: inherit; font-size: .8rem; font-weight: 650; white-space: nowrap; }
.viewer-header button:hover, .viewer-header button[aria-pressed="true"] { background: #deebd3; }
.viewer-header button:focus-visible, .viewer-scroll:focus-visible { outline: 3px solid #397045; outline-offset: -3px; }
.viewer-scroll { overflow: auto; max-height: 81vh; max-height: 81dvh; background: #e6ede1; }
.viewer-scroll img { display: block; width: auto; max-width: 100%; height: auto; margin-inline: auto; }
.viewer-scroll.is-original img { max-width: none; }

@media (max-width: 740px) {
  .shell { padding-block: 29px 38px; }
  .header-inner { min-height: 55px; }
  .header-inner nav { gap: 9px; }
  .brand { font-size: 19px; gap: 7px; }
  .brand-mark { width: 28px; height: 28px; border-radius: 7px; }
  .home-link { display: none; }
  .primary-link { min-height: 40px; padding-inline: 10px; font-size: 12px; }
  .intro { padding-bottom: 20px; margin-bottom: 16px; }
  .guide { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .contents { position: static; }
  .contents li + li { margin-top: 4px; }
  .chapters section + section { margin-top: 26px; padding-top: 21px; }
  .chapters p, .chapters li { font-size: .93rem; }
  .shot figcaption { font-size: .76rem; }
  .phone-example { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .phone-example figure { width: min(100%, 270px); margin-inline: auto !important; }
  table { font-size: .74rem; }
  th, td { padding: 7px 6px; }
}

@media (max-width: 540px) {
  .tutorial-tools { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 16px; }
  .tutorial-share { margin-top: 0; }
}

@media (max-width: 365px) {
  .header-inner { gap: 7px; }
  .brand { font-size: 17px; }
  .header-inner .primary-link { gap: 6px; padding-inline: 8px; }
}
