/*
Theme Name: Thoughting
Theme URI: https://thoughting.in/
Description: Where thoughts become stories. A dark, literary reading theme for serial stories in parts and short pieces. Needs the Thoughting Stories plugin.
Author: Thoughting
Version: 3.6.1
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: thoughting
*/
:root {
  --bg: #0e1220; --bg2: #161c30; --bg3: #1d2440; --ink: #eceef6; --muted: #9aa3b8; --line: #283151; --accent: #e8c07a; --accent2: #f3d9a4;
  --violet: #9b8cff; --cyan: #7fd6e6; --rose: #f39cb8; --gold: #e8c07a;
  --romance: #f39cb8; --kids: #7fd6e6; --horror: #9b8cff; --crime: #e8c07a; --thoughts: #c9b8ff; --fantasy: #b48cff; --scifi: #6fd3ff; --mythology: #ffb36b; --drama: #f2a3c0; --comedy: #ffd166; --adventure: #8fe3a8; --greentext: #9ad35a;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, "Noto Serif", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --reader-size: 1.18rem; --radius: 18px; --shadow: 0 18px 50px rgba(0, 0, 0, .45); --glow: 0 0 0 1px rgba(232, 192, 122, .25), 0 18px 50px rgba(155, 140, 255, .18);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
html[data-theme="light"] { --bg: #f5f1ea; --bg2: #fffdf9; --bg3: #f0eadf; --ink: #1c2238; --muted: #666d80; --line: #e2dccf; --accent: #b8792a; --accent2: #d9a24d; --shadow: 0 14px 40px rgba(28, 34, 56, .12); --glow: 0 0 0 1px rgba(184, 121, 42, .25), 0 18px 50px rgba(28, 34, 56, .12);
  --romance: #c2456f; --kids: #2e8bc0; --horror: #5b3a8a; --crime: #8a6d1f; --thoughts: #6b5cff; --fantasy: #6a3fc9; --scifi: #1f7fb5; --mythology: #b8621c; --drama: #b0446d; --comedy: #b07a10; --adventure: #2a8a4a; --greentext: #5a8a1a; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.6; position: relative; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0; background: var(--grain); opacity: .28; pointer-events: none; z-index: 0; mix-blend-mode: screen; }
html[data-theme="light"] body::before { mix-blend-mode: multiply; opacity: .45; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #111; padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hp { position: absolute; left: -9999px; }
main.site-main { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 24px 22px 70px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.012em; }
h1 { font-size: 2.4rem; margin: .2em 0 .3em; line-height: 1.12; }
h2 { font-size: 1.55rem; margin: 1.6em 0 .6em; }
.eyebrow { display: inline-block; font-family: var(--sans); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 4px; }
.notice { color: var(--muted); padding: 30px 0; text-align: center; }
img { max-width: 100%; height: auto; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .reveal { opacity: 1 !important; transform: none !important; } }

/* drifting mist behind everything */
.mist { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.mist i { position: absolute; width: 60vw; height: 60vw; border-radius: 50%; filter: blur(80px); opacity: .28; animation: mist 40s ease-in-out infinite alternate; }
.mist i:nth-child(1) { left: -20vw; top: -10vw; background: var(--violet); }
.mist i:nth-child(2) { right: -25vw; top: 20vh; background: var(--cyan); opacity: .16; animation-duration: 55s; }
.mist i:nth-child(3) { left: 20vw; bottom: -30vw; background: var(--rose); opacity: .14; animation-duration: 48s; }
html[data-theme="light"] .mist i { opacity: .16; }
@keyframes mist { to { transform: translate(6vw, 4vh) scale(1.12); } }
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
html.js .reveal.in { opacity: 1; transform: none; }

/* header */
header.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; padding: 10px 22px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); flex-wrap: wrap; }
header.top::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, var(--gold), var(--rose), var(--violet), var(--cyan)); opacity: .9; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--serif); font-size: 1.45rem; font-weight: 600; letter-spacing: -.02em; color: var(--ink); }
.brand .mark { transition: transform .25s; } .brand:hover .mark { transform: rotate(-6deg) scale(1.06); }
.brand .word i { font-style: normal; color: var(--accent); font-size: .8em; }
.mark .book { fill: var(--bg2); } .mark .lines { stroke: currentColor; }
header nav { display: flex; gap: 2px; flex-wrap: wrap; }
header nav a { padding: 7px 12px; border-radius: 999px; font-size: .92rem; color: var(--muted); transition: background .2s, color .2s; }
header nav a:hover, header nav a.current { background: color-mix(in srgb, var(--ink) 9%, transparent); color: var(--ink); }
.menu-btn { display: none; border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 10px; width: 40px; height: 36px; font-size: 1.1rem; cursor: pointer; }
header .search { margin-left: auto; }
header .search input { border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font: inherit; background: var(--bg2); color: var(--ink); width: 190px; transition: width .25s, box-shadow .25s; }
header .search input:focus { outline: none; width: 250px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
header .theme { border: 1px solid var(--line); background: var(--bg2); color: var(--ink); border-radius: 999px; width: 36px; height: 36px; cursor: pointer; }
#readbar { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--gold), var(--rose)); z-index: 11; transition: width .1s linear; }

/* hero */
.hero { position: relative; overflow: hidden; margin: 8px 0 0; border-radius: 28px; padding: 86px 22px 78px; text-align: center; color: #f2efff; box-shadow: var(--shadow); isolation: isolate;
  background: radial-gradient(900px 500px at 50% 115%, rgba(232, 192, 122, .35) 0%, transparent 55%), radial-gradient(700px 400px at 15% 10%, rgba(155, 140, 255, .35), transparent 60%), radial-gradient(600px 400px at 90% 30%, rgba(127, 214, 230, .22), transparent 60%), linear-gradient(180deg, #0b0f1e 0%, #171c3a 60%, #2a2450 100%); }
.hero::after { content: ""; position: absolute; inset: 0; background: var(--grain); opacity: .4; mix-blend-mode: overlay; pointer-events: none; }
.hero .ink { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(closest-side at 30% 70%, rgba(243, 156, 184, .18), transparent), radial-gradient(closest-side at 75% 60%, rgba(127, 214, 230, .16), transparent); filter: blur(30px); animation: mist 30s ease-in-out infinite alternate; }
.hero .sky { position: absolute; inset: 0; pointer-events: none; }
.hero .sky i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff; opacity: .6; animation: drift 14s ease-in-out infinite; box-shadow: 0 0 10px 2px rgba(255,255,255,.35); }
.hero .sky i:nth-child(1) { left: 8%; top: 55%; } .hero .sky i:nth-child(2) { left: 18%; top: 28%; animation-delay: -3s; } .hero .sky i:nth-child(3) { left: 84%; top: 24%; animation-delay: -6s; }
.hero .sky i:nth-child(4) { left: 66%; top: 66%; animation-delay: -9s; width: 3px; height: 3px; } .hero .sky i:nth-child(5) { left: 30%; top: 74%; animation-delay: -12s; } .hero .sky i:nth-child(6) { left: 92%; top: 62%; animation-delay: -5s; width: 3px; height: 3px; } .hero .sky i:nth-child(7) { left: 45%; top: 14%; animation-delay: -8s; width: 3px; height: 3px; }
.hero .moon { position: absolute; right: 11%; top: 30px; width: 58px; height: 58px; border-radius: 50%; background: #fff2d6; box-shadow: -16px -7px 0 5px #171c3a inset, 0 0 40px 12px rgba(255, 240, 200, .28); opacity: .9; }
@keyframes drift { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-14px) } }
.hero > * { position: relative; z-index: 1; }
.hero-mark { color: #f2efff; margin-bottom: 8px; filter: drop-shadow(0 6px 18px rgba(0,0,0,.4)); }
.hero-mark .mark .book { fill: #1b1f3a; } .hero-mark .mark .lines { stroke: #f2efff; }
.hero h1 { font-size: clamp(2.8rem, 6.4vw, 4.6rem); margin: 0 0 .1em; font-weight: 700; letter-spacing: -.03em; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.hero h1 span { color: var(--gold); font-weight: 400; font-size: .55em; vertical-align: .18em; letter-spacing: 0; }
.hero .hero-tag { font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: #f2efff; margin: 0 0 14px; }
.hero p.lede { color: rgba(242, 239, 255, .78); max-width: 640px; margin: 0 auto; font-size: 1.06rem; }
.hero .cta { display: flex; gap: 12px; justify-content: center; margin: 26px 0 0; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); color: var(--ink); font: inherit; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--glow); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #17130a; font-weight: 600; box-shadow: 0 10px 30px rgba(232, 192, 122, .25); }
.btn.ghost { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.3); color: #f2efff; backdrop-filter: blur(6px); }
.btn.icon { padding: 8px 12px; }
.btn.disabled { color: var(--muted); cursor: default; } .btn.disabled:hover { transform: none; box-shadow: none; }
.btn:disabled { opacity: .6; cursor: wait; }

.intro { text-align: center; max-width: 720px; margin: 34px auto 0; font-family: var(--serif); font-size: 1.35rem; line-height: 1.5; color: var(--ink); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 40px 0 16px; }
.section-head h2 { margin: 0; }
.section-head > a, .section-head .meta { color: var(--muted); font-size: .9rem; }
.page-head { text-align: center; padding: 30px 0 8px; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.page-head p { color: var(--muted); max-width: 620px; margin: 0 auto; font-size: 1.05rem; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg2); color: var(--ink); font: inherit; font-size: .9rem; cursor: pointer; transition: background .2s, border-color .2s, transform .15s; }
.chip small { color: var(--muted); font-size: .78rem; }
.chip:hover { transform: translateY(-1px); border-color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #17130a; font-weight: 600; }
.chip.active small { color: #17130a; }
.chip-rows { display: grid; gap: 8px; }
.chips-label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-right: 4px; min-width: 52px; }
.chip.active.mood-love, .chip.active.mood-dreams, .chip.active.mood-loneliness, .chip.active.mood-hope, .chip.active.mood-mystery, .chip.active.mood-memory { border-color: var(--accent); }
.chip.mood-love { border-color: color-mix(in srgb, var(--rose) 50%, var(--line)); } .chip.mood-dreams { border-color: color-mix(in srgb, var(--cyan) 50%, var(--line)); }
.chip.mood-loneliness { border-color: color-mix(in srgb, var(--violet) 50%, var(--line)); } .chip.mood-hope { border-color: color-mix(in srgb, var(--gold) 50%, var(--line)); }
.chip.mood-mystery { border-color: color-mix(in srgb, var(--horror) 50%, var(--line)); } .chip.mood-memory { border-color: color-mix(in srgb, var(--thoughts) 50%, var(--line)); } .chip.mood-abstract { border-color: color-mix(in srgb, var(--violet) 40%, var(--line)); }
.tag { display: inline-block; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; border-radius: 999px; padding: 3px 10px; font-weight: 600; background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--muted); }
.tag.romance { color: var(--romance); background: color-mix(in srgb, var(--romance) 14%, transparent); } .tag.kids { color: var(--kids); background: color-mix(in srgb, var(--kids) 14%, transparent); }
.tag.horror { color: var(--horror); background: color-mix(in srgb, var(--horror) 16%, transparent); } .tag.crime { color: var(--crime); background: color-mix(in srgb, var(--crime) 16%, transparent); }
.tag.thoughts { color: var(--thoughts); background: color-mix(in srgb, var(--thoughts) 16%, transparent); }
.tag.fantasy { color: var(--fantasy); background: color-mix(in srgb, var(--fantasy) 16%, transparent); } .tag.scifi { color: var(--scifi); background: color-mix(in srgb, var(--scifi) 16%, transparent); } .tag.mythology { color: var(--mythology); background: color-mix(in srgb, var(--mythology) 16%, transparent); } .tag.drama { color: var(--drama); background: color-mix(in srgb, var(--drama) 16%, transparent); } .tag.comedy { color: var(--comedy); background: color-mix(in srgb, var(--comedy) 16%, transparent); } .tag.greentext { color: var(--greentext); background: color-mix(in srgb, var(--greentext) 16%, transparent); } .tag.adventure { color: var(--adventure); background: color-mix(in srgb, var(--adventure) 16%, transparent); } 
.tag.mood { background: color-mix(in srgb, var(--violet) 12%, transparent); color: var(--muted); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }

/* genre rooms */
.genres { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 30px 0 10px; }
@media (min-width: 1000px) { .genres { grid-template-columns: repeat(5, 1fr); } .genre-card { min-height: 230px; padding: 20px 18px 16px; } .genre-card h2 { font-size: 1.3rem; } }
.genre-card { position: relative; display: block; overflow: hidden; border-radius: var(--radius); padding: 22px 20px 18px; color: #fff; min-height: 210px; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; isolation: isolate; }
.genre-card::after { content: ""; position: absolute; inset: 0; background: var(--grain); opacity: .35; mix-blend-mode: overlay; pointer-events: none; }
.genre-card:hover { transform: translateY(-4px); box-shadow: var(--glow); }
.genre-card .emblem { width: 48px; height: 48px; margin-bottom: 12px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.3)); }
.genre-card h2 { margin: 0 0 6px; font-size: 1.4rem; color: #fff; }
.genre-card p { margin: 0 0 10px; color: rgba(255,255,255,.82); font-size: .9rem; }
.genre-card small { color: rgba(255,255,255,.75); font-weight: 500; }
.genre-card.romance { background: linear-gradient(160deg, #c94a77, #6e2a52 70%, #40173a); }
.genre-card.kids { background: linear-gradient(160deg, #3f98c9, #245a9a 70%, #183a6b); }
.genre-card.horror { background: linear-gradient(160deg, #4a2f7a, #201a3d 70%, #0f0c22); }
.genre-card.crime { background: linear-gradient(160deg, #a57d2a, #614412 70%, #35260a); }
.genre-card.thoughts { background: linear-gradient(160deg, #6b5cff, #3b2f9a 70%, #1f1a5a); }
.genre-card.fantasy { background: linear-gradient(160deg, #7b4fd6, #2a1a5e 70%, #160d33); }
.genre-card.scifi { background: linear-gradient(160deg, #2b7fd6, #173f7a 70%, #0c1f44); }
.genre-card.mythology { background: linear-gradient(160deg, #c9862a, #7a3f12 70%, #3a1c08); }
.genre-card.drama { background: linear-gradient(160deg, #b0446d, #5a2a4a 70%, #2e1430); }
.genre-card.comedy { background: linear-gradient(160deg, #e0a422, #8a5a10 70%, #3d2806); }
.genre-card.greentext { background: linear-gradient(160deg, #3d5a1e, #1f2e10 70%, #0f180a); }
.genre-card.adventure { background: linear-gradient(160deg, #2f9a5a, #1a5a3a 70%, #0d3322); }
.genre-head { position: relative; margin: 6px 0 22px; padding: 46px 26px 40px; color: #fff; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); }
.genre-head::after { content: ""; position: absolute; inset: 0; background: var(--grain); opacity: .3; mix-blend-mode: overlay; pointer-events: none; }
.genre-head > * { position: relative; z-index: 1; }
.genre-head h1 { display: flex; align-items: center; gap: 14px; color: #fff; font-size: 2.6rem; }
.genre-head p { color: rgba(255,255,255,.85); font-size: 1.05rem; max-width: 640px; }
.genre-head.romance { background: linear-gradient(135deg, #c94a77, #40173a); } .genre-head.kids { background: linear-gradient(135deg, #3f98c9, #183a6b); }
.genre-head.horror { background: linear-gradient(135deg, #4a2f7a, #0f0c22); } .genre-head.crime { background: linear-gradient(135deg, #a57d2a, #35260a); }
.genre-head.thoughts { background: linear-gradient(135deg, #6b5cff, #1f1a5a); }
.genre-head.fantasy { background: linear-gradient(135deg, #7b4fd6, #160d33); } .genre-head.scifi { background: linear-gradient(135deg, #2b7fd6, #0c1f44); } .genre-head.mythology { background: linear-gradient(135deg, #c9862a, #3a1c08); } .genre-head.drama { background: linear-gradient(135deg, #b0446d, #2e1430); } .genre-head.comedy { background: linear-gradient(135deg, #e0a422, #3d2806); } .genre-head.greentext { background: linear-gradient(135deg, #3d5a1e, #0f180a); } .genre-head.adventure { background: linear-gradient(135deg, #2f9a5a, #0d3322); } .genre-head.plain { background: linear-gradient(135deg, #2b2f5e, #0b0f1e); }
.genre-head form { display: flex; gap: 8px; }
.genre-head input { flex: 1; font: inherit; padding: 11px 16px; border: 1px solid rgba(255,255,255,.4); border-radius: 12px; background: rgba(255,255,255,.14); color: #fff; }
.genre-head input::placeholder { color: rgba(255,255,255,.7); }

/* story cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.card { display: grid; grid-template-columns: 100px 1fr; gap: 16px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; transition: transform .22s, box-shadow .22s, border-color .22s; position: relative; }
.card:hover { transform: translateY(-3px); box-shadow: var(--glow); border-color: transparent; }
.card.mini { grid-template-columns: 1fr; }
.cover { position: relative; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 24px rgba(0,0,0,.35); background: linear-gradient(160deg, #2b2f5e, #17203a); color: #fff; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.card:hover .cover img { transform: scale(1.04); }
.cover.gen { display: flex; align-items: flex-end; padding: 8px; }
.cover.gen::before { content: attr(data-initial); position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); font-family: var(--serif); font-size: 3rem; font-weight: 700; opacity: .9; }
.cover.gen span { font-size: .6rem; line-height: 1.2; font-weight: 600; opacity: .9; }
.cover.romance { background: linear-gradient(160deg, #c94a77, #40173a); } .cover.kids { background: linear-gradient(160deg, #3f98c9, #183a6b); } .cover.horror { background: linear-gradient(160deg, #4a2f7a, #0f0c22); } .cover.crime { background: linear-gradient(160deg, #a57d2a, #35260a); } .cover.thoughts { background: linear-gradient(160deg, #6b5cff, #1f1a5a); }
.cover.fantasy { background: linear-gradient(160deg, #7b4fd6, #160d33); } .cover.scifi { background: linear-gradient(160deg, #2b7fd6, #0c1f44); } .cover.mythology { background: linear-gradient(160deg, #c9862a, #3a1c08); } .cover.drama { background: linear-gradient(160deg, #b0446d, #2e1430); } .cover.comedy { background: linear-gradient(160deg, #e0a422, #3d2806); } .cover.greentext { background: linear-gradient(160deg, #3d5a1e, #0f180a); } .cover.adventure { background: linear-gradient(160deg, #2f9a5a, #0d3322); }
.card .body { min-width: 0; display: flex; flex-direction: column; }
.card h3 { margin: 2px 0 4px; font-size: 1.12rem; line-height: 1.25; }
.card .tagline { color: var(--muted); font-size: .92rem; margin: 0 0 8px; font-style: italic; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta, .meta { color: var(--muted); font-size: .85rem; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 8px; }
.bar { flex: 1; height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--rose)); }
.like { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: 6px 12px; cursor: pointer; font: inherit; font-size: .85rem; transition: color .2s, border-color .2s, transform .15s; }
.like.small { padding: 4px 10px; }
.like:hover { color: var(--rose); border-color: var(--rose); }
.like.on { color: var(--rose); border-color: var(--rose); }
.like.on svg path { fill: var(--rose); }
.like:active { transform: scale(.94); }

.parts-feed { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.parts-feed li a { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; padding: 11px 14px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); transition: transform .2s, border-color .2s; }
.parts-feed li a:hover { transform: translateX(4px); border-color: var(--accent); }

/* opening line, fragments, newsletter */
.opening { margin: 40px auto 6px; max-width: 760px; text-align: center; }
.opening blockquote { font-family: var(--serif); font-size: 1.5rem; font-style: italic; line-height: 1.5; margin: 6px 0 8px; color: var(--ink); }
.opening blockquote::before { content: "“"; color: var(--accent); font-size: 1.6em; line-height: 0; vertical-align: -.25em; margin-right: .05em; }
.opening .meta a { border-bottom: 1px solid var(--accent); }
.frag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.frag-grid.big { margin-top: 20px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.frag { margin: 0; padding: 20px 22px; border-radius: 16px; background: var(--bg2); border: 1px solid var(--line); border-left: 3px solid var(--violet); font-family: var(--serif); font-size: 1.12rem; line-height: 1.5; transition: transform .2s, box-shadow .2s; }
.frag:hover { transform: translateY(-2px); box-shadow: var(--glow); }
.frag footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.frag .like.small { padding: 4px 8px; }
.frag .acts { display: flex; align-items: center; gap: 10px; }
.play { font: inherit; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--accent); cursor: pointer; font-size: .7rem; line-height: 1; transition: transform .15s, background .15s; }
.play:hover { transform: scale(1.1); background: var(--bg3); }
.narration { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; padding: 12px 16px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); }
.narration audio { flex: 1; height: 36px; min-width: 0; } .narration .eyebrow { margin: 0; } .frag .plot { font-family: var(--sans); font-size: .78rem; color: var(--gold); white-space: nowrap; }
.from-prompt { border-left-color: var(--gold); font-family: var(--serif); font-style: italic; }
.frag-cta { margin: 18px 0 0; color: var(--muted); font-size: .95rem; }
.frag.pending { border-style: dashed; border-color: var(--gold); background: color-mix(in oklab, var(--gold) 6%, var(--bg2)); }
.frag.pending.gone { opacity: 0; transform: scale(.96); transition: opacity .35s, transform .35s; }
.frag .judge { display: flex; gap: 6px; }
.frag .judge button { font: inherit; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; font-size: 1.1rem; transition: transform .15s, background .15s, color .15s; }
.frag .judge .heart:hover { background: var(--rose); color: #fff; border-color: var(--rose); transform: scale(1.1); }
.frag .judge .pass:hover { background: var(--bg3, var(--bg2)); transform: scale(1.1); }
.story-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 44px; align-items: start; }
.loved { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; padding: 22px 22px 18px; border-radius: 20px; background: var(--bg2); border: 1px solid var(--line); scrollbar-width: thin; }
.loved h3 { margin: 4px 0 12px; font-size: 1.25rem; }
.loved .waiting.small { margin: 0 0 22px; padding: 14px 16px; border-radius: 16px; }
.loved .waiting.small h3 { font-size: 1.05rem; }
.thoughts, .wait-grid:not(.frag-grid) { display: grid; gap: 10px; }
.thought { padding: 14px 16px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--rose); font-size: .96rem; line-height: 1.5; }
.thought p { margin: 0 0 8px; font-family: var(--serif); }
.thought footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.thought cite { font-family: var(--sans); font-style: normal; font-size: .74rem; letter-spacing: .04em; color: var(--muted); } .thought cite a { color: var(--accent); }
.thought.pending { border-style: dashed; border-color: var(--gold); border-left-width: 3px; }
.thought.pending.gone { opacity: 0; transform: scale(.96); transition: opacity .35s, transform .35s; }
.thought .judge { display: flex; gap: 6px; } .thought .judge button { font: inherit; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg2); color: var(--ink); cursor: pointer; transition: transform .15s, background .15s, color .15s; }
.thought .judge .heart:hover { background: var(--rose); color: #fff; border-color: var(--rose); transform: scale(1.1); } .thought .judge .pass:hover { transform: scale(1.1); }
.thought.new { animation: fragin .5s ease-out; }
.say { margin: 40px 0 0; padding-top: 26px; border-top: 1px solid var(--line); }
.say h3 { margin: 4px 0 14px; }
.say .th-form.stack { padding: 20px; }
@media (max-width: 1000px) { .story-layout { grid-template-columns: 1fr; } .loved { position: static; max-height: none; } }
.waiting { margin: 30px auto 0; padding: 24px; border-radius: 22px; border: 1px dashed var(--gold); }
.waiting .count { display: inline-block; min-width: 1.6em; padding: 0 .5em; margin-left: 6px; border-radius: 999px; background: var(--gold); color: #1b1633; font-family: var(--sans); font-size: .8rem; line-height: 1.7; text-align: center; vertical-align: middle; }
.prompt-wrap { margin-top: 48px; }
.prompt-wrap .section-head { margin-bottom: 14px; }
.frag.new { animation: fragin .5s ease-out; }
@keyframes fragin { from { opacity: 0; transform: translateY(8px); } }
.frag p { margin: 0 0 8px; } .frag cite { font-family: var(--sans); font-style: normal; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.frag.mood-love { border-left-color: var(--rose); } .frag.mood-dreams { border-left-color: var(--cyan); } .frag.mood-hope { border-left-color: var(--gold); } .frag.mood-memory { border-left-color: var(--thoughts); } .frag.mood-mystery { border-left-color: var(--horror); }
.newsletter { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; margin-top: 44px; padding: 30px; border-radius: 24px; background: linear-gradient(135deg, var(--bg2), var(--bg3)); border: 1px solid var(--line); }
.newsletter h2 { margin: 4px 0 6px; } .newsletter p { color: var(--muted); margin: 0; }
.th-form.inline { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: start; }
.th-form.inline .form-msg { grid-column: 1 / -1; }

/* stories browser */
.browser .toolbar { display: grid; gap: 14px; margin: 18px 0 8px; }
.browser .tools { display: flex; gap: 10px; flex-wrap: wrap; }
.browser input, .browser select, .th-form input, .th-form select, .th-form textarea { font: inherit; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); color: var(--ink); }
.browser input { flex: 1; min-width: 220px; }
.browser .count { margin: 4px 0 14px; min-height: 1.2em; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); border: 1px dashed var(--line); border-radius: 20px; }
.empty .mark { color: var(--muted); } .empty h3 { color: var(--ink); margin: 10px 0 4px; } .empty a { color: var(--accent); }
.more { text-align: center; margin: 24px 0 0; }

/* story page */
.story-head { display: grid; grid-template-columns: 230px 1fr; gap: 34px; align-items: start; margin-top: 12px; }
.story-head .cover { border-radius: 14px; box-shadow: var(--shadow); position: sticky; top: 84px; }
.story-head .cover.gen::before { font-size: 5rem; }
.crumbs { color: var(--muted); font-size: .9rem; }
.story-head h1 { font-size: clamp(2rem, 4.6vw, 2.8rem); }
.story-head .tagline { font-family: var(--serif); font-style: italic; font-size: 1.2rem; }
.story-head .synopsis { max-width: 640px; font-size: 1.02rem; } .story-head .synopsis p { margin: 0 0 1em; }
.actions { display: flex; gap: 10px; margin: 14px 0 20px; flex-wrap: wrap; align-items: center; }
.share { display: inline-flex; gap: 6px; margin-left: 4px; }
.author-note { margin: 22px 0 0; padding: 16px 20px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); border-left: 3px solid var(--accent); }
.author-note p { margin: 4px 0 0; font-family: var(--serif); font-style: italic; }
.parts { margin-top: 28px; }
.parts-list { list-style: none; padding: 0; margin: 0; max-width: 720px; }
.parts-list li a { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; padding: 12px 10px; border-bottom: 1px solid var(--line); align-items: center; border-radius: 10px; transition: background .2s; }
.parts-list li a:hover { background: var(--bg2); }
.parts-list .no { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .78rem; font-weight: 600; background: color-mix(in srgb, var(--ink) 10%, transparent); }
.parts-list .title { font-family: var(--serif); font-size: 1.05rem; } .parts-list .mins { color: var(--muted); font-size: .84rem; }
.parts-list li.read .no { background: var(--accent); color: #17130a; }
.parts-list li.current a { background: var(--bg2); box-shadow: inset 3px 0 0 var(--accent); }

/* reader */
.reader { max-width: 780px; margin: 10px auto 0; }
.reader .page { background: var(--bg2); border: 1px solid var(--line); border-radius: 22px; padding: 46px 54px 40px; box-shadow: var(--shadow); position: relative; }
.reader .page::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--grain); opacity: .25; pointer-events: none; }
.reader .page > * { position: relative; }
.reader h1 { font-size: 2.1rem; margin: 6px 0 4px; }
.reader h1 .no { display: block; font-family: var(--sans); font-size: .72rem; color: var(--accent); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 10px; font-weight: 600; }
.reader .byline { color: var(--muted); font-size: .9rem; margin: 0 0 8px; }
.reader-tools { display: flex; gap: 6px; justify-content: flex-end; align-items: center; margin: 2px 0 20px; }
.reader-tools button:not(.like) { border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 8px; padding: 4px 10px; cursor: pointer; font: inherit; }
.reader .body { font-family: var(--serif); font-size: var(--reader-size); line-height: 1.85; }
.reader .body p { margin: 0 0 1.15em; }
.reader .body > p:first-of-type::first-letter { font-size: 3.1em; float: left; line-height: .8; padding: .1em .14em 0 0; color: var(--accent); font-weight: 600; }
.reader .fin { text-align: center; color: var(--accent); font-size: 1.6rem; margin: 26px 0 6px; letter-spacing: .3em; }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; margin: 26px 0 0; align-items: center; }
.pager .next, .pager .prev { display: grid; gap: 2px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg2); transition: transform .2s, box-shadow .2s; }
.pager .next { text-align: right; background: var(--accent); color: #17130a; border-color: var(--accent); }
.pager .next:hover, .pager .prev:hover { transform: translateY(-2px); box-shadow: var(--glow); }
.pager small { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.pager .end { text-align: right; color: var(--muted); padding: 14px 16px; }

/* pages, forms */
.page-content { max-width: 720px; margin: 10px auto 0; background: var(--bg2); border: 1px solid var(--line); border-radius: 22px; padding: 36px 44px; }
.prose h2 { font-size: 1.5rem; margin: 1.5em 0 .4em; } .prose p { font-size: 1.05rem; line-height: 1.75; }
.quote-band { position: relative; overflow: hidden; margin: 36px auto 0; max-width: 900px; border-radius: 26px; padding: 60px 26px; text-align: center; color: #f2efff; background: linear-gradient(135deg, #171c3a, #2a2450 60%, #40173a); box-shadow: var(--shadow); }
.quote-band .sky { position: absolute; inset: 0; pointer-events: none; } .quote-band .sky i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff; opacity: .6; animation: drift 14s ease-in-out infinite; }
.quote-band .sky i:nth-child(1) { left: 10%; top: 30%; } .quote-band .sky i:nth-child(2) { left: 80%; top: 20%; animation-delay: -4s; } .quote-band .sky i:nth-child(3) { left: 60%; top: 75%; animation-delay: -8s; } .quote-band .sky i:nth-child(4) { left: 25%; top: 80%; animation-delay: -6s; } .quote-band .sky i:nth-child(5) { left: 92%; top: 60%; animation-delay: -10s; }
.quote-band blockquote { position: relative; font-family: var(--serif); font-style: italic; font-size: clamp(1.5rem, 3.4vw, 2.2rem); max-width: 760px; margin: 0 auto 22px; line-height: 1.4; }
.quote-band .cta { position: relative; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.form-wrap, .contact-grid { max-width: 820px; margin: 10px auto 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 30px; align-items: start; max-width: 960px; }
.contact-side { background: var(--bg2); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.contact-side p { margin: 0 0 14px; } .contact-side a { color: var(--accent); }
.th-form.stack { display: grid; gap: 14px; background: var(--bg2); border: 1px solid var(--line); border-radius: 22px; padding: 28px; }
.th-form.stack .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.th-form label { display: grid; gap: 6px; font-size: .9rem; color: var(--muted); }
.th-form label.check { grid-template-columns: auto 1fr; align-items: center; color: var(--ink); }
.th-form label .opt { color: var(--muted); font-weight: 400; }
.th-form input, .th-form select, .th-form textarea { width: 100%; color: var(--ink); }
.th-form textarea { font-family: var(--serif); font-size: 1.05rem; line-height: 1.6; resize: vertical; }
.th-form input:focus, .th-form select:focus, .th-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.th-form .bad { border-color: var(--rose); }
.th-form .err { color: var(--rose); font-size: .82rem; min-height: 1em; }
.th-form .hint { color: var(--muted); font-size: .88rem; margin: 0; }
.form-msg { margin: 0; min-height: 1.4em; font-size: .95rem; } .form-msg.good { color: var(--cyan); } .form-msg.bad { color: var(--rose); }

/* footer */
footer.site-footer { position: relative; z-index: 1; margin-top: 64px; padding: 0 22px 26px; background: #090c17; color: #aab2c8; }
footer.site-footer::before { content: ""; display: block; height: 1px; background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--violet) 70%, transparent); opacity: .7; }
html[data-theme="light"] footer.site-footer { background: #1c2238; }
footer .foot-top { display: grid; grid-template-columns: 1.25fr 2fr; gap: 48px; max-width: 1100px; margin: 0 auto; padding: 46px 0 34px; }
footer .foot-cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; }
footer .col { display: grid; gap: 8px; align-content: start; font-size: .94rem; }
footer .col .two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
footer h3 { margin: 0 0 6px; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-family: var(--sans); }
footer .col a { color: #aab2c8; text-decoration: none; transition: color .15s; } footer .col a:hover { color: #fff; }
footer .brand-line { font-family: var(--serif); font-size: 1.35rem; color: #fff; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
footer .brand-line span { color: var(--gold); } footer .brand-line .mark { color: #fff; } footer .brand-line .mark .book { fill: #090c17; }
footer .purpose { margin: 0 0 18px; max-width: 360px; font-size: .94rem; line-height: 1.6; }
footer .foot-news { max-width: 360px; }
footer .foot-news input { background: #111627; border-color: #283151; color: #fff; }
footer .social { display: flex; gap: 10px; margin-top: 6px; }
footer .social a { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid #283151; color: #aab2c8; }
footer .social a:hover { border-color: var(--gold); color: #fff; }
footer .foot-bottom { max-width: 1100px; margin: 0 auto; padding-top: 18px; border-top: 1px solid #1c2338; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: .84rem; color: #7f889e; }
footer .foot-bottom p { margin: 0; } footer .foot-bottom a { color: #aab2c8; } footer .foot-bottom .quote { font-style: italic; font-family: var(--serif); font-size: .95rem; }
/* genre emblems: quiet line icons on a soft disc */
.genre-card .emblem { width: 62px; height: 62px; padding: 12px; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.genre-head .emblem { color: #fff; }

@media (max-width: 860px) {
  .newsletter, .contact-grid, .th-form.stack .row { grid-template-columns: 1fr; }
  footer .foot-top { grid-template-columns: 1fr; gap: 30px; } footer .foot-cols { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 720px) {
  header.top { gap: 10px; }
  .menu-btn { display: inline-block; order: 2; margin-left: auto; }
  header nav { display: none; order: 4; width: 100%; flex-direction: column; padding: 6px 0; }
  header nav.open { display: flex; }
  header .search { order: 3; width: 100%; margin: 0; } header .search input, header .search input:focus { width: 100%; }
  header .theme { order: 2; }
  .hero { padding: 58px 18px 52px; }
  .story-head { grid-template-columns: 1fr; } .story-head .cover { position: static; max-width: 190px; }
  .reader .page { padding: 28px 22px; border-radius: 16px; }
  .pager { grid-template-columns: 1fr; } .pager .next { text-align: left; }
  .page-content { padding: 24px 20px; }
  footer .foot-cols { grid-template-columns: 1fr 1fr; } footer .foot-bottom { flex-direction: column; }
}

/* greentext: the classic look, one line per thought */
.reader.greentext .body { font-family: ui-monospace, "JetBrains Mono", "Fira Mono", Menlo, Consolas, monospace; font-size: calc(var(--reader-size) * .86); line-height: 1.55; }
.reader.greentext .body p { margin: 0 0 .35em; color: #8fbf4a; white-space: pre-wrap; }
.reader.greentext .body p:not(.gt) { color: var(--ink); margin: .6em 0; }
.reader.greentext .body p::first-letter { font-size: inherit; float: none; margin: 0; color: inherit; font-family: inherit; }
.genre-card.greentext h2, .genre-head.greentext h1 { font-family: ui-monospace, Menlo, Consolas, monospace; }

/* language switcher */
.langsw{display:inline-flex;align-items:center;gap:2px;margin-inline-start:6px;border:1px solid var(--line,#3a3f52);border-radius:999px;padding:2px;line-height:1}
.langsw a.lang{display:inline-block;padding:3px 9px;border-radius:999px;font-size:.78rem;font-weight:600;text-decoration:none;color:inherit;opacity:.62}
.langsw a.lang:hover{opacity:1}
.langsw a.lang.current{background:var(--accent,#c8a24a);color:#12151f;opacity:1}
html[lang^="te"] body{font-family:"Noto Sans Telugu","Gautami",system-ui,sans-serif}
html[lang^="te"] .story-body,html[lang^="te"] .part-body{line-height:1.95}
