Spaces:
Running
Running
File size: 7,524 Bytes
8052574 0f2c05e 8052574 2f3b92c 8052574 d2c65ec 8052574 50003e3 8052574 05b80f3 2f3b92c d2c65ec 2f3b92c d2c65ec 6b67cae d2c65ec 2f3b92c 8052574 d2c65ec 8052574 d2c65ec 8052574 ef0ec43 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 | @import "tailwindcss";
@plugin "@tailwindcss/typography";
@theme {
--color-sacred-gold: #D4AF37;
--color-sacred-gold-light: #F4E7A5;
--color-parchment: #F9F4E8;
--color-pali-text: #2C1810;
--font-sarabun: "Sarabun", "Noto Serif Thai", "Noto Sans Thai Looped", sans-serif;
}
:root {
font-family: var(--font-sarabun);
line-height: 1.7;
font-weight: 400;
color: var(--color-pali-text);
background-color: var(--color-parchment);
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
body {
margin: 0;
display: flex;
min-width: 320px;
min-height: 100vh;
/* Safe area padding for PWA notch/status bar (iOS black-translucent) */
padding-top: env(safe-area-inset-top);
padding-bottom: env(safe-area-inset-bottom);
padding-left: env(safe-area-inset-left);
padding-right: env(safe-area-inset-right);
/* Default bg matches dark theme β seamless PWA splash/status bar */
background-color: #1a1a2e;
}
#root {
width: 100%;
}
/* ββ Search Highlight ββββββββββββββββββββββββββββββββββββββββββββ */
mark.search-highlight {
background-color: #c8860a;
color: #fff;
border-radius: 2px;
padding: 0 2px;
font-weight: inherit;
animation: highlight-fade 3s ease-out 0.5s forwards;
}
@keyframes highlight-fade {
0% { background-color: #c8860a; color: #fff; }
60% { background-color: #c8860a55; color: inherit; }
100% { background-color: transparent; color: inherit; }
}
/* ββ Thai/Pali Typography ββββββββββββββββββββββββββββββββββββββββ */
/* Font-kerning and Thai OpenType features for the body reading text */
.reader-content p,
.content-body p {
/* !important overrides Tailwind typography plugin defaults and any inherited text-center */
text-align: justify !important;
text-align-last: left !important;
text-justify: auto !important;
text-indent: 2em;
margin-bottom: 0.6rem !important;
line-height: 1.75 !important;
word-break: normal;
line-break: loose;
overflow-wrap: anywhere;
font-kerning: normal;
font-feature-settings: "kern" 1, "liga" 1, "clig" 1;
orphans: 2;
widows: 2;
}
.reader-content p.numbered-line,
.content-body p.numbered-line {
padding-left: 2.8em;
text-indent: -2.8em;
text-align: left !important;
text-justify: none;
}
/* Structured/tabular lines (e.g. Abhidhamma Patthana) β kept as standalone rows */
.reader-content p.structured-line,
.content-body p.structured-line {
text-align: left !important;
text-indent: 0;
text-justify: none;
margin-bottom: 0.1rem !important;
}
/* Numbered-list paragraphs (ΰΉ)/(ΰΉ)/(ΰΉ) β cancel text-indent so all items align left */
.reader-content p.numbered-list,
.content-body p.numbered-list {
text-indent: 0 !important;
}
/* Continuation / repetition lines starting with "..." β no paragraph indent */
.reader-content p.continuation-line,
.content-body p.continuation-line {
text-indent: 0 !important;
}
/* All inline reference superscripts β same colour, same cursor for future click-to-expand */
sup.footnote-ref,
sup.abbrev-ref {
font-size: 0.7em;
color: #f59e0b;
opacity: 0.8;
vertical-align: super;
cursor: pointer;
letter-spacing: 0.03em;
transition: opacity 0.15s;
}
sup.footnote-ref:hover,
sup.abbrev-ref:hover {
opacity: 1;
text-decoration: underline;
}
/* Standalone fallback block β remove gaps so it reads like part of the paragraph above */
.reader-content p.footnote-ref {
display: inline; /* collapses to inline flow β no block gap */
font-size: 0.72em;
opacity: 0.55;
margin: 0;
padding: 0;
text-indent: 0;
}
/* Wrap each footnote-ref in a block-level container so "display:inline" still works inside prose */
.reader-content p.footnote-ref::before {
content: " "; /* space before the marker */
}
/* Paragraph immediately before a footnote-ref: kill its bottom margin */
.reader-content p:has(+ p.footnote-ref) {
margin-bottom: 0 !important;
}
/* Paragraph immediately after a footnote-ref: normal top gap resumes */
.reader-content p.footnote-ref + p {
margin-top: 0;
}
/* Remove gap when <br/> is at the start of a <p> (edge case) */
.reader-content p:first-child {
margin-top: 0;
}
/* Custom Utilities */
.text-pali {
font-family: var(--font-sarabun);
font-size: 1.125rem;
line-height: 1.8;
}
.sacred-border {
border-image: linear-gradient(to bottom, #D4AF37, #F4E7A5, #D4AF37) 1;
}
/* ββ Theme Backgrounds with Textures ββββββββββββββββββββββββββ */
.theme-light-bg {
background-color: #f8f6f0;
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.45' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.012'/%3E%3C/svg%3E");
}
.theme-classic-bg {
background-color: #f5edd8;
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.45' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.015'/%3E%3C/svg%3E");
}
.theme-dark-bg {
background-color: #1a1a2e;
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.45' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.018'/%3E%3C/svg%3E");
}
.glass-panel {
background: rgba(255, 255, 255, 0.03);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid rgba(255, 255, 255, 0.1);
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}
.glass-panel-light {
background: rgba(255, 255, 255, 0.6);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border: 1px solid rgba(200, 134, 10, 0.1);
}
/* ββ Inline Content Headings ββ smaller than body text, highlight makes it stand out */
.content-heading {
color: #c8860a;
font-weight: 700;
font-size: 0.85em;
margin: 1.2em 0 0.6em 0;
padding: 0.4em 0.75em;
background: rgba(200, 134, 10, 0.08);
border-left: 3px solid rgba(200, 134, 10, 0.5);
border-radius: 0 0.375rem 0.375rem 0;
line-height: 1.4;
text-align: left;
}
/* Remove extra margin when following another heading */
.content-heading + .content-heading {
margin-top: -0.3em;
}
/* Italic footnote styling */
.content-body i {
opacity: 0.75;
font-style: italic;
}
/* Underline reference styling */
.content-body u {
text-decoration: none;
border-bottom: 1px dotted rgba(200, 134, 10, 0.3);
}
/* ββ First Page Top Section ββββββββββββββββββββββββββββββββββββββ */
.first-page-top {
text-align: center;
}
.first-page-top .content-heading {
text-align: center;
background: transparent;
border: none;
padding: 0;
margin: 0.2em 0;
font-weight: 400;
font-size: 1em;
color: inherit;
line-height: inherit;
border-radius: 0;
}
|