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

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #FFFDF7;
  color: #3E4658;
  font-family: Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  line-height: 1.55;
}

a {
  text-decoration: none;
  color: inherit;
}

button,input,textarea,select {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
}

.site-shell {
  min-height: 100vh;
  overflow: hidden;
}

.topbar {
  height: 84px;
  max-width: 1180px;
  padding: 0 24px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  position: relative;
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-logo {
  width: 48px;
  height: 48px;
}

.brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.07;
}

.brand strong {
  font-family: Georgia,serif;
  color: #4E6F99;
  font-size: 18px;
}

.brand small {
  margin-top: 4px;
  font-size: 9px;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: #D98CA8;
}

.desktop-nav {
  display: flex;
  gap: 22px;
  color: #5F687A;
  font-size: 14px;
}

.desktop-nav a:hover {
  color: #4E6F99;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.icon-btn,.profile-link {
  border: 1px solid rgba(104,139,182,.17);
  background: white;
  border-radius: 14px;
  min-height: 42px;
  padding: 0 13px;
  display: grid;
  place-items: center;
  color: #4E6F99;
}

.profile-link {
  display: flex;
  font-size: 13px;
}

.menu-toggle {
  display: none;
}

.search-panel {
  position: absolute;
  z-index: 26;
  top: 78px;
  left: 50%;
  transform: translate(-50%,-8px);
  width: min(800px,calc(100% - 28px));
  padding: 13px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(104,139,182,.17);
  box-shadow: 0 18px 55px rgba(76,101,136,.11);
  border-radius: 20px;
  opacity: 0;
  pointer-events: none;
  transition: .18s;
}

.search-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%,0);
}

.search-box {
  display: flex;
  gap: 8px;
  align-items: center;
}

.search-box input {
  flex: 1;
  border: 1px solid rgba(104,139,182,.17);
  background: #F6FBFF;
  border-radius: 14px;
  min-height: 46px;
  padding: 0 13px;
  outline: none;
}

.search-box button {
  border: 0;
  background: #688BB6;
  color: white;
  border-radius: 12px;
  padding: 10px 16px;
}

.mobile-menu,.backdrop {
  display: none;
}

.toast {
  position: fixed;
  z-index: 200;
  right: 18px;
  top: 92px;
  background: white;
  border: 1px solid rgba(104,139,182,.17);
  padding: 12px 16px;
  border-radius: 14px;
  box-shadow: 0 18px 55px rgba(76,101,136,.11);
  font-size: 13px;
}

.toast-error {
  border-color: #efc8d0;
  color: #B85467;
}

.kicker {
  font-size: 10px;
  letter-spacing: .16em;
  font-weight: 900;
  color: #688BB6;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 800;
  font-size: 13px;
  transition: .18s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: #688BB6;
  color: white;
  box-shadow: 0 9px 22px rgba(104,139,182,.2);
}

.btn-secondary {
  background: white;
  color: #4E6F99;
  border-color: rgba(104,139,182,.17);
}

.btn-danger {
  background: #fff0f2;
  color: #B85467;
  border-color: #f3c7d0;
}

.btn-sm {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 12px;
}

.w100 {
  width: 100%;
}

.hero {
  max-width: 1180px;
  margin: 10px auto 0;
  padding: 48px;
  border-radius: 34px;
  background: linear-gradient(135deg,#EAF5FF,#FFF9E7);
  border: 1px solid rgba(104,139,182,.17);
  box-shadow: 0 18px 55px rgba(76,101,136,.11);
  display: grid;
  grid-template-columns: 1fr .95fr;
  gap: 40px;
  align-items: center;
}

.hero h1 {
  font-family: Georgia,serif;
  font-size: clamp(40px,5vw,66px);
  line-height: 1.02;
  color: #425A76;
  letter-spacing: -.035em;
  margin: 13px 0 15px;
}

.hero p {
  color: #667184;
  font-size: 16px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 24px 0;
}

.hero-stats {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.hero-stats span {
  font-size: 11px;
  color: #7B8496;
}

.hero-stats b {
  display: block;
  font-size: 18px;
  color: #3E4658;
}

.hero-window {
  min-height: 380px;
  border-radius: 34px;
  border: 9px solid rgba(255,255,255,.85);
  background: linear-gradient(#DCEFFF 0 58%,#FFF1C1 58%);
  position: relative;
  overflow: hidden;
}

.hero-window:before {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  right: 44px;
  top: 42px;
  background: #FFE594;
  box-shadow: 0 0 0 18px rgba(255,229,148,.22);
}

.hero-window:after {
  content: "";
  position: absolute;
  left: 35px;
  right: 35px;
  bottom: 28px;
  height: 100px;
  background: rgba(255,255,255,.8);
  border-radius: 22px;
  backdrop-filter: blur(7px);
  border: 1px solid rgba(255,255,255,.85);
}

.hero-card-copy {
  position: absolute;
  z-index: 2;
  left: 58px;
  right: 58px;
  bottom: 50px;
}

.hero-card-copy small {
  color: #D98CA8;
  font-weight: 900;
  letter-spacing: .12em;
}

.hero-card-copy strong {
  display: block;
  font-family: Georgia,serif;
  color: #526D89;
  font-size: 23px;
  margin-top: 3px;
}

.quick-categories {
  max-width: 1180px;
  margin: 18px auto;
  padding: 0 2px;
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 12px;
}

.cat {
  background: white;
  border: 1px solid rgba(104,139,182,.17);
  border-radius: 18px;
  padding: 14px;
  display: flex;
  gap: 11px;
  align-items: center;
}

.cat i {
  font-style: normal;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: #FFF9E7;
  display: grid;
  place-items: center;
  color: #4E6F99;
}

.cat b,.cat small {
  display: block;
}

.cat small {
  font-size: 11px;
  color: #7B8496;
  margin-top: 2px;
}

.section {
  max-width: 1180px;
  margin: 30px auto;
  padding: 34px;
  border-radius: 30px;
  border: 1px solid rgba(104,139,182,.17);
}

.section-blue {
  background: #F6FBFF;
}

.section-yellow {
  background: #FFFBED;
}

.section-white {
  background: white;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 22px;
}

.section-head h2 {
  font-family: Georgia,serif;
  color: #455F7D;
  font-size: 32px;
  margin: 3px 0;
}

.section-head p {
  margin: 0;
  color: #7B8496;
  font-size: 13px;
}

.see-all {
  white-space: nowrap;
  border: 1px solid rgba(104,139,182,.17);
  border-radius: 999px;
  background: white;
  color: #4E6F99;
  font-size: 12px;
  font-weight: 800;
  padding: 9px 12px;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(5,1fr);
  gap: 18px;
}

.story-card {
  min-width: 0;
}

.cover-wrap {
  aspect-ratio: 2/3;
  border-radius: 21px;
  overflow: hidden;
  border: 1px solid rgba(104,139,182,.1);
  background: linear-gradient(145deg,#BFDDF5,#FFE8A8);
  box-shadow: 0 11px 26px rgba(64,83,110,.1);
  position: relative;
}

.cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: .2s;
}

.story-card:hover .cover-wrap img {
  transform: scale(1.025);
}

.story-badge {
  position: absolute;
  z-index: 2;
  top: 11px;
  left: 11px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  background: #E7F4E7;
  color: #587D5D;
}

.story-info {
  padding: 12px 3px 0;
}

.story-info h3 {
  font-size: 14px;
  margin: 0 0 3px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.story-info p {
  font-size: 11px;
  color: #7B8496;
  margin: 0 0 8px;
}

.tag-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.tag {
  font-size: 9px;
  padding: 4px 7px;
  border-radius: 999px;
  background: white;
  border: 1px solid rgba(104,139,182,.17);
  color: #677288;
}

.banner-card {
  max-width: 1180px;
  margin: 28px auto;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(104,139,182,.17);
  position: relative;
  min-height: 270px;
  background: linear-gradient(135deg,#A9D0E8,#F9E2A7);
}

.banner-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,rgba(47,66,89,.63),rgba(47,66,89,.08));
}

.banner-copy {
  position: relative;
  z-index: 2;
  padding: 46px;
  max-width: 590px;
  color: white;
}

.banner-copy h2 {
  font-family: Georgia,serif;
  font-size: 38px;
  margin: 6px 0;
}

.banner-copy p {
  max-width: 500px;
}

.empty {
  padding: 35px;
  border: 1px dashed rgba(104,139,182,.17);
  border-radius: 18px;
  text-align: center;
  color: #7B8496;
}

.footer {
  max-width: 1180px;
  margin: 55px auto 0;
  padding: 38px 24px 24px;
  border-top: 1px solid rgba(104,139,182,.17);
  display: grid;
  grid-template-columns: 1.1fr 1.3fr;
  gap: 30px;
}

.footer p {
  font-size: 12px;
  color: #7B8496;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 20px;
}

.footer-links div {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.footer-links b {
  font-size: 12px;
}

.footer-links a {
  font-size: 12px;
  color: #7B8496;
}

.copyright {
  grid-column: 1/-1;
  border-top: 1px solid rgba(104,139,182,.17);
  padding-top: 16px;
  color: #99A2B1;
  font-size: 10px;
}

.auth-page {
  max-width: 920px;
  margin: 45px auto;
  padding: 0 18px;
}

.auth-card {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  background: white;
  border: 1px solid rgba(104,139,182,.17);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 18px 55px rgba(76,101,136,.11);
}

.auth-art {
  padding: 34px;
  background: linear-gradient(135deg,#EAF5FF,#FFF9E7);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 520px;
}

.auth-art h2 {
  font-family: Georgia,serif;
  color: #4D6886;
  font-size: 35px;
  margin: 8px 0;
}

.auth-form {
  padding: 42px;
}

.auth-form h1 {
  font-family: Georgia,serif;
  color: #455F7D;
  margin-top: 0;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}

.field {
  width: 100%;
  border: 1px solid rgba(104,139,182,.17);
  background: white;
  border-radius: 13px;
  min-height: 44px;
  padding: 10px 12px;
  outline: none;
  color: #3E4658;
}

textarea.field {
  min-height: 140px;
  resize: vertical;
}

.form-help {
  font-size: 11px;
  color: #7B8496;
}

.form-error {
  color: #B85467;
  font-size: 12px;
  margin: 8px 0;
}

.auth-foot {
  font-size: 12px;
  color: #7B8496;
  margin-top: 16px;
}

.story-page {
  max-width: 1180px;
  margin: auto;
  padding: 30px 24px;
}

.story-hero {
  padding: 30px;
  border-radius: 30px;
  border: 1px solid rgba(104,139,182,.17);
  background: linear-gradient(135deg,#F6FBFF,#FFF9E7);
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 38px;
  align-items: center;
}

.story-cover {
  aspect-ratio: 2/3;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 55px rgba(76,101,136,.11);
}

.story-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-summary h1 {
  font-family: Georgia,serif;
  font-size: 45px;
  line-height: 1.03;
  color: #455F7D;
  margin: 5px 0;
}

.story-summary .author {
  color: #7B8496;
}

.story-meta {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.story-meta span {
  font-size: 10px;
  border: 1px solid rgba(104,139,182,.17);
  background: white;
  border-radius: 999px;
  padding: 5px 8px;
}

.story-intro {
  max-width: 750px;
  color: #5E687A;
}

.story-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.trust {
  font-size: 10px;
  color: #7B8496;
  margin-top: 10px;
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 5px;
  overflow: auto;
  background: rgba(255,253,247,.94);
  border: 1px solid rgba(104,139,182,.17);
  border-radius: 15px;
  padding: 5px;
  margin: 22px 0 16px;
  backdrop-filter: blur(8px);
}

.tabs a {
  white-space: nowrap;
  padding: 9px 12px;
  border-radius: 11px;
  font-size: 12px;
  color: #657084;
}

.tabs a.active {
  background: #688BB6;
  color: white;
}

.content-card {
  background: white;
  border: 1px solid rgba(104,139,182,.17);
  border-radius: 24px;
  padding: 26px;
}

.prose {
  font-family: Georgia,serif;
  font-size: 18px;
  line-height: 1.82;
}

.prose h2,.prose h3 {
  color: #455F7D;
}

.chapter-tools {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.chapter-tools form {
  display: flex;
  gap: 8px;
}

.chapter-list {
  display: grid;
  gap: 8px;
}

.chapter-item {
  padding: 13px 15px;
  border: 1px solid rgba(104,139,182,.17);
  background: white;
  border-radius: 13px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.chapter-item:hover {
  border-color: #b8d9ef;
}

.chapter-item small {
  color: #7B8496;
}

.locked {
  opacity: .8;
}

.purchase-box {
  background: linear-gradient(135deg,#FFF9E7,#F6FBFF);
  border: 1px solid rgba(104,139,182,.17);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  margin-bottom: 14px;
}

.purchase-box h3 {
  margin: 3px 0;
}

.purchase-box p {
  font-size: 12px;
  color: #7B8496;
  margin: 0;
}

.reader {
  max-width: 780px;
  margin: 25px auto;
  padding: 0 18px;
}

.reader-head {
  margin-bottom: 20px;
  text-align: center;
}

.reader-head h1 {
  font-family: Georgia,serif;
  color: #455F7D;
  font-size: 30px;
}

.reader-prose {
  background: #fffef9;
  border: 1px solid rgba(104,139,182,.17);
  border-radius: 22px;
  padding: 34px;
  font-family: Georgia,serif;
  font-size: 19px;
  line-height: 1.9;
  white-space: normal;
}

.reader-prose p {
  margin: 0 0 1.35em;
}

.reader-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  margin: 18px 0;
}

.reader-nav a:nth-child(3) {
  justify-self: end;
}

.progress-bar {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  height: 3px;
  background: #688BB6;
  width: 0;
}

.account-wrap {
  max-width: 1180px;
  margin: 30px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 22px;
}

.account-side,.account-main {
  background: white;
  border: 1px solid rgba(104,139,182,.17);
  border-radius: 24px;
  padding: 20px;
}

.account-side nav {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.account-side a {
  padding: 10px 12px;
  border-radius: 11px;
  font-size: 12px;
}

.account-side a:hover {
  background: #F6FBFF;
}

.account-main h1 {
  font-family: Georgia,serif;
  color: #455F7D;
}

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

.order-list {
  display: grid;
  gap: 10px;
}

.order-card {
  border: 1px solid rgba(104,139,182,.17);
  border-radius: 16px;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
}

.order-card p {
  font-size: 11px;
  color: #7B8496;
  margin: 4px 0;
}

.status {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 9px;
  font-weight: 900;
  background: #FFF2C8;
  color: #8A6A20;
}

.status.approved {
  background: #E7F4E7;
  color: #587D5D;
}

.status.rejected {
  background: #FDE7EA;
  color: #A45868;
}

.status.reviewing {
  background: #E5F1FF;
  color: #587DA1;
}

.checkout {
  max-width: 900px;
  margin: 32px auto;
  padding: 0 18px;
}

.checkout-card {
  background: white;
  border: 1px solid rgba(104,139,182,.17);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 18px 55px rgba(76,101,136,.11);
}

.checkout-card h1 {
  font-family: Georgia,serif;
  color: #455F7D;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.payment-info {
  display: grid;
  gap: 8px;
}

.payment-row {
  border: 1px solid rgba(104,139,182,.17);
  background: #F6FBFF;
  border-radius: 13px;
  padding: 12px;
}

.payment-row span {
  display: block;
  font-size: 10px;
  color: #7B8496;
}

.payment-row b {
  display: block;
  margin-top: 3px;
}

.qr-box {
  border: 1px solid rgba(104,139,182,.17);
  border-radius: 18px;
  padding: 16px;
  display: grid;
  place-items: center;
  background: white;
}

.qr-box img {
  max-width: 280px;
}

.upload-drop {
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed #a9cbe3;
  border-radius: 16px;
  background: #F6FBFF;
  padding: 20px;
  margin: 16px 0;
}

.upload-drop small {
  color: #7B8496;
}

.search-results {
  max-width: 1180px;
  margin: 30px auto;
  padding: 0 24px;
}

.search-results h1 {
  font-family: Georgia,serif;
  color: #455F7D;
}

.static {
  max-width: 900px;
  margin: 34px auto;
  padding: 0 18px;
}

.static-card {
  background: white;
  border: 1px solid rgba(104,139,182,.17);
  border-radius: 24px;
  padding: 28px;
}

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

.step {
  border: 1px solid rgba(104,139,182,.17);
  border-radius: 16px;
  padding: 16px;
  background: #F6FBFF;
}

.step i {
  font-style: normal;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #FFF2C8;
  font-weight: 900;
}

.notice {
  background: #edf8ef;
  border: 1px solid #cfe7d3;
  color: #4f7354;
  padding: 11px 13px;
  border-radius: 12px;
  font-size: 12px;
  margin: 10px 0;
}

.notice.danger {
  background: #fff0f2;
  border-color: #f1cbd2;
  color: #a04d5e;
}

.admin-body {
  background: #F4F7FB;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 230px 1fr;
}

.admin-sidebar {
  background: #425A76;
  color: white;
  padding: 20px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.admin-brand {
  margin-bottom: 24px;
}

.admin-brand strong {
  color: white;
}

.admin-sidebar nav {
  display: grid;
  gap: 5px;
}

.admin-sidebar nav a {
  font-size: 12px;
  padding: 10px 11px;
  border-radius: 10px;
  color: #EAF5FF;
}

.admin-sidebar nav a:hover {
  background: rgba(255,255,255,.1);
}

.admin-main {
  padding: 28px;
  min-width: 0;
}

.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.admin-top h1 {
  font-family: Georgia,serif;
  color: #425A76;
  margin: 3px 0;
}

.admin-user {
  font-size: 11px;
  color: #7B8496;
}

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

.stat-card {
  background: white;
  border: 1px solid rgba(104,139,182,.17);
  border-radius: 17px;
  padding: 16px;
}

.stat-card span {
  font-size: 10px;
  color: #7B8496;
}

.stat-card b {
  font-size: 26px;
  color: #455F7D;
  display: block;
  margin-top: 4px;
}

.admin-card {
  background: white;
  border: 1px solid rgba(104,139,182,.17);
  border-radius: 20px;
  padding: 18px;
  margin-top: 16px;
  overflow: auto;
}

.admin-card h2 {
  font-family: Georgia,serif;
  color: #455F7D;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 720px;
}

.table th,.table td {
  border-bottom: 1px solid rgba(104,139,182,.17);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.table th {
  color: #7B8496;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 12px;
}

.admin-form .full {
  grid-column: 1/-1;
}

.preview-thumb {
  width: 54px;
  height: 74px;
  border-radius: 9px;
  object-fit: cover;
}

@media (max-width:980px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: grid;
  }

  .hero {
    grid-template-columns: 1fr;
    margin: 8px 18px;
  }

  .quick-categories {
    padding: 0 18px;
    grid-template-columns: repeat(2,1fr);
  }

  .section,.banner-card {
    margin-left: 18px;
    margin-right: 18px;
  }

  .story-grid {
    grid-template-columns: repeat(3,1fr);
  }

  .footer {
    grid-template-columns: 1fr;
  }

  .story-hero {
    grid-template-columns: 220px 1fr;
  }

  .account-wrap {
    grid-template-columns: 1fr;
  }

  .account-side nav {
    grid-template-columns: repeat(4,1fr);
  }

  .library-grid {
    grid-template-columns: repeat(3,1fr);
  }

  .admin-grid {
    grid-template-columns: repeat(2,1fr);
  }
}

@media (max-width:700px) {
  .topbar {
    height: 72px;
    padding: 0 13px;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .brand strong {
    font-size: 14px;
  }

  .brand small {
    font-size: 7px;
  }

  .profile-link {
    font-size: 0;
    width: 42px;
  }

  .profile-link:before {
    content: "♡";
    font-size: 16px;
  }

  .hero {
    margin: 6px 10px;
    padding: 24px;
    border-radius: 25px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-window {
    min-height: 290px;
  }

  .quick-categories {
    padding: 0 10px;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .cat {
    padding: 11px;
  }

  .cat i {
    width: 34px;
    height: 34px;
  }

  .cat small {
    display: none;
  }

  .section,.banner-card {
    margin: 18px 10px;
    padding: 21px;
    border-radius: 24px;
  }

  .section-head {
    align-items: flex-start;
  }

  .section-head h2 {
    font-size: 27px;
  }

  .story-grid {
    grid-template-columns: repeat(2,1fr);
    gap: 12px;
  }

  .tag-row {
    display: none;
  }

  .banner-copy {
    padding: 28px 22px;
  }

  .banner-copy h2 {
    font-size: 30px;
  }

  .footer-links {
    grid-template-columns: 1fr 1fr;
  }

  .mobile-menu {
    display: flex;
    position: fixed;
    z-index: 80;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(330px,88vw);
    background: #FFFDF7;
    padding: 18px;
    flex-direction: column;
    transform: translateX(105%);
    transition: .2s;
    box-shadow: -20px 0 50px rgba(50,67,90,.18);
  }

  .mobile-menu.open {
    transform: none;
  }

  .mobile-menu-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(104,139,182,.17);
    padding-bottom: 12px;
  }

  .mobile-menu-head button {
    border: 0;
    background: white;
    font-size: 24px;
  }

  .mobile-menu a {
    padding: 14px 3px;
    border-bottom: 1px solid rgba(104,139,182,.17);
    display: flex;
    justify-content: space-between;
    font-size: 13px;
  }

  .backdrop {
    display: block;
    position: fixed;
    z-index: 70;
    inset: 0;
    background: rgba(44,58,78,.25);
    opacity: 0;
    pointer-events: none;
    transition: .18s;
  }

  .backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  .search-panel {
    top: 68px;
  }

  .auth-card {
    grid-template-columns: 1fr;
  }

  .auth-art {
    min-height: 220px;
  }

  .auth-form {
    padding: 26px;
  }

  .story-page {
    padding: 15px 10px;
  }

  .story-hero {
    grid-template-columns: 112px 1fr;
    gap: 14px;
    padding: 16px;
    border-radius: 22px;
    align-items: start;
  }

  .story-summary h1 {
    font-size: 28px;
  }

  .story-intro {
    display: none;
  }

  .story-cta .btn {
    width: 100%;
  }

  .story-cover {
    border-radius: 14px;
  }

  .tabs {
    margin-top: 14px;
  }

  .content-card {
    padding: 18px;
  }

  .prose {
    font-size: 17px;
  }

  .chapter-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .chapter-tools form {
    flex-direction: column;
  }

  .purchase-box {
    align-items: stretch;
    flex-direction: column;
  }

  .reader-prose {
    padding: 22px;
    font-size: 18px;
  }

  .account-wrap {
    padding: 0 10px;
  }

  .account-side nav {
    grid-template-columns: repeat(2,1fr);
  }

  .library-grid {
    grid-template-columns: repeat(2,1fr);
  }

  .checkout-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .admin-sidebar nav {
    grid-template-columns: repeat(2,1fr);
  }

  .admin-main {
    padding: 14px;
  }

  .admin-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-form {
    grid-template-columns: 1fr;
  }

  .admin-form .full {
    grid-column: auto;
  }

  .admin-top {
    align-items: flex-start;
    gap: 10px;
  }

  .admin-user {
    display: none;
  }
}

.banner-carousel {
  padding: 0;
  position: relative;
}

.banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}

.banner-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.banner-slide>img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-slide .banner-copy {
  position: relative;
}

.banner-dots {
  position: absolute;
  z-index: 5;
  left: 46px;
  bottom: 22px;
  display: flex;
  gap: 7px;
}

.banner-dots button {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.55);
  padding: 0;
}

.banner-dots button.active {
  width: 24px;
  background: white;
}

.notify-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #F3BFD1;
  color: #7A4860;
  font-size: 9px;
  margin-left: 5px;
}

.order-card.unread {
  background: #F6FBFF;
  border-color: #BFDDF5;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: 10px;
  z-index: 999;
  transform: translateY(-150%);
  background: #3E4658;
  color: #fff;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 12px;
}

.skip-link:focus {
  transform: none;
}

:focus-visible {
  outline: 3px solid rgba(104,139,182,.45);
  outline-offset: 3px;
}

@media (prefers-reduced-motion:reduce) {
  *,*:before,*:after {
    scroll-behavior: auto!important;
    transition: none!important;
    animation: none!important;
  }
}

/* =========================================================
   HẢI DƯƠNG THIÊN KHẢI — PRO KAWAII THEME
   Korean Bakery + Pastel Candy
   Fonts support Vietnamese via Google Fonts latin-ext/vietnamese glyph coverage
========================================================= */

/* Typography */

body,
button,
input,
textarea,
select,
.desktop-nav,
.profile-link,
.story-info p,
.tag,
.chapter-item,
.account-side,
.admin-body,
.admin-main,
.footer {
  font-family: "Quicksand", "Segoe UI", Arial, sans-serif;
}

h1,
h2,
.hero h1,
.section-head h2,
.story-summary h1,
.account-main h1,
.auth-form h1,
.auth-art h2,
.checkout-card h1,
.search-results h1,
.static-card h1,
.admin-top h1,
.admin-card h2,
.reader-head h1,
.brand strong {
  font-family: "Baloo 2", "Quicksand", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.story-info h3,
.story-card h3 {
  font-family: "Baloo 2", "Quicksand", sans-serif;
  font-weight: 600;
  line-height: 1.35;
}

.reader-prose,
.prose {
  font-family: "Nunito", "Segoe UI", Arial, sans-serif;
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0;
}

/* Background */

body {
  background: radial-gradient(circle at 8% 8%, rgba(255, 235, 170, .18), transparent 18%),
        radial-gradient(circle at 92% 6%, rgba(207, 232, 255, .32), transparent 22%),
        radial-gradient(circle at 84% 80%, rgba(247, 214, 232, .24), transparent 20%),
        linear-gradient(180deg, #FFFDF9 0%, #FFF9F5 100%);
}

/* Header */

.topbar {
  border-bottom: 1px solid rgba(120,155,205,.08);
}

.brand strong {
  color: #6674A8;
}

.brand small {
  color: #D28BAA;
  letter-spacing: .16em;
}

.icon-btn,
.profile-link {
  border-radius: 16px;
  background: rgba(255,255,255,.92);
  border-color: rgba(120, 155, 205, .18);
}

/* Hero */

.candy-hero,
.hero {
  border-radius: 34px;
  background: radial-gradient(circle at 90% 10%, rgba(255,255,255,.70), transparent 20%),
        linear-gradient(135deg, #FFF9DF, #FFF0F7 48%, #EEF7FF);
  border: 1px solid rgba(120, 155, 205, .18);
  box-shadow: 0 16px 40px rgba(102, 133, 176, .10);
}

.sweet-kicker,
.cute-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border-radius: 999px;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(247,214,232,.65);
  box-shadow: 0 8px 20px rgba(210,139,170,.10);
  color: #737FB0;
  font-family: "Quicksand", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}

.hero h1,
.candy-hero h1 {
  color: #39446F;
}

.hero p,
.candy-hero p {
  color: #71799C;
}

/* Dessert visual */

.hero-visual,
.cute-window,
.hero-window {
  border-radius: 30px;
  background: radial-gradient(circle at 20% 18%, rgba(255,255,255,.88), transparent 18%),
        linear-gradient(135deg, #F0F7FF 0%, #FFF6D3 47%, #FCE3EF 100%);
  border: 1px solid rgba(120, 155, 205, .18);
  box-shadow: 0 18px 45px rgba(120,155,205,.12);
}

.dessert-card,
.main-card {
  border-radius: 28px;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(255,224,161,.42);
  box-shadow: 0 18px 40px rgba(120,155,205,.12);
}

.floating-pill,
.floating-chip,
.window-badge {
  border-radius: 18px;
  background: rgba(255,255,255,.90);
  border: 1px solid rgba(120, 155, 205, .18);
  color: #6976A8;
  box-shadow: 0 10px 24px rgba(120,155,205,.10);
  font-family: "Quicksand", sans-serif;
  font-weight: 700;
}

/* Categories */

.quick-categories,
.sweet-categories,
.cute-categories {
  gap: 14px;
}

.quick-categories .cat,
.sweet-categories .cat,
.cute-categories .cat {
  min-height: 78px;
  border-radius: 24px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(120, 155, 205, .18);
  box-shadow: 0 12px 28px rgba(120,155,205,.08);
  transition: transform .18s ease, box-shadow .18s ease;
}

.quick-categories .cat:hover,
.sweet-categories .cat:hover,
.cute-categories .cat:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(120,155,205,.13);
}

.quick-categories .cat i,
.sweet-categories .cat i,
.cute-categories .cat i {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(135deg, #FFF3BE, #E8F4FF 68%, #FDE4EF);
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 21px;
}

.quick-categories .cat b,
.sweet-categories .cat b,
.cute-categories .cat b {
  font-family: "Baloo 2", "Quicksand", sans-serif;
  font-size: 16px;
  color: #4D5B8D;
}

.quick-categories .cat small,
.sweet-categories .cat small,
.cute-categories .cat small {
  color: #8B91AD;
  font-size: 11px;
}

/* Sections */

.section,
.pastel-section {
  border-radius: 30px;
  border: 1px solid rgba(120, 155, 205, .18);
  box-shadow: 0 16px 40px rgba(102, 133, 176, .10);
}

.section-blue,
.pastel-blue {
  background: linear-gradient(180deg, rgba(238,247,255,.94), rgba(255,255,255,.98));
}

.section-yellow,
.pastel-yellow,
.pastel-cream {
  background: linear-gradient(180deg, rgba(255,249,223,.95), rgba(255,255,255,.98));
}

.pastel-pink {
  background: linear-gradient(180deg, rgba(255,240,247,.96), rgba(255,255,255,.98));
}

.section-white,
.pastel-white {
  background: linear-gradient(180deg, #FFFFFF, #FFFDF8);
}

.section-head,
.sweet-head,
.cute-head {
  align-items: center;
}

.title-group,
.cute-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon,
.cute-head-icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #FFF0B8, #F8DDE9 58%, #DDEEFF);
  box-shadow: 0 8px 18px rgba(120,155,205,.09);
  font-size: 20px;
}

.section-head h2,
.title-group h2 {
  margin: 0;
  color: #42517F;
}

.title-group p {
  margin: 2px 0 0;
  color: #9196AF;
  font-size: 12px;
}

/* Story cards */

.story-card,
.sweet-story-card {
  padding: 9px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(255,252,247,.98));
  border: 1px solid rgba(120, 155, 205, .18);
  box-shadow: 0 12px 28px rgba(120,155,205,.08);
  transition: transform .18s ease, box-shadow .18s ease;
}

.story-card:hover,
.sweet-story-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 17px 34px rgba(120,155,205,.13);
}

.cover-wrap {
  border-radius: 18px;
}

.story-badge {
  border-radius: 999px;
  background: linear-gradient(135deg, #FFE5F0, #DDEFFF, #FFF1C1);
  color: #5D699A;
  border: 1px solid rgba(255,255,255,.55);
  font-size: 9px;
  font-weight: 800;
}

.story-info h3 {
  color: #445282;
}

.story-info p {
  color: #8088A7;
}

.tag {
  border-radius: 999px;
  background: #F8F8FF;
  border-color: rgba(120,155,205,.12);
  color: #7179A1;
}

/* Buttons */

.btn {
  border-radius: 999px;
  font-family: "Quicksand", sans-serif;
  font-weight: 700;
}

.btn-primary {
  background: linear-gradient(135deg, #8ABCF5, #7AA7E9);
  box-shadow: 0 12px 24px rgba(122,167,233,.24);
}

.btn-secondary {
  background: linear-gradient(135deg, #FFF6C8, #FADDEA);
  color: #6470A0;
  border-color: rgba(255,255,255,.7);
}

.see-all {
  border-radius: 999px;
  background: rgba(255,255,255,.86);
  border-color: rgba(120, 155, 205, .18);
  color: #6572A1;
}

/* Banner */

.banner-card,
.sweet-banner-carousel {
  border-radius: 30px;
  border: 1px solid rgba(120, 155, 205, .18);
  box-shadow: 0 16px 40px rgba(102, 133, 176, .10);
}

.banner-pastel-pill,
.banner-cute-pill {
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: #6B77A7;
  font-family: "Quicksand", sans-serif;
  font-weight: 700;
}

/* Forms */

.field {
  border-radius: 15px;
  border-color: rgba(120, 155, 205, .18);
}

.field:focus {
  border-color: #A9CFF1;
  box-shadow: 0 0 0 4px rgba(169,207,241,.16);
}

/* Reader */

.reader-prose {
  background: #FFFDF8;
  border-radius: 24px;
  border: 1px solid rgba(120,155,205,.12);
}

/* Account */

.account-side,
.account-main {
  border-radius: 24px;
  border-color: rgba(120, 155, 205, .18);
  box-shadow: 0 12px 28px rgba(120,155,205,.07);
}

/* Admin stays professional */

.admin-body {
  background: #F6F8FC;
}

.admin-card,
.stat-card {
  border-radius: 18px;
  border-color: rgba(120,155,205,.14);
}

/* Footer */

.footer {
  border-top-color: rgba(120,155,205,.12);
}

/* Accessibility */

:focus-visible {
  outline: 3px solid rgba(138,188,245,.40);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 700px) {
  .hero,
    .candy-hero {
    border-radius: 26px;
  }

  .section,
    .pastel-section {
    border-radius: 24px;
  }

  .story-card,
    .sweet-story-card {
    border-radius: 20px;
  }

  .section-icon,
    .cute-head-icon {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }
}

/* =========================================================
   HOMEPAGE CLEANUP — CURRENT LAYOUT
   Hero: 1 column | Categories: 2 equal cards
========================================================= */

.candy-hero {
  grid-template-columns: 1fr !important;
}

.candy-hero .hero-copy {
  width: 100%;
  max-width: 100%;
}

.sweet-categories {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.sweet-categories .cat {
  width: 100%;
  min-height: 76px;
}

.sweet-categories .cat span {
  display: flex;
  align-items: center;
}

@media (max-width: 640px) {
  .sweet-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

crgba(62,84,122,.15);
}

.story-summary .kicker,
.kicker{
  display:inline-flex;
  align-items:center;
  gap:7px;
  letter-spacing:.14em;
  color:#6877A5;
}

.story-summary .kicker::before,
.kicker::before{
  content:"✦";
  color:#E1B55C;
}

.story-summary h1{
  color:#3A4977;
}

.story-meta span{
  border-radius:999px;
}

.story-meta span:nth-child(-n+2){
  background:#fff;
  border-color:rgba(88,118,165,.14);
}

.story-meta span:nth-child(n+3){
  background:linear-gradient(135deg,#EEF7FF,#FFF7D9 56%,#FCE7EF);
  border-color:rgba(255,255,255,.82);
}

/* Primary / secondary rõ ràng */
.story-cta .btn-primary{
  background:linear-gradient(135deg,#7DACE3,#6F96D0);
  box-shadow:0 14px 28px rgba(96,139,199,.21);
}

.story-cta .btn-secondary{
  background:rgba(255,255,255,.88);
  border:1px solid rgba(102,132,178,.14);
  color:#66749F;
  box-shadow:none;
}

/* 10) TABS như mục lục dossier, không giống thanh mục cổ điển */
.tabs{
  border:1px solid rgba(95,124,169,.12);
  background:rgba(255,255,255,.82);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}

.tabs a{
  color:#78809C;
}

.tabs a.active{
  background:linear-gradient(135deg,#536C9F,#6987BE);
  color:#fff;
}

/* 11) FOOTER như chữ ký thương hiệu */
.footer{
  position:relative;
  padding-top:34px;
}

.footer::before{
  content:"HẢI DƯƠNG THIÊN KHẢI · SWEET STORY ATELIER";
  position:absolute;
  top:8px;
  left:0;
  font-family:"Quicksand",sans-serif;
  font-size:7.5px;
  font-weight:700;
  letter-spacing:.20em;
  color:rgba(70,89,130,.28);
}

/* =========================
   MOBILE SIGNATURE
   ========================= */
@media (max-width:700px){
  .topbar{
    margin:9px 12px 12px;
    padding:0 11px;
    border-radius:22px;
    min-height:66px;
  }

  .brand-logo{
    width:42px;
    height:42px;
  }

  .candy-hero,
  .hero{
    margin:10px 14px 16px;
    padding:25px 22px 24px;
    border-radius:28px;
  }

  .candy-hero::before,
  .hero::before{
    width:145px;
    height:145px;
    right:-54px;
    top:-58px;
    border-width:26px;
  }

  .candy-hero::after,
  .hero::after{
    right:18px;
    bottom:14px;
    font-size:7px;
  }

  .hero h1,
  .candy-hero h1{
    font-size:36px;
    line-height:1.02;
    letter-spacing:-.035em;
  }

  .sweet-categories,
  .quick-categories{
    margin:0 14px;
  }

  .cute-homepage .section,
  .cute-homepage .pastel-section{
    margin:20px 14px;
    padding:20px 17px 22px;
    border-radius:27px;
  }

  .cute-homepage .pastel-section::before,
  .cute-homepage .section::before{
    width:4px;
  }

  .section-head,
  .sweet-head{
    padding-bottom:12px;
    margin-bottom:18px;
  }

  .section-head::after,
  .sweet-head::after{
    display:none;
  }

  .section-head h2,
  .title-group h2{
    font-size:25px;
  }

  .story-grid{
    gap:15px 13px;
  }

  .story-card,
  .sweet-story-card{
    border-radius:18px;
  }

  .cover-wrap{
    border-radius:18px;
  }

  .story-info{
    margin:-12px 6px 0;
    padding:18px 10px 10px;
    border-radius:0 0 16px 16px;
  }

  .story-info h3{
    font-size:13.5px;
    line-height:1.28;
  }

  .story-info p{
    font-size:10px;
    margin-bottom:1px;
  }

  .see-all{
    min-height:36px;
    padding:8px 11px;
    font-size:10px;
  }

  .empty{
    min-height:88px;
  }

  .story-page{
    padding:12px 14px 28px;
  }

  .story-hero{
    border-radius:27px;
    padding:17px;
    grid-template-columns:112px minmax(0,1fr);
  }

  .story-hero::before{
    display:none;
  }

  .story-summary h1{
    font-size:28px;
  }

  .story-meta span{
    font-size:8.5px;
  }

  .tabs{
    border-radius:17px;
  }
}

/* Small phones */
@media (max-width:390px){
  .topbar{
    margin-left:9px;
    margin-right:9px;
  }

  .candy-hero,
  .hero,
  .cute-homepage .section,
  .cute-homepage .pastel-section{
    margin-left:11px;
    margin-right:11px;
  }

  .sweet-categories,
  .quick-categories{
    margin-left:11px;
    margin-right:11px;
  }

  .hero h1,
  .candy-hero h1{
    font-size:34px;
  }

  .section-head h2,
  .title-group h2{
    font-size:23px;
  }
}
