/* Navegação visual: categorias descrevem o destino, não a extensão do arquivo. */
.ui-icon { width:20px; height:20px; flex-shrink:0; vertical-align:middle; }
.client-label { display:flex; align-items:center; gap:12px; font-size:14px; font-weight:550; margin-bottom:14px; }
.client-label > span { font-weight:400; color:var(--muted); border-left:1px solid #bdb7ac; padding-left:12px; }
.workspace { grid-template-columns:292px minmax(0,1fr); gap:28px; }
.workspace-content { min-width:0; }
.library { position:sticky; top:24px; min-width:0; }
.library-top { display:flex; align-items:center; justify-content:space-between; gap:10px; padding-bottom:14px; }
.library-top h2 { font-size:16px; font-weight:550; letter-spacing:-.015em; }
.overview-button { display:flex; align-items:center; gap:6px; min-height:44px; border:0; background:transparent; font-size:12px; padding:8px 5px; color:var(--muted); }
.overview-button .ui-icon { width:16px; height:16px; }
.overview-button[aria-pressed=true] { color:var(--rust); font-weight:550; }
.category-filters { display:flex; flex-wrap:wrap; gap:7px; padding-bottom:22px; border-bottom:1px solid var(--line); }
.category-filter { display:flex; align-items:center; justify-content:center; gap:6px; padding:8px 10px; border:1px solid var(--line); border-radius:8px; background:transparent; color:var(--muted); min-height:44px; font-size:12px; }
.category-filter .ui-icon { width:16px; height:16px; }
.category-filter[aria-pressed=true] { color:var(--cream); background:var(--ink); border-color:var(--ink); }
.category-count { font-family:'Fragment Mono',monospace; font-size:10px; opacity:.7; }
.material-nav { position:static; gap:17px; padding-top:18px; }
.group-heading { display:flex; align-items:center; gap:8px; padding:0 7px 7px; color:var(--muted); }
.group-heading .ui-icon { width:16px; height:16px; }
.group-heading h3 { font-size:12px; letter-spacing:0; font-weight:550; }
.group-heading > span { font-family:'Fragment Mono',monospace; margin-left:auto; font-size:10px; }
.group-materials { display:flex; flex-direction:column; gap:5px; }
.material-select { padding:10px 8px; gap:12px; min-height:88px; border-radius:10px; }
.material-select[aria-current=true] { border-color:#b8b0a3; box-shadow:inset 3px 0 var(--coral); background:var(--surface); }
.material-thumb { display:flex; position:relative; width:60px; height:66px; flex-shrink:0; background:#d8d4ca; border-radius:6px; overflow:hidden; align-items:center; justify-content:center; }
.material-thumb img { display:block; width:100%; height:100%; object-fit:cover; }
.material-thumb > .ui-icon { width:28px; height:28px; color:var(--muted); }
.thumb-play { position:absolute; inset:0; display:grid; place-items:center; background:#1112; color:#fff; }
.thumb-play .ui-icon { width:23px; height:23px; filter:drop-shadow(0 1px 3px #0008); }
.thumb-stack { position:absolute; right:3px; bottom:3px; background:#211f1bcc; color:var(--cream); border-radius:3px; padding:1px 3px; font-size:13px; }
.material-label strong { font-size:14px; margin:0 0 5px; line-height:1.3; }
.material-label small { font-size:11px; margin-bottom:6px; }
.material-label .status { font-size:10px; padding:4px 7px; white-space:normal; }
.library-note { margin:20px 7px 0; font-size:12px; color:var(--muted); line-height:1.6; }
/* A lista longa não aumenta a página nem afasta o player ao escolher um item. */
@media (min-width:761px) {
  .library { display:flex; flex-direction:column; max-height:calc(100vh - 132px); max-height:calc(100dvh - 132px); }
  .library-top, .category-filters, .library-note { flex-shrink:0; }
  .library-note { display:none; }
  .material-nav { min-height:0; overflow-y:auto; overscroll-behavior-y:contain; scrollbar-width:thin; scrollbar-gutter:stable; padding-right:5px; }
  .review-panel { scroll-margin-top:24px; }
}
.material-category { display:flex; align-items:center; gap:6px; font-size:11px; color:var(--muted); margin-bottom:9px; }
.material-category .ui-icon { width:15px; height:15px; }
.material-heading h2 { font-size:27px; line-height:1.15; }
.material-heading .version-tag { margin-top:4px; }
.media-stage { background:#e0dcd2; }
.media-stage:has(video) { background:#151413; }
.round-progress { min-width:205px; }
.round-progress strong { font-size:30px; }
.round-progress strong > span { font-size:14px; letter-spacing:0; color:var(--muted); }
.progress-track { height:5px; }
.progress-fill { width:100%; transform-origin:left; transition:transform 220ms ease-out; }
.pager-position { display:flex; align-items:center; font-family:'Fragment Mono',monospace; font-size:10px; color:var(--muted); }
.below-panel button:disabled { cursor:default; opacity:.35; }
.choice .ui-icon { width:19px; height:19px; }
.adjust-tools .secondary-button { gap:8px; }
.adjust-tools .secondary-button .ui-icon { width:18px; height:18px; }
.sendbar .primary-button .ui-icon { width:18px; height:18px; }
.send-summary { min-width:0; }
.confirm-material { display:flex; flex-direction:column; gap:5px; }
.confirm-material small { font-size:11px; color:var(--muted); }
.point-preview { margin-top:7px; }
.point-preview summary { cursor:pointer; min-height:44px; display:flex; align-items:center; font-size:12px; text-decoration:underline; text-underline-offset:3px; }
.point-image { background:#e0dcd2; border-radius:6px; overflow:hidden; display:grid; place-items:center; margin-top:5px; }
.point-image canvas { width:auto; height:auto; max-width:100%; max-height:220px; }

/* Visão geral: miniaturas pertencem aos mesmos materiais e respostas. */
#material-overview { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:28px; }
.overview-head { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:28px; }
.overview-head h2 { font-size:29px; }
.overview-head p { color:var(--muted); font-size:14px; margin-top:8px; }
.overview-total { font-size:12px; white-space:nowrap; color:var(--muted); }
.gallery-group + .gallery-group { margin-top:28px; border-top:1px solid var(--line); padding-top:23px; }
.gallery-group-heading { display:flex; align-items:center; gap:8px; margin-bottom:13px; }
.gallery-group-heading h3 { font-size:16px; }
.gallery-group-heading > span { font-size:12px; color:var(--muted); margin-left:auto; }
.gallery-group-heading .ui-icon { width:18px; height:18px; }
.material-gallery { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.visual-card { background:transparent; border:1px solid var(--line); border-radius:10px; padding:0; text-align:left; overflow:hidden; display:flex; flex-direction:column; align-self:start; }
.visual-card:hover { border-color:#a39988; }
.material-thumb.large { border-radius:0; width:100%; height:175px; }
.material-thumb.large.portrait { height:220px; }
.material-thumb.large.portrait img { object-position:center 38%; }
.material-thumb.large .thumb-play .ui-icon { width:42px; height:42px; }
.visual-card-body { display:flex; flex-direction:column; padding:14px; gap:9px; width:100%; }
.visual-card-meta { display:flex; justify-content:space-between; color:var(--muted); font-size:11px; }
.visual-card-meta > span { font-family:'Fragment Mono',monospace; font-size:10px; }
.visual-card-body > strong { font-size:16px; font-weight:550; line-height:1.25; }
.visual-card-body .status { align-self:start; font-size:11px; white-space:normal; }
.visual-card-action { display:flex; justify-content:space-between; align-items:center; font-size:12px; padding-top:11px; margin-top:2px; border-top:1px solid var(--line); }
.visual-card-action .ui-icon { width:16px; height:16px; }

/* Ferramentas com ícone e instrução de gesto sempre visível. */
.mark-toolbar { gap:12px; margin-bottom:8px; }
.drawing-tools { display:flex; gap:7px; }
.mark-toolbar .tool-button { min-height:60px; display:flex; align-items:center; gap:9px; background:var(--paper); padding:10px 16px; border:1px solid var(--line); border-radius:9px; }
.mark-toolbar .tool-button[aria-pressed=true] { background:var(--cream); border-color:var(--rust); color:var(--rust); box-shadow:inset 0 -3px var(--coral); }
.mark-toolbar .tool-button .ui-icon { width:23px; height:23px; }
.mark-toolbar .undo-button { display:flex; align-items:center; gap:7px; min-height:44px; padding:9px 10px; border:0; }
.tool-hint { font-size:13px; color:var(--muted); margin:0 0 13px; min-height:20px; }
.studio-material { display:flex; gap:14px; align-items:center; min-width:0; }
.studio-material h3 { line-height:1.25; }
.studio-material .material-category { margin-bottom:6px; }

@media (min-width:1100px) {
  .material-body { grid-template-columns:minmax(0,1.3fr) minmax(0,1fr); }
  .material-body .response-block { padding:8px 23px 28px; }
  .material-body .media-stage { margin-left:24px; }
  .material-body .caption-block { padding-left:24px; }
  .material-body .media-stage img { height:380px; }
  .material-body .adjust-tools .small { font-size:12px; }
}
@media (max-width:1099px) and (min-width:761px) {
  .workspace { grid-template-columns:245px minmax(0,1fr); gap:20px; }
  .library-top h2 { font-size:15px; }
  .overview-button span { display:none; }
  .material-heading h2 { font-size:24px; }
  .category-filter { padding:8px; font-size:11px; }
  .category-filter .ui-icon { width:14px; }
  #material-overview { padding:22px; }
  .overview-head { display:block; }
  .overview-total { display:block; margin-top:12px; }
  .gallery-group-heading > span { display:none; }
  .material-gallery { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:760px) {
  main { padding-bottom:195px; }
  .topbar { flex-wrap:nowrap; }
  .topbar-right { flex-direction:column; align-items:flex-end; gap:2px; }
  .demo-label { font-size:8px; }
  .profile-button { min-height:44px; padding:5px 9px; }
  .client-label { font-size:12px; margin-bottom:12px; }
  .client-label > span { padding-left:10px; }
  .page-lead h1 { font-size:34px; max-width:290px; }
  .page-lead .subline { font-size:13px; margin-top:10px; }
  .round-progress { margin-top:17px; gap:10px; }
  .round-progress strong { font-size:22px; }
  .round-progress strong > span { font-size:12px; }
  .round-progress small { width:auto; font-size:11px; }
  .round-progress .progress-track { min-width:80px; }
  .library { position:sticky; top:0; z-index:15; background:var(--paper); padding-top:6px; margin-bottom:16px; }
  .library-top { padding-bottom:0; }
  .category-filters { flex-wrap:nowrap; overflow:auto; margin:0 -20px; padding:0 20px 8px; border-bottom:0; gap:7px; }
  .category-filters, .material-nav { scrollbar-width:thin; }
  .category-filter { flex-shrink:0; font-size:12px; }
  .category-filter .ui-icon { width:15px; height:15px; }
  .material-nav { margin-top:0; margin-bottom:0; padding-top:0; padding-bottom:8px; gap:8px; overscroll-behavior-x:contain; }
  .material-group, .group-materials { display:contents; }
  .group-heading, .library-note { display:none; }
  .material-select { width:240px; min-width:240px; padding:8px; display:flex; flex-direction:row; align-items:center; gap:9px; min-height:86px; }
  .material-select[aria-current=true] { box-shadow:inset 0 -3px var(--coral); border-color:#b8b0a3; }
  .material-select .material-thumb { width:42px; height:58px; }
  .material-label strong { font-size:13px; margin-bottom:4px; }
  .material-select .material-label small { display:none; }
  .material-label .status { font-size:10px; }
  .material-heading h2 { font-size:23px; }
  .material-heading { padding-top:18px; }
  .material-category { margin-bottom:7px; font-size:10px; }
  .material-heading p { font-size:12px; }
  .media-stage img { height:290px; }
  .media-stage video { max-height:40svh; }
  .review-panel { scroll-margin-top:204px; }
  .sendbar { display:grid; grid-template-columns:1fr auto; gap:10px 12px; }
  .mobile-choice { display:grid; grid-column:1/-1; grid-template-columns:1fr 1fr; gap:9px; }
  .mobile-choice .choice { min-height:46px; font-size:13px; padding:10px 8px; }
  .sendbar p { font-size:11px; max-width:160px; }
  .sendbar .primary-button { min-height:46px; padding:12px 13px; font-size:12px; gap:7px; }
  #material-overview { padding:20px 17px; }
  .workspace:has(#material-overview:not([hidden])) .material-nav { display:none; }
  .overview-head { display:block; margin-bottom:22px; }
  .overview-head h2 { font-size:25px; }
  .overview-head p { font-size:13px; }
  .overview-total { display:block; margin-top:10px; }
  .gallery-group-heading > span { display:none; }
  .material-gallery { gap:10px; }
  .material-thumb.large { height:114px; }
  .material-thumb.large.portrait { height:165px; }
  .visual-card-body { padding:11px; gap:8px; }
  .visual-card-body > strong { font-size:14px; }
  .visual-card-body .status { font-size:10px; }
  .visual-card-action { font-size:10px; }
  .mark-toolbar { gap:8px; }
  .drawing-tools { width:100%; display:grid; grid-template-columns:1fr 1fr 1.25fr; gap:6px; }
  .mark-toolbar .tool-button { min-height:64px; flex-direction:column; justify-content:center; gap:5px; padding:8px 4px; font-size:12px; }
  .mark-toolbar .tool-button .ui-icon { width:21px; height:21px; }
  .mark-toolbar .undo-button { padding:5px; font-size:12px; }
  .mark-toolbar .anchor-label { font-size:10px; }
  .tool-hint { font-size:12px; }
  .mark-dialog .material-category { max-width:245px; }
  .studio-card-head { flex-wrap:wrap; gap:12px; }
  .studio-material .material-thumb { width:50px; height:55px; }
}
@media (max-width:370px) {
  .category-filters { margin-left:-16px; margin-right:-16px; padding-left:16px; padding-right:16px; }
  .material-gallery { grid-template-columns:minmax(0,1fr); }
  .material-thumb.large { height:170px; }
  .sendbar strong { font-size:11px; }
  .sendbar .primary-button { padding:11px; }
}

/* Celular: peças completas em sequência. A coluna fica no computador/tablet. */
.mobile-feed { display:none; }
.media-stage { position:relative; }
.media-stage.carousel-stable { min-height:0; }
.media-stage.carousel-stable > img { position:absolute; inset:0; width:100%; height:100%; max-height:100%; object-fit:contain; }
.media-loading { position:absolute; z-index:3; left:50%; top:50%; width:36px; height:36px; margin:-18px; border:4px solid #ffffffaa; border-top-color:#ff2d6e; border-radius:50%; box-shadow:0 0 0 8px #10141988; animation:media-loading-turn .8s linear infinite; pointer-events:none; }
.media-stage[aria-busy=true] > img { opacity:.65; }
@keyframes media-loading-turn { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) { .media-loading { animation:none; } }
@media (max-width:760px) {
  main { padding-bottom:140px; }
  .library { display:none; }
  .mobile-feed { display:flex; flex-direction:column; gap:28px; }
  .feed-card { min-width:0; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; }
  .feed-card:has(> #review-panel) { border:0; background:transparent; overflow:visible; }
  .feed-card .media-stage { min-height:0; max-height:none; }
  .feed-card .media-stage img { width:100%; height:auto; max-height:75svh; object-fit:contain; }
  .feed-card .media-stage video { min-height:0; max-height:75svh; }
  .feed-caption { margin:14px 18px 0; font-size:14px; }
  .feed-caption summary { cursor:pointer; min-height:44px; display:flex; align-items:center; font-weight:550; }
  .feed-caption p { white-space:pre-wrap; margin:10px 0; }
  .feed-response { padding:16px 18px 22px; display:grid; gap:15px; }
  .review-panel { scroll-margin-top:16px; }
  .mobile-choice { display:none!important; }
}
