/* shared/shared.css */
/* Shared styles for every page. No web fonts: system fonts per script for speed and zero CLS. */

:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #eef1f7;
  --text: #171c28;
  --muted: #4a5366;
  --border: #d5dbe7;
  --primary: #2f5bd3;
  --primary-hover: #2449ad;
  --primary-text: #ffffff;
  --primary-soft: #e6edfd;
  --accent: #b45309;
  --success: #17703f;
  --success-soft: #e3f5ea;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --warn-text: #7a4a00;
  --warn-soft: #fff3dc;
  --focus: #1d4ed8;
  --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 4px 16px rgb(16 24 40 / 6%);
  --radius: 14px;
  --radius-sm: 10px;
  --tap: 44px;
  /* No system-ui: on Windows it maps to the OS UI font of the user's locale (e.g. the 15 MB
     "Yu Gothic UI" on Japanese Windows) even on English pages, which costs ~100 ms of font loading.
     CJK pages get their own stacks below; other scripts fall back per character. */
  /* Only two weights are used site-wide (400 and 700): every extra weight is another font file
     the browser has to open before the first paint. */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1219;
    --surface: #161c26;
    --surface-2: #1e2532;
    --text: #e9edf4;
    --muted: #a9b2c3;
    --border: #2d3646;
    --primary: #7da3ff;
    --primary-hover: #a3bdff;
    --primary-text: #0a1020;
    --primary-soft: #1c2944;
    --accent: #fbbf62;
    --success: #5fd197;
    --success-soft: #12301f;
    --danger: #ff9289;
    --danger-soft: #3a1714;
    --warn-text: #ffd48a;
    --warn-soft: #362806;
    --focus: #a3bdff;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 4px 16px rgb(0 0 0 / 30%);
  }
}

:lang(ja) { --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", "Segoe UI", sans-serif; font-family: var(--font); }
:lang(zh-CN) { --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Hiragino Sans GB", "Segoe UI", sans-serif; font-family: var(--font); }
:lang(ko) { --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Segoe UI", sans-serif; font-family: var(--font); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-wrap: anywhere;
}
:lang(ja) body, :lang(zh-CN) body, :lang(ko) body { line-height: 1.8; }
img, svg, video, canvas { max-width: 100%; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .6em; }
h1 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.3rem, 3.2vw, 1.65rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-hover); }
button, input, select, textarea, ::file-selector-button { font: inherit; }
code, kbd { font-family: var(--mono); font-size: .92em; background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--primary); color: var(--primary-text);
  padding: 10px 16px; border-radius: 8px; text-decoration: none; font-weight: 700;
}
.skip-link:focus { top: 8px; color: var(--primary-text); }

.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }
.icon--small { width: 1em; height: 1em; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  max-width: 1200px; margin: 0 auto; padding: 8px 16px; min-height: 60px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.05rem; min-height: var(--tap); }
.brand svg { width: 32px; height: 32px; }
.brand:hover { color: var(--text); }
.site-nav { display: flex; align-items: center; gap: 6px; }

.menu { position: relative; }
.menu > summary { list-style: none; }
/* Chrome still shapes the text inside a closed <details>; for the language list that means loading
   CJK fallback fonts (10+ MB on Windows) on every page. display:none skips that until it is opened. */
.menu:not([open]) > .menu__panel { display: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu__button {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 6px 12px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text);
  cursor: pointer; font-weight: 700; font-size: .95rem; user-select: none;
}
.menu__button:hover { background: var(--surface-2); }
.menu[open] > .menu__button { background: var(--primary-soft); border-color: var(--primary); }
.menu__panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; margin: 0; padding: 8px; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  max-height: min(70vh, 560px); overflow: auto; min-width: 220px;
}
.menu__panel a {
  display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 8px 12px; border-radius: 8px;
  color: var(--text); text-decoration: none;
}
.menu__panel a:hover, .menu__panel a:focus-visible { background: var(--surface-2); }
.menu__panel a[aria-current="true"] { background: var(--primary-soft); font-weight: 700; }
.menu__panel--tools { min-width: 280px; }
.menu__panel ul { list-style: none; margin: 0; padding: 0; }
.menu__group + .menu__group { margin-top: 6px; border-top: 1px solid var(--border); padding-top: 6px; }
.menu__group-title { margin: 4px 12px; font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.brand { min-width: 0; }
.brand__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-nav { flex: none; }
@media (max-width: 520px) {
  .menu__button { padding: 6px 10px; gap: 4px; }
  .menu__button .icon--small { display: none; }
  .menu__button span { max-width: 9ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .menu--tools .menu__button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .brand__name { max-width: 11ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .menu__panel { position: fixed; left: 8px; right: 8px; top: 68px; min-width: 0; }
}

/* ---------- layout ---------- */
.main { display: block; }
.page { max-width: 1200px; margin: 0 auto; padding: 16px 16px 48px; display: grid; gap: 32px; }
.page__main { min-width: 0; }
.page__side { display: none; }
@media (min-width: 1100px) {
  .page--tool { grid-template-columns: minmax(0, 1fr) 300px; }
  .page__side { display: block; position: relative; }
  .page__side > * + * { margin-top: 24px; }
}
.narrow { max-width: 820px; margin: 0 auto; padding: 16px 16px 56px; }

/* ---------- breadcrumbs ---------- */
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; padding: 0; font-size: .9rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 4px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }

/* ---------- hero ---------- */
.tool-hero { padding: 8px 0 16px; }
.tool-hero__title { margin-bottom: .3em; }
.tool-hero__lead { font-size: 1.08rem; color: var(--muted); max-width: 62ch; }
.privacy-badge {
  display: inline-flex; align-items: center; gap: 10px; margin: 4px 0 0; padding: 10px 14px;
  background: var(--success-soft); color: var(--success); border-radius: 999px; font-weight: 700; font-size: .95rem;
}
.privacy-badge .icon { width: 1.4em; height: 1.4em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 10px 20px; border-radius: 12px; border: 2px solid transparent;
  font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn--primary { background: var(--primary); color: var(--primary-text); }
.btn--primary:hover { background: var(--primary-hover); color: var(--primary-text); }
.btn--secondary { background: var(--surface); color: var(--primary); border-color: var(--primary); }
.btn--secondary:hover { background: var(--primary-soft); color: var(--primary); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.btn--large { min-height: 56px; padding: 14px 28px; font-size: 1.1rem; border-radius: 14px; }
.btn--block { width: 100%; }
.btn--small { min-height: var(--tap); padding: 6px 14px; font-size: .9rem; }
.btn--success { background: var(--success); color: #fff; }
@media (prefers-color-scheme: dark) { .btn--success { color: #08130d; } }
.btn--success:hover { filter: brightness(1.08); color: #fff; }

/* ---------- tool frame ---------- */
.tool {
  background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 40px;
}
@media (min-width: 640px) { .tool { padding: 24px 28px 28px; } }

.steps { list-style: none; display: flex; gap: 8px; margin: 0 0 20px; padding: 0; counter-reset: s; }
.steps__item {
  flex: 1; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px;
  background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: .92rem; min-width: 0;
}
.steps__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps__num {
  display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--border); font-weight: 700; color: var(--muted);
}
.steps__item.is-current { background: var(--primary-soft); color: var(--text); }
.steps__item.is-current .steps__num { border-color: var(--primary); color: var(--primary); }
.steps__item.is-done { color: var(--success); }
.steps__item.is-done .steps__num { background: var(--success); border-color: var(--success); color: var(--surface); }
@media (max-width: 420px) { .steps__item { flex-direction: column; text-align: center; gap: 4px; font-size: .8rem; } .steps__text { white-space: normal; } }

.step { border-top: 1px solid var(--border); padding-top: 20px; margin-top: 20px; }
.step:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.step__title { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; margin-bottom: 14px; }
.step__num {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: var(--primary); color: var(--primary-text); font-size: 1rem; font-weight: 700;
}
.step.is-locked { opacity: .55; }
.step.is-locked .step__body { pointer-events: none; }
.step.is-done .step__num { background: var(--success); color: var(--surface); }

/* ---------- dropzone ---------- */
.dropzone { position: relative; }
.dropzone__input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 1; }
.dropzone__input:focus-visible + .dropzone__label { outline: 3px solid var(--focus); outline-offset: 3px; }
.dropzone__label {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  min-height: 220px; padding: 24px 16px; border: 2.5px dashed var(--border); border-radius: var(--radius);
  background: var(--surface-2); transition: border-color .15s, background-color .15s;
}
.dropzone:hover .dropzone__label, .dropzone.is-dragover .dropzone__label { border-color: var(--primary); background: var(--primary-soft); }
.dropzone__icon .icon { width: 44px; height: 44px; color: var(--primary); }
.dropzone__title { font-size: 1.15rem; font-weight: 700; }
.dropzone__or { color: var(--muted); font-size: .9rem; }
.dropzone__button { pointer-events: none; }
.dropzone__hint { color: var(--muted); font-size: .9rem; max-width: 46ch; }

.file-info {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface-2);
}
.file-info__icon .icon { width: 28px; height: 28px; color: var(--primary); }
.file-info__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.file-info__name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-info__meta { color: var(--muted); font-size: .9rem; }

/* ---------- notices ---------- */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); margin: 14px 0 0; }
.notice .icon { margin-top: .2em; }
.notice__text { margin: 0; }
.notice--error { background: var(--danger-soft); color: var(--danger); }
.notice--warn { background: var(--warn-soft); color: var(--warn-text); }
.notice--info { background: var(--primary-soft); color: var(--text); }

/* ---------- form controls ---------- */
.field { margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.field__label, .field > legend { display: block; font-weight: 700; margin-bottom: 8px; padding: 0; }
.field__hint { color: var(--muted); font-size: .9rem; margin: 6px 0 0; }
select, input[type="text"], input[type="number"], input[type="url"], input[type="email"], textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 10px; min-height: var(--tap); padding: 8px 12px; width: 100%;
}
textarea { min-height: 96px; resize: vertical; }
select:focus-visible, input:focus-visible, textarea:focus-visible { border-color: var(--primary); }
.check { display: flex; align-items: center; gap: 10px; min-height: var(--tap); cursor: pointer; font-weight: 700; }
.check input { width: 22px; height: 22px; accent-color: var(--primary); flex: none; }

/* Segmented control (role=radiogroup) with a sliding highlight. */
.segmented {
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 4px; isolation: isolate;
}
.segmented__thumb {
  position: absolute; z-index: -1; top: 4px; bottom: 4px; left: 4px;
  width: calc((100% - 8px) / var(--count, 2));
  transform: translateX(calc(100% * var(--index, 0)));
  background: var(--surface); border-radius: 10px; box-shadow: var(--shadow); border: 1.5px solid var(--primary);
  transition: transform .28s cubic-bezier(.3, .7, .2, 1);
}
.segmented__option {
  appearance: none; border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--muted);
  min-height: var(--tap); padding: 8px 10px; border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: color .2s;
}
.segmented__option[aria-checked="true"] { color: var(--primary); }
.segmented__option[aria-disabled="true"] { color: var(--muted); opacity: .45; cursor: not-allowed; }
.segmented__option:focus-visible { outline-offset: -3px; }

/* Range slider */
.range { width: 100%; height: var(--tap); accent-color: var(--primary); cursor: pointer; background: transparent; }
.range-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: .85rem; margin-top: -4px; }

/* Progress */
.progress { margin: 16px 0 0; }
.progress__bar { height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.progress__fill { height: 100%; width: 0; background: var(--primary); border-radius: inherit; transition: width .2s; }
.progress__text { display: flex; justify-content: space-between; margin-top: 6px; color: var(--muted); font-size: .92rem; font-variant-numeric: tabular-nums; }

/* ---------- result ---------- */
.result { margin-top: 8px; }
.result__done {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  padding: 20px 16px; border-radius: var(--radius); background: var(--success-soft);
}
.result__title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.2rem; font-weight: 700; color: var(--success); }
.result__meta { margin: 0; color: var(--muted); font-size: .95rem; }
.result__again { margin-top: 4px; }
/* Keep generous space between the download button and anything after it (related tools, share, ads). */
.result__next { margin-top: 56px; }

/* ---------- related / cards ---------- */
.related__title { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.tool-card {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none;
  transition: border-color .15s, transform .15s, box-shadow .15s; min-height: 88px;
}
.tool-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); color: var(--text); }
.tool-card__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; flex: none; background: var(--primary-soft); color: var(--primary); }
.tool-card__icon .icon { width: 24px; height: 24px; }
.tool-card__icon--video { background: #fde8e8; color: #b42318; }
.tool-card__icon--image { background: #e5f6ec; color: #17703f; }
.tool-card__icon--pdf { background: #fff0e0; color: #9a4a00; }
.tool-card__icon--other { background: #efe7fb; color: #6b3fb5; }
@media (prefers-color-scheme: dark) {
  .tool-card__icon--video { background: #3a1714; color: #ff9289; }
  .tool-card__icon--image { background: #12301f; color: #5fd197; }
  .tool-card__icon--pdf { background: #362206; color: #ffbf73; }
  .tool-card__icon--other { background: #2a1d42; color: #c9a8ff; }
}
.tool-card__body { display: flex; flex-direction: column; min-width: 0; }
.tool-card__name { font-weight: 700; }
.tool-card__desc { color: var(--muted); font-size: .92rem; line-height: 1.5; }
.tool-card--featured { border-width: 2px; border-color: var(--primary-soft); background: linear-gradient(135deg, var(--surface), var(--primary-soft)); }
.tool-group + .tool-group { margin-top: 24px; }
.tool-group__title { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; color: var(--muted); }
.side-related { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.side-related__title { font-weight: 700; margin-bottom: 10px; }
.side-related .card-grid { grid-template-columns: 1fr; }
.side-related .tool-card { padding: 10px; border: 0; min-height: 0; }

/* ---------- content sections ---------- */
.content-section { margin: 0 0 48px; }
/* Below-the-fold text is laid out only when it approaches the viewport (cuts first-load main-thread
   work; find-in-page, anchors and screen readers still see the content). */
.content-section, .site-footer { content-visibility: auto; contain-intrinsic-size: auto 640px; }
.article { max-width: 72ch; }
.article h2 { margin-top: 1.6em; }
.article h3 { margin-top: 1.4em; }
.article ul, .article ol { padding-left: 1.3em; }
.article li { margin-bottom: .4em; }
.article table { border-collapse: collapse; width: 100%; margin: 0 0 1.2em; font-size: .95rem; display: block; overflow-x: auto; }
.article th, .article td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.article th { background: var(--surface-2); }
.callout { padding: 14px 16px; border-left: 4px solid var(--primary); background: var(--primary-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 0 0 1.2em; }

.howto { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); counter-reset: none; }
.howto__step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 16px 14px; }
.howto__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); margin-bottom: 10px; }
.howto__icon .icon { width: 26px; height: 26px; }
.howto__num { position: absolute; top: 14px; right: 16px; font-size: 1.8rem; font-weight: 700; color: var(--border); line-height: 1; }
.howto__title { font-size: 1.02rem; margin-bottom: .4em; }
.howto__step p { margin: 0; color: var(--muted); font-size: .95rem; }

.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.feature { display: flex; gap: 12px; align-items: flex-start; }
.feature > .icon { width: 28px; height: 28px; color: var(--success); margin-top: 2px; }
.feature__title { font-size: 1rem; margin-bottom: .25em; }
.feature p { margin: 0; color: var(--muted); font-size: .95rem; }

.faq { display: grid; gap: 10px; }
.faq__item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.faq__q { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: var(--tap); padding: 12px 16px; cursor: pointer; font-weight: 700; }
.faq__q::-webkit-details-marker { display: none; }
.faq__chev { transition: transform .2s; }
.faq__item[open] .faq__chev { transform: rotate(180deg); }
.faq__a { padding: 0 16px 4px; color: var(--muted); }

/* ---------- ads ---------- */
.ad-slot { margin: 40px auto; max-width: 970px; text-align: center; }
.ad-slot__label { margin: 0 0 4px; font-size: .75rem; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
/* Reserve height up front so ads never shift the layout (CLS). */
.ad-slot__unit { display: block; min-height: 280px; width: 100%; }
.ad-slot--sidebar .ad-slot__unit { min-height: 600px; }
.ad-slot--sidebar { margin: 0; }
.ad-slot--result { margin-top: 64px; }
@media (min-width: 768px) { .ad-slot__unit { min-height: 250px; } }
.ad-slot--placeholder .ad-slot__unit {
  display: grid; place-items: center; border: 1.5px dashed var(--border); border-radius: var(--radius-sm);
  color: var(--muted); background: repeating-linear-gradient(45deg, transparent 0 12px, var(--surface-2) 12px 24px);
}
.affiliate { margin: 0 0 40px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.affiliate__label { font-weight: 700; margin-bottom: 6px; }
.affiliate ul { margin: 0; padding-left: 1.2em; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--warn-soft); color: var(--warn-text); font-size: .8rem; font-weight: 700; }

/* ---------- share ---------- */
.share { margin: 0 0 48px; padding: 20px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); text-align: center; }
.share--result { margin-top: 40px; }
.share__title { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 1.15rem; }
.share__title .icon { color: #e0245e; }
.share__native { margin: 0 auto 12px; }
.share__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.share__btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 700; font-size: .92rem; cursor: pointer;
}
.share__btn:hover { border-color: var(--primary); }
.share__btn .icon { width: 18px; height: 18px; }
.share__btn--x .icon { color: var(--text); }
.share__btn--facebook .icon { color: #1877f2; }
.share__btn--reddit .icon { color: #ff4500; }
.share__btn--whatsapp .icon { color: #1fa855; }
.share__btn--telegram .icon { color: #229ed9; }
.share__btn--line .icon { color: #06c755; }
.share__btn--vk .icon { color: #0077ff; }
.share__btn--wechat .icon { color: #07c160; }
.share__btn--kakao .icon { color: #a68a00; }
@media (prefers-color-scheme: dark) { .share__btn--kakao .icon { color: #fee500; } }
.share__status { min-height: 1.6em; margin: 10px 0 0; color: var(--success); font-weight: 700; }
.qr-dialog { border: 0; border-radius: var(--radius); padding: 20px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); max-width: min(92vw, 360px); text-align: center; }
.qr-dialog::backdrop { background: rgb(0 0 0 / 50%); }
.qr-dialog__img { width: 240px; height: 240px; background: #fff; padding: 10px; border-radius: 8px; image-rendering: pixelated; }

/* ---------- language banner (fixed: never shifts layout) ---------- */
.lang-banner {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 70; max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 10px 10px 16px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.lang-banner__text { flex: 1 1 200px; margin: 0; font-size: .95rem; }
.lang-banner__close { display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.lang-banner__close:hover { background: var(--surface-2); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); }
.site-footer__inner { max-width: 1200px; margin: 0 auto; padding: 28px 16px 40px; color: var(--muted); font-size: .92rem; }
.footer-links { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer-links a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--text); }
.site-footer__note { display: flex; gap: 8px; align-items: flex-start; }
.site-footer__note .icon { color: var(--success); margin-top: .25em; }
.site-footer__copy { margin: 0; }

/* ---------- home / neutral / static pages ---------- */
.hero { text-align: center; padding: 40px 16px 24px; max-width: 860px; margin: 0 auto; }
.hero__lead { font-size: 1.15rem; color: var(--muted); }
.hero__points { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.hero__points li { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 700; font-size: .95rem; }
.hero__points .icon { color: var(--success); }
.neutral { max-width: 880px; margin: 0 auto; padding: 48px 16px; text-align: center; }
.neutral__lead { color: var(--muted); }
.lang-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); text-align: left; }
.lang-list a { display: flex; flex-direction: column; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; min-height: var(--tap); }
.lang-list a:hover { border-color: var(--primary); }
.lang-list__name { font-weight: 700; }
.lang-list__desc { color: var(--muted); font-size: .9rem; }
.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.8em; }
.prose ul { padding-left: 1.3em; }
.contact-email { font-size: 1.15rem; font-weight: 700; }
.updated { color: var(--muted); font-size: .9rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .ad-slot, .share, .page__side, .lang-banner { display: none !important; }
}

/* tools/audio-cutter/style.css */
/* Audio Cutter */
.wave { margin: 0 0 16px; }
.wave__canvas {
  display: block; width: 100%; height: 140px; border-radius: var(--radius-sm); background: var(--surface-2);
  border: 1px solid var(--border); touch-action: none; cursor: ew-resize;
}
.trim { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 480px) { .trim { grid-template-columns: 1fr; } }
.trim__field { margin-bottom: 10px; }
.trim__time { font-variant-numeric: tabular-nums; color: var(--primary); margin-left: 6px; }
.trim__length { margin: 0 0 18px; color: var(--muted); }
.trim__length strong { color: var(--text); font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cutter-play { margin: 0 0 18px; }
.preview__buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.preview__buttons .btn { flex: 1 1 140px; }
