/* TRES TOOLS component additions. Source: DESIGN_SYSTEM.md, revision 2026-11-09. */
/* Camera compatibility: native disclosures and responsive, fully readable cards. */
html[data-tres-design] .tres-reference-body, html[data-tres-design] .tres-reference-body *, html[data-tres-design] .tres-reference-body *::before, html[data-tres-design] .tres-reference-body *::after { box-sizing:border-box; }
html[data-tres-design] .tres-reference-body { margin:0; }
html[data-tres-design] .tres-reference-layout { max-width:1200px; width:calc(100% - 64px); margin:0 auto; padding:24px 0; }
html[data-tres-design] .tres-reference-layout section { padding:40px 0; border-bottom:1px solid var(--tres-outline); scroll-margin-top:24px; }
html[data-tres-design] .tres-reference-layout h2 { font:400 28px/36px var(--tres-font); }
html[data-tres-design] .tres-reference-layout p { margin:16px 0; line-height:24px; }
html[data-tres-design] .tres-reference-nav { display:flex; flex-wrap:wrap; gap:8px 16px; margin:24px 0; }
html[data-tres-design] .tres-reference-nav :is(a,button) { display:inline-flex; align-items:center; min-height:48px; padding:14px 24px; border:0; border-radius:24px; background:var(--tres-container); color:var(--tres-ink); font:500 14px/20px var(--tres-font); text-decoration:none; cursor:pointer; }
html[data-tres-design] .tres-reference-layout .tres-camera-maker>summary { display:list-item; }
html[data-tres-design] .tres-reference-layout .tres-camera-card h4 { margin:0 0 8px; }
@media(max-width:680px) { html[data-tres-design] .tres-reference-layout { width:calc(100% - 32px); } }
html[data-tres-design] .tres-camera-maker { margin:16px 0; border:1px solid var(--tres-outline); border-radius:12px; }
html[data-tres-design] .tres-camera-maker>summary { cursor:pointer; min-height:64px; padding:16px 24px; color:var(--tres-ink); font:500 22px/28px var(--tres-font); overflow-wrap:anywhere; }
html[data-tres-design] .tres-camera-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; padding:0 24px 24px; margin:0; list-style:none; }
html[data-tres-design] .tres-camera-card { min-width:0; padding:24px; border-radius:12px; background:var(--tres-container); overflow-wrap:anywhere; }
html[data-tres-design] .tres-camera-card h4 { margin:0 0 8px; font:500 22px/28px var(--tres-font); }
html[data-tres-design] .tres-camera-card .tres-camera-status { margin:0 0 16px!important; font-weight:500; color:var(--tres-ink); }
html[data-tres-design] .tres-camera-card dl { margin:0; font:400 16px/24px var(--tres-font); }
html[data-tres-design] .tres-camera-card dt { margin-top:16px; font-weight:500; color:var(--tres-ink); }
html[data-tres-design] .tres-camera-card dd { margin:4px 0 0; }
@media(max-width:680px) {
  html[data-tres-design] .tres-camera-grid { grid-template-columns:minmax(0,1fr); padding:0 16px 16px; }
  html[data-tres-design] .tres-camera-card { padding:16px; }
  html[data-tres-design] .tres-camera-maker>summary { padding:16px; }
}
html[data-tres-design] .hero-platform:has(.tres-product-icon) {
  display:inline-flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:8px 16px!important;
}
html[data-tres-design] .tres-update-card .cl-head {
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:8px 16px!important;
}
html[data-tres-design] .tres-update-card .cl-head .cl-ver {
  margin:0!important;
  padding:0!important;
  border:0!important;
}
html[data-tres-design] .tres-update-card .cl-date {
  display:block!important;
  margin:0 0 16px!important;
  color:var(--tres-body)!important;
  font:400 14px/20px var(--tres-font)!important;
  letter-spacing:0!important;
}
html[data-tres-design] .tres-update-card .cl-cat {
  margin:16px 0 8px!important;
  padding:0!important;
  border:0!important;
  color:var(--tres-ink)!important;
  font:500 14px/20px var(--tres-font)!important;
  letter-spacing:0!important;
  text-transform:none!important;
}
html[data-tres-design] .tres-update-card .cl-cat+.cl-list {
  margin-top:8px!important;
}
html[data-tres-design] .tres-update-card .cl-notes {
  margin-top:16px!important;
  padding-top:8px!important;
  border-top:1px solid var(--tres-outline)!important;
}
html[data-tres-design] .tres-update-card .cl-notes>summary {
  display:flex!important;
  justify-content:space-between!important;
  align-items:center!important;
  gap:16px!important;
  min-height:48px!important;
  padding:12px 0!important;
  cursor:pointer;
  font:500 16px/24px var(--tres-font)!important;
}
html[data-tres-design] .tres-update-card .cl-notes>summary::after {
  content:"＋";
  width:24px;
  flex-shrink:0;
  text-align:center;
}
html[data-tres-design] .tres-update-card .cl-notes[open]>summary::after {
  content:"−";
}
html[data-tres-design] .tres-update-card .cl-notes .cl-list {
  margin-top:8px!important;
}

/* Illustrated camera connection steps: desktop image beside text; mobile text below. */
html[data-tres-design] .tres-camera-steps { list-style:none; margin:24px 0; padding:0; }
html[data-tres-design] .tres-camera-steps>li { padding:32px 0; border-bottom:1px solid var(--tres-outline); scroll-margin-top:160px; }
html[data-tres-design] .tres-camera-steps h3 { margin:0 0 24px; color:var(--tres-ink); font:500 22px/28px var(--tres-font); }
html[data-tres-design] .tres-camera-step-content { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:24px; align-items:start; }
html[data-tres-design] .tres-camera-step-content>*, html[data-tres-design] .tres-camera-step-text { min-width:0; }
html[data-tres-design] .tres-camera-step-content .sc-wrap { margin:0!important; }
html[data-tres-design] .tres-camera-step-text p { margin:0 0 16px; font:400 16px/24px var(--tres-font); overflow-wrap:anywhere; }
html[data-tres-design] .tres-camera-step-text .dtable { table-layout:fixed; width:100%; }
html[data-tres-design] .tres-camera-step-text .dtable :is(th,td) { min-width:0; overflow-wrap:anywhere; }
html[data-tres-design] .tres-camera-step-text:only-child { grid-column:1/-1; }
html[data-tres-design] .tres-camera-image { display:block; width:100%; min-height:48px; border:0; padding:0; background:transparent; cursor:zoom-in; }
html[data-tres-design] .tres-camera-image img { display:block; width:100%; height:auto; aspect-ratio:16/9; object-fit:contain; border:0; border-radius:0; }
html[data-tres-design] .tres-camera-image:focus-visible { outline:3px solid var(--tres-ink); outline-offset:4px; }
html[data-tres-design] .tres-camera-steps figcaption, html[data-tres-design] .tres-camera-image-hint { display:block; margin:8px 0 0; color:var(--tres-body); font:400 14px/20px var(--tres-font); }
html.tres-camera-modal-open { overflow:hidden; }
@media(max-width:680px) { html[data-tres-design] .tres-camera-step-content { grid-template-columns:minmax(0,1fr); gap:24px; } }

/* Preserve tablet screenshot proportions when the rendered width shrinks. */
html[data-tres-design] .sc-img-tablet { height:auto; }

/* One frameless image dialog for camera and tablet screenshots. */
html[data-tres-design] .tres-screenshot-image { display:block; width:100%; max-width:600px; padding:0; border:0; background:transparent; cursor:zoom-in; }
html[data-tres-design] .tres-screenshot-image:focus-visible { outline:3px solid var(--tres-ink); outline-offset:4px; }
html[data-tres-design] :is(.tres-camera-lightbox,.guide-lightbox) { position:fixed; inset:0; width:100vw; max-width:none; height:100dvh; max-height:none; margin:0; padding:72px 16px 16px; border:0; border-radius:0; box-shadow:none; background:transparent; color:#fff; overflow:hidden; }
html[data-tres-design] :is(.tres-camera-lightbox,.guide-lightbox)[open] { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:0; }
html[data-tres-design] :is(.tres-camera-lightbox,.guide-lightbox)::backdrop { background:rgb(0 0 0 / .88); }
html[data-tres-design] :is(.tres-camera-lightbox,.guide-lightbox) img { display:block; width:auto; height:auto; max-width:100%; max-height:100%; margin:0; object-fit:contain; flex:0 1 auto; min-height:0; border:0; border-radius:0; box-shadow:none; }
html[data-tres-design] :is(.tres-camera-lightbox,.guide-lightbox) button { position:fixed; top:16px; right:16px; display:flex; align-items:center; justify-content:center; width:48px; height:48px; min-width:48px; min-height:48px; margin:0; padding:0; border:0; border-radius:24px; background:#171717; color:#fff; cursor:pointer; font:400 32px/1 var(--tres-font); }
html[data-tres-design] :is(.tres-camera-lightbox,.guide-lightbox) button:focus-visible { outline:3px solid #fff; outline-offset:3px; }
html[data-tres-design] :is(.tres-camera-lightbox,.guide-lightbox) p { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }

/* Opt-in data tables: retain left alignment while separating text from cell edges. */
html[data-tres-design] .tres-data-table :is(th,td) {
  padding-inline:16px!important;
  vertical-align:top;
  overflow-wrap:anywhere;
}
html[data-tres-design] .tres-data-table thead :is(th,td) { padding-block:12px!important; }
html[data-tres-design] .tres-data-table tbody th { padding-block:16px!important; }
@media(max-width:680px) {
  html[data-tres-design] .tres-data-table :is(th,td) { padding-inline:12px!important; }
  html[data-tres-design] :is(.tres-data-table--filename,.tres-data-table--status) { table-layout:fixed; }
  html[data-tres-design] .tres-data-table--filename :is(th,td):nth-child(1) { width:44%!important; }
  html[data-tres-design] .tres-data-table--filename :is(th,td):nth-child(2) { width:22%!important; }
  html[data-tres-design] .tres-data-table--filename :is(th,td):nth-child(3) { width:34%!important; }
  html[data-tres-design] .tres-data-table--status :is(th,td):nth-child(1) { width:26%!important; }
  html[data-tres-design] .tres-data-table--status :is(th,td):nth-child(2) { width:46%!important; }
  html[data-tres-design] .tres-data-table--status :is(th,td):nth-child(3) { width:28%!important; }
}

/* Document headers keep product navigation available when controls wrap. */
html[data-tres-design] .tres-header--document,
html[data-tres-design] .tres-header--document .tres-header__inner { height:auto!important; }

/* Renewal v1: opt-in only; original pages remain on the published design. */
html[data-tres-design][data-tres-renewal] .rn-header a { min-width:48px!important; letter-spacing:0!important; }
html[data-tres-design][data-tres-renewal] :is(code,.flow-step span,.flow-index,.flow-arrow,.ui-card-title,.export-type,.folder-box .hl) { color:#333338!important; }
html[data-tres-design][data-tres-renewal] .exp-f { color:#333338!important; }
html[data-tres-design][data-tres-renewal] .env-list span { color:#333338!important; }
html[data-tres-design][data-tres-renewal] :is(.list-key,.viewer-line span,.viewer-node strong,.footer-mark,.env-grid span,.spec-grid span,table th) { color:#333338!important; }
html[data-tres-design][data-tres-renewal] .rn-home-lead { margin-top:24px; font-size:16px; line-height:1.8; color:#333338; }
html[data-tres-design][data-tres-renewal] .rn-hero-secondary { display:inline-flex; align-items:center; justify-content:center; min-height:48px; padding:12px 20px; border:1px solid #c8c8ce; border-radius:8px; font-size:14px; text-decoration:none; color:#111114; }
html[data-tres-design][data-tres-renewal] .rn-hero-primary { order:-1; }
html[data-tres-design][data-tres-renewal] .rn-preview-caption .rd-facts { margin-top:12px!important; }
html[data-tres-design][data-tres-renewal] { --rn-ink:#111114; --rn-body:#333338; --rn-muted:#5e5e66; --rn-line:#e2e2e6; --rn-surface:#f7f7f8; --rn-gold:#c9a333; scroll-padding-top:92px; }
html[data-tres-design][data-tres-renewal] body { margin:0!important; background:#fff!important; color:var(--rn-body)!important; font-family:var(--tres-font),"Yu Gothic",Meiryo,sans-serif!important; font-size:16px!important; line-height:1.75!important; }
html[data-tres-design][data-tres-renewal] *,html[data-tres-design][data-tres-renewal] *::before,html[data-tres-design][data-tres-renewal] *::after { box-sizing:border-box; }
html[data-tres-design][data-tres-renewal] :is(button,summary,[role="button"],.btn-dl,.btn-primary) { min-height:48px!important; min-width:48px!important; height:auto; cursor:pointer; }
html[data-tres-design][data-tres-renewal] :is(a,button,summary):focus-visible { outline:2px solid #111114!important; outline-offset:3px!important; }
html[data-tres-design][data-tres-renewal] :is(h1,h2,h3,h4) { color:var(--rn-ink)!important; letter-spacing:normal!important; }
html[data-tres-design][data-tres-renewal] :is(p,li,td,th,.feat-desc,.sdesc) { overflow-wrap:anywhere; }
html[data-tres-design][data-tres-renewal] img { object-fit:contain!important; height:auto!important; max-width:100%!important; filter:none!important; border-radius:0!important; }
html[data-tres-design][data-tres-renewal] .rn-header { height:68px; position:sticky; top:0; z-index:220; background:#fff; border-bottom:1px solid var(--rn-line); }
html[data-tres-design][data-tres-renewal] .rn-header-inner { max-width:1120px; height:68px; margin:auto; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:0 24px; }
html[data-tres-design][data-tres-renewal] .rn-header a { display:inline-flex!important; align-items:center; justify-content:center; min-height:48px!important; padding:8px!important; color:var(--rn-ink)!important; font-size:14px!important; text-decoration:none; white-space:nowrap; background:none!important; border:0!important; }
html[data-tres-design][data-tres-renewal] .rn-header .tres-header__brand { gap:8px!important; font-family:"Arial Black",Arial,sans-serif!important; font-weight:900; letter-spacing:0!important; }
html[data-tres-design][data-tres-renewal] .rn-header .tres-header__mark { color:#111114!important; background:var(--rn-gold)!important; border:0!important; border-radius:6px!important; width:32px!important; height:32px!important; font-size:26px!important; display:grid; place-items:center; }
html[data-tres-design][data-tres-renewal] .rn-header-links { display:flex; gap:8px; }
html[data-tres-design][data-tres-renewal] .rn-secondary { max-width:1120px; padding:8px 24px; margin:auto; display:flex; gap:8px; flex-wrap:wrap; }
html[data-tres-design][data-tres-renewal] .rn-secondary a { display:inline-flex!important; align-items:center; min-height:48px; padding:8px 12px; color:var(--rn-muted)!important; font-size:14px!important; }
html[data-tres-design][data-tres-renewal] .rn-product-layout { display:grid; grid-template-columns:280px minmax(0,760px); gap:48px; width:calc(100% - 48px); max-width:1120px; margin:24px auto 64px; align-items:start; }
html[data-tres-design][data-tres-renewal] .rn-product-layout main { min-width:0; width:100%!important; margin:0!important; padding:0!important; }
html[data-tres-design][data-tres-renewal] .rn-sidebar { position:sticky; top:92px; max-height:calc(100dvh - 116px); overflow:auto; padding-right:8px; scrollbar-width:thin; }
html[data-tres-design][data-tres-renewal] .rn-sidebar-heading { display:flex; flex-direction:column; gap:12px; margin-bottom:24px; }
html[data-tres-design][data-tres-renewal] .rn-sidebar-heading>strong { font-size:22px; color:var(--rn-ink); }
html[data-tres-design][data-tres-renewal] .rn-sidebar .hero-platform { font-size:13px!important; margin:0!important; }
html[data-tres-design][data-tres-renewal] .rn-sidebar-actions { display:grid; gap:8px; margin-bottom:24px; }
html[data-tres-design][data-tres-renewal] :is(.rn-sidebar-actions,.rn-mobile-cta) .btn-dl { display:flex!important; justify-content:center; align-items:center; gap:8px; width:100%; padding:12px!important; margin:0!important; font-size:14px!important; text-align:center; white-space:normal; }
html[data-tres-design][data-tres-renewal] :is(.btn-dl,.btn-primary,.rn-card-launch) { background:var(--rn-gold)!important; color:#111114!important; border:1px solid var(--rn-gold)!important; border-radius:8px!important; box-shadow:none!important; transform:none!important; font-weight:700!important; }
html[data-tres-design][data-tres-renewal] :is(.btn-dl,.btn-primary,.rn-card-launch):hover { background:#b38f28!important; }
html[data-tres-design][data-tres-renewal] .btn-dl-secondary { background:#fff!important; border-color:#c8c8ce!important; }
html[data-tres-design][data-tres-renewal] .rn-sidebar .toc-bar { position:static!important; border:0!important; background:#fff!important; }
html[data-tres-design][data-tres-renewal] .rn-sidebar .toc-bar-inner { display:flex!important; flex-direction:column; gap:8px; padding:0!important; overflow:visible!important; white-space:normal!important; }
html[data-tres-design][data-tres-renewal] .rn-sidebar .toc-btn { display:flex!important; min-height:48px; padding:10px 12px!important; border:0!important; border-left:3px solid transparent!important; border-radius:0!important; font-size:14px!important; color:var(--rn-body)!important; }
html[data-tres-design][data-tres-renewal] .rn-sidebar .toc-btn.active { border-left-color:var(--rn-gold)!important; background:var(--rn-surface)!important; font-weight:700; }
html[data-tres-design][data-tres-renewal] .toc-btn-num { color:var(--rn-muted)!important; opacity:1!important; }
html[data-tres-design][data-tres-renewal] .rn-sidebar .toc-arrow { display:none!important; }
html[data-tres-design][data-tres-renewal] .rn-sidebar .toc-bar::before,html[data-tres-design][data-tres-renewal] .rn-sidebar .toc-bar::after { display:none; }
html[data-tres-design][data-tres-renewal] :is(.sections-wrap,.hero) { padding:0!important; margin:0!important; max-width:100%!important; width:100%!important; }
html[data-tres-design][data-tres-renewal] .hero { padding-bottom:32px!important; border-bottom:1px solid var(--rn-line)!important; }
html[data-tres-design][data-tres-renewal] :is(.product-hero-layout,.batchre-hero-layout) { display:block!important; }
html[data-tres-design][data-tres-renewal] .hero-title { font-size:28px!important; line-height:1.35!important; font-weight:700!important; margin:16px 0!important; }
html[data-tres-design][data-tres-renewal] .hero-subtitle { max-width:none!important; font-size:16px!important; line-height:1.75!important; }
html[data-tres-design][data-tres-renewal] :is(.hero-platform,.hero-tag,.download-badge,.hero-note,.hero-version,.section-label,.cl-date,.mode-label) { color:var(--rn-muted)!important; font-size:13px!important; }
html[data-tres-design][data-tres-renewal] .hero-tags { margin:24px 0!important; gap:8px!important; }
html[data-tres-design][data-tres-renewal] :is(.product-action-card,.batchre-download-grid) { margin-top:24px!important; box-shadow:none!important; background:var(--rn-surface)!important; }
html[data-tres-design][data-tres-renewal] .section { padding:40px 0!important; max-width:100%!important; width:100%!important; margin:0!important; border-bottom:1px solid var(--rn-line)!important; scroll-margin-top:92px; }
html[data-tres-design][data-tres-renewal] .section-title { font-size:22px!important; line-height:1.4!important; font-weight:700!important; margin-bottom:24px!important; }
html[data-tres-design][data-tres-renewal] .feat-grid { display:grid!important; grid-template-columns:1fr!important; gap:0!important; counter-reset:rn-feature; }
html[data-tres-design][data-tres-renewal] .feat-card { position:relative; counter-increment:rn-feature; background:#fff!important; border:0!important; border-bottom:1px solid var(--rn-line)!important; border-radius:0!important; padding:24px 0 24px 56px!important; box-shadow:none!important; }
html[data-tres-design][data-tres-renewal] .feat-card::before { content:counter(rn-feature,decimal-leading-zero); position:absolute; left:0; top:24px; color:var(--rn-gold); font-size:28px; line-height:1.4; font-weight:700; font-variant-numeric:tabular-nums; }
html[data-tres-design][data-tres-renewal] .feat-card .feat-icon { display:none!important; }
html[data-tres-design][data-tres-renewal] .feat-title { color:var(--rn-ink)!important; font-size:18px!important; font-weight:700!important; margin:0 0 8px!important; }
html[data-tres-design][data-tres-renewal] .feat-desc { font-size:16px!important; line-height:1.75!important; }
html[data-tres-design][data-tres-renewal] table { width:100%!important; table-layout:auto!important; border-collapse:collapse; font-size:15px!important; }
html[data-tres-design][data-tres-renewal] table :is(th,td) { padding:16px!important; width:auto!important; white-space:normal!important; border-bottom:1px solid var(--rn-line)!important; }
html[data-tres-design][data-tres-renewal] table :is(th,td:first-child) { background:var(--rn-surface)!important; color:var(--rn-ink)!important; }
html[data-tres-design][data-tres-renewal] :is(.note,.notice,.warning,.codec-notice,.hero-note,[data-tres-section-role="notes"],#notes,#license,#terms,#privacy) { border-left:4px solid var(--rn-muted)!important; background:var(--rn-surface)!important; padding:24px!important; border-radius:0!important; margin:24px 0!important; }
html[data-tres-design][data-tres-renewal] details { border:1px solid var(--rn-line); border-radius:8px; margin:12px 0; }
html[data-tres-design][data-tres-renewal] summary { padding:12px 16px!important; color:var(--rn-ink)!important; font-size:16px!important; line-height:1.5!important; }
html[data-tres-design][data-tres-renewal] .rn-history { padding:0 16px 16px; }
html[data-tres-design][data-tres-renewal] .rn-history>summary { margin:0 -16px; }
html[data-tres-design][data-tres-renewal] .rn-history>summary h2 { display:inline; margin:0!important; }
html[data-tres-design][data-tres-renewal] .rn-unavailable { min-height:48px; display:grid; place-items:center; background:var(--rn-surface); color:var(--rn-muted); border:1px solid var(--rn-line); border-radius:8px; padding:12px; }
html[data-tres-design][data-tres-renewal] .rn-mobile-cta { display:none; }
html[data-tres-design][data-tres-renewal] footer { max-width:1120px!important; margin:0 auto!important; padding:32px 24px!important; }
html[data-tres-design][data-tres-renewal] footer a { min-height:48px; display:inline-flex; align-items:center; padding:8px; }
html[data-tres-design][data-tres-renewal] #redesign-home { background:#fff!important; }
html[data-tres-design][data-tres-renewal] .rd-shell { max-width:1120px!important; width:calc(100% - 48px)!important; }
html[data-tres-design][data-tres-renewal] .rd-hero { display:grid!important; grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr)!important; gap:64px!important; padding:64px 0!important; align-items:center; }
html[data-tres-design][data-tres-renewal] .rd-hero h1 { font-size:32px!important; line-height:1.6!important; font-weight:700!important; }
html[data-tres-design][data-tres-renewal] .rd-screen { margin:0!important; padding:12px!important; background:var(--rn-surface)!important; border:1px solid #dcdce0!important; border-radius:8px!important; box-shadow:none!important; }
html[data-tres-design][data-tres-renewal] .rd-screen img { display:block; max-height:360px!important; width:100%!important; }
html[data-tres-design][data-tres-renewal] .rn-preview-caption { padding:0 0 12px; font-size:16px; color:var(--rn-ink); }
html[data-tres-design][data-tres-renewal] .rn-preview-caption em { color:var(--rn-ink)!important; font-style:normal; }
html[data-tres-design][data-tres-renewal] .rn-filters { display:flex; flex-wrap:wrap; gap:8px; margin:16px 0; }
html[data-tres-design][data-tres-renewal] .rn-filters button { font:inherit; padding:12px 20px; background:#fff; color:var(--rn-body); border:1px solid #c8c8ce; border-radius:8px; }
html[data-tres-design][data-tres-renewal] .rn-filters button[aria-pressed="true"] { background:var(--rn-gold); border-color:var(--rn-gold); color:#111114; font-weight:700; }
html[data-tres-design][data-tres-renewal] .rn-filter-status:empty { display:none; }
html[data-tres-design][data-tres-renewal] .rn-tools-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
html[data-tres-design][data-tres-renewal] .rn-tool-card { display:flex; flex-direction:column; border:1px solid var(--rn-line); border-radius:12px; padding:24px; background:#fff; }
html[data-tres-design][data-tres-renewal] .rn-tool-card[hidden] { display:none!important; }
html[data-tres-design][data-tres-renewal] .rn-tool-card:hover { border-color:#8e8e96; }
html[data-tres-design][data-tres-renewal] .rn-card-main { display:flex; flex-direction:column; gap:20px; flex:1; text-decoration:none; color:var(--rn-body); }
html[data-tres-design][data-tres-renewal] .rn-card-main :is(.rd-copy,.rd-desc) { font-size:16px!important; line-height:1.75!important; margin:0!important; max-width:none!important; }
html[data-tres-design][data-tres-renewal] .rn-card-main h3 { font-size:18px!important; font-weight:700!important; }
html[data-tres-design][data-tres-renewal] .rn-card-main .tres-tool-heading { display:flex; gap:16px!important; align-items:center; }
html[data-tres-design][data-tres-renewal] .rn-card-main .tres-card-icon { width:48px!important; height:48px!important; flex-shrink:0; }
html[data-tres-design][data-tres-renewal] .rn-card-main .tres-tool-platform { font-size:13px!important; color:var(--rn-muted)!important; }
html[data-tres-design][data-tres-renewal] .rn-card-launch { margin-top:24px; padding:12px 16px; min-height:48px; text-align:center; text-decoration:none; }
html[data-tres-design][data-tres-renewal] .rd-about { margin-top:64px!important; padding:32px 0 64px!important; gap:48px!important; }
html[data-tres-design][data-tres-renewal] .rd-about h2 { font-size:28px!important; line-height:1.5!important; }
html[data-tres-design][data-tres-renewal] .rd-about-copy { font-size:16px!important; }
html[data-tres-design][data-tres-renewal] .rd-corporate { min-height:48px; display:inline-flex; align-items:center; }
html[data-tres-design][data-tres-renewal] .rn-app-preview { background:var(--rn-surface); border:1px solid #dcdce0; padding:12px; margin:24px 0; }
html[data-tres-design][data-tres-renewal] .rn-app-preview figcaption { font-size:13px; color:var(--rn-muted); margin-bottom:12px; }
html[data-tres-design][data-tres-renewal] .rn-app-preview img { width:100%; }
@media(max-width:1000px) and (min-width:768px) {
  html[data-tres-design][data-tres-renewal] .rn-product-layout { grid-template-columns:220px minmax(0,1fr); gap:24px; }
}
@media(max-width:767px) {
  html[data-tres-design][data-tres-renewal] [data-rn-label]::before { content:attr(data-rn-label); display:block; font-size:13px; font-weight:700; color:#5e5e66; margin-bottom:8px; }
  html[data-tres-design][data-tres-renewal] body:has(.rn-mobile-cta) { padding-bottom:calc(var(--rn-mobile-bar-height,100px) + 24px)!important; }
  html[data-tres-design][data-tres-renewal] .rn-header-inner { padding:0 8px; gap:8px; }
  html[data-tres-design][data-tres-renewal] .rn-header a { padding:4px!important; font-size:12px!important; }
  html[data-tres-design][data-tres-renewal] .rn-header .tres-header__brand { font-size:12px!important; gap:4px!important; }
  html[data-tres-design][data-tres-renewal] .rn-header .tres-header__mark { width:24px!important; height:28px!important; font-size:24px!important; }
  html[data-tres-design][data-tres-renewal] .rn-header-links { gap:8px; }
  html[data-tres-design][data-tres-renewal] .rn-secondary { padding:8px 16px; }
  html[data-tres-design][data-tres-renewal] .rn-product-layout { display:flex; flex-direction:column; width:calc(100% - 32px); margin:16px auto 40px; gap:24px; }
  html[data-tres-design][data-tres-renewal] .rn-sidebar { position:static; max-height:none; width:100%; padding:0; }
  html[data-tres-design][data-tres-renewal] .rn-sidebar-heading,html[data-tres-design][data-tres-renewal] .rn-sidebar-actions { display:none; }
  html[data-tres-design][data-tres-renewal] .rn-sidebar .toc-bar-inner { display:flex!important; flex-direction:row; flex-wrap:wrap; }
  html[data-tres-design][data-tres-renewal] .rn-sidebar .toc-btn { font-size:13px!important; padding:8px!important; background:var(--rn-surface)!important; }
  html[data-tres-design][data-tres-renewal] .hero-title { font-size:22px!important; }
  html[data-tres-design][data-tres-renewal] .section-title { font-size:19px!important; }
  html[data-tres-design][data-tres-renewal] .feat-title { font-size:17px!important; }
  html[data-tres-design][data-tres-renewal] .feat-desc { font-size:15px!important; }
  html[data-tres-design][data-tres-renewal] .rn-mobile-cta { display:flex; position:fixed; bottom:0; left:0; right:0; z-index:210; align-items:center; justify-content:space-between; gap:8px; background:#fff; border-top:1px solid var(--rn-line); padding:12px 16px calc(12px + env(safe-area-inset-bottom)); }
  html[data-tres-design][data-tres-renewal] .rn-mobile-cta>strong { font-size:13px; max-width:40%; overflow-wrap:anywhere; }
  html[data-tres-design][data-tres-renewal] .rn-mobile-cta>.btn-dl { width:auto; flex:1; max-width:65%; }
  html[data-tres-design][data-tres-renewal] table :is(thead,tbody,tr,th,td) { display:block!important; width:100%!important; }
  html[data-tres-design][data-tres-renewal] table tr { border:1px solid var(--rn-line); margin-bottom:16px; }
  html[data-tres-design][data-tres-renewal] table :is(th,td) { padding:12px!important; }
  html[data-tres-design][data-tres-renewal] :is(.product-action-card,.batchre-download-grid,.mode-intro,.sc-grid,.price-grid,.guide-grid) { grid-template-columns:1fr!important; min-width:0!important; }
  html[data-tres-design][data-tres-renewal] .rd-shell { width:calc(100% - 32px)!important; }
  html[data-tres-design][data-tres-renewal] .rd-hero { grid-template-columns:1fr!important; gap:24px!important; padding:32px 0 40px!important; }
  html[data-tres-design][data-tres-renewal] .rd-hero h1 { font-size:24px!important; line-height:1.6!important; }
  html[data-tres-design][data-tres-renewal] .rd-screen img { max-height:300px!important; }
  html[data-tres-design][data-tres-renewal] .rn-tools-grid { grid-template-columns:1fr; }
  html[data-tres-design][data-tres-renewal] .rn-tool-card { padding:20px; }
  html[data-tres-design][data-tres-renewal] .rn-filters button { font-size:14px; padding:12px; }
  html[data-tres-design][data-tres-renewal] .rd-about { grid-template-columns:1fr!important; gap:24px!important; }
  html[data-tres-design][data-tres-renewal] .rd-footer-row { flex-wrap:wrap; }
}
@media(prefers-reduced-motion:reduce) {
  html[data-tres-design][data-tres-renewal] { scroll-behavior:auto!important; }
  html[data-tres-design][data-tres-renewal] * { transition:none!important; animation:none!important; }
}

/* Photo Comparison Maker. Only the draft app opts into this layout. */
html[data-tres-photo-comparison] body {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
}
html[data-tres-photo-comparison] [hidden] { display: none !important; }
html[data-tres-photo-comparison] body > header { flex-shrink: 0; }
html[data-tres-photo-comparison] main {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-areas: "settings preview" "export preview";
}
html[data-tres-photo-comparison] main > aside {
  grid-area: settings;
  width: auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scroll-padding-block: 12px;
}
html[data-tres-photo-comparison] #stage {
  grid-area: preview;
  flex-direction: column;
  gap: 8px;
}
html[data-tres-photo-comparison] #previewWrap { flex: 1; height: auto; }
html[data-tres-photo-comparison] #meta { width: auto; flex-shrink: 0; }
html[data-tres-photo-comparison] #previewStatus {
  flex-shrink: 0;
  color: white;
  font-size: 14px;
  text-align: center;
}
html[data-tres-photo-comparison] #fileStatus {
  margin-block-start: 8px;
  color: var(--tres-body);
  font-size: 14px;
}
html[data-tres-photo-comparison] :is(#previewStatus, #fileStatus, #exportStatus):empty { margin: 0; }
html[data-tres-photo-comparison] #dropzone button {
  color: var(--tres-ink);
  border-color: #767676;
}
html[data-tres-photo-comparison] .dialog-body a { color: var(--tres-ink); }
html[data-tres-photo-comparison] .item .btns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
html[data-tres-photo-comparison] .item button[aria-disabled="true"] { opacity: .55; cursor: default; }
html[data-tres-photo-comparison] footer.export {
  grid-area: export;
  position: static;
  margin: 0;
  padding: 16px 24px;
  border-right: 1px solid var(--tres-outline);
  background: var(--tres-surface);
  gap: 0;
}
html[data-tres-photo-comparison] .export-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
html[data-tres-photo-comparison] .export-actions button { padding-inline: 8px; }
html[data-tres-photo-comparison] #exportStatus:not(:empty) { margin-block-start: 8px; }
html[data-tres-photo-comparison] #downloadLink {
  display: grid;
  place-items: center;
  align-self: center;
  min-height: 48px;
  padding-inline: 12px;
  color: var(--tres-ink);
  text-underline-offset: 3px;
}
@media (max-width: 800px) {
  html[data-tres-photo-comparison] body > header {
    flex-flow: row wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 16px;
  }
  html[data-tres-photo-comparison] .header-help {
    position: static;
    margin-inline-start: 0;
    max-width: 100%;
  }
  html[data-tres-photo-comparison] main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: clamp(108px, 30vh, 240px) minmax(0, 1fr) auto;
    grid-template-rows: clamp(108px, 30dvh, 240px) minmax(0, 1fr) auto;
    grid-template-areas: "preview" "settings" "export";
  }
  html[data-tres-photo-comparison] #stage { height: auto; min-height: 0; padding: 8px 16px; }
  html[data-tres-photo-comparison] #meta { margin-block-start: 4px; padding-block: 2px; }
  html[data-tres-photo-comparison] main > aside { padding: 16px; }
  html[data-tres-photo-comparison] main input[type="range"] { touch-action: pan-y; }
  html[data-tres-photo-comparison] footer.export {
    border-right: 0;
    padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  }
}
@media (max-width: 800px) and (max-height: 500px) {
  html[data-tres-photo-comparison] body { height: auto; min-height: 100vh; }
  html[data-tres-photo-comparison] main { grid-template-rows: 160px auto auto; }
  html[data-tres-photo-comparison] main > aside { overflow: visible; }
}
