@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --navy: #0b2a59; 
  --sky: #7ed5ea;  
  --lilac: #dda4f4; 
  
  --paper: #f0f4f8; 
  --muted: #52647e;
  --border: rgba(255, 255, 255, 0.6);
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-card: rgba(255, 255, 255, 0.7);
  --font: 'DM Sans', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 110px; overflow-x: hidden; }

/* Animated Floating Orbs Background */
body {
  margin: 0;
  color: var(--navy);
  background-color: var(--paper);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  position: relative;
  z-index: 0;
  overflow-x: hidden;
  overflow-wrap: anywhere; 
  word-break: break-word;
}

body::before, body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: -1;
  pointer-events: none;
}

body::before {
  background: 
    radial-gradient(circle at 15% 20%, rgba(126, 213, 234, 0.4) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(221, 164, 244, 0.4) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(11, 42, 89, 0.05) 0%, transparent 60%);
  animation: floatBg 20s ease-in-out infinite alternate;
}

@keyframes floatBg {
  0% { transform: scale(1) translate(0, 0); }
  33% { transform: scale(1.1) translate(3%, 4%); }
  66% { transform: scale(1.05) translate(-2%, 5%); }
  100% { transform: scale(1.2) translate(-4%, -2%); }
}

body:has(dialog[open]) { overflow: hidden; }

button, input, textarea, select { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; border: 0; }
button:disabled { opacity: .55; cursor: wait; }
a { color: inherit; text-decoration: none; }

button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 4px;
}

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: 'Manrope', Arial, sans-serif; letter-spacing: -.045em; line-height: 1.17; }
h1 { font-size: clamp(32px, 4.65vw, 70px); font-weight: 600; }
h2 { font-size: clamp(26px, 2.65vw, 40px); font-weight: 600; }
h3 { font-size: 19px; font-weight: 700; letter-spacing: -.025em; }
p { color: var(--muted); }

.skip { position: fixed; left: 20px; top: -100px; padding: 10px; background: white; z-index: 100; transition: top 0.3s ease; }
.skip:focus { top: 15px; }

.announcement {
  background: linear-gradient(90deg, var(--navy), #173c70);
  color: #f8fafc;
  text-align: center;
  font-size: 11px;
  letter-spacing: .025em;
  padding: 9px 20px;
}
.announcement span { margin-left: 30px; color: var(--sky); text-shadow: 0 0 8px rgba(126, 213, 234, 0.4); }

/* Frosted Glass Header */
header {
  background: rgba(255, 255, 255, 0.85); 
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

.header-inner { max-width: 1440px; height: 94px; padding: 0 5.1%; display: flex; align-items: center; gap: 26px; margin: auto; }
.wordmark { font-family: 'Manrope', Arial, sans-serif; font-weight: 800; font-size: 23px; letter-spacing: -1px; line-height: 1.2; white-space: nowrap; }
.wordmark span { display: block; font-size: 9px; letter-spacing: 4.5px; font-weight: 600; margin-top: 7px; background: linear-gradient(90deg, var(--navy), var(--lilac)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.icon-btn { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; background: transparent; font-size: 25px; border-radius: 50%; line-height: 1; flex-shrink: 0; transition: background 0.2s ease, transform 0.2s ease; }
.icon-btn:hover { background: var(--glass-bg); transform: scale(1.05); }

.header-inner nav { display: flex; gap: 32px; margin-left: auto; font-size: 13px; }
.header-inner nav a { padding: 12px 0; position: relative; font-weight: 500; }
.header-inner nav a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background: linear-gradient(90deg, var(--sky), var(--lilac)); transform: scaleX(0); transition: transform 0.3s ease; }
.header-inner nav a:hover::after, .header-inner nav a.active::after { transform: scaleX(1); }

.cart-trigger { margin-left: 32px; display: flex; align-items: center; gap: 12px; background: transparent; font-size: 13px; font-weight: 600; transition: transform 0.2s ease; }
.cart-trigger:hover { transform: translateY(-2px); }
.cart-trigger #cart-count { background: linear-gradient(135deg, var(--sky), var(--lilac)); color: var(--navy); border-radius: 50%; width: 24px; height: 24px; display: grid; place-content: center; font-size: 11px; font-weight: bold; box-shadow: 0 4px 10px rgba(126, 213, 234, 0.4); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

.bag-icon { width: 17px; height: 18px; border: 1.5px solid var(--navy); display: inline-block; position: relative; border-radius: 2px; }
.bag-icon:before { content: ''; position: absolute; border: 1.5px solid var(--navy); border-bottom: 0; width: 7px; height: 6px; top: -6px; left: 3.5px; border-radius: 4px 4px 0 0; }

.hero { max-width: 1440px; margin: auto; display: grid; grid-template-columns: 1fr 1fr; min-height: 590px; padding: 0 5.1%; }
.hero-copy { padding: 63px 20px 55px 0; }
.eyebrow { font-size: 10px; letter-spacing: 1.7px; font-weight: 700; line-height: 1.6; color: var(--navy); }
.tiny-line { width: 22px; height: 1px; background: linear-gradient(90deg, var(--sky), var(--lilac)); display: inline-block; vertical-align: middle; margin-right: 10px; }

/* The Glowing Title Underline */
.hero h1 { margin: 22px 0 23px; }
.hero h1 span, .author-page h1 span, .login-page h1 span { position: relative; z-index: 1; }
.hero h1 span:after, .author-page h1 span:after, .login-page h1 span:after { content: ''; position: absolute; z-index: -1; bottom: 5px; left: -2px; right: 0; height: 20px; background: linear-gradient(90deg, rgba(126, 213, 234, 0.5), rgba(221, 164, 244, 0.5)); border-radius: 10px; filter: blur(4px); }

.hero-copy > p { font-size: 15px; max-width: 430px; line-height: 1.8; font-weight: 500; }
.hero-actions { display: flex; gap: 28px; align-items: center; margin-top: 29px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 26px;
  background: linear-gradient(135deg, var(--navy), #1a4282);
  color: white; padding: 15px 24px; min-height: 48px; border-radius: 8px;
  font-size: 12px; font-weight: 600; border: none;
  box-shadow: 0 4px 15px rgba(11, 42, 89, 0.2);
  transition: transform .25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow .25s, background .25s;
}
.btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 25px rgba(126, 213, 234, 0.4); 
  background: linear-gradient(135deg, #133870, #2256a6);
}
.btn.secondary { background: var(--glass-bg); color: var(--navy); border: 1px solid var(--navy); backdrop-filter: blur(4px); box-shadow: none; }
.btn.secondary:hover { background: rgba(255, 255, 255, 0.9); box-shadow: 0 6px 15px rgba(221, 164, 244, 0.3); }
.btn.light { background: rgba(255, 255, 255, 0.9); color: var(--navy); box-shadow: none; }
.btn.small { padding: 10px 14px; min-height: 40px; font-size: 11px; gap: 10px; }
.wide { width: 100%; }

.text-link { font-size: 12px; font-weight: 700; border-bottom: 2px solid var(--lilac); padding-bottom: 4px; background: none; display: inline-flex; gap: 16px; align-items: center; transition: gap 0.2s ease, border-color 0.2s ease; }
.text-link:hover { gap: 20px; border-color: var(--sky); }

.hero-note { display: flex; align-items: center; gap: 13px; margin-top: 35px; font-size: 11px; line-height: 1.6; color: var(--muted); }
.note-icon { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, rgba(126, 213, 234, 0.2), rgba(221, 164, 244, 0.2)); border: 1px solid rgba(255,255,255,0.6); display: grid; place-content: center; color: var(--navy); }

/* Glassmorphism Hero Art Area */
.hero-art {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
  min-height: 570px;
  margin: 24px 0 24px 22px;
  border-radius: 16px;
}

.orbit { position: absolute; border: 1px solid rgba(126, 213, 234, 0.5); border-radius: 50%; width: 470px; height: 470px; top: 90px; left: 50%; transform: translateX(-50%); z-index: -1; }
.orbit-two { width: 380px; height: 380px; top: 135px; border-style: dashed; border-color: rgba(221, 164, 244, 0.6); opacity: .8; animation: spin 45s linear infinite; }
@keyframes spin { 100% { transform: translateX(-50%) rotate(360deg); } }

.art-label { position: absolute; top: 31px; left: 28px; font-size: 9px; letter-spacing: 1.6px; font-weight: 700; line-height: 1.7; }
.book-stack { position: absolute; inset: 100px 40px 90px; display: flex; align-items: center; justify-content: center; }

.hero-book { padding: 0; position: absolute; box-shadow: 12px 22px 35px rgba(11, 42, 89, 0.2); border-radius: 2px 4px 4px 2px; transform-origin: center; overflow: hidden; border-left: 5px solid rgba(255,255,255,0.8); max-width: 55%; background: #fff; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.hero-book img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-book.front { width: 222px; aspect-ratio: .7; transform: rotate(9deg) translate(48px, -2px); z-index: 2; }
.hero-book.front:hover { transform: rotate(5deg) translate(48px, -15px) scale(1.05); }
.hero-book.back { width: 208px; aspect-ratio: .7; transform: rotate(-12deg) translate(-65px, -14px); filter: brightness(.95) contrast(1.05); }

.art-caption { position: absolute; bottom: 74px; left: 26px; background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(8px); display: flex; align-items: center; gap: 12px; padding: 15px 21px; border-radius: 8px; font-size: 10px; box-shadow: 0 8px 25px rgba(11, 42, 89, 0.1); z-index: 3; transform: rotate(-4deg); transition: transform 0.3s ease; }
.hero-art:hover .art-caption { transform: rotate(-2deg) translateY(-5px); }
.sparkle { font-size: 35px; background: linear-gradient(135deg, var(--sky), var(--lilac)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.edition-label { position: absolute; bottom: 26px; right: 27px; font-size: 8px; letter-spacing: 1.5px; }

/* Frosted Glass Benefit Strip */
.benefit-strip { display: flex; align-items: center; justify-content: center; gap: 0; padding: 25px 5%; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--glass-bg); backdrop-filter: blur(12px); box-shadow: 0 4px 30px rgba(0,0,0,0.02); }
.benefit-strip > div { flex: 1; max-width: 400px; display: flex; align-items: center; justify-content: center; gap: 15px; font-size: 12px; border-right: 1px solid var(--border); transition: transform 0.3s ease; }
.benefit-strip > div:hover { transform: translateY(-2px); }
.benefit-strip > div:last-child { border: 0; }
.benefit-strip > div > span:first-child { font-size: 23px; color: var(--sky); text-shadow: 0 0 10px rgba(126, 213, 234, 0.5); }

.collection { max-width: 1440px; padding: 66px 5.1% 70px; margin: auto; }
.section-heading { display: flex; justify-content: space-between; gap: 30px; align-items: end; }
.section-heading h2 { margin-top: 13px; font-size: 32px; }
.section-heading > p { font-size: 12px; line-height: 1.8; font-weight: 500; }

.catalog-tools { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 30px 0; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter { padding: 9px 16px; background: var(--glass-bg); border: 1px solid var(--border); border-radius: 30px; font-size: 10px; font-weight: 600; white-space: nowrap; backdrop-filter: blur(4px); transition: all 0.2s ease; }
.filter:hover { background: rgba(255, 255, 255, 0.9); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(126, 213, 234, 0.2); }
.filter.active { background: linear-gradient(135deg, var(--navy), #173c70); color: white; border-color: transparent; box-shadow: 0 6px 15px rgba(11, 42, 89, 0.2); }

.search { display: flex; align-items: center; gap: 8px; border-bottom: 2px solid rgba(11, 42, 89, 0.2); padding: 3px 0; min-width: 180px; max-width: 220px; transition: border-color 0.3s; }
.search:focus-within { border-bottom-color: var(--lilac); }
.search > span { font-size: 25px; color: var(--navy); }
.search input { border: 0; background: transparent; width: 100%; font-size: 11px; padding: 8px; outline-offset: 0; }

.book-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* Frosted Glass Book Cards */
.book-card {
  min-width: 0;
  background: var(--glass-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow .3s ease;
}
.book-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(11, 42, 89, 0.12), 0 0 20px rgba(221, 164, 244, 0.2); 
}

.cover-stage { width: 100%; height: 280px; background: rgba(255,255,255,0.3); display: flex; align-items: center; justify-content: center; position: relative; padding: 24px; border-bottom: 1px solid var(--border); overflow: hidden; }
.stage-1 { background: linear-gradient(135deg, rgba(126, 213, 234, 0.15), transparent); }
.stage-2 { background: linear-gradient(135deg, rgba(221, 164, 244, 0.15), transparent); }
.stage-3 { background: linear-gradient(135deg, rgba(11, 42, 89, 0.05), transparent); }
.cover-stage img { width: auto; max-width: 92%; height: auto; max-height: 224px; box-shadow: 6px 12px 20px rgba(11, 42, 89, 0.15); transition: transform .4s cubic-bezier(0.175, 0.885, 0.32, 1.275); border-radius: 2px 4px 4px 2px; }
.book-card:hover .cover-stage img { transform: rotate(-3deg) translateY(-5px) scale(1.05); box-shadow: 12px 18px 25px rgba(11, 42, 89, 0.2); }

.cover-peek { position: absolute; bottom: 0; right: 0; left: 0; background: rgba(11, 42, 89, 0.9); backdrop-filter: blur(4px); color: #fff; padding: 9px; font-size: 10px; transform: translateY(100%); transition: transform .3s ease; }
.cover-stage:hover .cover-peek, .cover-stage:focus-visible .cover-peek { transform: none; }

.badge { display: inline-flex; background: linear-gradient(135deg, var(--sky), var(--lilac)); color: var(--navy); border-radius: 20px; padding: 5px 12px; font-size: 8px; letter-spacing: 1px; font-weight: 800; box-shadow: 0 4px 10px rgba(126, 213, 234, 0.3); }
.sale { position: absolute; top: 15px; left: 15px; z-index: 2; }

.card-body { padding: 22px 18px 0; }
.card-body .eyebrow { font-size: 8px; color: var(--navy); font-weight: 700; background: rgba(126, 213, 234, 0.3); display: inline-block; padding: 3px 8px; border-radius: 12px; }
.title-button { background: transparent; text-align: left; padding: 0; margin: 12px 0 9px; display: block; width: 100%; min-height: 46px; }
.title-button h3 { font-size: 18px; line-height: 1.3; letter-spacing: -.5px; transition: color 0.2s; }
.book-card:hover .title-button h3 { color: #2256a6; }

.card-body > p { font-size: 11px; line-height: 1.8; min-height: 63px; font-weight: 500; }
.rating { font-size: 11px; display: inline-flex; align-items: center; gap: 5px; margin: 12px 0; font-weight: 600; }
.rating > span:first-child { color: #2256a6; font-size: 14px; text-shadow: 0 0 5px rgba(126, 213, 234, 0.5); }
.muted { color: var(--muted); font-weight: 400; }

.card-purchase { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 10px 0 18px; }
.reservation { font-size: 10px; max-width: 85px; line-height: 1.6; font-weight: 600; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px; }
.price strong { font-size: 18px; font-weight: 800; }
.price del { font-size: 11px; color: var(--muted); }

.preview-link { border-top: 1px solid rgba(11, 42, 89, 0.1); padding: 14px; width: 100%; background: rgba(255,255,255,0.4); text-align: center; font-size: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; transition: background 0.2s, color 0.2s; font-weight: 600; border-radius: 0 0 12px 12px; }
.preview-link:hover { background: rgba(221, 164, 244, 0.15); color: var(--navy); }
.preview-link span { font-size: 16px; transition: transform 0.2s; }
.preview-link:hover span { transform: translateX(4px); }

/* Colorful Vibrant Bundle Section */
.bundle { max-width: 1294px; margin: 0 auto 70px; padding: 45px; background: linear-gradient(135deg, var(--navy) 0%, #1a4282 100%); color: white; display: grid; grid-template-columns: 240px 1fr 240px; align-items: center; gap: 40px; border-radius: 16px; position: relative; overflow: hidden; box-shadow: 0 20px 40px rgba(11, 42, 89, 0.25); border: 1px solid rgba(255,255,255,0.2); }
.bundle::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle at 80% 20%, rgba(126, 213, 234, 0.15), transparent 40%), radial-gradient(circle at 20% 80%, rgba(221, 164, 244, 0.15), transparent 40%); pointer-events: none; }
.bundle-mini { height: 185px; position: relative; }
.bundle-mini > div { position: absolute; left: calc(var(--i) * 35px); top: calc(18px - var(--i) * 3px); width: 102px; height: 145px; transform: rotate(calc(-14deg + var(--i) * 7deg)); box-shadow: -5px 10px 20px rgba(0,0,0,0.4); border-radius: 2px 4px 4px 2px; overflow: hidden; background: #fff; transition: transform 0.4s ease; border-left: 2px solid rgba(255,255,255,0.9); }
.bundle:hover .bundle-mini > div { transform: rotate(calc(-8deg + var(--i) * 4deg)) translateY(-15px); }
.bundle-mini img { width: 100%; height: 100%; object-fit: cover; }
.bundle-copy h2 { font-size: 32px; max-width: 360px; margin: 16px 0 12px; }
.bundle-copy p { color: rgba(255,255,255,0.8); font-size: 12px; max-width: 380px; font-weight: 500; }
.bundle-meta { display: block; font-size: 9px; letter-spacing: 2px; margin-top: 20px; color: var(--sky); font-weight: 700; }
.bundle-action { text-align: right; z-index: 1; }
.bundle-action > p { color: white; font-size: 13px; margin-bottom: 15px; font-weight: 600; }
.bundle-action .btn { width: 100%; background: white; color: var(--navy); box-shadow: none; }
.bundle-action .btn:hover { background: var(--sky); color: var(--navy); box-shadow: 0 8px 20px rgba(126, 213, 234, 0.4); }
.bundle-action small { display: block; font-size: 9px; margin-top: 14px; color: rgba(255,255,255,0.6); }
.bundle-price strong { font-size: 32px; }
.bundle-price del { font-size: 14px; color: rgba(255,255,255,0.6); }

/* Glassmorphism Author Teaser */
.author-teaser { max-width: 1294px; margin: 0 auto 70px; display: grid; grid-template-columns: 230px 1fr 130px; align-items: center; gap: 50px; padding: 35px 55px; background: var(--glass-card); backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 10px 30px rgba(11, 42, 89, 0.05); transition: transform 0.3s ease; }
.author-teaser:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(126, 213, 234, 0.15); }
.author-monogram { font-family: Georgia, serif; font-size: 100px; line-height: 1; letter-spacing: -10px; padding: 25px; border-right: 1px solid rgba(11, 42, 89, 0.1); color: var(--navy); }
.author-monogram span { font-family: var(--font); font-size: 8px; display: block; letter-spacing: 1.5px; line-height: 1.8; margin-top: 20px; font-weight: 600; }
.author-teaser h2 { font-size: 30px; margin: 14px 0; }
.author-teaser p { font-size: 13px; max-width: 430px; margin-bottom: 20px; font-weight: 500; }
.teaser-mark { font-size: 100px; background: linear-gradient(135deg, var(--sky), var(--lilac)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-align: center; transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); opacity: 0.8; }
.author-teaser:hover .teaser-mark { transform: rotate(15deg) scale(1.1); opacity: 1; }

.how { max-width: 1294px; margin: 0 auto; padding: 0 0 75px; display: grid; grid-template-columns: 1.25fr 1fr 1fr 1fr; gap: 40px; }
.how h2 { font-size: 28px; margin-top: 15px; max-width: 230px; }
.how > div { transition: transform 0.3s ease; padding: 20px; border-radius: 12px; }
.how > div:not(:first-child):hover { transform: translateY(-5px); background: var(--glass-bg); backdrop-filter: blur(8px); box-shadow: 0 10px 25px rgba(11, 42, 89, 0.05); }
.how > div > span { display: block; font-size: 12px; color: var(--navy); font-weight: 800; border-bottom: 2px solid var(--sky); padding: 0 0 15px; }
.how h3 { font-size: 15px; margin: 18px 0 10px; color: var(--navy); }
.how p { font-size: 11px; line-height: 1.8; font-weight: 500; }

footer { border-top: 1px solid var(--border); max-width: 1440px; margin: auto; padding: 38px 5.1%; display: flex; align-items: start; justify-content: space-between; gap: 35px; background: rgba(255,255,255,0.4); backdrop-filter: blur(10px); }
footer .wordmark { font-size: 20px; }
footer p { font-size: 11px; margin-top: 16px; font-weight: 500; }
footer > div:nth-child(2) { display: flex; gap: 22px; font-size: 11px; padding-top: 8px; font-weight: 600; }
footer small { font-size: 9px; line-height: 1.9; color: var(--muted); text-align: right; padding-top: 7px; }

/* Modals & Forms */
dialog { 
  border: 1px solid var(--border); 
  color: var(--navy); 
  background: rgba(255, 255, 255, 0.95); 
  backdrop-filter: blur(25px); 
  padding: 35px; 
  border-radius: 16px; 
  width: min(90vw, 600px); 
  max-height: 90dvh; 
  overflow-y: auto; 
  overscroll-behavior: contain;
  box-shadow: 0 30px 100px rgba(11, 42, 89, 0.3); 
}
dialog::-webkit-scrollbar { width: 8px; }
dialog::-webkit-scrollbar-thumb { background: rgba(11, 42, 89, 0.2); border-radius: 4px; }
dialog::backdrop { background: rgba(11, 42, 89, 0.4); backdrop-filter: blur(8px); }
dialog[open] { animation: appear .3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
dialog .close { position: absolute; right: 17px; top: 15px; }
dialog h2 { padding-right: 28px; font-size: 28px; margin: 10px 0 18px; }
.wide-modal { width: min(92vw, 900px); }

.drawer { position: fixed; inset: 0 0 0 auto; margin: 0; height: 100dvh; max-height: 100dvh; width: min(100vw, 480px); max-width: 100vw; border-radius: 0; padding: 30px; background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(25px); border-left: 1px solid var(--border); }
.drawer[open] { animation: slide .3s cubic-bezier(0.165, 0.84, 0.44, 1); }
.nav-drawer { inset: 0 auto 0 0; width: min(88vw, 400px); padding: 55px 30px; border-left: none; border-right: 1px solid var(--border); }

.drawer-nav { display: flex; flex-direction: column; margin: 65px 0 80px; gap: 25px; }
.drawer-nav a { font-size: 12px; border-bottom: 1px solid rgba(11,42,89,0.1); padding-bottom: 20px; display: flex; gap: 20px; align-items: center; transition: padding-left 0.2s; font-weight: 600; }
.drawer-nav a:hover { padding-left: 10px; color: #173c70; border-color: var(--sky); }
.drawer-nav strong { font-size: 21px; font-weight: 600; flex: 1; }

.drawer-head { position: relative; padding: 15px 0 20px; border-bottom: 1px solid rgba(11,42,89,0.1); }
.drawer-head .close { top: 5px; right: 0; }
.drawer-head h2 { margin: 10px 0 0; }
.drawer-head h2 span { font-size: 18px; color: var(--sky); font-weight: 800; }

.cart-item { display: flex; gap: 15px; align-items: start; border-bottom: 1px solid rgba(11,42,89,0.1); padding: 22px 0; }
.cart-item > img { width: 62px; height: 88px; object-fit: contain; background: rgba(255,255,255,0.5); border-radius: 4px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.cart-item h3 { font-size: 14px; line-height: 1.4; }
.cart-price { font-size: 11px; margin: 8px 0; display: flex; flex-direction: column; }
.quantity { display: inline-flex; align-items: center; border: 1px solid rgba(11,42,89,0.2); border-radius: 6px; height: 30px; font-size: 11px; font-weight: 600; background: white; }
.quantity button { background: transparent; width: 30px; height: 30px; transition: background 0.2s; }
.quantity button:hover { background: rgba(126, 213, 234, 0.2); }
.quantity span { padding: 0 8px; }

.cart-totals { padding: 23px 0; border-bottom: 1px solid rgba(11,42,89,0.1); }
.cart-totals > div { display: flex; justify-content: space-between; font-size: 12px; margin: 7px 0; font-weight: 600; }
.cart-totals .total { font-size: 17px; margin: 14px 0; font-weight: 800; }

#checkout { padding-top: 25px; }
#checkout h3 { font-size: 18px; margin-bottom: 20px; }

.field { display: flex; flex-direction: column; font-size: 12px; font-weight: 600; gap: 7px; margin-bottom: 18px; }
.field input, .field textarea { width: 100%; min-height: 46px; border: 1px solid rgba(11,42,89,0.2); border-radius: 8px; padding: 10px 14px; background: rgba(255,255,255,0.8); color: var(--navy); font-size: 13px; font-weight: 500; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; }
.field input:focus, .field textarea:focus { border-color: var(--sky); box-shadow: 0 0 0 4px rgba(126, 213, 234, 0.2); background: white; outline: none; }
.field textarea { min-height: 100px; resize: vertical; }

.detail-layout { display: grid; grid-template-columns: 240px 1fr; gap: 35px; padding: 20px 0; }
.detail-cover { background: rgba(255,255,255,0.4); padding: 25px; display: flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--border); }
.detail-cover img { max-width: 100%; max-height: 300px; box-shadow: 6px 8px 15px rgba(11,42,89,0.15); border-radius: 2px 4px 4px 2px; }
.detail-layout p { font-size: 13px; margin: 12px 0; }
.detail-layout h2 { line-height: 1.25; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 25px; }

.reviews { border-top: 1px solid rgba(11,42,89,0.1); margin-top: 25px; padding-top: 25px; }
.reviews > h3 { margin-bottom: 20px; }
.review { padding: 20px 0; border-bottom: 1px solid rgba(11,42,89,0.1); font-size: 13px; }
.review > span { float: right; font-size: 14px; letter-spacing: 2px; color: #f59e0b; }
.review p { margin: 12px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.review small { font-size: 10px; color: var(--muted); }

#review-form { margin-top: 30px; background: rgba(255,255,255,0.4); padding: 25px; border-radius: 12px; border: 1px solid var(--border); }
#review-form h3 { margin-bottom: 20px; }
.stars { display: flex; gap: 8px; }
.stars label { flex: 1; }
.stars input { position: absolute; opacity: 0; }
.stars span { display: block; text-align: center; padding: 8px; border: 1px solid rgba(11,42,89,0.2); border-radius: 8px; background: white; cursor: pointer; font-size: 12px; transition: all 0.2s; }
.stars span:hover { border-color: var(--navy); }
.stars input:checked + span { background: var(--navy); color: white; border-color: var(--navy); box-shadow: 0 4px 10px rgba(11, 42, 89, 0.2); }
.stars input:focus-visible + span { outline: 3px solid #39769d; }

.pdf-viewer { width: 100%; height: 62vh; margin-top: 20px; border: 1px solid rgba(11,42,89,0.2); border-radius: 8px; }

/* =========================================
   FIXED AUTHOR PAGE & PORTRAIT (3D Glass)
   ========================================= */
.author-page {
  max-width: 1200px;
  margin: 40px auto;
  padding: 50px 5%;
  background: var(--glass-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(11, 42, 89, 0.1);
  overflow: hidden; 
}

.author-page h1 { margin: 10px 0 50px; }

.author-layout {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 60px;
  align-items: start;
  max-width: 100%;
}

.author-portrait {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-bottom: 3px solid rgba(11, 42, 89, 0.1);
  border-radius: 16px;
  display: grid;
  place-content: center;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(11, 42, 89, 0.15), inset 0 5px 15px rgba(255, 255, 255, 0.7);
  transform: translateZ(0); 
  width: 100%;
  aspect-ratio: 3 / 4; 
}

.author-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.author-portrait:hover img { transform: scale(1.03); }

.initials { font-family: Georgia, serif; font-size: 135px; letter-spacing: -14px; color: var(--navy); opacity: 0.8; }
.author-portrait > span { font-size: 8px; letter-spacing: 2px; position: absolute; bottom: 30px; width: 100%; text-align: center; font-weight: 700; color: var(--navy); background: rgba(255,255,255,0.7); backdrop-filter: blur(4px); padding: 5px 0; }

.author-layout h2 { margin: 15px 0 10px; }
.credentials { font-size: 12px; font-weight: 700; letter-spacing: 2px; margin-bottom: 25px; background: linear-gradient(90deg, var(--navy), var(--sky)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.author-layout p { font-size: 14px; line-height: 1.9; margin: 18px 0; font-weight: 500; }

.highlight-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 25px 0; }
.highlight-list span {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  border-radius: 25px;
  padding: 7px 16px;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
  transition: transform 0.2s, background 0.2s;
}
.highlight-list span:hover { transform: translateY(-2px); background: rgba(221, 164, 244, 0.2); }

blockquote { margin: 30px 0; font-size: 23px; letter-spacing: -.5px; line-height: 1.5; border-left: 4px solid var(--sky); padding-left: 22px; font-style: italic; color: var(--navy); }

/* =========================================
   FIXED LOGIN PAGE & ADMIN PORTAL
   ========================================= */
.login-page {
  max-width: 1000px;
  margin: 60px auto;
  min-height: 60vh;
  padding: 50px 5%;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  column-gap: 60px;
  align-items: center;
}

.login-page > .eyebrow { grid-column: 1 / -1; margin-bottom: 10px; }
.login-page h1 { font-size: 48px; margin-bottom: 20px; }

.admin-panel {
  padding: 40px;
  background: var(--glass-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(11, 42, 89, 0.15);
}

.admin-panel h2 { font-size: 25px; margin-bottom: 15px; }
.admin-panel > p { font-size: 13px; margin: 10px 0 25px; font-weight: 500; }

.admin { max-width: 1200px; margin: auto; padding: 55px 5% 80px; min-height: 75vh; }
.admin h1 { font-size: 46px; margin: 15px 0; }
.admin .section-heading p { font-size: 12px; }
.admin-tabs { display: flex; gap: 12px; padding: 25px 0; border-bottom: 1px solid var(--border); margin-bottom: 25px; overflow-x: auto; }
.admin-tabs .filter { font-size: 12px; }

.admin-toolbar { display: flex; gap: 30px; align-items: center; justify-content: space-between; margin: 25px 0; }
.admin-toolbar p { font-size: 11px; margin-top: 7px; }
.admin-toolbar > div:last-child { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-toolbar .btn { font-size: 10px; padding: 10px 14px; }

.admin-list article { 
  display: flex; 
  align-items: center; 
  gap: 22px; 
  background: rgba(255, 255, 255, 0.65); 
  backdrop-filter: blur(12px); 
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.9); 
  border-bottom: 2px solid rgba(11, 42, 89, 0.1); 
  padding: 20px; 
  margin: 16px 0; 
  border-radius: 16px; 
  box-shadow: 0 10px 30px rgba(11, 42, 89, 0.08), inset 0 2px 10px rgba(255, 255, 255, 0.8);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}
.admin-list article:hover { 
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 15px 35px rgba(126, 213, 234, 0.25), inset 0 2px 10px rgba(255, 255, 255, 1);
  border-color: rgba(221, 164, 244, 0.4); 
}
.admin-list img { width: 55px; height: 75px; object-fit: cover; border-radius: 6px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.admin-list article > div { flex: 1; }
.admin-list h3 { font-size: 17px; margin-bottom: 5px; }
.admin-list p { font-size: 11px; margin-top: 5px; color: var(--muted); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.switch { appearance: none; flex-shrink: 0; width: 40px; height: 24px; border-radius: 25px; background: rgba(11,42,89,0.1); position: relative; cursor: pointer; transition: background .2s; }
.switch:before { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: white; transition: transform .3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.switch:checked { background: var(--navy); }
.switch:checked:before { transform: translateX(16px); }
.switch-row + .field { margin-top: 20px; }

.dynamic-group { margin: 25px 0; }
.dynamic-group h3 { margin-bottom: 15px; }
.dynamic-row { display: flex; gap: 10px; align-items: center; animation: appear 0.3s ease; }
.dynamic-row .field { flex: 1; }
.dynamic-row .icon-btn { margin-top: 5px; }
.photo-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 50%; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.form-actions { display: flex; gap: 25px; align-items: center; margin-top: 25px; }
.danger-link { background: transparent; text-decoration: underline; font-size: 12px; color: #7c2946; }

#toast { position: fixed; bottom: 25px; left: 50%; transform: translate(-50%, 20px); max-width: 90vw; padding: 14px 25px; color: white; background: var(--navy); border-radius: 8px; box-shadow: 0 8px 35px #0b2a5940; font-size: 13px; z-index: 100; opacity: 0; pointer-events: none; transition: all .35s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* =========================================
   MOBILE RESPONSIVENESS FIXES
   ========================================= */

@media(max-width: 1000px) {
  /* Tablet adjustments */
  .book-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .hero { grid-template-columns: 1fr; }
  .how { grid-template-columns: repeat(2, 1fr); }
  .how > div:first-child { grid-column: 1 / -1; }
  
  .bundle { display: flex; flex-direction: column; padding: 40px 30px; margin: 0 5% 50px; text-align: center; }
  .bundle-mini { align-self: center; width: 100%; max-width: 300px; margin-bottom: 20px; }
  .bundle-action { text-align: center; width: 100%; max-width: 400px; align-self: center; }
  
  .author-teaser { grid-template-columns: 1fr; padding: 40px 30px; margin: 0 5% 50px; text-align: center; }
  .author-monogram { border-right: none; border-bottom: 1px solid rgba(11, 42, 89, 0.1); padding: 0 0 20px; display: flex; align-items: center; justify-content: center; gap: 20px; }
  
  .author-layout { grid-template-columns: 280px 1fr; gap: 40px; }
  .login-page { grid-template-columns: 1fr; gap: 40px; }
  .login-page h1 { margin-bottom: 10px; }
}

@media(max-width: 680px) {
  /* Header Fixes */
  .header-inner { height: 78px; padding: 0 5%; gap: 13px; }
  .wordmark { font-size: 19px; }
  .wordmark span { font-size: 7px; letter-spacing: 3.7px; }
  .header-inner nav { display: none; }
  .cart-trigger { margin-left: auto; gap: 8px; padding: 0; }
  .cart-label { display: none; }
  .cart-trigger #cart-count { width: 21px; height: 21px; }
  .header-inner > .icon-btn { width: 25px; font-size: 21px; }

  /* Hero Typography & Button Stack Fixes */
  .hero { padding: 0 6%; min-height: 0; }
  .hero-copy { padding: 40px 0 15px; }
  .hero .eyebrow { font-size: 8px; letter-spacing: 1.1px; }
  .hero h1 { font-size: clamp(28px, 8.5vw, 42px); letter-spacing: -1px; margin: 23px 0; line-height: 1.1; }
  .hero-copy > p { font-size: 13px; max-width: 100%; }
  
  .hero-actions { margin-top: 23px; gap: 15px; flex-direction: column; align-items: stretch; }
  .hero-actions .btn { font-size: 13px; padding: 13px 18px; width: 100%; }
  .hero-actions .text-link { font-size: 12px; align-self: center; margin-top: 5px; }

  /* Hero Art Mobile Scaling */
  .hero-art { min-height: 395px; margin: 20px 0 25px; border-radius: 9px; }
  .art-label { font-size: 8px; top: 22px; left: 22px; }
  .hero-book.front { width: 159px; transform: rotate(9deg) translate(40px, 15px); }
  .hero-book.back { width: 153px; transform: rotate(-12deg) translate(-45px, 4px); }
  .book-stack { inset: 60px 25px 80px; }
  .orbit { width: 340px; height: 340px; top: 45px; }
  .orbit-two { width: 280px; height: 280px; top: 75px; }
  .art-caption { bottom: 39px; left: 20px; font-size: 9px; }
  .art-caption .sparkle { font-size: 29px; }
  .edition-label { bottom: 14px; font-size: 6px; }

  /* Section Spacing & Grids */
  .benefit-strip { padding: 15px 4%; flex-direction: column; gap: 15px; }
  .benefit-strip > div { font-size: 11px; gap: 8px; border-right: none; border-bottom: 1px solid rgba(11,42,89,0.1); padding-bottom: 15px; width: 100%; }
  .benefit-strip > div:last-child { border-bottom: none; padding-bottom: 0; }
  
  .collection { padding: 40px 5%; }
  .section-heading { flex-direction: column; align-items: flex-start; gap: 12px; }
  .section-heading h2 { margin-top: 5px; font-size: 26px; }
  
  .catalog-tools { flex-direction: column; align-items: stretch; margin: 24px 0; }
  .filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { font-size: 11px; padding: 10px 14px; }
  .search { width: 100%; max-width: none; margin-top: 10px; }
  
  .book-grid { grid-template-columns: 1fr; }
  
  .bundle { padding: 35px 20px; margin: 0 5% 40px; }
  .bundle-mini { max-width: 200px; height: 160px; }
  .bundle-mini > div { width: 90px; height: 130px; }
  
  .author-teaser { padding: 30px 20px; margin: 0 5% 40px; }
  
  .how { grid-template-columns: 1fr; margin: 0 5%; padding-bottom: 40px; gap: 20px; }
  .how > div { padding: 15px; }
  
  footer { flex-direction: column; padding: 30px 5%; }
  footer > div:nth-child(2) { flex-wrap: wrap; justify-content: flex-start; }
  footer small { text-align: left; }
  
  /* Adjusted Fixed Pages for Mobile */
  .author-page { margin: 20px 5%; padding: 30px 20px; }
  .author-layout { grid-template-columns: 1fr; gap: 30px; }
  .author-portrait { aspect-ratio: 1 / 1.1; width: 100%; min-height: 0; }
  
  .login-page { margin: 20px 5%; padding: 0; display: flex; flex-direction: column; }
  .admin-panel { padding: 25px 20px; width: 100%; }
  .form-grid { grid-template-columns: 1fr; gap: 10px; }

  /* Admin List Item Mobile Stacking */
  .admin-list article { flex-direction: column; align-items: stretch; text-align: center; gap: 15px; padding: 25px 20px; }
  .admin-list img { width: 80px; height: 110px; margin: 0 auto; box-shadow: 0 8px 20px rgba(0,0,0,0.15); }
  .admin-list article > div { text-align: center; }
  .admin-list .btn { width: 100%; justify-content: center; } 
  
  /* Mobile Tap Animations replacing hover */
  .book-card:active, .btn:active, .author-teaser:active, .how > div:active {
    transform: scale(0.96) !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
    transition: all 0.1s ease !important;
  }
  
  /* Auto-animations for mobile where hover is not possible */
  .book-card .cover-stage img { animation: mobileBreathe 5s ease-in-out infinite; }
  .book-card:nth-child(2n) .cover-stage img { animation-delay: 1s; }
  .book-card:nth-child(3n) .cover-stage img { animation-delay: 2s; }
  .bundle-mini > div { animation: mobileFan 6s ease-in-out infinite; }
  .teaser-mark { animation: mobileSparkle 4s ease-in-out infinite; opacity: 1; }

  /* Details Modal Mobile Fixes */
  dialog { width: 95vw; padding: 20px 15px; margin: auto; border-radius: 12px; }
  .detail-layout { grid-template-columns: 1fr; gap: 15px; padding: 0; }
  .detail-cover { padding: 15px; height: auto; }
  .detail-cover img { max-height: 180px; } 
  .detail-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; }
  .detail-actions .btn { width: 100%; justify-content: center; margin: 0; }
  #review-form { padding: 15px; margin-top: 20px; }
  .stars { flex-wrap: wrap; }
  .stars span { padding: 8px 2px; font-size: 11px; }
}

/* Mobile specific Keyframes */
@keyframes mobileBreathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes mobileFan {
  0%, 100% { transform: rotate(calc(-14deg + var(--i) * 7deg)) translateY(0); }
  50% { transform: rotate(calc(-8deg + var(--i) * 4deg)) translateY(-12px); }
}
@keyframes mobileSparkle {
  0%, 100% { transform: rotate(0deg) scale(0.9); }
  50% { transform: rotate(15deg) scale(1.1); }
}
@keyframes appear { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes slide { from { opacity: 0; transform: translateX(35px); } to { opacity: 1; transform: none; } }
@media(prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }