/* Global shell for My Weird Twin. Loaded after styles.css. */
:root {
  --shell-ink: #17264a;
  --shell-ink-soft: #5d6780;
  --shell-gold: #e3a52f;
  --shell-cream: #fbf3e4;
  --shell-line: rgba(23, 38, 74, .14);
}
html, body { min-height: 100%; }
body { margin: 0; background: var(--shell-cream); color: var(--shell-ink); }
.site-shell { min-height: 100dvh; display: grid; grid-template-columns: 256px minmax(0, 1fr); }
.sidebar { min-height: 100dvh; position: relative; }
.sidebar-inner { min-height: 100dvh; display: flex; flex-direction: column; padding: 26px 20px 22px; box-sizing: border-box; }
.main {
  min-width: 0;
  min-height: 100dvh;
  height: auto !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden !important;
  padding: 0 !important;
}
.site-header {
  min-height: 74px;
  padding: 0 clamp(20px, 3vw, 42px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(255,255,255,.88);
  border-bottom: 1px solid var(--shell-line);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 5;
}
.header-brand, .header-brand:visited {
  color: var(--shell-ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 800 1.08rem/1 Georgia, "Times New Roman", serif;
  white-space: nowrap;
}
.header-brand-mark, .brand-mark {
  width: 40px; height: 40px; border-radius: 13px;
  display: grid; place-items: center;
  background: var(--shell-gold); color: var(--shell-ink);
  font: 900 1.35rem/1 Georgia, "Times New Roman", serif;
  box-shadow: 0 8px 18px rgba(23,38,74,.12);
}
.site-nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); flex-wrap: wrap; justify-content: flex-end; }
.site-nav a, .site-nav a:visited {
  color: var(--shell-ink); text-decoration: none;
  font: 700 .92rem/1 Arial, sans-serif;
}
.site-nav a:hover, .site-nav a:focus-visible,
.site-footer a:hover, .site-footer a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.app-frame { min-width: 0; min-height: 0; overflow: auto; padding: clamp(18px, 2.5vw, 36px); scroll-behavior: smooth; }
.site-footer {
  min-height: 54px; padding: 0 clamp(20px, 3vw, 42px);
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  background: rgba(255,255,255,.88); border-top: 1px solid var(--shell-line);
  color: var(--shell-ink-soft); font: 500 .82rem/1.2 Arial, sans-serif;
}
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a, .site-footer a:visited { color: var(--shell-ink); text-decoration: none; }
.brand, .brand:visited { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 12px; }
.brand-name { font: 800 1.35rem/1 Georgia, "Times New Roman", serif; }
.side-kicker { margin: 34px 6px 18px; }
.sidebar-bottom { margin-top: auto; padding: 24px 6px 0; }
.sidebar-bottom p { margin: 0 0 14px; }
.sidebar-bottom a { color: var(--shell-gold); font-weight: 700; text-underline-offset: 4px; }
.gallery-dock {
  position: fixed; right: 0; top: 38%; z-index: 30;
  width: 80px; min-height: 230px; padding: 16px 10px;
  border: 1px solid rgba(23,38,74,.16); border-right: 0;
  border-radius: 26px 0 0 26px;
  background: linear-gradient(160deg, #f5c85a 0%, #e3a52f 100%);
  color: var(--shell-ink); cursor: pointer;
  box-shadow: 0 14px 28px rgba(23,38,74,.18);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 9px;
}
.gallery-dock span, .gallery-dock strong, .gallery-dock small {
  display: block; writing-mode: vertical-rl; transform: rotate(180deg); text-align: left;
}
.gallery-dock span { font: 800 .7rem/1 Arial, sans-serif; letter-spacing: .12em; }
.gallery-dock strong { font: 800 1rem/1 "Segoe Print", "Comic Sans MS", cursive; }
.gallery-dock small { font: 600 .73rem/1.05 Arial, sans-serif; }
.gallery-modal, .about-modal {
  border: 0; border-radius: 28px; background: #fffaf0; color: var(--shell-ink);
  box-shadow: 0 30px 80px rgba(7,13,29,.32);
}
.gallery-modal { width: min(1180px, calc(100% - 36px)); height: min(88vh, 900px); padding: 28px; overflow: hidden; }
.gallery-modal::backdrop, .about-modal::backdrop { background: rgba(7,13,29,.76); backdrop-filter: blur(7px); }
.gallery-modal-shell { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.gallery-header { padding-right: 42px; }
.gallery-header h2 { margin: 0 0 8px; font: 800 clamp(2rem, 4vw, 3.8rem)/1 Georgia, "Times New Roman", serif; }
.gallery-header p:last-child { margin: 0; color: var(--shell-ink-soft); }
.gallery-categories { margin: 20px 0 16px; display: flex; gap: 9px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.gallery-category {
  flex: 0 0 auto; border: 1px solid var(--shell-line); border-radius: 999px;
  padding: 9px 14px; background: #fff; color: var(--shell-ink);
  font: 700 .86rem/1 Arial, sans-serif; cursor: pointer;
}
.gallery-category.active, .gallery-category:hover { background: #f4c65c; border-color: #e3a52f; }
.gallery-grid { min-height: 0; flex: 1; overflow: auto; padding-right: 4px; }
.gallery-art { display: block; }
.gallery-art img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.modal-close {
  position: absolute; top: 14px; right: 16px; width: 42px; height: 42px;
  border: 0; border-radius: 50%; background: var(--shell-ink); color: #fff;
  font-size: 1.65rem; line-height: 1; cursor: pointer; z-index: 5;
}
.art-preview-modal {
  width: min(560px, calc(100% - 32px)); max-height: 88vh; padding: 18px;
  border: 0; border-radius: 26px; background: #101b36; color: #fff;
}
.art-preview-modal img { width: 100%; max-height: 75vh; object-fit: contain; display: block; border-radius: 16px; }
.about-modal { width: min(620px, calc(100% - 34px)); padding: 38px; }
.about-modal-inner h2 { margin: 0 0 14px; font: 800 clamp(2rem, 4vw, 3rem)/1 Georgia, "Times New Roman", serif; }
.about-modal-inner p { color: var(--shell-ink-soft); line-height: 1.65; }
.text-link { display: inline-block; margin-top: 8px; color: var(--shell-ink); font-weight: 800; }
@media (max-width: 980px) {
  .site-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .site-header { min-height: auto; padding-block: 15px; align-items: flex-start; }
  .site-nav { gap: 12px 18px; }
  .app-frame { padding: 18px; }
  .gallery-dock {
    top: auto; bottom: 18px; right: 18px; width: auto; min-height: 0; padding: 12px 16px;
    border-right: 1px solid rgba(23,38,74,.16); border-radius: 18px; flex-direction: row;
  }
  .gallery-dock span, .gallery-dock strong, .gallery-dock small { writing-mode: horizontal-tb; transform: none; text-align: left; }
  .gallery-dock small { display: none; }
}
@media (max-width: 640px) {
  .site-header { display: block; }
  .site-nav { margin-top: 12px; justify-content: flex-start; }
  .site-footer { padding-block: 14px; align-items: flex-start; flex-direction: column; }
  .gallery-modal { width: calc(100% - 20px); height: 92vh; padding: 18px; }
}
