/* AprendeCasa: identidad, apoyo y pie de página. */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
}
.topbar { flex: 0 0 auto; height: 90px; min-height: 90px; gap: 16px; }
.brand { margin: 0; min-width: 0; }
.brand-logo { display: block; width: 222px; max-width: 100%; height: auto; object-fit: contain; }
.header-actions { flex: 0 0 auto; }
.workspace { flex: 1 1 auto; height: auto; min-height: 0; }
.side-toolbar { overflow-y: auto; }
.activity-group-buttons.one-activity { grid-template-columns: minmax(0, 1fr); }
.activity-group-buttons.three-activities { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.donate-button, .share-button, .paypal-button, .qr-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid #ffccd7;
  border-radius: 12px;
  color: #d51c49;
  background: #fff5f7;
  cursor: pointer;
  font: 800 14px/1.3 "Trebuchet MS", Arial, sans-serif;
  text-align: center;
  text-decoration: none;
}
.donate-button:hover { background: #ffe8ee; border-color: #f595ac; }
.support-rail { display: flex; flex-direction: column; gap: 10px; min-height: 0; min-width: 0; overflow-y: auto; }
.support-card { flex: 0 0 auto; padding: 10px; border: 1px solid #dce7f1; border-radius: 15px; background: #fff; }
.support-donate-button { width: 100%; padding: 12px 8px; }
.support-donate-button > span { flex: 0 0 auto; }
.support-card > p { margin: 12px 0; color: #4b6986; font: 13px/1.5 Arial, sans-serif; text-align: center; }
.share-button { width: 100%; color: #124e80; background: #f2f6ff; border-color: #cdddf4; }
.share-button:hover { background: #e6effe; border-color: #96b9e6; }
.share-button .icon { flex: 0 0 auto; width: 21px; height: 21px; }
.support-card > .share-status:empty { display: none; }
.support-rail > .ad-slot { flex: 1 0 130px; height: auto; min-height: 130px; }
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 6px 18px;
  min-height: 46px;
  padding: 8px 0.5cm;
  border-top: 1px solid #dce7ef;
  color: #46657d;
  background: #fff;
  font: 12px/1.5 Arial, sans-serif;
}
.site-footer p { margin: 0; font-weight: 700; white-space: nowrap; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.site-footer a { color: #315d82; text-decoration: none; padding-block: 4px; }
.site-footer a:hover { color: #075ba8; text-decoration: underline; }
.site-footer a:focus-visible, .donate-button:focus-visible, .share-button:focus-visible,
.paypal-button:focus-visible, .qr-download:focus-visible { outline: 3px solid #1680ee; outline-offset: 3px; }
.site-dialog {
  width: min(640px, calc(100% - 28px));
  max-height: calc(100dvh - 32px);
  padding: 24px;
  border: 1px solid #d8e5ed;
  border-radius: 20px;
  color: #23496a;
  background: #fff;
  box-shadow: 0 24px 80px #15365340;
  overflow-y: auto;
}
.site-dialog::backdrop { background: #12293c88; }
.site-dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin: 0 0 16px; }
.site-dialog-heading h2 { margin: 4px 0 0; font-size: 23px; line-height: 1.25; }
.site-dialog-heading .dialog-close-button { flex: 0 0 auto; }
.site-dialog p, .site-info-content { font: 15px/1.65 Arial, sans-serif; }
.site-info-content h3 { margin: 22px 0 8px; color: #185884; font: 700 17px/1.4 "Trebuchet MS", Arial, sans-serif; }
.site-info-content p { margin: 0 0 12px; }
.donation-dialog { width: min(690px, calc(100% - 28px)); }
.donation-dialog h2 { color: #cf1d4b; }
.donation-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.donation-method { min-width: 0; padding: 18px; border: 1px solid #d8e5ed; border-radius: 16px; text-align: center; }
.donation-method h3 { font-size: 18px; margin: 14px 0 8px; }
.donation-method p { font-size: 13px; line-height: 1.55; }
.paypal-method { background: #f4f8ff; }
.yape-method { background: #fcf7ff; }
.payment-badge { display: inline-block; padding: 6px 15px; border-radius: 20px; background: #e1ebfc; color: #003087; font-weight: 900; }
.yape-method .payment-badge { color: #692480; background: #f0e1f6; }
.paypal-button { margin-top: 12px; color: #fff; background: #0070ba; border-color: #0070ba; }
.paypal-button:hover { background: #005d9c; }
.yape-qr { display: block; width: min(100%, 210px); height: auto; margin: 10px auto; border-radius: 8px; }
.qr-download { color: #6e2587; border-color: #dcc4e7; background: #fff; }
.qr-download:hover { background: #f3e8f9; }
.donation-note { margin-bottom: 0; padding-top: 12px; text-align: center; color: #547187; }
.share-dialog label { display: block; margin: 12px 0 6px; }
.share-dialog input { width: 100%; padding: 12px; border: 1px solid #bfd2e3; border-radius: 8px; color: #23496a; }
.share-dialog .share-button { margin-top: 12px; }
.app-shell.painting-fullscreen .site-footer,
.app-shell.painting-fullscreen .support-card { display: none; }
.app-shell.painting-fullscreen .workspace { flex: 1 1 auto; height: 100dvh; }
@media (max-width: 960px) and (min-width: 761px) {
  .site-footer { justify-content: center; text-align: center; }
  .site-footer nav { justify-content: center; gap: 4px 12px; }
}
@media (max-width: 760px) {
  .app-shell { height: auto; min-height: 100dvh; }
  .topbar { height: auto; min-height: 78px; flex-wrap: wrap; justify-content: center; padding: 8px 14px; gap: 6px 16px; }
  .brand-logo { width: 210px; }
  .header-actions { justify-content: center; flex-wrap: wrap; max-width: 100%; }
  .header-donate-button { min-height: 38px; padding: 8px 12px; }
  .workspace { flex: 1 0 auto; }
  .support-rail { overflow: visible; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
  .support-rail > .ad-slot { max-height: none; height: 100%; }
  .site-footer { justify-content: center; padding: 14px; text-align: center; }
  .site-footer nav { justify-content: center; gap: 4px 14px; }
  .app-shell.painting-fullscreen .support-rail { display: block; }
}
@media (max-width: 480px) {
  .support-rail, .donation-methods { grid-template-columns: minmax(0, 1fr); }
  .support-rail > .ad-slot { min-height: 150px; }
  .site-dialog { padding: 18px; }
  .site-dialog-heading h2 { font-size: 21px; }
}
@media (print) {
  .site-footer, .support-rail, .header-donate-button, .site-dialog { display: none; }
}
