/* A stable header and icon system across every visual profile. */
#rincon-app[data-profile][data-theme] {
  --header-brand-font:var(--profile-heading-font,RinconRomantic,Georgia,serif);
  --header-copy-font:var(--profile-body-font,RinconSans,Arial,sans-serif);
  --header-meta-size:14px;
  --header-action-size:16px;
}
#rincon-app[data-profile=historias][data-theme][data-font=tangerine] {
  --header-brand-font:RinconGreatVibes,Georgia,serif;
  --header-copy-font:RinconTangerine,Georgia,serif;
  --header-meta-size:22px;
  --header-action-size:25px;
}
#rincon-app[data-profile][data-theme] .topbar {
  position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;
  grid-template-rows:22px 44px;align-content:center;align-items:center;
  gap:8px;width:100%;height:110px;min-height:110px;max-width:none;
  margin:0;padding:14px 20px 16px;
  background:var(--paper);border:0;border-bottom:1px solid var(--line);
}
#rincon-app[data-profile][data-theme] .topbar :is(.publisher-link,.topbar-label){display:none}
#rincon-app[data-profile][data-theme] .topbar #reader-greeting {
  display:block!important;grid-area:1/1;position:static;
  max-width:100%;margin:0;padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
#rincon-app[data-profile][data-theme] .topbar #header-clock {
  display:block;grid-area:1/2;position:static;justify-self:end;margin:0;padding:0;
}
#rincon-app[data-profile][data-theme] .topbar .mobile-brand {
  display:flex;grid-area:2/1;align-items:center;gap:8px;min-width:0;
  margin:0;padding:0;background:none;border:0;white-space:nowrap;
}
#rincon-app[data-profile][data-theme] .topbar .mobile-brand img {
  display:block;width:32px;height:36px;min-width:32px;object-fit:contain;filter:none;
}
#rincon-app[data-profile][data-theme] .topbar .topbar-actions {
  display:flex;grid-area:2/2;align-items:center;gap:8px;margin:0;padding:0;
}
#rincon-app[data-profile][data-theme] .topbar #personalize-button {
  display:grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;
  margin:0;padding:0;border:0;border-radius:50%;background:none;box-shadow:none;
}
#rincon-app[data-profile][data-theme] .topbar #personalize-button .appearance-icon {
  width:36px;height:36px;min-width:36px;min-height:36px;max-width:none;
  margin:0;padding:0;filter:none!important;opacity:1;transform:none;
}
#rincon-app[data-profile][data-theme] .topbar #account-link {
  display:flex;align-items:center;justify-content:center;min-height:44px;height:44px;
  max-width:none;margin:0;padding:8px 14px;white-space:nowrap;
  border:0;border-radius:999px;background:var(--style-accent);color:var(--scene-on-accent,#fff6ed);
  box-shadow:inset 0 1px #ffffff24;
}
/* Join the existing typography layer so its inherited !important rules cannot
   resize individual controls when the user switches profiles. */
@layer rincon-romantic-type {
  #rincon-app[data-profile][data-theme] .topbar :is(#reader-greeting,#header-clock) {
    font:400 var(--header-meta-size)/1.2 var(--header-copy-font)!important;
    color:var(--muted)!important;letter-spacing:0!important;
  }
  #rincon-app[data-profile][data-theme] .topbar .mobile-brand {
    font:600 28px/1.1 var(--header-brand-font)!important;
    color:var(--ink)!important;letter-spacing:-.02em!important;
  }
  #rincon-app[data-profile][data-theme] .topbar #account-link {
    font:600 var(--header-action-size)/1.1 var(--header-copy-font)!important;
    letter-spacing:0!important;
  }
  #rincon-app[data-profile=historias][data-theme][data-font=tangerine] .topbar .mobile-brand{font-size:32px!important}
  @media(max-width:350px) {
    #rincon-app[data-profile][data-theme] .topbar .mobile-brand{font-size:24px!important}
    #rincon-app[data-profile=historias][data-theme][data-font=tangerine] .topbar .mobile-brand{font-size:28px!important}
  }
}
#rincon-app[data-profile][data-theme] #app-navigation .nav-button img {
  width:24px;height:24px;object-fit:contain;
}
#rincon-app[data-profile][data-profile-dark=true] #app-navigation .nav-button img {
  filter:brightness(0) invert(.93);
}
#rincon-app[data-profile][data-theme] #main .dashboard-links button img {
  width:32px;height:32px;object-fit:contain;filter:none;
}
#rincon-app[data-profile-dark=true] #main img[data-profile-icon] {
  filter:brightness(0) invert(.93);
}
@media(max-width:350px) {
  #rincon-app[data-profile][data-theme] .topbar{padding-inline:14px;column-gap:4px}
  #rincon-app[data-profile][data-theme] .topbar .mobile-brand{gap:6px}
  #rincon-app[data-profile][data-theme] .topbar .mobile-brand img{width:28px;min-width:28px;height:32px}
  #rincon-app[data-profile][data-theme] .topbar .topbar-actions{gap:4px}
  #rincon-app[data-profile][data-theme] .topbar #account-link{padding-inline:9px}
}
