@media (max-width: 1180px) {
  :root { --topbar-h:118px; }
  .topbar {
    grid-template-columns:minmax(130px,auto) minmax(260px,1fr) auto;
    grid-template-rows:48px 50px;
    gap:4px 10px;
    padding:8px 12px;
  }
  .brand { grid-column:1; grid-row:1; }
  .persistent-search { grid-column:2; grid-row:1; }
  .topbar-actions { grid-column:3; grid-row:1; }
  .strip-bar { grid-column:1 / -1; grid-row:2; }
  .room-title { top:18px; left:22px; max-width:60vw; }
  .world-map { top:12px; right:12px; }
  .appearance-grid { grid-template-columns:repeat(3,minmax(110px,1fr)); }
}

@media (max-width: 720px) {
  :root { --topbar-h:158px; }
  .app-shell { width:calc(100vw - 12px); height:calc(100dvh - 12px); border-radius:24px; }
  .topbar {
    grid-template-columns:1fr auto;
    grid-template-rows:40px 48px 50px;
    gap:4px 8px;
    padding:7px 9px;
  }
  .brand { grid-column:1; grid-row:1; }
  .topbar-actions { grid-column:2; grid-row:1; }
  .persistent-search { grid-column:1 / -1; grid-row:2; height:44px; }
  .strip-bar { grid-column:1 / -1; grid-row:3; }
  .room-title { top:16px; left:18px; max-width:62vw; }
  .room-title p { display:none; }
  .room-title h1 { font-size:1.2rem; }
  .world-arrow { max-width:120px; padding:6px 8px; }
  .world-arrow small { font-size:.64rem; max-width:82px; }
  .world-arrow-left { left:5px; }
  .world-arrow-right { right:5px; }
  .world-arrow-up { top:5px; }
  .world-arrow-down { bottom:7px; }
  .world-map { top:9px; right:9px; transform:scale(.88); transform-origin:top right; }
  .widget-card { width:min(340px,calc(100vw - 36px)); }
  .widget-card[data-widget-type="drawing"],.widget-card[data-widget-type="shortcuts"] { width:min(430px,calc(100vw - 36px)) !important; }
  .widget-add-button { left:9px; bottom:9px; }
  .catalog-grid,.catalog-grid.compact { grid-template-columns:1fr; }
  .magic-window { width:210px; height:158px; }
  .door-zone { right:3%; transform:scale(.8); transform-origin:bottom right; }
  .book-shelf { right:0; transform:scale(.8); transform-origin:bottom right; }
  .search-browser header { grid-template-columns:40px 1fr; }
  .search-browser header > a { display:none; }
  .parchment { padding:45px 28px 32px; }
  .album-pages { padding:25px 16px; }
  .album-grid { grid-template-columns:repeat(2,minmax(85px,1fr)); gap:8px; }
  .album-slot { min-height:122px; }
  .appearance-grid { grid-template-columns:repeat(2,minmax(110px,1fr)); }
  .appearance-actions { justify-content:stretch; }
  .appearance-actions button { flex:1; }
}

@media (max-width: 430px) {
  .brand-word { display:none; }
  .persistent-search button { padding:0 9px; }
  .topbar-actions { gap:4px; }
  .icon-button { width:32px; height:32px; }
  .world-arrow small { display:none; }
  .world-arrow { width:34px; justify-content:center; padding:5px; }
  .world-arrow span { width:20px; }
  .appearance-grid { grid-template-columns:1fr 1fr; }
  .magic-window { width:185px; height:142px; border-width:11px; }
}


@media (max-width:1180px) { .persistent-search { width:min(440px,100%); } }
@media (max-width:720px) {
  .modal-card { margin:3vh auto 0; max-height:94vh; padding:20px; }
  .appearance-grid { grid-template-columns:repeat(5,minmax(0,1fr)); gap:5px; }
  .appearance-option { padding:5px; }
  .appearance-preview { margin-bottom:4px; }
  .appearance-option strong { font-size:.56rem; text-align:center; }
  .album-pages { padding:22px 14px 14px; }
  .album-grid { grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:repeat(2,minmax(0,1fr)); gap:8px; }
  .album-slot { min-height:0; padding:7px; }
  .album-slot .album-art { font-size:2rem; }
  .album-slot strong { font-size:.7rem; }
  .album-slot small { font-size:.62rem; }
}


@media (max-width:720px) {
  .google-departure-message p { font-size:.82rem; }
  .world-arrow { min-height:34px; }
  .world-arrow span { width:25px; height:25px; }
  .world-arrow span svg { width:17px; height:17px; }
}

/* v4.2 */
@media (max-width:1180px) { .persistent-search { width:min(340px,100%); } }
@media (max-width:720px) {
  .calendar-widget { grid-template-columns:1fr; grid-template-rows:minmax(180px,1fr) minmax(145px,.8fr); }
  .reminder-form { grid-template-columns:68px minmax(0,1fr) auto; }
  .widget-card[data-widget-type="calendar"] { width:min(430px,calc(100vw - 36px)) !important; }
  .world-map { transform:scale(.82); }
}


/* v4.2.3 · posiciones compactas */
@media (max-width:1180px) {
  .world-map { left:12px; right:auto; top:auto; bottom:12px; transform-origin:bottom left; }
  .widget-add-button { left:auto; right:12px; top:12px; bottom:auto; }
}
@media (max-width:720px) {
  .world-map { left:9px; right:auto; top:auto; bottom:9px; transform:scale(.82); transform-origin:bottom left; }
  .widget-add-button { left:auto; right:9px; top:9px; bottom:auto; }
}

/* v4.2.6 */
@media (max-width:720px) {
  .calendar-widget.is-compact { grid-template-columns:1fr; grid-template-rows:minmax(0,1fr); }
  .reminder-form { grid-template-columns:minmax(0,1fr) auto; }
}
