/* App interfaces inside the simulated desktop. Each app has its own look (not recoloured copies). */
#pc .ph-art { position: relative; width: 100%; display: grid; place-content: center; text-align: center; gap: 4px; padding: 10px;
              background: repeating-linear-gradient(135deg, #f6d9c8 0 14px, #f1cdb8 14px 28px); color: #9a5b3f; border-radius: 6px; }
#pc .ph-art span { font-weight: 600; font-size: 13px; } #pc .ph-art small { font-size: 11px; opacity: .8; }
#pc .media { display: block; width: 100%; height: auto; border-radius: 4px; }
#pc .ph-badge { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 99px; font-size: 10px; font-weight: 600;
                background: #ffe1cf; color: #b0552f; vertical-align: middle; }
#pc .ai-mobile-info { display: none; }
/* InDesign has no properties panel: the project description always sits under the document */
#pc .ai-mobile-info.id-info { display: block; flex: none; max-height: 32%; overflow: auto; padding: 12px 18px 16px; background: #2b2b2b; color: #ddd; font-size: 14px; line-height: 1.55; }
/* page + nav + description always fit together in the window (the page shrinks, nothing is pushed out of view) */
#pc .id-docv:has(.pg.full) { height: 100%; }
#pc .id-docv:has(.pg.full) .id-paste { flex: 1; min-height: 160px; padding: 0; position: relative; display: block; }
#pc .id-docv:has(.pg.full) .id-spread { position: absolute; inset: 14px; height: auto; justify-content: center; }
#pc .id-docv:has(.pg.full) .id-tab, #pc .id-docv:has(.pg.full) .id-nav { flex: none; }
#pc .id-spread:has(.pg.full) { height: 100%; box-shadow: none; }
#pc .pg.full { height: 100%; display: flex; align-items: center; justify-content: center; background: transparent; }
#pc .pg.full img { max-height: 100% !important; max-width: 100% !important; background: #fff; box-shadow: 4px 4px 0 rgba(0,0,0,.35); }
#pc .ai-mobile-info.id-info p { margin: 8px 0 0; max-width: 90ch; }

/* artwork is clickable to zoom */
#pc .ai-board img, #pc .ps-art img, #pc .pg.full img, #pc .fg-frame img, #pc .pc-lightbox figure img { cursor: zoom-in; }
#pc .zoom-btn { border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: inherit; border-radius: 99px; padding: 2px 10px;
                font-size: 11.5px; cursor: pointer; white-space: nowrap; }
#pc .zoom-btn:hover { background: rgba(255,255,255,.18); }
#pc .ai-tab .zoom-btn { margin-left: auto; width: auto; height: 22px; }
#pc .id-nav .zoom-btn { margin-left: 14px; min-height: 30px; }
#pc .ps-status .zoom-btn { margin-right: 8px; }

/* zoom viewer */
#pc .pc-zoom { position: absolute; inset: 0; z-index: 60; display: flex; flex-direction: column; background: rgba(12, 10, 9, .96); color: #eee; }
#pc .zv-bar { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 13px; border-bottom: 1px solid #333; }
#pc .zv-cap { margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#pc .zv-n { opacity: .65; margin-right: 8px; }
#pc .zv-bar button { min-width: 32px; height: 30px; padding: 0 10px; border: 0; border-radius: 6px; background: #2c2c2c; color: #eee; cursor: pointer; font-size: 15px; }
#pc .zv-bar button:hover { background: #3a3a3a; }
#pc .zv-fit { font-size: 12.5px !important; }
#pc .zv-pct { min-width: 46px; text-align: center; font-variant-numeric: tabular-nums; }
#pc .zv-stage { flex: 1; min-height: 0; position: relative; overflow: hidden; display: grid; place-items: center; cursor: zoom-in; touch-action: none; }
#pc .zv-stage.zoomed { cursor: grab; } #pc .zv-stage.drag { cursor: grabbing; }
#pc .zv-stage img { max-width: calc(100% - 40px); max-height: calc(100% - 40px); object-fit: contain; transform-origin: center; user-select: none; transition: transform .06s linear; will-change: transform; }
#pc .zv-stage img.smooth { transition: transform .28s cubic-bezier(.2, .7, .2, 1); }
#pc .zv-range { width: 120px; accent-color: #e98a62; cursor: pointer; }
#pc .zv-stage.drag img { transition: none; }
#pc .zv-p, #pc .zv-nx { position: absolute; top: 50%; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 26px; cursor: pointer; }
#pc .zv-p { left: 12px; } #pc .zv-nx { right: 12px; }
#pc .zv-hint { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); margin: 0; padding: 4px 12px; border-radius: 99px; background: rgba(0,0,0,.55); font-size: 12px; opacity: .8; pointer-events: none; white-space: nowrap; }

/* ---------- Fotos ---------- */
#pc .ph-app { display: flex; flex-direction: column; height: 100%; background: #fbf6f2; }
#pc .ph-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid #eadfd7; font-size: 13px; }
#pc .ph-bar b { font-size: 16px; margin-right: auto; }
#pc .ph-bar select { min-height: 32px; border: 1px solid #ddd; border-radius: 8px; background: #fff; padding: 0 8px; }
#pc .ph-size { display: flex; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; }
#pc .ph-size button { min-width: 36px; min-height: 32px; border: 0; background: #fff; cursor: pointer; }
#pc .ph-size button.on { background: #f2a27e; color: #fff; }
#pc .ph-grid { flex: 1; overflow: auto; display: grid; gap: 4px; padding: 4px; align-content: start; }
#pc .ph-grid.size-s { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
#pc .ph-grid.size-m { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
#pc .ph-grid.size-l { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
#pc .ph-item { aspect-ratio: 1; padding: 0; border: 0; overflow: hidden; cursor: zoom-in; background: #eee; }
#pc .ph-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
#pc .ph-item:hover img { transform: scale(1.04); }
#pc .pc-lightbox { position: absolute; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; gap: 8px; background: rgba(15, 8, 4, .94); color: #fff; }
#pc .pc-lightbox figure { margin: 0; flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 50px 0 16px; }
#pc .pc-lightbox img { max-width: 100%; max-height: calc(100% - 50px); object-fit: contain; border-radius: 4px; }
#pc .pc-lightbox figcaption { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; text-align: center; }
#pc .pc-lightbox figcaption span { opacity: .65; font-size: 12px; }
#pc .pc-lightbox button { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 26px; cursor: pointer; }
#pc .pc-lightbox .lb-x { position: absolute; top: 8px; right: 8px; }

/* ---------- shared "pro app" shell (Adobe) ---------- */
#pc .ai, #pc .ps, #pc .id { height: 100%; display: grid; color: #d7d7d7; font-size: 12px; }
#pc .ai h4, #pc .ps h4, #pc .id h4 { margin: 0 0 6px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; opacity: .75; }
#pc .ai h3, #pc .ps h3, #pc .id h3 { margin: 0 0 14px; font-size: 18px; font-weight: 600; color: #f1f1f1; }
#pc [class$="-menu"] { grid-area: menu; display: flex; align-items: center; gap: 14px; padding: 0 10px; height: 30px; overflow: hidden; white-space: nowrap; }
#pc .ai-logo, #pc .ps-logo, #pc .id-logo { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; font-weight: 700; font-size: 11px; }
#pc .ai-tools, #pc .ps-tools { grid-area: tools; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; }
#pc .ai-tools i, #pc .ps-tools i { display: grid; place-items: center; width: 30px; height: 28px; border-radius: 4px; font-style: normal; font-size: 15px; cursor: default; }
#pc .ai-tools i:hover, #pc .ps-tools i:hover { background: rgba(255,255,255,.1); }
#pc .sw { position: relative; height: 34px !important; } #pc .sw b { position: absolute; width: 16px; height: 16px; border: 2px solid #ccc; }
#pc .sw b:first-child { left: 4px; top: 4px; background: #fff; } #pc .sw b:last-child { left: 11px; top: 12px; background: #111; }
#pc .ly { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 4px; }
#pc .ly.sel { background: rgba(255,255,255,.12); }
#pc .ly .th { width: 26px; height: 20px; background: #fff; border: 1px solid #555; }
#pc .ly .ly-lock { margin-left: auto; opacity: .6; }
#pc [class$="-props"] a, #pc .ai-mobile-info a, #pc .fg-props a { display: inline-block; margin: 6px 6px 0 0; color: #4ea1ff; }
#pc [class$="-props"] p { line-height: 1.45; opacity: .85; }

/* Illustrator: warm dark grey, orange accents, white artboards on grey canvas */
#pc .ai { grid-template: "menu menu menu" 30px "tools main panels" 1fr / 44px 1fr 230px; background: #323232; }
#pc .ai-menu { background: #3a3a3a; } #pc .ai-logo { background: #330000; color: #ff9a00; border: 1px solid #ff9a00; }
#pc .ai-tools { background: #3a3a3a; border-right: 1px solid #252525; }
#pc .ai-main { grid-area: main; min-height: 0; overflow: auto; background: #535353; }
#pc .ai-panels { grid-area: panels; overflow: auto; background: #3a3a3a; border-left: 1px solid #252525; }
#pc .ai-panels section { padding: 10px; border-bottom: 1px solid #2a2a2a; }
#pc .ai-home { padding: 22px; background: #2b2b2b; min-height: 100%; }
#pc .ai-recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
#pc .ai-file { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid #444; border-radius: 6px; background: #383838; color: #ddd; text-align: left; cursor: pointer; }
#pc .ai-file:hover { border-color: #ff9a00; }
#pc .ai-file small { opacity: .6; }
#pc .ai-doc { display: flex; flex-direction: column; min-height: 100%; }
#pc .ai-tab, #pc .ps-tab, #pc .id-tab { display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 12px; background: #424242; color: #eee; font-size: 12px; }
#pc .ai-tab button, #pc .ps-tab button, #pc .id-tab button { width: 22px; height: 22px; border: 0; border-radius: 4px; background: none; color: inherit; cursor: pointer; font-size: 15px; }
#pc .ai-canvas { flex: 1; display: flex; gap: 40px; align-items: flex-start; justify-content: center; flex-wrap: wrap; padding: 40px 30px; }
#pc .ai-board { width: min(420px, 80%); display: flex; flex-direction: column; gap: 4px; }
#pc .ai-canvas.carousel { flex-wrap: nowrap; justify-content: safe center; align-items: center; gap: 6px; overflow-x: auto; min-height: 100%; }
#pc .ai-canvas.carousel .ai-board { flex: 1 1 0; min-width: 150px; max-width: 360px; width: auto; }
#pc .ai-board small { color: #cfcfcf; font-size: 11px; }
#pc .ai-board > img, #pc .ai-board > .ph-art { background-color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.35); border-radius: 0; }

/* Photoshop: darker, blue accents, checkerboard canvas, options bar, layers list */
#pc .ps { grid-template: "menu menu menu" 30px "opts opts opts" 34px "tools main panels" 1fr / 44px 1fr 240px; background: #282828; }
#pc .ps-menu { background: #323232; } #pc .ps-logo { background: #001e36; color: #31a8ff; border: 1px solid #31a8ff; }
#pc .ps-opts { grid-area: opts; display: flex; align-items: center; gap: 16px; padding: 0 12px; background: #323232; border-top: 1px solid #222; border-bottom: 1px solid #1d1d1d; overflow: hidden; white-space: nowrap; }
#pc .ps-opts .sep { width: 1px; height: 18px; background: #555; }
#pc .ps-tools { background: #323232; border-right: 1px solid #1d1d1d; }
#pc .ps-main { grid-area: main; min-height: 0; overflow: auto; background: #1f1f1f; }
#pc .ps-panels { grid-area: panels; overflow: auto; background: #323232; border-left: 1px solid #1d1d1d; }
#pc .ps-panels section { padding: 10px; border-bottom: 1px solid #262626; }
#pc .ps-home { padding: 22px; }
#pc .ps-list { width: 100%; border-collapse: collapse; }
#pc .ps-list th { text-align: left; font-weight: 500; opacity: .6; padding: 8px; border-bottom: 1px solid #3a3a3a; }
#pc .ps-list td { padding: 10px 8px; border-bottom: 1px solid #2f2f2f; }
#pc .ps-list tr[data-i] { cursor: pointer; } #pc .ps-list tr[data-i]:hover td { background: #2f3a46; }
#pc .ps-list .th { display: inline-block; width: 36px; height: 28px; margin-right: 10px; vertical-align: middle; background: repeating-conic-gradient(#ccc 0 25%, #fff 0 50%) 0 0 / 8px 8px; }
#pc .ps-list .th img { width: 100%; height: 100%; object-fit: cover; }
#pc .ps-doc { display: flex; flex-direction: column; height: 100%; }
#pc .ps-tab { flex: none; background: #2b2b2b; border-bottom: 2px solid #31a8ff; }
/* the whole image always fits the canvas (no cropping); carousels/pairs sit side by side */
#pc .ps-canvas { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: safe center; gap: 18px; padding: 24px; overflow: auto; }
#pc .ps-art { flex: 0 1 auto; min-width: 0; height: 100%; display: flex; align-items: center; justify-content: center; }
#pc .ps-canvas.multi .ps-art { flex: 1 1 0; }
#pc .ps-canvas.carousel { gap: 6px; }
#pc .ps-canvas.carousel .ps-art { flex: 1 1 0; min-width: 150px; }
#pc .ps-art > .media { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 0;
                       background: repeating-conic-gradient(#cfcfcf 0 25%, #fff 0 50%) 0 0 / 16px 16px; box-shadow: 0 0 0 1px #000, 0 6px 20px rgba(0,0,0,.4); }
#pc .ps-status { flex: none; }
#pc .ps-status { display: flex; justify-content: space-between; padding: 4px 10px; background: #2b2b2b; font-size: 11px; }
#pc .ps-status button { border: 0; background: #3a3a3a; color: #ddd; border-radius: 4px; min-width: 26px; cursor: pointer; }

/* InDesign: pasteboard + page spreads with margin guides, pages panel */
#pc .id { grid-template: "menu menu" 30px "control control" 34px "main pages" 1fr / 1fr 200px; background: #2e2e2e; }
#pc .id-menu { background: #353535; } #pc .id-logo { background: #49021f; color: #ff3366; border: 1px solid #ff3366; }
#pc .id-control { grid-area: control; display: flex; align-items: center; gap: 18px; padding: 0 12px; background: #3a3a3a; font-family: Consolas, monospace; font-size: 11px; overflow: hidden; white-space: nowrap; }
#pc .id-control .sep { width: 1px; height: 18px; background: #555; }
#pc .id-main { grid-area: main; min-height: 0; overflow: auto; background: #8a8a8a; }
#pc .id-pages { grid-area: pages; overflow: auto; padding: 10px; background: #3a3a3a; border-left: 1px solid #262626; }
#pc .id-thumbs { display: flex; flex-direction: column; gap: 10px; align-items: center; }
#pc .th-sp { display: flex; gap: 2px; padding: 4px; border: 1px solid transparent; background: none; cursor: pointer; }
#pc .th-sp i { display: grid; place-items: end center; width: 34px; height: 46px; background: #fff; color: #555; font-style: normal; font-size: 10px; }
#pc .th-sp.on { border-color: #ff3366; }
#pc .id-home { padding: 22px; background: #2e2e2e; min-height: 100%; }
#pc .id-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
#pc .id-doc { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid #444; border-radius: 6px; background: #383838; color: #ddd; text-align: left; cursor: pointer; }
#pc .id-doc:hover { border-color: #ff3366; }
#pc .id-doc .spread { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
#pc .id-doc small { opacity: .6; }
#pc .id-docv { display: flex; flex-direction: column; min-height: 100%; }
#pc .id-tab { background: #3a3a3a; }
#pc .id-paste { flex: 1; display: grid; place-items: center; padding: 30px 20px; }
#pc .id-spread { display: flex; gap: 0; box-shadow: 4px 4px 0 rgba(0,0,0,.35); }
#pc .pg { position: relative; width: min(260px, 38vw); aspect-ratio: 210 / 297; background: #fff; overflow: hidden; }
#pc .pg.blank { background: transparent; box-shadow: none; }
#pc .pg .mg { position: absolute; inset: 7%; border: 1px solid #c56cf0; pointer-events: none; z-index: 1; }
#pc .pg img { width: 100%; height: 100%; object-fit: cover; }
#pc .ai-file > img.media { aspect-ratio: 4 / 3; object-fit: cover; background: #fff; }
#pc .id-doc .spread img.media { aspect-ratio: 3 / 4; object-fit: cover; background: #fff; }
#pc .pg.full { width: auto; aspect-ratio: auto; background: #fff; }
#pc .pg.full img { display: block; width: auto; height: auto; max-width: min(820px, 100%); max-height: calc(100vh - 260px); object-fit: contain; }
#pc .th-sp.img { position: relative; padding: 2px; }
#pc .th-sp.img img { display: block; width: 92px; height: 64px; object-fit: cover; background: #fff; }
#pc .th-sp.img i { position: absolute; right: 4px; bottom: 4px; width: auto; height: auto; padding: 0 4px; background: rgba(0,0,0,.6); color: #fff; }
#pc .pg-ph { position: absolute; inset: 7%; display: grid; place-items: center; color: #b9a; font-size: 12px;
             background: repeating-linear-gradient(#fff 0 9px, #f1ecef 9px 10px); }
#pc .id-nav { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 6px; background: #3a3a3a; }
#pc .id-nav button { min-width: 36px; min-height: 30px; border: 0; border-radius: 4px; background: #4a4a4a; color: #eee; cursor: pointer; }

/* Figma: light UI, dark top bar, dotted canvas, frames with labels, Design panel */
#pc .fg { height: 100%; display: grid; grid-template: "top top top" 40px "left canvas right" 1fr / 220px 1fr 240px; background: #fff; color: #222; font-size: 12px; }
#pc .fg-top { grid-area: top; display: flex; align-items: center; gap: 4px; padding: 0 8px; background: #2c2c2c; color: #fff; }
#pc .fg-logo { width: 28px; height: 28px; margin-right: 6px; } #pc .fg-logo svg { width: 100%; height: 100%; }
#pc .fg-top i { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; font-style: normal; font-size: 14px; }
#pc .fg-top i:first-of-type { background: #0d99ff; }
#pc .fg-file { flex: 1; text-align: center; opacity: .85; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#pc .fg-share { padding: 6px 12px; border-radius: 6px; background: #0d99ff; font-weight: 600; }
#pc .fg-left, #pc .fg-right { overflow: auto; padding: 10px; border-right: 1px solid #e6e6e6; }
#pc .fg-left { grid-area: left; } #pc .fg-right { grid-area: right; border-right: 0; border-left: 1px solid #e6e6e6; }
#pc .fg h4 { margin: 8px 0 6px; font-size: 11px; font-weight: 600; }
#pc .fg-left button { display: block; width: 100%; min-height: 30px; padding: 0 8px; border: 0; border-radius: 6px; background: none; text-align: left; cursor: pointer; color: inherit; }
#pc .fg-left button:hover { background: #f2f2f2; } #pc .fg-left button.on, #pc .fg-left button.sel { background: #e5f4ff; }
#pc .fg-canvas { grid-area: canvas; min-width: 0; overflow: auto; background: #f5f5f5 radial-gradient(#d7d7d7 1px, transparent 1px) 0 0 / 16px 16px; }
#pc .fg-board { display: flex; gap: 40px; padding: 48px 40px; width: max-content; min-height: 100%; align-items: flex-start; }
#pc .fg-frame { display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
#pc .fg-board.mob .fg-frame { width: 200px; } #pc .fg-board.desk .fg-frame { width: 420px; }
#pc .fg-frame small { color: #888; } #pc .fg-frame.sel small { color: #0d99ff; }
#pc .fg-frame > img, #pc .fg-frame > .ph-art { background-color: #fff; border-radius: 0; box-shadow: 0 1px 3px rgba(0,0,0,.15); outline: 2px solid transparent; }
#pc .fg-frame.sel > img, #pc .fg-frame.sel > .ph-art { outline-color: #0d99ff; }
#pc .fg-frame.zoom { width: min(720px, 80vw) !important; }
#pc .fg-tabs { display: flex; gap: 14px; padding-bottom: 8px; border-bottom: 1px solid #eee; }
#pc .fg-tabs span { opacity: .5; }
#pc .fg-props h5 { margin: 12px 0 6px; font-size: 11px; }
#pc .fg-props .kv { display: flex; justify-content: space-between; padding: 4px 0; }
#pc .fg-props .kv span { opacity: .55; }

/* ---------- Navegador ---------- */
#pc .br { height: 100%; display: flex; flex-direction: column; background: #fff; color: #222; }
#pc .br-tabs { display: flex; align-items: flex-end; gap: 2px; padding: 6px 8px 0; background: #e9e4e0; overflow-x: auto; }
#pc .br-tablist { display: flex; gap: 2px; min-width: 0; }
#pc .br-tab { display: flex; align-items: center; gap: 6px; min-width: 120px; max-width: 200px; height: 34px; padding: 0 6px 0 10px; border-radius: 9px 9px 0 0; background: #d9d2cd; cursor: pointer; font-size: 12px; }
#pc .br-tab.on { background: #fff; }
#pc .br-tab .tt { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#pc .br-tab .fav img { width: 14px; height: 14px; }
#pc .br-close, #pc .br-new { width: 24px; height: 24px; border: 0; border-radius: 50%; background: none; cursor: pointer; font-size: 15px; color: inherit; }
#pc .br-close:hover, #pc .br-new:hover { background: rgba(0,0,0,.08); }
#pc .br-new { flex: none; margin-bottom: 5px; }
#pc .br-bar { display: flex; align-items: center; gap: 4px; padding: 6px 8px; border-bottom: 1px solid #e6e6e6; }
#pc .br-bar > button { flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; font-size: 16px; cursor: pointer; color: inherit; }
#pc .br-bar > button:disabled { opacity: .3; cursor: default; }
#pc .br-bar > button:not(:disabled):hover { background: #f0ebe7; }
#pc .br-url { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 99px; background: #f1ece8; }
#pc .br-url input { flex: 1; min-width: 0; border: 0; background: none; font-size: 13px; color: #444; outline: none; }
#pc .br-url .url-lock { font-size: 11px; opacity: .6; }
#pc .br-view { flex: 1; min-height: 0; overflow: auto; background: #fff; }
#pc .br-view:has(> iframe) { display: flex; flex-direction: column; overflow: hidden; }
#pc .br-view iframe { width: 100%; height: 100%; flex: 1; min-height: 0; border: 0; display: block; }
#pc .br-info { flex: none; display: flex; align-items: flex-start; gap: 12px; padding: 10px 14px; background: #fff7f1; border-bottom: 1px solid #f0e2d8; font-size: 13px; line-height: 1.45; }
#pc .br-info > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#pc .br-info > div span { opacity: .75; }
#pc .br-i { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #e98a62; color: #fff; font: italic 700 13px/1 Georgia, serif; }
#pc .br-info-t { flex: none; border: 1px solid #e7cdbd; background: #fff; border-radius: 99px; padding: 4px 12px; font-size: 12px; cursor: pointer; color: inherit; }
#pc .br-info.closed { padding-block: 6px; align-items: center; }
#pc .br-info.closed > div span { display: none; }
#pc .br-card p { margin: 0; font-size: 12.5px; line-height: 1.45; opacity: .78; }
#pc .br-home { max-width: 900px; margin: 0 auto; padding: 30px 20px; }
#pc .br-home h2 { margin: 0 0 18px; font-size: 22px; }
#pc .br-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
#pc .br-card { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid #eee; border-radius: 12px; background: #fff; text-align: left; cursor: pointer; color: inherit; }
#pc .br-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); }
#pc .br-card small { opacity: .6; }
#pc .br-preview { max-width: 860px; margin: 0 auto; padding: 24px 20px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: start; }
#pc .br-preview h2 { margin: 0 0 10px; font-size: 22px; }
#pc .br-open { display: inline-block; margin-top: 8px; padding: 10px 16px; border-radius: 99px; background: #e9825c; color: #fff; text-decoration: none; font-weight: 600; }

/* ---------- Duda (chat) ---------- */
#pc .dd { height: 100%; display: flex; flex-direction: column; background: #fdf3ee; }
#pc .dd-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #fff; border-bottom: 1px solid #f0e2da; }
#pc .dd-av { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; flex: none; }
#pc .dd-av img { width: 100%; height: 100%; object-fit: cover; }
#pc .dd-av-ph { display: block; width: 100%; height: 100%; background: url(lockscreen.jpg) 49.97% 71.44% / 2287% auto no-repeat; }
#pc .dd-head b { display: block; font-size: 15px; } #pc .dd-head small { color: #2fa86a; font-size: 12px; }
#pc .dd-chat { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 18px clamp(12px, 4%, 40px);
               background: #fdf3ee radial-gradient(rgba(233,130,92,.08) 1px, transparent 1px) 0 0 / 18px 18px; }
#pc .dd-msg { display: flex; align-items: flex-end; gap: 6px; max-width: min(78%, 520px); animation: ddIn .32s ease-out both; }
#pc .dd-msg p { margin: 0; padding: 10px 14px; font-size: 14.5px; line-height: 1.45; border-radius: 18px; }
#pc .dd-msg.them { align-self: flex-start; } #pc .dd-msg.them p { background: #fff; color: #3a2a22; border-bottom-left-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
#pc .dd-msg.me { align-self: flex-end; } #pc .dd-msg.me p { background: #e9825c; color: #fff; border-bottom-right-radius: 6px; }
#pc .dd-msg time { font-size: 10px; opacity: .5; }
#pc .dd-msg .mini { width: 24px; height: 24px; border-radius: 50%; }
#pc .typing p { display: flex; gap: 4px; padding: 14px; } #pc .typing i { width: 7px; height: 7px; border-radius: 50%; background: #d7b6a6; animation: ddDot 1s infinite; }
#pc .typing i:nth-child(2) { animation-delay: .15s; } #pc .typing i:nth-child(3) { animation-delay: .3s; }
#pc .dd-foot { display: flex; gap: 8px; justify-content: center; padding: 10px; background: #fff; border-top: 1px solid #f0e2da; }
#pc .dd-foot button { min-height: 38px; padding: 0 16px; border: 1px solid #e9825c; border-radius: 99px; background: #fff; color: #c8643f; cursor: pointer; }
#pc .dd-foot .dd-more { background: #e9825c; color: #fff; }
#pc .dd-foot.done { display: none; }
@keyframes ddIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes ddDot { 50% { transform: translateY(-3px); opacity: .5; } }

/* ---------- page (games) ---------- */
#pc .pg-app { max-width: 640px; margin: 0 auto; padding: 30px 20px; font-size: 15px; line-height: 1.55; }
#pc .pg-ic { display: block; width: 64px; height: 64px; }

/* ===================== phones: reorganise each app ===================== */
@media (max-width: 760px), (max-height: 520px) and (pointer: coarse) {
  #pc .ai { grid-template: "menu" 34px "main" 1fr / 1fr; }
  #pc .ps { grid-template: "menu" 34px "main" 1fr / 1fr; }
  #pc .id { grid-template: "menu" 34px "main" 1fr / 1fr; }
  #pc .ai-tools, #pc .ai-panels, #pc .ps-tools, #pc .ps-panels, #pc .ps-opts, #pc .id-control, #pc .id-pages { display: none; }
  #pc [class$="-menu"] span:not([class$="-logo"]) { display: none; }
  #pc [class$="-menu"]::after { content: "Toque em um arquivo para abrir"; opacity: .7; }
  #pc .ai-home, #pc .ps-home, #pc .id-home { padding: 16px; }
  #pc .ai-recent, #pc .id-docs { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  #pc .ai-canvas { padding: 20px 14px; gap: 20px; }
  #pc .ai-board { width: 100%; }
  #pc .ai-mobile-info { display: block; padding: 14px 16px 24px; background: #2b2b2b; color: #ddd; font-size: 14px; line-height: 1.5; }
  #pc .ps-canvas { padding: 14px; } #pc .ps-art { width: 100%; }
  #pc .ps-list td:nth-child(3), #pc .ps-list th:nth-child(3) { display: none; }
  #pc .id-paste { padding: 16px 8px; } #pc .pg { width: 44vw; }
  #pc .fg { grid-template: "top" 44px "canvas" 1fr "right" auto / 1fr; }
  #pc .fg-left { display: none; }
  #pc .fg-top i { display: none; } #pc .fg-share { display: none; }
  #pc .fg-right { max-height: 34%; border-left: 0; border-top: 1px solid #e6e6e6; }
  #pc .fg-board { padding: 24px 16px; gap: 20px; }
  #pc .fg-board.mob .fg-frame { width: 150px; } #pc .fg-board.desk .fg-frame { width: 78vw; }
  #pc .br-tab { min-width: 96px; max-width: 140px; }
  #pc .br-preview { grid-template-columns: 1fr; }
  #pc .br-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  #pc .br-home h2, #pc .br-preview h2 { font-size: 19px; }
  #pc .dd-msg { max-width: 86%; }
  #pc .ph-grid.size-m { grid-template-columns: repeat(3, 1fr); } #pc .ph-grid.size-s { grid-template-columns: repeat(4, 1fr); } #pc .ph-grid.size-l { grid-template-columns: 1fr; }
}

/* ===================== RESIZABLE WINDOWS: the app layout follows the window width (container "appwin") ===================== */
/* medium window: slimmer side panels, canvas keeps the room */
@container appwin (max-width: 1050px) {
  #pc .ai { grid-template-columns: 40px 1fr 190px; }
  #pc .ps { grid-template-columns: 40px 1fr 190px; }
  #pc .id { grid-template-columns: 1fr 140px; }
  #pc .th-sp.img img { width: 100px; height: 70px; }
  #pc .fg { grid-template-columns: 170px 1fr 200px; }
  #pc .ps-opts span:not(:first-child) { display: none; }
  #pc .id-control span:nth-child(n+5) { display: none; }
}
/* small window: same compact layout as phones (panels hidden, project info under the artwork) */
@container appwin (max-width: 760px) {
  #pc .ai { grid-template: "menu" 30px "main" 1fr / 1fr; }
  #pc .ps { grid-template: "menu" 30px "main" 1fr / 1fr; }
  #pc .id { grid-template: "menu" 30px "main" 1fr / 1fr; }
  #pc .ai-tools, #pc .ai-panels, #pc .ps-tools, #pc .ps-panels, #pc .ps-opts, #pc .id-control, #pc .id-pages { display: none; }
  #pc [class$="-menu"] span:nth-child(n+4):not([class$="-logo"]) { display: none; }
  #pc .ai-home, #pc .ps-home, #pc .id-home { padding: 16px; }
  #pc .ai-recent, #pc .id-docs { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  #pc .ai-canvas { padding: 20px 14px; gap: 20px; }
  #pc .ai-mobile-info { display: block; padding: 14px 16px 24px; background: #2b2b2b; color: #ddd; font-size: 14px; line-height: 1.5; }
  #pc .ps-doc { height: auto; min-height: 100%; }
  #pc .ps-canvas { min-height: 60cqw; padding: 14px; }
  #pc .ps-art > .media { max-height: 70cqw; }
  #pc .ps-list td:nth-child(3), #pc .ps-list th:nth-child(3) { display: none; }
  #pc .id-paste { padding: 16px 8px; }
  #pc .fg { grid-template: "top" 40px "canvas" 1fr "right" auto / 1fr; }
  #pc .fg-left, #pc .fg-share { display: none; }
  #pc .fg-right { max-height: 34%; border-left: 0; border-top: 1px solid #e6e6e6; }
  #pc .br-preview { grid-template-columns: 1fr; }
  #pc .br-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  #pc .dd-msg { max-width: 86%; }
}
@container appwin (max-width: 480px) {
  #pc .ph-grid.size-m { grid-template-columns: repeat(3, 1fr); } #pc .ph-grid.size-l { grid-template-columns: 1fr; }
  #pc .ps-canvas.multi { flex-direction: column; } #pc .ps-canvas.multi .ps-art { height: auto; }
}
