*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;color:#59463f;background:#fffdfb;font-family:"Kanit",sans-serif;font-weight:300;position:relative}
body::before{content:"";position:fixed;inset:0;z-index:-1;background:linear-gradient(rgba(255,252,248,.79),rgba(255,250,248,.84)),url("assets/garden-banner.png") center/cover no-repeat;pointer-events:none}a{color:inherit;text-decoration:none}.announcement{text-align:center;background:#dff2fc;color:#637e89;padding:8px 12px;font-size:12px;letter-spacing:.06em}.site-header{height:auto;min-height:82px;padding:12px clamp(18px,5vw,76px);display:flex;align-items:center;justify-content:space-between;gap:24px;background:rgba(255,253,251,.93);backdrop-filter:blur(12px);position:sticky;top:0;z-index:20;border-bottom:1px solid #f1e5e2}.brand{display:flex;align-items:center;gap:13px;color:#936c63}
.brand-avatar-wrap{width:58px;height:58px;display:block;position:relative;flex:0 0 58px;padding:4px;border:2px solid #e5b9c3;border-radius:50%;background:#fff8f6;box-shadow:0 3px 12px #b9858b35}
.brand-avatar{width:100%;height:100%;display:block;object-fit:cover;object-position:center 40%;border-radius:50%;border:2px solid #fff}
.avatar-flower{position:absolute;color:#d7839a;font-size:15px;line-height:1;text-shadow:0 1px white}
.avatar-flower-a{top:-7px;left:-5px}.avatar-flower-b{right:-6px;bottom:-5px;color:#9cb99f}
.brand-wordmark b{display:block;font-family:"Pridi",serif;font-size:23px;letter-spacing:.04em;line-height:1.15}
.brand small{font-size:9px;letter-spacing:.18em}.site-header nav{display:flex;gap:clamp(10px,1.8vw,25px);align-items:center;font-size:13px;color:#79665f}.site-header nav a:hover,.text-link:hover{color:#c77d8d}.account-link{border:1px solid #e8cbd0;border-radius:30px;padding:8px 17px;color:#ad7480;font-size:13px}.menu-toggle{display:none;background:none;border:0;font-size:24px;color:#8d6d65}.hero{height:min(620px,62vw);min-height:390px;position:relative;overflow:hidden;background:#e6f1e7}.hero-image{width:100%;height:100%;object-fit:cover;object-position:center 44%;display:block}.hero-shade{position:absolute;inset:0;background:linear-gradient(90deg,rgba(255,250,241,.82),rgba(255,250,241,.4) 42%,transparent 75%)}.hero-copy{position:absolute;left:clamp(24px,9vw,140px);top:50%;transform:translateY(-50%);max-width:490px}.eyebrow{font-size:10px;letter-spacing:.2em;color:#b77d85;font-weight:500;margin:0 0 10px}.hero h1{font-family:"Pridi",serif;font-size:clamp(34px,5vw,62px);font-weight:500;line-height:1.22;margin:0 0 14px;color:#75544b}.hero-copy p{color:#806d65;margin-bottom:25px}.hero-caption{position:absolute;right:30px;bottom:20px;color:white;text-shadow:0 1px 5px #6d5d56;font-family:Georgia,serif;font-style:italic}.button{display:inline-flex;justify-content:center;align-items:center;border-radius:30px;padding:11px 24px;font:400 13px "Kanit",sans-serif;cursor:pointer;transition:.2s}.button-rose{background:#d995a4;color:white;border:1px solid #d995a4}.button-rose:hover{background:#c77d8d}.button-outline{border:1px solid #d8aab2;color:#a66f7a;background:transparent}.section-wrap{padding:76px clamp(20px,8vw,120px)}.intro{text-align:center;padding-top:62px;padding-bottom:55px}.tiny-flower{font-size:30px;color:#d995a4}.intro h2,.section-heading h2,.feature-band h2,.ebook-band h2,.coin-section h2,.account-section h2{font-family:"Pridi",serif;font-weight:500;font-size:clamp(27px,3vw,38px);margin:0 0 8px;color:#75564e}.muted{color:#9b8982}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:28px}.section-heading p{margin:5px 0 0}.text-link{font-size:13px;color:#b47782}.novel-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.novel-card{border:2px solid #e9c5cb;border-radius:20px;overflow:hidden;background:rgba(255,253,251,.94);box-shadow:0 7px 24px rgba(128,91,83,.10);position:relative}
.novel-card::before,.novel-card::after{position:absolute;z-index:2;color:#d88da0;font-size:22px;line-height:1;text-shadow:0 1px 2px #fff;pointer-events:none}
.novel-card::before{content:"✿";top:7px;left:9px}
.novel-card::after{content:"❀";bottom:7px;right:9px;color:#9ab99f}.novel-card>img{width:100%;height:280px;object-fit:cover;object-position:center 40%}.novel-info{padding:18px}.tag{display:inline-block;background:#e8f3ed;color:#779184;border-radius:30px;padding:4px 11px;font-size:10px}.novel-info h3,.video-card h3,.recommend-box h3{font-family:"Pridi",serif;font-size:21px;font-weight:500;margin:9px 0 3px}.novel-info p,.video-card p,.recommend-box p{font-size:13px;color:#96837b;margin:0 0 18px}.card-bottom{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:#a18d85}.small-button{border:0;background:#f7e6e9;color:#a86e79;border-radius:20px;padding:7px 14px;font:400 12px "Kanit";cursor:pointer}.placeholder-art{height:280px;display:grid;place-items:center;background:linear-gradient(145deg,#dff2fc,#e3efdf);font-size:80px;color:#d18e9c}.placeholder-art.pink{background:linear-gradient(145deg,#f9dce8,#fff0d9)}.feature-band{background:rgba(225,240,230,.91);backdrop-filter:blur(5px);padding:58px clamp(20px,12vw,170px)}.feature-inner{display:flex;align-items:center;justify-content:space-between;gap:40px;max-width:1000px;margin:auto}.floral-photo-frame{width:230px;height:280px;position:relative;padding:9px;background:#fffaf5;border:2px solid #e5b8c1;box-shadow:0 8px 30px #9a8a7840;transform:rotate(2deg);flex:0 0 auto}
.floral-photo-frame img{width:100%;height:100%;object-fit:cover;display:block;border:1px solid #f1d7d8}
.frame-flower{position:absolute;font-size:25px;line-height:1;color:#d98299;text-shadow:0 1px 3px white;z-index:2}
.frame-tl{top:-12px;left:-12px}.frame-tr{top:-12px;right:-12px;color:#a4bd9a}.frame-bl{bottom:-12px;left:-12px;color:#a4bd9a}.frame-br{bottom:-12px;right:-12px}
.featured-cover{margin:0 6px 0 0}.feature-band p:not(.eyebrow){color:#7e8f80;margin-bottom:22px}.soft-pink{background:rgba(255,243,244,.93);backdrop-filter:blur(5px)}.stamp{border:1px solid #e3b7bf;border-radius:50%;width:88px;height:88px;display:grid;place-content:center;text-align:center;font-size:10px;letter-spacing:.1em;color:#bd8490;transform:rotate(9deg)}.recommend-box{display:flex;gap:20px;align-items:center;padding:25px 30px;border-radius:18px;background:rgba(255,253,251,.92);border:1px dashed #e7bdc5}.recommend-flower{font-size:44px;color:#d995a4}.recommend-box p{margin:0}.video-grid{display:grid;grid-template-columns:repeat(2,minmax(0,210px));gap:28px}.video-frame{aspect-ratio:9/16;background:#e1eff5;border-radius:18px;position:relative;overflow:hidden;padding:10px;box-shadow:0 8px 24px #8b77731a}.video-frame.lavender{background:#eee5f4}.video-placeholder{height:100%;border:1px dashed #b9cbd0;border-radius:12px;display:flex;flex-direction:column;justify-content:center;align-items:center;color:#8ba0a5;gap:10px}.video-placeholder span{width:45px;height:45px;border-radius:50%;display:grid;place-items:center;background:#ffffffb8;padding-left:3px}.video-placeholder small{font-size:11px}.video-badge{position:absolute;top:18px;left:18px;background:#fffdf0;color:#a17c68;border-radius:20px;padding:4px 9px;font-size:9px;letter-spacing:.1em}.video-card h3{font-size:18px}.video-card p{margin-bottom:7px}.note{font-size:11px;color:#a39189;margin-top:25px}.ebook-band{background:rgba(249,230,235,.94);backdrop-filter:blur(5px);padding:48px clamp(20px,12vw,170px);display:flex;justify-content:space-between;align-items:center}.ebook-band h2{margin-bottom:2px}.ebook-band p{color:#967c7e;margin:0}.ebook-icon{font-size:64px;color:#c58b97}.coin-section{display:grid;grid-template-columns:1.2fr .8fr;gap:40px;align-items:center}.coin-panel{padding:24px;border-radius:18px;background:rgba(240,247,242,.95);display:flex;align-items:center;justify-content:space-between;gap:15px}.coin-panel small,.coin-panel span{display:block;color:#8a9c8d;font-size:11px}.coin-panel strong{display:block;font-family:"Pridi";font-size:25px;color:#66816d}.account-section{text-align:center;background:rgba(244,249,252,.94);backdrop-filter:blur(5px)}.account-actions{display:flex;justify-content:center;gap:12px;margin-top:20px}footer{background:rgba(231,241,244,.95);backdrop-filter:blur(5px);padding:38px 20px;text-align:center;color:#82949a;font-size:11px}.footer-brand{font-family:"Pridi";font-size:19px;color:#8a7772;letter-spacing:.08em}.footer-links{display:flex;flex-wrap:wrap;justify-content:center;gap:10px 22px;margin:20px auto;max-width:900px}.footer-links a:hover{color:#bd7d89}.dialog{border:0;border-radius:20px;padding:30px;max-width:460px;width:calc(100% - 32px);color:#66524b;box-shadow:0 20px 70px #47332b55}.dialog::backdrop{background:#3c333b77;backdrop-filter:blur(3px)}.dialog form{position:relative}.dialog h2{font-family:"Pridi";font-weight:500}.dialog-close{position:absolute;right:0;top:-12px;border:0;background:none;font-size:25px;color:#9b817b;cursor:pointer}.dialog-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;margin-top:20px}.toast{position:fixed;bottom:20px;left:50%;transform:translate(-50%,20px);opacity:0;background:#66564f;color:white;padding:11px 20px;border-radius:30px;font-size:13px;transition:.25s;pointer-events:none;z-index:50}.toast.show{opacity:1;transform:translate(-50%,0)}@media(max-width:900px){.site-header nav{display:none;position:absolute;top:100%;left:0;right:0;background:#fffdfb;padding:18px 24px;box-shadow:0 10px 20px #6b51431c;flex-direction:column;align-items:flex-start}.site-header nav.open{display:flex}.menu-toggle{display:block;margin-left:auto}.account-link{display:none}.novel-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.novel-card:last-child{display:none}}@media(max-width:600px){.hero{height:560px;min-height:0}.hero-image{object-position:62% center}.hero-shade{background:linear-gradient(90deg,#fff8eddb,#fff8ed66 80%)}.hero-copy{left:24px;right:20px;top:48%}.hero h1{font-size:38px}.section-wrap{padding:52px 20px}.section-heading{align-items:flex-start}.novel-grid{grid-template-columns:1fr}.novel-card:last-child{display:block}.novel-card>img,.placeholder-art{height:300px}.feature-inner{gap:15px}.floral-photo-frame{width:140px;height:180px;padding:6px}.frame-flower{font-size:19px}.feature-band{padding:42px 22px}.stamp{width:66px;height:66px;font-size:8px;flex-shrink:0}.video-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.coin-section{grid-template-columns:1fr;gap:20px}.coin-panel{align-items:flex-start;flex-direction:column}.ebook-band{padding:38px 22px}.footer-links{gap:10px 14px}}

/* Floral frame details around the main garden photograph */
.hero{border-bottom:5px solid #f4dce0}
.hero::before,.hero::after{content:"✿";position:absolute;z-index:4;top:13px;font-size:34px;color:#e7a1af;text-shadow:0 2px 5px #fff;pointer-events:none}
.hero::before{left:18px}.hero::after{right:18px;color:#a7c2a1}
.section-wrap:not(.intro){background-color:rgba(255,253,251,.83);backdrop-filter:blur(4px)}
.section-wrap.soft-pink{background-color:rgba(255,243,244,.93)}
.novel-card>img{border-bottom:1px solid #f1dadd}
@media(max-width:600px){.brand-avatar-wrap{width:50px;height:50px;flex-basis:50px}.brand-wordmark b{font-size:20px}.hero::before,.hero::after{font-size:25px}}

/* === Theme update v3: pastel green garden + pink menu + character logo === */
html { background: #e8f2e7; }
body { background: #e8f2e7; }
body::before {
  background:
    radial-gradient(circle at 8% 12%, rgba(255,255,255,.48) 0 2px, transparent 3px),
    radial-gradient(circle at 92% 22%, rgba(255,255,255,.38) 0 2px, transparent 3px),
    linear-gradient(145deg, #e1efdf 0%, #eaf4e6 48%, #e4f0e2 100%);
  background-size: 48px 48px, 62px 62px, auto;
}
.announcement { background: #dcebdc; color: #718b74; }
.site-header { background: rgba(255,250,248,.96); border-bottom: 1px solid #efd6d8; }
.brand-character-wrap {
  width:66px; height:68px; display:block; position:relative; flex:0 0 66px;
  padding:3px; border:1.5px solid #e7b5be; border-radius:15px 8px 15px 8px;
  background:#fff8f4; box-shadow:0 3px 12px rgba(185,133,139,.20); transform:rotate(-2deg);
}
.brand-character {
  width:100%; height:100%; display:block; object-fit:cover; object-position:center 42%;
  border-radius:11px 5px 11px 5px; border:1px solid #fff;
}
.character-daisy {
  position:absolute; right:-8px; top:-9px; color:#fff4c9;
  -webkit-text-stroke:.6px #d98e9d; font-size:18px; line-height:1;
  text-shadow:0 1px 3px #fff;
}
.brand-wordmark b { color:#906b65; letter-spacing:.04em; }
#mainNav {
  background:#e4a5b3; border:1px solid #dc93a4; border-radius:999px;
  padding:11px 29px; gap:clamp(10px,1.55vw,22px); position:relative;
  box-shadow:0 4px 12px rgba(193,123,140,.14);
}
#mainNav a { color:#fffaf6; font-weight:400; white-space:nowrap; }
#mainNav a:hover { color:#fff1bf; }
.nav-daisy {
  position:absolute; top:-10px; z-index:2; color:#fff3c5;
  -webkit-text-stroke:.6px #d48b9b; text-shadow:0 1px 3px #fff;
  font-size:17px; line-height:1; pointer-events:none;
}
.nav-daisy-left { left:13px; }
.nav-daisy-right { right:13px; }
.account-link { border-color:#e4b4bd; color:#a96f7c; background:#fff7f6; }
.section-wrap:not(.intro) { background-color:rgba(232,243,229,.86); backdrop-filter:blur(4px); }
.section-wrap.soft-pink { background-color:rgba(255,241,243,.94); }
.feature-band { background:rgba(218,237,218,.95); }
.ebook-band { background:rgba(250,232,235,.94); }
.account-section { background:rgba(229,241,230,.94); }
.coin-panel { background:rgba(220,237,219,.96); }
footer { background:rgba(218,235,221,.97); }
@media(max-width:900px) {
  #mainNav { border-radius:0 0 22px 22px; border:0; border-bottom:2px solid #d88f9f;
    padding:25px 28px 20px; background:#e4a5b3; }
  #mainNav a { color:#fffaf6; }
  .nav-daisy-left { left:17px; top:7px; }
  .nav-daisy-right { right:17px; top:7px; }
}
@media(max-width:600px) {
  .brand-character-wrap { width:58px; height:61px; flex-basis:58px; }
  .brand-wordmark b { font-size:20px; }
}


/* === Daisy decoration v4: white petals + yellow centers === */
.nav-daisy {
  position: absolute;
  display: block;
  width: 21px;
  height: 21px;
  top: -12px;
  z-index: 4;
  filter: drop-shadow(0 1px 2px rgba(151,111,82,.25));
  pointer-events: none;
}
.nav-daisy-left { left: 11px; }
.nav-daisy-right { right: 11px; }
#mainNav { isolation: isolate; }
.floating-daisies {
  position: absolute;
  inset: 0;
  z-index: 19;
  pointer-events: none;
  overflow: visible;
}
.floating-daisy {
  position: absolute;
  display: block;
  width: 24px;
  height: 24px;
  opacity: .82;
  filter: drop-shadow(0 2px 3px rgba(141,119,87,.18));
  animation: daisy-bob 5.5s ease-in-out infinite alternate;
  will-change: transform;
}
.fd-1  { top: 2.5%;  left: 2.2%; width: 25px; animation-delay: -.8s; }
.fd-2  { top: 10%;   right: 3.5%; width: 18px; animation-delay: -2s; }
.fd-3  { top: 19%;   left: 1.1%; width: 20px; animation-delay: -1.5s; }
.fd-4  { top: 29%;   right: 1.7%; width: 27px; animation-delay: -3.1s; }
.fd-5  { top: 39%;   left: 4.2%; width: 17px; animation-delay: -2.4s; }
.fd-6  { top: 49%;   right: 3.1%; width: 23px; animation-delay: -.4s; }
.fd-7  { top: 59%;   left: 1.8%; width: 26px; animation-delay: -1.9s; }
.fd-8  { top: 68%;   right: 5%; width: 17px; animation-delay: -2.8s; }
.fd-9  { top: 77%;   left: 3.5%; width: 21px; animation-delay: -1.1s; }
.fd-10 { top: 86%;   right: 1.8%; width: 25px; animation-delay: -3.6s; }
.fd-11 { top: 93%;   left: 7%; width: 16px; animation-delay: -2.1s; }
.fd-12 { top: 97%;   right: 8%; width: 19px; animation-delay: -.9s; }
@keyframes daisy-bob {
  0% { transform: translate3d(0,-3px,0) rotate(-8deg); }
  100% { transform: translate3d(3px,8px,0) rotate(10deg); }
}
@media (prefers-reduced-motion: reduce) {
  .floating-daisy { animation: none; }
}
@media (max-width: 900px) {
  .nav-daisy { top: 7px; width: 18px; height: 18px; }
  .nav-daisy-left { left: 12px; }
  .nav-daisy-right { right: 12px; }
  .floating-daisy { opacity: .7; }
}
@media (max-width: 600px) {
  .floating-daisy { width: 16px; height: 16px; opacity: .65; }
  .fd-1 { width:18px; } .fd-4 { width:19px; }
  .fd-6 { width:17px; } .fd-7 { width:18px; }
  .fd-10 { width:18px; }
}


/* === v5: individual daisy menu buttons + supplied garden image as page background === */
body::before {
  background:
    linear-gradient(rgba(241, 249, 237, .16), rgba(239, 248, 234, .26)),
    url("assets/garden-banner.png") center center / cover no-repeat;
  background-attachment: fixed;
}

/* Navigation is no longer one long pink capsule. */
#mainNav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 11px;
  position: static;
  padding: 10px 8px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Each link becomes its own capsule button. */
#mainNav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 16px 8px 23px;
  border: 1px solid #d98fa1;
  border-radius: 999px;
  background: #df879b;
  color: #fffaf7;
  box-shadow: 0 3px 9px rgba(159, 103, 119, .18);
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}
#mainNav a::before {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  left: -7px;
  top: -5px;
  background: url("assets/daisy.svg") center / contain no-repeat;
  filter: drop-shadow(0 1px 2px rgba(114, 88, 62, .24));
  pointer-events: none;
}
#mainNav a:hover {
  color: #fff;
  background: #ce748b;
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(159, 103, 119, .23);
}
#mainNav a:focus-visible {
  outline: 3px solid #f5d46a;
  outline-offset: 3px;
}

/* The old end-of-strip daisies are no longer used. */
.nav-daisy { display: none; }

/* Keep the individual buttons comfortably spaced on small screens. */
@media (max-width: 900px) {
  #mainNav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 11px;
    padding: 18px 25px 22px;
    border: 0;
    border-bottom: 2px solid #d88f9f;
    border-radius: 0 0 22px 22px;
    background: rgba(255, 247, 245, .98);
    box-shadow: 0 10px 20px rgba(107, 81, 67, .12);
  }
  #mainNav.open { display: flex; }
  #mainNav a {
    width: fit-content;
    min-width: 145px;
    justify-content: flex-start;
    background: #df879b;
    color: #fffaf7;
  }
  #mainNav a::before { left: -7px; top: -5px; }
}
@media (max-width: 600px) {
  #mainNav { gap: 12px; }
  #mainNav a { font-size: 13px; }
}

/* Translucent surfaces let the original garden photograph remain visible around the content. */
.announcement {
  background: rgba(220, 235, 220, .88);
}
.site-header {
  background: rgba(255, 250, 248, .88);
  backdrop-filter: blur(8px);
}
.hero {
  background: rgba(225, 239, 223, .2);
}

/* ===== NARANIN NOVEL DETAIL ===== */

.novel-detail-page {
  max-width: 1100px;
  margin: 35px auto;
  padding: 25px;
  position: relative;
}

.back-link {
  display: inline-block;
  color: #846d65;
  margin-bottom: 20px;
  font-size: 14px;
}

.detail-panel {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 35px;
  padding: 30px;
  background: rgba(255, 253, 249, .96);
  border: 2px solid #e7c1c7;
  border-radius: 25px;
  box-shadow: 0 8px 25px #78947730;
}

.detail-cover {
  padding: 9px;
  background: #fff;
  border: 2px solid #e4b2bd;
  border-radius: 15px;
  position: relative;
  height: fit-content;
}

.detail-cover::after {
  content: "✿";
  position: absolute;
  right: -14px;
  bottom: -17px;
  color: #d995a4;
  font-size: 32px;
}

.detail-cover img {
  display: block;
  width: 100%;
  border-radius: 10px;
}

.detail-information h1 {
  font-family: "Pridi", serif;
  font-size: 34px;
  color: #75564e;
  margin: 12px 0;
}

.detail-information h2,
.chapter-section h2 {
  font-family: "Pridi", serif;
  color: #75564e;
}

.detail-author {
  color: #9b8982;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.detail-tags span {
  background: #e5f1e5;
  color: #779178;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
}

.detail-synopsis {
  line-height: 2;
  color: #77645c;
  white-space: pre-line;
}

.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  color: #9b8982;
  font-size: 12px;
  margin: 20px 0;
}

/* สารบัญตอน */

.chapter-section {
  margin-top: 35px;
  padding: 28px;
  border: 1px solid #edcbd1;
  border-radius: 22px;
  background: rgba(255, 243, 244, .96);
}

.chapter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 18px;
  background: #fffdfb;
  border: 1px solid #efd9dc;
  border-radius: 15px;
}

.chapter-row b,
.chapter-row small {
  display: block;
}

.chapter-row small {
  color: #9b8982;
  margin-top: 5px;
}

.chapter-free {
  color: #b47782;
  font-size: 13px;
  white-space: nowrap;
}

/* มือถือ */

@media (max-width: 650px) {

  .detail-panel {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .detail-cover {
    max-width: 260px;
    margin: auto;
  }

  .detail-information h1 {
    font-size: 28px;
  }

  .novel-detail-page {
    padding: 15px;
  }

  .chapter-section {
    padding: 18px;
  }

}

/* ===== NARANIN : FLOWER GARDEN BACKGROUND ===== */

body {
  background-color: #e7f1e5 !important;

  background-image:
    linear-gradient(
      rgba(231, 242, 225, 0.20),
      rgba(231, 242, 225, 0.35)
    ),
    url("assets/garden-banner.png") !important;

  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* ปิดพื้นหลังชั้นเก่าที่ทำให้ภาพสวนไม่ปรากฏ */
body::before {
  display: none !important;
}

/* กรอบเนื้อหายังอ่านง่าย แต่เห็นสวนด้านหลังบาง ๆ */
.detail-panel {
  background: rgba(255, 253, 249, 0.91) !important;
  backdrop-filter: blur(3px);
}

/* กล่องสารบัญ */
.chapter-section {
  background: rgba(255, 243, 244, 0.90) !important;
}

/* มือถือ */
@media (max-width: 650px) {
  body {
    background-attachment: scroll;
    background-position: center top;
  }
}

/* ===== NARANIN READING PAGE ===== */

.reader-page {
  max-width: 1100px;
  margin: 28px auto 55px;
  padding: 20px;
  position: relative;
}

.reader-top {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
  color: #826f67;
  font-size: 13px;
}

.reader-top a {
  color: #b47782;
}

.reader-paper {
  --reader-size: 20px;

  padding: 28px clamp(20px, 7vw, 75px) 38px;
  background: rgba(255, 253, 249, .97);
  border: 2px solid #e8c9c4;
  border-radius: 24px;
  box-shadow: 0 8px 28px rgba(89, 106, 79, .17);
  transition: background .25s, color .25s;
}

/* แถบควบคุมด้านบน */

.reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  border-bottom: 1px solid #efd9d2;
  padding-bottom: 18px;
}

.reader-chapter-label {
  color: #795e53;
  font-family: "Pridi", serif;
  font-size: 18px;
  font-weight: 500;
}

.reader-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.reader-size-controls,
.reader-theme-controls {
  display: flex;
  gap: 5px;
}

.reader-controls button {
  border: 1px solid #e7c2ba;
  background: #fffaf6;
  color: #795e53;
  border-radius: 20px;
  padding: 8px 13px;
  font-family: "Kanit", sans-serif;
  cursor: pointer;
  transition: .2s;
}

.reader-controls button:hover {
  background: #f7e5e7;
}

.reader-controls button.active {
  background: #dfa0aa;
  border-color: #dfa0aa;
  color: white;
}

/* หัวข้อตอน */

.reader-heading {
  text-align: center;
  padding: 34px 10px 20px;
}

.reader-heading h1 {
  font-family: "Pridi", serif;
  font-size: 32px;
  font-weight: 500;
  color: #76574e;
  margin: 8px 0;
}

.reader-flower-divider {
  color: #d995a4;
  font-size: 24px;
  letter-spacing: 9px;
  margin-top: 15px;
}

/* เนื้อหานิยาย */

.reader-content {
  max-width: 850px;
  margin: 15px auto 35px;
  color: #58473e;
  font-family: "Pridi", serif;
  font-size: 20px;
  line-height: 2.05;
  transition: font-size .2s, color .25s;
}

.reader-content p {
  text-indent: 2em;
  margin: 0 0 24px;
}

/* ปุ่มท้ายตอน */

.reader-bottom {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  border-top: 1px solid #efd9d2;
  padding-top: 22px;
}

.reader-bottom button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* โหมดกระดาษ */

.reader-paper[data-theme="paper"] {
  background: #f1e6d1;
  border-color: #d9c4a0;
}

.reader-paper[data-theme="paper"] .reader-heading h1,
.reader-paper[data-theme="paper"] .reader-chapter-label {
  color: #73553e;
}

.reader-paper[data-theme="paper"] .reader-content {
  color: #5b4938;
}

/* โหมดกลางคืน */

.reader-paper[data-theme="night"] {
  background: #252b2d;
  border-color: #596466;
}

.reader-paper[data-theme="night"] .reader-heading h1,
.reader-paper[data-theme="night"] .reader-chapter-label {
  color: #eedbc2;
}

.reader-paper[data-theme="night"] .reader-content {
  color: #e1d6c7;
}

.reader-paper[data-theme="night"] .reader-toolbar {
  border-color: #596466;
}

.reader-paper[data-theme="night"] .reader-bottom {
  border-color: #596466;
}

.reader-paper[data-theme="night"] .reader-controls button {
  background: #394245;
  color: #f1e4d3;
  border-color: #657274;
}

.reader-paper[data-theme="night"] .reader-controls button.active {
  background: #a97483;
  color: white;
  border-color: #a97483;
}

.reader-paper[data-theme="night"] .reader-flower-divider {
  color: #e4aaba;
}

/* แสดงผลบนมือถือ */

@media (max-width: 650px) {
  .reader-page {
    padding: 12px;
    margin-top: 15px;
  }

  .reader-paper {
    padding: 20px 15px 25px;
  }

  .reader-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .reader-controls {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .reader-heading h1 {
    font-size: 27px;
  }

  .reader-content {
    font-size: 18px;
    line-height: 1.95;
  }

  .reader-bottom {
    flex-direction: column;
  }

  .reader-bottom .button {
    width: 100%;
  }
}

/* ===== NARANIN FONT SELECTOR ===== */

.reader-font-family {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #80685e;
  font-size: 13px;
}

.reader-font-family select {
  border: 1px solid #e3bdc2;
  border-radius: 20px;
  padding: 8px 13px;
  background: #fffaf7;
  color: #795e53;
  font-family: "Kanit", sans-serif;
  cursor: pointer;
  outline: none;
}

.reader-font-family select:focus {
  border-color: #d995a4;
  box-shadow: 0 0 0 3px #f7e5e9;
}

.reader-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 650px) {
  .reader-font-family {
    width: 100%;
    justify-content: space-between;
  }

  .reader-font-family select {
    flex: 1;
  }
}

/* ===== NARANIN COPYRIGHT FOOTER ===== */

.site-footer {
  position: relative;
  z-index: 20;
  text-align: center;
  padding: 45px 20px 35px;
  background: rgba(218, 235, 221, .97);
  border-top: 2px solid #e7c2c9;
  color: #89766d;
}

.site-footer .footer-brand {
  font-family: "Pridi", serif;
  font-size: 21px;
  color: #927069;
  margin-bottom: 15px;
}

.copyright-main,
.copyright-detail,
.copyright-warning {
  max-width: 850px;
  margin: 8px auto;
  font-size: 12px;
  line-height: 1.9;
}

.copyright-main {
  color: #80665e;
}

.copyright-detail {
  color: #8d8076;
}

.copyright-warning {
  color: #a47d81;
}

.footer-legal-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  font-size: 12px;
  color: #b47782;
}

.footer-legal-links a:hover {
  color: #d07c91;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .site-footer {
    padding: 32px 18px;
  }

  .copyright-main,
  .copyright-detail,
  .copyright-warning {
    font-size: 11px;
  }
}

/* ===== COPYRIGHT POLICY PAGE ===== */

.copyright-page {
  max-width: 950px;
  margin: 40px auto;
  padding: 20px;
  position: relative;
}

.copyright-card {
  background: rgba(255, 253, 249, .96);
  border: 2px solid #e8c3ca;
  border-radius: 24px;
  padding: clamp(24px, 5vw, 55px);
  box-shadow: 0 8px 30px rgba(94, 124, 91, .15);
  line-height: 1.9;
}

.copyright-card h1,
.copyright-card h2 {
  font-family: "Pridi", serif;
  font-weight: 500;
  color: #795c52;
}

.copyright-card h1 {
  font-size: 35px;
  margin-bottom: 5px;
}

.copyright-card h2 {
  font-size: 22px;
  margin-top: 30px;
  border-bottom: 1px solid #f0d8dc;
  padding-bottom: 7px;
}

.copyright-card p,
.copyright-card li {
  color: #78675f;
  font-size: 14px;
}

.policy-update {
  color: #aa8c84 !important;
  font-size: 12px !important;
}

.policy-note {
  padding: 16px;
  border-radius: 12px;
  background: #f8eeee;
  color: #98757a !important;
  margin: 25px 0;
}

.contact-placeholder {
  padding: 14px;
  border-radius: 12px;
  background: #eaf3e7;
  overflow-wrap: anywhere;
}

@media (max-width: 600px) {
  .copyright-page {
    padding: 12px;
    margin: 20px auto;
  }

  .copyright-card h1 {
    font-size: 28px;
  }

  .copyright-card p,
  .copyright-card li {
    font-size: 13px;
  }
}

/* =================================
   NARANIN WATERMARK
   ลายน้ำตัวเล็กเรียงเฉียงทั่วหน้าอ่าน
================================= */

.reader-paper {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

/* ชั้นลายน้ำ */
.reader-watermark {
  position: absolute;
  inset: 0;

  z-index: 0;

  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(5, 1fr);

  place-items: center;

  pointer-events: none;
  user-select: none;

  color: #947B6C;
  opacity: 0.13;
}

/* ตัวหนังสือลายน้ำ */
.reader-watermark span {
  font-family: "Pridi", serif;
  font-size: 16px;
  font-weight: 500;

  white-space: nowrap;
  letter-spacing: 0.04em;

  transform: rotate(-25deg);
}

/* ให้เนื้อหาอยู่ด้านหน้าลายน้ำ */
.reader-toolbar,
.reader-heading,
.reader-content,
.reader-bottom {
  position: relative;
  z-index: 1;
}

/* โหมดกลางคืน */
.reader-paper[data-theme="night"] .reader-watermark {
  color: #F3E3C9;
  opacity: 0.13;
}

/* โหมดกระดาษ */
.reader-paper[data-theme="paper"] .reader-watermark {
  color: #92795C;
  opacity: 0.14;
}

/* โทรศัพท์มือถือ */
@media (max-width: 600px) {
  .reader-watermark span {
    font-size: 12px;
  }
}

/* ===== NARANIN SIGNATURE GREEN ===== */

html,
body {
  background-color: #93BA98 !important;
}

/* ภาพสวนเดิมพร้อมโทนเขียว #93BA98 */
body {
  background-image:
    linear-gradient(
      rgba(147, 186, 152, 0.68),
      rgba(147, 186, 152, 0.68)
    ),
    url("assets/garden-banner.png") !important;

  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* พื้นที่ส่วนต่าง ๆ ของเว็บไซต์ */
.section-wrap:not(.soft-pink) {
  background-color: rgba(147, 186, 152, 0.82) !important;
}

.intro {
  background-color: rgba(147, 186, 152, 0.78);
}

/* กล่องอ่านนิยายยังคงสีครีม */
.detail-panel,
.reader-paper,
.copyright-card {
  background-color: rgba(255, 253, 249, 0.96);
}

/* มือถือ */
@media (max-width: 650px) {
  body {
    background-attachment: scroll;
  }
}

/* ===== NARANIN INTRO WHITE TEXT ===== */

.intro .eyebrow,
.intro .muted,
.intro .tiny-flower {
  color: #FFFFFF !important;
  text-shadow: 0 1px 4px rgba(55, 90, 60, 0.45);
}

/* ===== NARANIN UNIFIED WHITE TEXT ===== */

/* ส่วนต้อนรับ */
.intro .eyebrow,
.intro .muted,
.intro .tiny-flower {
  color: #FFFFFF !important;
}

/* หัวข้อเล็กในชั้นหนังสือ */
#novels > .section-heading .eyebrow,
#novels > .section-heading .muted,
#novels > .section-heading .text-link {
  color: #FFFFFF !important;
}

/* ส่วนแนะนำเรื่อง */
.feature-band .eyebrow,
.feature-band .feature-inner p:not(.eyebrow) {
  color: #FFFFFF !important;
}

/* ส่วน E-book และเติมเหรียญ */
.ebook-band .eyebrow,
.coin-section .eyebrow,
.coin-section .muted {
  color: #FFFFFF !important;
}

/* ส่วนสมาชิก */
.account-section .eyebrow,
.account-section .muted {
  color: #FFFFFF !important;
}

/* เงาตัวอักษรช่วยให้เห็นชัดบนสีเขียว */
.intro .eyebrow,
.intro .muted,
#novels > .section-heading .eyebrow,
#novels > .section-heading .muted,
#novels > .section-heading .text-link,
.feature-band .eyebrow,
.feature-band .feature-inner p,
.ebook-band .eyebrow,
.coin-section .eyebrow,
.coin-section .muted,
.account-section .eyebrow,
.account-section .muted {
  text-shadow: 0 1px 3px rgba(57, 91, 62, .45);
}

/* คงหัวข้อใหญ่สีน้ำตาล */
.intro h2,
.section-heading h2,
.feature-band h2,
.ebook-band h2,
.coin-section h2,
.account-section h2 {
  color: #75564E;
}

/* คงข้อความในการ์ดนิยายให้อ่านง่าย */
.novel-info p {
  color: #806D65;
  text-shadow: none;
}

/* ===== NARANIN TEXT COLOR STANDARD ===== */

/* ข้อความเล็กและคำอธิบายบนพื้นหลังสีเขียว */
.intro .eyebrow,
.intro .muted,

#novels .section-heading .eyebrow,
#novels .section-heading .muted,
#novels .section-heading .text-link,

.feature-band .eyebrow,
.feature-band .feature-inner p:not(.eyebrow),

.coin-section .eyebrow,
.coin-section .muted,

.account-section .eyebrow,
.account-section .muted {
  color: #FFFFFF !important;
  text-shadow: 0 1px 4px rgba(55, 90, 60, .45);
}

/* หัวข้อใหญ่สีน้ำตาลเหมือนภาพตัวอย่าง */
.intro h2,
#novels .section-heading h2,
.feature-band h2,
.coin-section h2,
.account-section h2 {
  color: #75564E !important;
}

/* ข้อความภายในการ์ดนิยายไม่เปลี่ยนเป็นสีขาว */
.novel-card .novel-info p,
.novel-card .novel-info h3 {
  color: #806D65;
  text-shadow: none;
}

/* ===== NARANIN SOFT PASTEL RESTORE ===== */

/* พื้นหลังสวนสีเขียวอ่อน */
html,
body {
  background-color: #E8F1E6 !important;
  background-image: none !important;
}

body::before {
  display: block !important;
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;

  background:
    linear-gradient(
      rgba(232, 241, 230, .86),
      rgba(232, 241, 230, .86)
    ),
    url("assets/garden-banner.png")
    center center / cover no-repeat;

  background-attachment: fixed;
}

/* กลับสีข้อความเล็กเป็นสีเดิม */
.intro .eyebrow,
#novels .section-heading .eyebrow,
.feature-band .eyebrow,
.coin-section .eyebrow,
.account-section .eyebrow {
  color: #B77D85 !important;
  text-shadow: none !important;
}

.intro .muted,
#novels .section-heading .muted,
.coin-section .muted,
.account-section .muted {
  color: #9B8982 !important;
  text-shadow: none !important;
}

#novels .section-heading .text-link {
  color: #B47782 !important;
  text-shadow: none !important;
}

.feature-band .feature-inner p:not(.eyebrow) {
  color: #7E8F80 !important;
  text-shadow: none !important;
}

.ebook-band .eyebrow {
  color: #B77D85 !important;
  text-shadow: none !important;
}

.ebook-band p {
  color: #967C7E !important;
}

/* พื้นหลังแต่ละส่วนกลับมาเป็นพาสเทล */
.section-wrap:not(.soft-pink) {
  background-color: rgba(232, 241, 230, .82) !important;
}

.feature-band {
  background: rgba(227, 240, 225, .93) !important;
}

.account-section {
  background: rgba(244, 249, 242, .94) !important;
}

/* คงสีหัวข้อใหญ่ */
.intro h2,
.section-heading h2,
.feature-band h2,
.ebook-band h2,
.coin-section h2,
.account-section h2 {
  color: #75564E !important;
  text-shadow: none !important;
}

/* คงกล่องนิยายและข้อความภายในการ์ด */
.novel-card {
  background: rgba(255, 253, 251, .96);
}

.novel-card .novel-info p {
  color: #96837B !important;
  text-shadow: none !important;
}

/* มือถือ */
@media (max-width: 650px) {
  body::before {
    background-attachment: scroll;
  }
}

/* ===== NARANIN NOVEL COVER RATIO 3:4 ===== */

/* ปกนิยายบนชั้นหนังสือ */
.novel-card > img,
.placeholder-art {
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto !important;
  object-fit: cover;
  object-position: center;
}

/* ปกนิยายหน้ารายละเอียด */
.detail-cover,
.detail-cover-frame {
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto !important;
  overflow: hidden;
}

.detail-cover img,
.detail-cover-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ปกในส่วนนิยายแนะนำ */
.feature-inner img {
  aspect-ratio: 3 / 4;
  height: auto !important;
  object-fit: cover;
}

/* โทรศัพท์มือถือ */
@media (max-width: 600px) {
  .novel-card > img,
  .placeholder-art {
    aspect-ratio: 3 / 4;
    height: auto !important;
  }
}

/* ===== NARANIN BOOK SHELF : 5 BOOKS PER ROW ===== */

.novel-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 18px !important;
}

.novel-card {
  min-width: 0;
  display: block !important;
  border-radius: 15px;
}

.novel-card > img,
.novel-card .placeholder-art {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto !important;
  object-fit: cover;
  object-position: center;
}

.novel-info {
  padding: 12px;
}

.novel-info h3 {
  font-size: 17px;
  line-height: 1.5;
}

.novel-info p {
  font-size: 11px;
  line-height: 1.6;
}

/* หน้าจอแท็บเล็ต */
@media (max-width: 850px) {
  .novel-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* หน้าจอโทรศัพท์ */
@media (max-width: 550px) {
  .novel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .novel-info {
    padding: 10px;
  }
}

/* ===== NARANIN GARDEN BACKGROUND RESTORE ===== */

html {
  background: #E8F1E6 !important;
}

body {
  background-color: #E8F1E6 !important;

  background-image:
    linear-gradient(
      rgba(232, 241, 230, 0.48),
      rgba(232, 241, 230, 0.48)
    ),
    url("assets/garden-banner.png") !important;

  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* ปิดพื้นหลังชั้นเก่าที่อาจบังภาพสวน */
body::before {
  display: none !important;
}

/* ให้เห็นภาพสวนผ่านพื้นที่ต่าง ๆ */
.section-wrap:not(.soft-pink) {
  background: rgba(232, 241, 230, 0.68) !important;
}

.feature-band {
  background: rgba(227, 240, 225, 0.76) !important;
}

.account-section {
  background: rgba(244, 249, 242, 0.78) !important;
}

/* กล่องอ่านและการ์ดยังคงอ่านง่าย */
.novel-card,
.detail-panel,
.reader-paper {
  background: rgba(255, 253, 251, 0.96);
}

/* พื้นหลังมือถือ */
@media (max-width: 650px) {
  body {
    background-attachment: scroll;
  }
}

/* ===== NARANIN ADMIN DASHBOARD ===== */

.admin-page {
  max-width: 1050px;
  margin: 35px auto;
  padding: 20px;
  position: relative;
}

.admin-heading {
  text-align: center;
  margin-bottom: 28px;
}

.admin-heading h1 {
  font-family: "Pridi", serif;
  font-size: 34px;
  color: #75564E;
  margin: 5px;
}

.admin-heading p:not(.eyebrow) {
  color: #8B8179;
}

.admin-notice {
  padding: 17px 20px;
  border-radius: 15px;
  background: #FFF4E5;
  border: 1px solid #EBD7B8;
  color: #886F55;
  margin-bottom: 25px;
  font-size: 13px;
}

.admin-notice p {
  margin: 5px 0 0;
}

.admin-form-card,
.admin-list-card {
  background: rgba(255, 253, 249, .97);
  border: 1px solid #E8C5CB;
  border-radius: 22px;
  padding: clamp(20px, 4vw, 35px);
  margin-bottom: 28px;
  box-shadow: 0 7px 22px rgba(100, 120, 92, .10);
}

.admin-form-card h2,
.admin-list-card h2 {
  font-family: "Pridi", serif;
  color: #75564E;
  font-weight: 500;
}

#novelForm label {
  display: block;
  color: #806B61;
  margin: 17px 0 7px;
  font-size: 14px;
}

#novelForm input:not([type="checkbox"]),
#novelForm textarea,
#novelForm select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #E6CBD0;
  border-radius: 12px;
  background: #FFFCFA;
  color: #66534A;
  font: 14px "Kanit", sans-serif;
  outline: none;
}

#novelForm input:focus,
#novelForm textarea:focus,
#novelForm select:focus {
  border-color: #D995A4;
  box-shadow: 0 0 0 3px rgba(217,149,164,.14);
}

#novelForm input[readonly] {
  background: #F1F5EE;
}

#novelForm textarea {
  resize: vertical;
  line-height: 1.8;
}

#novelForm input[type="file"] {
  background: #F5F8F1;
}

.admin-help {
  color: #9A8B80;
  font-size: 11px;
}

.admin-cover-preview {
  width: 150px;
  aspect-ratio: 3 / 4;
  border: 1px dashed #D9AAB5;
  border-radius: 12px;
  background: #F8EEEF;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #AD858D;
  font-size: 12px;
  overflow: hidden;
  margin-top: 12px;
}

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

.admin-check {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.admin-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 25px;
}

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

.admin-novel-list {
  display: grid;
  gap: 13px;
}

.admin-novel-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px;
  border: 1px solid #F0DFDF;
  border-radius: 14px;
  background: #FFFAF8;
}

.admin-novel-item > img {
  width: 65px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 7px;
}

.admin-novel-info {
  flex: 1;
  min-width: 0;
}

.admin-novel-info b,
.admin-novel-info small {
  display: block;
  overflow-wrap: anywhere;
}

.admin-novel-info b {
  color: #75564E;
}

.admin-novel-info small {
  color: #97857D;
  font-size: 11px;
  margin-top: 4px;
}

.admin-novel-info .adult-label {
  color: #B45F6C;
  font-weight: 500;
}

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

.admin-item-actions button {
  border: 1px solid #E5BBC4;
  border-radius: 20px;
  background: #F8E8EB;
  color: #A16D78;
  padding: 7px 12px;
  font: 12px "Kanit", sans-serif;
  cursor: pointer;
}

.admin-item-actions button[data-delete] {
  background: #FFF0ED;
  border-color: #E8C0B8;
  color: #A66D63;
}

.admin-empty {
  color: #9A8981;
  text-align: center;
  padding: 25px;
  font-size: 13px;
}

@media (max-width: 600px) {
  .admin-page {
    padding: 12px;
  }

  .admin-novel-item {
    flex-wrap: wrap;
  }

  .admin-item-actions {
    width: 100%;
  }

  .admin-list-heading {
    align-items: flex-start;
  }
}

/* ===== DYNAMIC NOVEL DETAIL ===== */

.detail-cover {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 3 / 4;
  height: auto;
  overflow: hidden;
}

.detail-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.detail-synopsis {
  white-space: pre-line;
  line-height: 2;
  overflow-wrap: anywhere;
}

.adult-label {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 12px;
  border-radius: 20px;
  background: #F8E1E4;
  color: #A74E60;
  font-size: 12px;
  font-weight: 500;
}

.adult-label[hidden] {
  display: none;
}

.detail-tags #detailStatus {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  background: #E5F1E5;
  color: #779178;
  font-size: 12px;
}

.detail-note {
  color: #9A8981;
  font-size: 12px;
  margin-top: 15px;
}

.admin-added-card .small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  text-decoration: none;
}

.chapter-row {
  text-decoration: none;
}

@media (max-width: 650px) {
  .detail-cover {
    margin: 0 auto;
  }
}

/* ===== NARANIN CHAPTER ADMIN DESIGN ===== */

.admin-chapters-card {
  max-width: 1050px;
  margin: 30px auto;
  padding: clamp(20px, 4vw, 35px);
  background: rgba(255, 253, 249, .97);
  border: 1px solid #E8C5CB;
  border-radius: 22px;
  box-shadow: 0 7px 22px rgba(100, 120, 92, .10);
  position: relative;
}

.admin-chapters-card label {
  display: block;
  margin: 18px 0 7px;
  color: #806B61;
  font-size: 14px;
}

.admin-chapters-card input,
.admin-chapters-card textarea,
.admin-chapters-card select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #E6CBD0;
  border-radius: 12px;
  background: #FFFCFA;
  color: #66534A;
  font: 14px "Kanit", sans-serif;
  outline: none;
}

.admin-chapters-card input:focus,
.admin-chapters-card textarea:focus,
.admin-chapters-card select:focus {
  border-color: #D995A4;
  box-shadow: 0 0 0 3px rgba(217,149,164,.14);
}

.admin-chapters-card textarea {
  resize: vertical;
  line-height: 1.9;
}

.admin-chapters-card [hidden] {
  display: none !important;
}

.admin-chapter-list-area {
  margin-top: 35px;
  padding-top: 25px;
  border-top: 1px solid #F0DFDF;
}

.admin-chapter-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid #EFD9DC;
  border-radius: 14px;
  background: #FFFAF8;
}

.admin-chapter-info {
  min-width: 0;
  flex: 1;
}

.admin-chapter-info b,
.admin-chapter-info small {
  display: block;
  overflow-wrap: anywhere;
}

.admin-chapter-info b {
  color: #75564E;
  font-family: "Pridi", serif;
  font-size: 17px;
}

.admin-chapter-info small {
  margin-top: 5px;
  color: #9A8981;
  font-size: 12px;
}

.admin-chapter-item .admin-item-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .admin-chapters-card {
    margin: 18px 12px;
    padding: 18px;
  }

  .admin-chapter-item {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ===== NARANIN CHAPTER LIST ===== */

#dynamicChapterList {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

#dynamicChapterList .chapter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border: 1px solid #efd9dc;
  border-radius: 15px;
  background: rgba(255, 253, 251, .95);
  text-decoration: none;
  transition: .2s;
}

#dynamicChapterList .chapter-row:hover {
  border-color: #d995a4;
  transform: translateY(-2px);
}

#dynamicChapterList .chapter-row b,
#dynamicChapterList .chapter-row small {
  display: block;
}

#dynamicChapterList .chapter-row b {
  color: #75564E;
  font-family: "Pridi", serif;
}

#dynamicChapterList .chapter-row small {
  margin-top: 5px;
  color: #99867D;
  font-size: 12px;
}

.chapter-paid {
  color: #A86E79;
  background: #F8E6E9;
  border-radius: 20px;
  padding: 7px 12px;
  font-size: 12px;
  white-space: nowrap;
}

/* กล่องแจ้งเตือนตอนติดเหรียญ */

.reader-locked {
  max-width: 540px;
  margin: 40px auto;
  padding: 35px 20px;
  text-align: center;
  border: 1px solid #E7C1C8;
  border-radius: 22px;
  background: #FFF4F4;
}

.reader-locked h2 {
  font-family: "Pridi", serif;
  color: #795D52;
  font-weight: 500;
}

.reader-locked p {
  color: #917D74;
  line-height: 1.9;
}

.reader-locked button {
  margin-top: 15px;
}

@media (max-width: 600px) {
  #dynamicChapterList .chapter-row {
    padding: 13px;
  }

  .chapter-paid {
    font-size: 11px;
    padding: 6px 9px;
  }
}

/* ซ่อนสารบัญตัวอย่างเก่า เมื่อเปิดนิยายจาก Admin */
#chapterLink[hidden] {
  display: none !important;
}
/* ซ่อนตอนตัวอย่างเดิมเมื่อมีสารบัญจาก Admin */
#chapterLink[hidden] {
  display: none !important;
}
/* NARANIN BACKUP CARD */

.admin-backup-card {
  margin: 20px auto;
  max-width: 1050px;
  padding: 22px 28px;
  border: 1px solid #D5E4D3;
  border-radius: 18px;
  background: rgba(244, 249, 242, .96);
}

.admin-backup-card h2 {
  font-family: "Pridi", serif;
  color: #75564E;
  margin-top: 0;
}

.admin-backup-card p {
  color: #8B8179;
  font-size: 13px;
  line-height: 1.8;
}

/* =================================
   NARANIN MEMBER PAGE
================================= */

.member-page {
  max-width: 600px;
  margin: 45px auto 60px;
  padding: 20px;
  position: relative;
}

.member-card {
  padding: clamp(22px, 5vw, 42px);
  border: 2px solid #E8C5CB;
  border-radius: 25px;
  background: rgba(255, 253, 249, .97);
  box-shadow: 0 9px 28px rgba(91, 116, 90, .13);
}

.member-heading {
  text-align: center;
  margin-bottom: 25px;
}

.member-heading h1 {
  color: #75564E;
  font-family: "Pridi", serif;
  font-size: 30px;
  font-weight: 500;
  margin: 8px 0;
}

.member-heading p:not(.eyebrow) {
  color: #9A8981;
  font-size: 13px;
}

.member-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding: 5px;
  background: #F5ECEA;
  border-radius: 30px;
  margin-bottom: 24px;
}

.member-tab {
  border: none;
  border-radius: 25px;
  padding: 11px;
  background: transparent;
  color: #987C77;
  font: 14px "Kanit", sans-serif;
  cursor: pointer;
}

.member-tab.active {
  background: #DF9BA9;
  color: white;
  box-shadow: 0 3px 8px #D995A430;
}

.member-form label {
  display: block;
  color: #806B61;
  font-size: 13px;
  margin: 15px 0 7px;
}

.member-form input {
  display: block;
  width: 100%;
  padding: 13px 15px;
  background: #FFFCFA;
  color: #66534A;
  border: 1px solid #E6CBD0;
  border-radius: 12px;
  font: 14px "Kanit", sans-serif;
  outline: none;
}

.member-form input:focus {
  border-color: #D995A4;
  box-shadow: 0 0 0 3px #F7E5E9;
}

.member-submit {
  display: block;
  width: 100%;
  margin-top: 24px;
  padding: 12px;
}

.member-submit:disabled {
  opacity: .6;
  cursor: wait;
}

.member-text-button,
.member-logout {
  display: block;
  margin: 15px auto 0;
  border: none;
  background: transparent;
  color: #B47782;
  font: 13px "Kanit", sans-serif;
  cursor: pointer;
}

.member-message {
  min-height: 24px;
  margin: 16px 0;
  text-align: center;
  font-size: 13px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.member-message[data-type="success"] {
  color: #658C6B;
}

.member-message[data-type="error"] {
  color: #B65E6D;
}

.member-message[data-type="info"] {
  color: #917D74;
}

.member-card [hidden] {
  display: none !important;
}

/* โปรไฟล์สมาชิก */

#accountPanel {
  text-align: center;
  padding: 20px 0;
}

.member-avatar {
  width: 76px;
  height: 76px;
  margin: auto;
  display: grid;
  place-items: center;
  background: #F8E6E9;
  border: 2px solid #E8C5CB;
  border-radius: 50%;
  color: #C98799;
  font-size: 36px;
}

#memberDisplayName {
  font-family: "Pridi", serif;
  color: #75564E;
  font-size: 24px;
  margin: 16px 0 5px;
}

#memberDisplayEmail {
  color: #99877F;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.member-verification {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
  color: #8B7D73;
  font-size: 13px;
}

.member-verification b {
  color: #789878;
}

.member-logout {
  color: #B47782;
  border: 1px solid #E8C5CB;
  border-radius: 25px;
  padding: 9px 25px;
}

.member-footer-note {
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid #F0DFDF;
  text-align: center;
  color: #B58B88;
  font: 14px "Pridi", serif;
}

@media (max-width: 600px) {
  .member-page {
    margin: 20px auto 35px;
    padding: 12px;
  }

  .member-card {
    padding: 22px 17px;
  }

  .member-heading h1 {
    font-size: 25px;
  }
}

/* =================================
   NARANIN 18+ AGE GATE DESIGN
================================= */

.age-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: rgba(48, 63, 49, .65);
  backdrop-filter: blur(7px);
}

.age-gate-overlay[hidden] {
  display: none !important;
}

.age-gate-card {
  width: 100%;
  max-width: 430px;
  padding: 35px 26px;
  border: 2px solid #E8C5CB;
  border-radius: 25px;
  background: #FFFCF8;
  box-shadow: 0 15px 40px rgba(0, 0, 0, .15);
  text-align: center;
  animation: ageGateAppear .25s ease;
}

.age-gate-flower {
  color: #D68FA0;
  font-size: 42px;
  margin-bottom: 12px;
}

.age-gate-card h2 {
  color: #795D52;
  font-family: "Pridi", serif;
  font-weight: 500;
  font-size: 23px;
  margin: 12px 0;
}

.age-gate-card > p:not(.eyebrow) {
  color: #8B7A72;
  font-size: 13px;
  line-height: 1.9;
}

.age-gate-card button {
  width: 100%;
  margin-top: 13px;
  padding: 12px;
}

.age-gate-card #ageGateLogin {
  display: block;
  margin-top: 17px;
  color: #B47782;
  font-size: 14px;
}

.age-gate-card #ageGateLogin[hidden] {
  display: none !important;
}

.age-gate-note {
  margin-top: 22px;
  color: #A6968C !important;
  font-size: 11px !important;
}

@keyframes ageGateAppear {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =====================================
   NARANIN FIRESTORE MIGRATION
===================================== */

.migration-page {
  max-width: 780px;
  margin: 40px auto 60px;
  padding: 20px;
}

.migration-card {
  padding: clamp(22px, 4vw, 40px);
  border: 1px solid #E8C5CB;
  border-radius: 24px;
  background: rgba(255, 253, 249, .97);
  box-shadow: 0 10px 30px rgba(91, 116, 90, .12);
}

.migration-card h1 {
  color: #75564E;
  font: 500 30px "Pridi", serif;
  margin: 10px 0;
}

.migration-description {
  color: #95847B;
  font-size: 13px;
  line-height: 1.9;
  margin-bottom: 25px;
}

.migration-card label {
  display: block;
  color: #806B61;
  font-size: 13px;
  margin: 24px 0 9px;
}

.migration-card input[type="file"] {
  display: block;
  width: 100%;
  padding: 14px;
  border: 1px dashed #DCAAB5;
  border-radius: 12px;
  background: #FFFAF8;
  color: #806B61;
  font: 13px "Kanit", sans-serif;
}

.migration-card button {
  margin-top: 16px;
  min-height: 42px;
}

.migration-card button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.migration-status,
.migration-summary {
  padding: 16px;
  margin: 18px 0;
  border-radius: 13px;
  background: #EDF4EB;
  color: #68866A;
  font-size: 13px;
  line-height: 1.9;
  white-space: pre-line;
}

.migration-summary {
  background: #F9EDEF;
  color: #916B71;
}

.migration-submit {
  display: block;
  width: 100%;
}

#progressArea {
  margin-top: 25px;
}

#migrationProgress {
  width: 100%;
  height: 13px;
  accent-color: #83A889;
}

#progressText {
  text-align: center;
  font-size: 12px;
  color: #806B61;
}

.migration-log {
  min-height: 65px;
  padding: 15px;
  margin-top: 20px;
  border-radius: 12px;
  background: #F5F1ED;
  color: #745F55;
  font: 12px/1.8 monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.migration-warning {
  margin-top: 22px;
  padding: 16px;
  border-left: 3px solid #DCA56A;
  border-radius: 8px;
  background: #FFF7EA;
  color: #947A5E;
  font-size: 12px;
  line-height: 1.9;
}

.migration-warning p {
  margin: 5px 0 0;
}

@media (max-width: 600px) {
  .migration-page {
    padding: 12px;
    margin-top: 20px;
  }

  .migration-card h1 {
    font-size: 25px;
  }
}

/* =========================================
   NARANIN MINT PASTEL 3D NAVIGATION
   Keep original compact button dimensions
========================================= */

/* แถบเมนูหลัก */
#mainNav {
  width: fit-content !important;
  max-width: calc(100% - 24px);
  margin: 8px auto !important;
  padding: 8px 12px !important;
  gap: 9px !important;

  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;

  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

/* ปุ่มแต่ละเมนู */
#mainNav a {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;

  width: fit-content !important;
  min-width: 0 !important;
  max-width: 100%;
  flex: 0 0 auto;

  padding: 7px 18px 7px 13px !important;
  border-radius: 999px !important;

  color: #65483D !important;
  font-family: "Kanit", sans-serif;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.35;
  white-space: nowrap;
  text-decoration: none;

  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background .18s ease;

  box-sizing: border-box;
}

/* ปุ่มสีชมพู */
#mainNav a:nth-of-type(odd) {
  background: linear-gradient(
    180deg,
    #FBE0E6 0%,
    #F1BFCB 100%
  ) !important;

  border: 1px solid #D69AA8 !important;

  box-shadow:
    0 3px 0 #C98798,
    0 5px 10px rgba(128, 80, 82, .15);
}

/* ปุ่มสีเหลือง */
#mainNav a:nth-of-type(even) {
  background: linear-gradient(
    180deg,
    #FFF4D1 0%,
    #F3E3A9 100%
  ) !important;

  border: 1px solid #D6BD76 !important;

  box-shadow:
    0 3px 0 #C5AC65,
    0 5px 10px rgba(128, 105, 62, .15);
}

/* ตอนชี้เมาส์ */
#mainNav a:hover {
  color: #65483D !important;
  transform: translateY(-2px);
}

#mainNav a:nth-of-type(odd):hover {
  box-shadow:
    0 5px 0 #C98798,
    0 8px 13px rgba(128, 80, 82, .18);
}

#mainNav a:nth-of-type(even):hover {
  box-shadow:
    0 5px 0 #C5AC65,
    0 8px 13px rgba(128, 105, 62, .18);
}

/* ตอนกดปุ่ม ให้ยุบลง */
#mainNav a:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(100, 70, 50, .3);
}

/* กรอบโฟกัสสำหรับคีย์บอร์ด */
#mainNav a:focus-visible {
  outline: 2px solid #789B7D;
  outline-offset: 4px;
}

/* ย้ายดอกไม้บนแต่ละปุ่มไปด้านขวาบน */
#mainNav a::before {
  left: auto !important;
  right: -7px !important;
  top: -5px !important;
}

/* ดอกเดซี่ประดับแถบเมนู:
   ซ่อนตำแหน่งซ้ายและใช้ตำแหน่งขวา */
.nav-daisy-left {
  display: none !important;
}

.nav-daisy-right {
  display: block !important;
  left: auto !important;
  right: 13px !important;
  top: -10px !important;
}

/* มือถือ */
@media (max-width: 600px) {

  #mainNav {
    max-width: 100%;
    padding: 8px 6px !important;
    gap: 8px !important;
  }

  #mainNav a {
    font-size: 12px !important;
    padding: 7px 15px 7px 11px !important;
  }

}

/* ==========================================
   NARANIN GLOBAL 3D BUTTON SYSTEM
   ใช้กับปุ่มทุกหน้าในเว็บไซต์
========================================== */

:root {
  --nara-pink-top: #FBE2E9;
  --nara-pink-bottom: #F1C1CE;
  --nara-pink-border: #D69AA8;
  --nara-pink-shadow: #C98798;

  --nara-yellow-top: #FFF4D2;
  --nara-yellow-bottom: #F3E3A9;
  --nara-yellow-border: #D6BD76;
  --nara-yellow-shadow: #C5AC65;

  --nara-brown: #65483D;
  --nara-green: #93BA98;
}

/* ปุ่มทุกชนิด */
:where(
  button,
  input[type="button"],
  input[type="submit"],
  input[type="reset"],
  a.button,
  a[class*="button"],
  .small-button,
  .account-link,
  .member-tab,
  .member-logout,
  .member-text-button
) {
  box-sizing: border-box;
  position: relative;

  border: 1px solid var(--nara-pink-border) !important;
  border-radius: 999px !important;

  background: linear-gradient(
    180deg,
    var(--nara-pink-top) 0%,
    var(--nara-pink-bottom) 100%
  ) !important;

  color: var(--nara-brown) !important;

  box-shadow:
    0 3px 0 var(--nara-pink-shadow),
    0 5px 10px rgba(101, 72, 61, .14),
    inset 0 1px 1px rgba(255,255,255,.85);

  cursor: pointer;

  transition:
    transform .18s ease,
    box-shadow .18s ease,
    filter .18s ease;
}

/* ปุ่มรองสีเหลืองพาสเทล */
:where(
  .button-outline,
  .member-text-button,
  .member-logout,
  .button-yellow
) {
  background: linear-gradient(
    180deg,
    var(--nara-yellow-top) 0%,
    var(--nara-yellow-bottom) 100%
  ) !important;

  border-color: var(--nara-yellow-border) !important;

  box-shadow:
    0 3px 0 var(--nara-yellow-shadow),
    0 5px 10px rgba(101, 72, 61, .12),
    inset 0 1px 1px rgba(255,255,255,.85);
}

/* ปุ่มสีเขียวสำหรับการดำเนินการสำเร็จ */
:where(
  .button-green,
  .button-success
) {
  background: linear-gradient(
    180deg,
    #B9D9BE 0%,
    #93BA98 100%
  ) !important;

  border-color: #789C7E !important;

  box-shadow:
    0 3px 0 #64896B,
    0 5px 10px rgba(70, 105, 75, .15);
}

/* Hover: ยกปุ่มให้ลอยขึ้น */
:where(
  button,
  input[type="button"],
  input[type="submit"],
  input[type="reset"],
  a.button,
  a[class*="button"],
  .small-button,
  .account-link,
  .member-tab,
  .member-logout,
  .member-text-button
):not(:disabled):not([aria-disabled="true"]):hover {

  transform: translateY(-2px);
  filter: brightness(1.035);

  box-shadow:
    0 5px 0 var(--nara-pink-shadow),
    0 8px 14px rgba(101, 72, 61, .16),
    inset 0 1px 1px rgba(255,255,255,.9);
}

/* Active: ปุ่มยุบลงเมื่อกด */
:where(
  button,
  input[type="button"],
  input[type="submit"],
  input[type="reset"],
  a.button,
  a[class*="button"],
  .small-button,
  .account-link,
  .member-tab,
  .member-logout,
  .member-text-button
):not(:disabled):not([aria-disabled="true"]):active {

  transform: translateY(2px);

  box-shadow:
    0 1px 0 var(--nara-pink-shadow),
    0 2px 4px rgba(101, 72, 61, .12);
}

/* ปุ่ม Disabled */
:where(
  button,
  input[type="button"],
  input[type="submit"],
  input[type="reset"]
):disabled {

  opacity: .48;
  cursor: not-allowed;
  transform: none;
  filter: none;
  box-shadow: none;
}

/* ขอบเมื่อใช้แป้นพิมพ์ */
:where(
  button,
  input[type="button"],
  input[type="submit"],
  input[type="reset"],
  a.button,
  a[class*="button"]
):focus-visible {

  outline: 3px solid #93BA98;
  outline-offset: 4px;
}

/* ลดการเคลื่อนไหวสำหรับผู้ใช้ที่ตั้งค่าระบบไว้ */
@media (prefers-reduced-motion: reduce) {
  :where(button, a.button, input[type="button"], input[type="submit"]) {
    transition: none !important;
  }
}

/* =========================================
   NARANIN DAISY DECORATION FOR ALL BUTTONS
   White petals + yellow center
========================================= */

/* เตรียมพื้นที่สำหรับดอกไม้ */
:where(
  button,
  input[type="button"],
  input[type="submit"],
  input[type="reset"],
  a.button,
  a[class*="button"],
  .small-button,
  .account-link,
  .member-tab,
  .member-logout,
  .member-text-button
):not(#mainNav a) {
  position: relative;
  overflow: visible !important;
}

/* ดอกเดซี่ */
:where(
  button,
  input[type="button"],
  input[type="submit"],
  input[type="reset"],
  a.button,
  a[class*="button"],
  .small-button,
  .account-link,
  .member-tab,
  .member-logout,
  .member-text-button
):not(#mainNav a)::after {

  content: "";
  position: absolute;

  width: 17px;
  height: 17px;

  top: -7px;
  right: -6px;

  z-index: 5;
  pointer-events: none;

  background:
    radial-gradient(circle at 50% 50%,
      #FFD84F 0 17%,
      transparent 20%
    ),
    radial-gradient(circle at 50% 12%,
      #FFFFFF 0 19%,
      transparent 23%
    ),
    radial-gradient(circle at 88% 35%,
      #FFFFFF 0 19%,
      transparent 23%
    ),
    radial-gradient(circle at 74% 82%,
      #FFFFFF 0 19%,
      transparent 23%
    ),
    radial-gradient(circle at 26% 82%,
      #FFFFFF 0 19%,
      transparent 23%
    ),
    radial-gradient(circle at 12% 35%,
      #FFFFFF 0 19%,
      transparent 23%
    );

  filter: drop-shadow(0 1px 2px rgba(90,70,45,.20));

  transition: transform .2s ease;
}

/* ดอกไม้ขยับเล็กน้อยตอนชี้เมาส์ */
:where(
  button,
  a.button,
  a[class*="button"],
  .small-button,
  .account-link
):not(#mainNav a):hover::after {
  transform: rotate(15deg) scale(1.12);
}

/* มือถือ */
@media (max-width: 600px) {
  :where(
    button,
    a.button,
    a[class*="button"],
    .small-button,
    .account-link
  ):not(#mainNav a)::after {
    width: 15px;
    height: 15px;
    top: -6px;
    right: -5px;
  }
}

/* ==========================================
   NARANIN MINT PASTEL GARDEN THEME
   Global background and typography
========================================== */

:root {
  --nara-mint: #E3F0E6;
  --nara-green: #93BA98;
  --nara-pink: #F5D3DC;
  --nara-yellow: #F8E9B9;
  --nara-cream: #FFFCF8;
  --nara-brown: #65483D;
  --nara-white: #FFFFFF;
}

/* พื้นหลังหลัก */
html {
  background-color: var(--nara-mint);
}

body {
  background-color: var(--nara-mint) !important;
  color: var(--nara-brown);
}

/* หัวเว็บ */
.site-header {
  background-color: rgba(255, 252, 248, .96);
  color: var(--nara-brown);
}

/* แถบประกาศ */
.announcement {
  background-color: rgba(227, 240, 230, .92);
  color: var(--nara-brown);
}

/* หัวข้อหลัก */
h1, h2, h3, h4 {
  color: var(--nara-brown);
}

/* ข้อความทั่วไป */
main p,
main label,
main .novel-info,
main .video-card p {
  color: var(--nara-brown);
}

/* พื้นการ์ดเนื้อหา */
.novel-card,
.member-card,
.migration-card,
.admin-form-card,
.admin-backup-card {
  background-color: rgba(255, 252, 248, .97);
  color: var(--nara-brown);
}

/* หมวดพื้นสีมิ้นต์ */
.section-wrap:not(.intro) {
  background-color: rgba(227, 240, 230, .91);
  color: var(--nara-brown);
}

/* หมวดสีชมพู */
.section-wrap.soft-pink {
  background-color: rgba(245, 211, 220, .88);
  color: var(--nara-brown);
}

/* แถบนิยายแนะนำ */
.feature-band {
  background-color: rgba(227, 240, 230, .92);
  color: var(--nara-brown);
}

/* ห้อง E-book */
.ebook-band {
  background-color: rgba(248, 233, 185, .90);
  color: var(--nara-brown);
}

/* ส่วนบัญชีสมาชิก */
.account-section {
  background-color: rgba(227, 240, 230, .93);
  color: var(--nara-brown);
}

/* ส่วนเติมเหรียญ */
.coin-panel {
  background-color: rgba(245, 211, 220, .91);
  color: var(--nara-brown);
}

/* ส่วนท้ายเว็บไซต์ */
.site-footer {
  background-color: rgba(227, 240, 230, .97);
  color: var(--nara-brown);
}

.site-footer p,
.site-footer a {
  color: var(--nara-brown);
}

/* ข้อความขนาดเล็ก */
.muted,
.caption,
.novel-info p {
  color: #806B61;
}

/* ข้อความสีขาวบนพื้นเข้ม */
.dark-section,
.dark-section h1,
.dark-section h2,
.dark-section p,
.dark-section .eyebrow {
  color: var(--nara-white);
}

/* ปุ่มสีเขียวเข้ม ใช้ตัวอักษรขาว */
.button-green,
.button-success {
  color: var(--nara-white) !important;
}

/* ภาพสวนเดิมยังคงแสดงตาม CSS เดิม */
body,
.site-header,
main {
  background-blend-mode: normal;
}

/* ======================================
   NARANIN FLOWER PETAL FALL ANIMATION
====================================== */

.naranin-petal-layer {
  position: fixed;
  inset: 0;

  width: 100%;
  height: 100%;

  overflow: hidden;

  pointer-events: none;

  z-index: 900;

  contain: layout style;

}

/* กลีบดอกไม้แต่ละกลีบ */
.naranin-falling-petal {

  position: absolute;

  top: -25px;

  display: block;

  border-radius: 85% 10% 85% 15%;

  background: linear-gradient(
    145deg,
    #FFFFFF 0%,
    var(--petal-color, #F9DDE5) 60%,
    #E9B8C7 100%
  );

  opacity: 0;

  box-shadow:
    inset 1px 1px 2px rgba(255,255,255,.8),
    0 1px 3px rgba(110,80,75,.12);

  animation:
    naraninPetalFall
    var(--petal-duration, 14s)
    linear
    forwards;

  will-change: transform, opacity;

}

/* โปรยลงมาอย่างอ่อนโยน */
@keyframes naraninPetalFall {

  0% {
    transform:
      translate3d(0, -5vh, 0)
      rotate(0deg);
    opacity: 0;
  }

  12% {
    opacity: .78;
  }

  50% {
    transform:
      translate3d(var(--petal-mid-x), 48vh, 0)
      rotate(var(--petal-mid-rotation));
    opacity: .72;
  }

  85% {
    opacity: .65;
  }

  100% {
    transform:
      translate3d(var(--petal-end-x), 110vh, 0)
      rotate(var(--petal-end-rotation));
    opacity: 0;
  }

}

/* มือถือ: ลดการใช้ทรัพยากร */
@media (max-width: 600px) {

  .naranin-falling-petal {
    box-shadow: 0 1px 2px rgba(110,80,75,.10);
  }

}

/* ผู้ใช้ที่ไม่ต้องการภาพเคลื่อนไหว */
@media (prefers-reduced-motion: reduce) {

  .naranin-petal-layer {
    display: none !important;
  }

}

/* =========================================
   NARANIN GLOBAL TEXT CONTRAST SYSTEM
   Light background = Dark text
   Dark background = White text
========================================= */

:root {
  --nara-text-dark: #65483D;
  --nara-text-medium: #806B61;
  --nara-text-light: #FFFFFF;

  --nara-mint: #E3F0E6;
  --nara-green: #93BA98;
  --nara-pink: #F5D3DC;
  --nara-yellow: #F8E9B9;
  --nara-cream: #FFFCF8;
}

/* -----------------------------------------
   สีตัวอักษรพื้นฐานทุกหน้า
----------------------------------------- */

html,
body {
  color: var(--nara-text-dark);
}

body :is(
  h1, h2, h3, h4, h5, h6,
  p, li, label, small,
  figcaption, caption
) {
  color: var(--nara-text-dark);
}

/* ข้อความรอง */
body :is(
  .muted,
  .note,
  .caption,
  .copyright-main,
  .novel-meta,
  .chapter-meta
) {
  color: var(--nara-text-medium);
}

/* ลิงก์ทั่วไป */
body a:not(#mainNav a):not(.button):not(.account-link) {
  color: #76564A;
}

/* -----------------------------------------
   พื้นหลังสว่าง: ตัวอักษรน้ำตาล
----------------------------------------- */

.site-header,
.announcement,
.section-wrap,
.feature-band,
.ebook-band,
.account-section,
.coin-panel,
.site-footer,
.novel-card,
.member-card,
.migration-card,
.firebase-check {
  color: var(--nara-text-dark);
}

.site-header :is(
  h1, h2, h3, p, small, span
),
.announcement :is(
  p, small, span
),
.section-wrap :is(
  h1, h2, h3, h4, p, li, small, label
),
.feature-band :is(
  h1, h2, h3, p, small
),
.novel-card :is(
  h2, h3, p, small, span
),
.member-card :is(
  h1, h2, h3, p, label, small
),
.site-footer :is(
  p, small, a
) {
  color: var(--nara-text-dark);
}

/* -----------------------------------------
   ช่องกรอกข้อมูล
----------------------------------------- */

body :is(input, textarea, select) {
  background-color: var(--nara-cream);
  color: var(--nara-text-dark);
  border-color: #D9B9B9;
}

body :is(input, textarea, select)::placeholder {
  color: #89776E;
  opacity: 1;
}

/* -----------------------------------------
   พื้นเข้ม: ตัวอักษรสีขาว
   ใช้กับส่วนที่กำหนดเป็น dark surface
----------------------------------------- */

:where(
  .dark-section,
  .nara-dark-surface,
  .reader-night,
  .night-mode,
  [data-theme="dark"]
) {
  color: var(--nara-text-light) !important;
}

:where(
  .dark-section,
  .nara-dark-surface,
  .reader-night,
  .night-mode,
  [data-theme="dark"]
) :is(
  h1, h2, h3, h4, h5, h6,
  p, li, label, small,
  span, strong, em, figcaption
):not(.button):not(.icon) {
  color: var(--nara-text-light) !important;
}

/* ช่องกรอกบนพื้นมืด */
:where(
  .dark-section,
  .nara-dark-surface,
  .reader-night,
  .night-mode,
  [data-theme="dark"]
) :is(input, textarea, select) {
  background-color: #34463A !important;
  color: #FFFFFF !important;
  border-color: #789B7D !important;
}

:where(
  .dark-section,
  .nara-dark-surface,
  .reader-night,
  .night-mode,
  [data-theme="dark"]
) :is(input, textarea, select)::placeholder {
  color: #E2E9E1 !important;
}

/* -----------------------------------------
   ตัวอักษรบนปุ่ม
----------------------------------------- */

/* ปุ่มพาสเทล */
#mainNav a,
.button,
.small-button,
.account-link,
.member-tab {
  color: var(--nara-text-dark);
}

/* ปุ่มสีเข้ม */
.button-green,
.button-success {
  color: #FFFFFF !important;
}

/* -----------------------------------------
   ข้อความแจ้งเตือน
----------------------------------------- */

.member-message[data-type="success"] {
  color: #416F4B;
}

.member-message[data-type="error"] {
  color: #9A354A;
}

.member-message[data-type="info"] {
  color: #65483D;
}

/* =========================================
   NARANIN READER - TRUE THEME TEXT COLORS
   Match read.html: data-theme="light/paper/night"
========================================= */

/* โหมดสว่าง */
#readerPaper[data-theme="light"] {
  background: #FFFCF8 !important;
  color: #65483D !important;
}

#readerPaper[data-theme="light"] .reader-heading h1,
#readerPaper[data-theme="light"] .reader-heading p,
#readerPaper[data-theme="light"] .reader-content,
#readerPaper[data-theme="light"] .reader-content * {
  color: #65483D !important;
}

/* โหมดกระดาษ */
#readerPaper[data-theme="paper"] {
  background: #F3EBDD !important;
  color: #65483D !important;
}

#readerPaper[data-theme="paper"] .reader-heading h1,
#readerPaper[data-theme="paper"] .reader-heading p,
#readerPaper[data-theme="paper"] .reader-content,
#readerPaper[data-theme="paper"] .reader-content * {
  color: #65483D !important;
}

/* โหมดกลางคืน */
#readerPaper[data-theme="night"] {
  background: #252B2B !important;
  color: #F7F2E9 !important;
}

#readerPaper[data-theme="night"] .reader-heading h1,
#readerPaper[data-theme="night"] .reader-heading p,
#readerPaper[data-theme="night"] .reader-content,
#readerPaper[data-theme="night"] .reader-content * {
  color: #F7F2E9 !important;
}

/* ลิงก์ในเนื้อหานิยาย */
#readerPaper[data-theme="night"] .reader-content a {
  color: #F3C4D1 !important;
  text-decoration: underline;
}

/* ดอกไม้คั่นกลางเรื่อง */
#readerPaper[data-theme="night"] .reader-flower-divider {
  color: #F3C4D1 !important;
}

/* รักษาขนาดตัวอักษรที่ผู้อ่านเลือก */
#readerPaper .reader-content {
  font-family: inherit;
  line-height: inherit;
}

/* ป้องกันตัวหนังสือจางเกินไป */
#readerPaper[data-theme="night"] .reader-content {
  opacity: 1 !important;
}


/* NARANIN Reader: styles target the actual #readerPaper element in read.html. */
#readerPaper {
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
#readerPaper[data-theme="light"] {
  background: #FFFCF8;
  border-color: #E7D6D1;
  color: #65483D;
}
#readerPaper[data-theme="light"] .reader-heading h1,
#readerPaper[data-theme="light"] #readerChapterLabel,
#readerPaper[data-theme="light"] #readerContent,
#readerPaper[data-theme="light"] #readerContent p {
  color: #65483D !important;
}
#readerPaper[data-theme="paper"] {
  background: #F3E8D6;
  border-color: #D9C4A0;
  color: #5B4938;
}
#readerPaper[data-theme="paper"] .reader-heading h1,
#readerPaper[data-theme="paper"] #readerChapterLabel,
#readerPaper[data-theme="paper"] #readerContent,
#readerPaper[data-theme="paper"] #readerContent p {
  color: #5B4938 !important;
}
#readerPaper[data-theme="night"] {
  background: #252B2D;
  border-color: #596466;
  color: #F7F2E9;
}
#readerPaper[data-theme="night"] .reader-heading h1,
#readerPaper[data-theme="night"] #readerChapterLabel,
#readerPaper[data-theme="night"] #readerContent,
#readerPaper[data-theme="night"] #readerContent p {
  color: #F7F2E9 !important;
}
#readerPaper[data-theme="night"] hr {
  border-top-color: #596466 !important;
}
#readerPaper .reader-toolbar button.active {
  outline: 2px solid #D99EAD;
  outline-offset: 1px;
}
#readerPaper[data-theme="night"] .reader-toolbar button {
  background: #394245;
  color: #F7F2E9;
  border-color: #657274;
}
#readerPaper[data-theme="night"] .reader-toolbar button.active {
  background: #A97483;
  color: #FFFFFF;
  border-color: #D6A0AE;
}
#readerPaper[data-theme="night"] #readerDemoNotice {
  background: #394245;
  border-color: #657274;
  color: #F7F2E9;
}

/* ===== NARANIN READER FONT SIZE CONTROL FIX =====
   The selected font size is controlled by --reader-font-size.
   This rule intentionally targets the actual paragraphs rendered from Firebase.
*/
#readerPaper {
  --reader-font-size: 17px;
}

#readerPaper #readerContent,
#readerPaper #readerContent p {
  font-size: var(--reader-font-size, 17px) !important;
}

#readerPaper #readerContent {
  line-height: 2.05;
  transition: font-size .18s ease;
}

#readerPaper #readerContent p {
  line-height: inherit;
  transition: font-size .18s ease;
}

#readerPaper .reader-toolbar button:disabled {
  opacity: .45;
  cursor: not-allowed;
  filter: grayscale(.25);
}

#readerPaper .reader-toolbar button:focus-visible {
  outline: 3px solid #D99EAD;
  outline-offset: 3px;
}

@media (max-width: 650px) {
  #readerPaper #readerContent,
  #readerPaper #readerContent p {
    line-height: 1.95;
  }
}
