/* Navegación multipágina y simplificación visual — SESIONES_REGULARES_3.3 */
body.module-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 0%, rgba(0,157,215,.09), transparent 28rem),
    linear-gradient(180deg, #f8fcff 0, #ffffff 24rem);
}
body.module-menu-open { overflow: hidden; }
.brand-link { color: inherit; text-decoration: none; }
.app-topbar {
  padding-block: 10px;
  box-shadow: 0 8px 30px rgba(36,58,133,.06);
}
.app-topbar .brand h1 { font-size: 1.05rem; }
.app-topbar .brand p { font-size: .76rem; }
.app-topbar .brand-mark { width: 38px; height: 38px; }
.current-tool {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 170px;
  padding: 7px 11px;
  border: 1px solid color-mix(in srgb, var(--module-accent, var(--brand-cyan)) 28%, #dce7ee);
  border-radius: 14px;
  background: color-mix(in srgb, var(--module-accent, var(--brand-cyan)) 7%, white);
  color: var(--brand-blue);
}
.current-tool > svg { width: 21px; height: 21px; color: var(--module-accent, var(--brand-cyan)); }
.current-tool span { display: grid; line-height: 1.12; }
.current-tool small { color: var(--muted); font-size: .65rem; font-weight: 700; }
.current-tool strong { font-size: .82rem; }
.menu-button,
.switch-tool,
.back-home,
.result-jump {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #cfe2ee;
  border-radius: 14px;
  padding: 0 13px;
  color: var(--brand-blue);
  background: #fff;
  text-decoration: none;
  font-weight: 850;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.menu-button:hover,.switch-tool:hover,.back-home:hover,.result-jump:hover { transform: translateY(-1px); border-color: #75cee9; box-shadow: 0 10px 22px rgba(36,58,133,.09); }
.menu-button-bars { width: 18px; height: 12px; border-block: 2px solid currentColor; position: relative; }
.menu-button-bars::after { content:""; position:absolute; left:0; right:0; top:4px; border-top:2px solid currentColor; }
.page-toolbar { display:flex; align-items:center; gap:9px; margin:0 0 14px; }
.page-toolbar .result-jump { margin-left:auto; }
.module-page .app-shell { max-width: 1680px; padding-top: 16px; grid-template-columns:minmax(0,2.15fr) minmax(340px,.85fr); }
.module-page .title-strip { margin-bottom:14px; border-left-color:var(--module-accent, var(--brand-cyan)); padding:16px 18px; }
.page-title-copy h2 svg { color:var(--module-accent, var(--brand-cyan)); }
.module-page .block { padding: 17px; }
.module-page .block h3 { margin-bottom: 11px; }
.module-page .microcopy,
.module-page .level-help,
.module-page .session-mode-intro p { display:none; }
.module-page .section-tabs { padding: 4px; margin: 0 0 14px; border:1px solid #e1ebf1; border-radius:16px; background:#f7fafc; }
.module-page .section-tabs button { flex:1 0 auto; border-radius:12px; padding:10px 12px; }
.module-page .section-tabs button[aria-selected="true"] { background:#fff; box-shadow:0 7px 18px rgba(36,58,133,.08); }
.module-page .result { top:78px; }
.module-page .result-card { border-radius:22px; box-shadow:0 18px 46px rgba(36,58,133,.11); }
.result-mobile-close { display:none; position:absolute; top:9px; right:9px; width:34px; height:34px; border:0; border-radius:50%; background:#eef6fb; color:#28405d; font-size:1.45rem; line-height:1; }
.module-menu-overlay { position:fixed; inset:0; z-index:1000; display:grid; grid-template-columns:1fr minmax(320px,440px); }
.module-menu-backdrop { background:rgba(12,31,58,.48); backdrop-filter:blur(4px); }
.module-menu-drawer { background:#fff; padding:22px; overflow:auto; box-shadow:-24px 0 60px rgba(12,31,58,.2); }
.module-menu-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; margin-bottom:18px; }
.module-menu-head h2 { margin:0; color:var(--brand-blue); }
.drawer-close { width:40px; height:40px; border:1px solid #dce7ee; border-radius:13px; background:#f8fbfd; color:#344054; font-size:1.55rem; line-height:1; }
.module-menu-grid { display:grid; gap:10px; }
.module-menu-link { --card-accent:var(--brand-cyan); display:grid; grid-template-columns:46px 1fr; gap:12px; align-items:center; min-height:64px; padding:12px; border:1px solid #e0e9ef; border-radius:17px; color:#243042; text-decoration:none; background:#fff; transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.module-menu-link > svg { width:24px; height:24px; padding:10px; box-sizing:content-box; border-radius:14px; color:var(--card-accent); background:color-mix(in srgb,var(--card-accent) 10%,white); }
.module-menu-link span { display:grid; gap:2px; }
.module-menu-link strong { color:var(--brand-blue); }
.module-menu-link small { color:var(--muted); line-height:1.25; }
.module-menu-link:hover { transform:translateX(-2px); border-color:color-mix(in srgb,var(--card-accent) 46%,#dfe8ee); box-shadow:0 12px 28px rgba(36,58,133,.09); }
.module-menu-link[aria-current="page"] { border-color:color-mix(in srgb,var(--card-accent) 52%,#dfe8ee); background:color-mix(in srgb,var(--card-accent) 5%,white); box-shadow:inset 4px 0 var(--card-accent); }
.drawer-home-link { display:inline-flex; gap:8px; align-items:center; margin-top:18px; color:var(--brand-blue); font-weight:850; text-decoration:none; }
.module-accent-cyan{--card-accent:#009dd7}.module-accent-green{--card-accent:#18a66a}.module-accent-violet{--card-accent:#7c3aed}.module-accent-orange{--card-accent:#e97718}.module-accent-blue{--card-accent:#2f80ed}.module-accent-teal{--card-accent:#0f9f91}.module-accent-pink{--card-accent:#d94c8b}
body[data-module-accent="cyan"]{--module-accent:#009dd7}body[data-module-accent="green"]{--module-accent:#18a66a}body[data-module-accent="violet"]{--module-accent:#7c3aed}body[data-module-accent="orange"]{--module-accent:#e97718}body[data-module-accent="blue"]{--module-accent:#2f80ed}body[data-module-accent="teal"]{--module-accent:#0f9f91}body[data-module-accent="pink"]{--module-accent:#d94c8b}
@media (max-width:1280px){.current-tool{display:none}.top-ai-links{display:none}.module-page .app-shell{grid-template-columns:minmax(0,1.65fr) minmax(330px,.85fr)}}
@media (max-width:1120px){.module-page .app-shell{grid-template-columns:1fr}.module-page .result{position:static}.result-jump{display:inline-flex}}
@media (min-width:1121px){.result-jump{display:none}}
@media (max-width:760px){
 .app-topbar{position:sticky; flex-direction:row; align-items:center; padding:9px 12px; gap:8px}.app-topbar .brand p{display:none}.app-topbar .brand-mark{width:34px;height:34px}.app-topbar .topbar-actions{width:auto; margin-left:auto; flex-wrap:nowrap; gap:6px}.app-topbar .global-data-btn{width:42px;padding:0;justify-content:center}.app-topbar .global-data-btn span{display:none}.app-topbar .project-file-actions{display:none}.menu-button{width:42px;padding:0}.menu-button span:last-child{display:none}
 .module-page .app-shell{padding:12px 10px 24px;gap:14px}.page-toolbar{position:sticky;top:62px;z-index:15;margin-inline:-2px;padding:7px;border:1px solid #e2ebf1;border-radius:16px;background:rgba(255,255,255,.94);backdrop-filter:blur(8px)}.back-home,.switch-tool,.result-jump{min-height:40px;padding:0 10px;font-size:.78rem}.switch-tool svg,.result-jump svg{width:16px;height:16px}.page-toolbar .result-jump{margin-left:0}.page-toolbar{display:grid;grid-template-columns:auto 1fr auto}
 .module-page .title-strip{padding:14px}.module-page .title-strip .status-pill{display:none}.module-page .title-strip h2{font-size:1.08rem}.module-page .block{padding:14px;border-radius:17px}.module-page .section-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible}.module-page .section-tabs button{min-width:0;justify-content:flex-start;font-size:.8rem}
 .module-menu-overlay{grid-template-columns:1fr}.module-menu-backdrop{display:none}.module-menu-drawer{padding:18px}.module-menu-link{min-height:70px}
 body.result-expanded .result{display:block;position:fixed;inset:0;z-index:1200;background:#f5f9fc;padding:10px;overflow:auto}.result-mobile-close{display:block}.result-card{min-height:calc(100vh - 20px);position:relative;padding-top:44px}.prompt-output{height:auto;min-height:55vh}
}
@media (max-width:760px){
  .module-page .tooltip-box {
    position: fixed;
    left: 50%;
    right: auto;
    top: auto;
    bottom: 18px;
    width: min(340px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    transform: translateX(-50%) translateY(8px);
  }
  .module-page .tooltip-box::after { display:none; }
  .module-page .tooltip-container:hover .tooltip-box,
  .module-page .tooltip-container:focus-within .tooltip-box {
    transform: translateX(-50%) translateY(0);
  }
}
/* Ajustes de claridad del panel de resultado y mayor espacio contextual. */
.module-page .result-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.module-page .result-actions .primary {
  grid-column: 1 / -1;
}
body[data-page-module="session"] #standardContextInput { min-height: 150px; }
body[data-page-module="session"] #contextCustom,
body[data-page-module="session"] #notesInput { min-height: 125px; }
@media (max-width:760px){
  .module-page .result-actions { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .module-page .result-actions .primary { grid-column:1 / -1; }
}

/* Encabezado simplificado — 3.3 */
.top-home,.top-result-jump{
  min-height:42px;display:inline-flex;align-items:center;justify-content:center;gap:7px;
  border:1px solid #cfe2ee;border-radius:14px;padding:0 12px;background:#fff;color:var(--brand-blue);
  text-decoration:none;font-weight:850;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease
}
.top-home:hover,.top-result-jump:hover{transform:translateY(-1px);border-color:#75cee9;box-shadow:0 10px 22px rgba(36,58,133,.09)}
.top-home svg,.top-result-jump svg{width:19px;height:19px}
.top-result-jump{display:none}
@media(max-width:1120px){.top-result-jump{display:inline-flex}}
@media(max-width:760px){
  .top-home,.top-result-jump{width:42px;padding:0}
  .top-home span,.top-result-jump span{display:none}
  .top-home svg,.top-result-jump svg{width:18px;height:18px}
}

/* Herramienta visual — 3.5 */
.module-accent-indigo{--card-accent:#5367d9}
body[data-module-accent="indigo"]{--module-accent:#5367d9}
