933 lines
80 KiB
CSS
933 lines
80 KiB
CSS
/* Divan styles: Ganjoor's look (palette, gold pills, centred couplets with ✤), RTL, Naskh default. */
|
|
[hidden] { display: none !important; } /* layout rules (e.g. .site-header .wrap flex) must not unhide */
|
|
/* Libron (OFL, github.com/nicoverbruggen/libron) for Latin text: emails, the dictionary's English, Western digits. Limited to
|
|
Latin, so it can lead every font stack and Urdu falls through to Naskh or Nastaliq */
|
|
@font-face { font-family: 'Libron'; src: url('/fonts/libron/Libron-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap;
|
|
unicode-range: U+0000-024F, U+1E00-1EFF, U+2000-206F, U+20AC, U+2122, U+2190-2193; }
|
|
@font-face { font-family: 'Libron'; src: url('/fonts/libron/Libron-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap;
|
|
unicode-range: U+0000-024F, U+1E00-1EFF, U+2000-206F, U+20AC, U+2122, U+2190-2193; }
|
|
@font-face { font-family: 'Libron'; src: url('/fonts/libron/Libron-Italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap;
|
|
unicode-range: U+0000-024F, U+1E00-1EFF, U+2000-206F, U+20AC, U+2122, U+2190-2193; }
|
|
@font-face { font-family: 'Libron'; src: url('/fonts/libron/Libron-BoldItalic.woff2') format('woff2'); font-weight: 700; font-style: italic; font-display: swap;
|
|
unicode-range: U+0000-024F, U+1E00-1EFF, U+2000-206F, U+20AC, U+2122, U+2190-2193; }
|
|
/* Design tokens. Palettes set colours only, each as light-dark(light, dark); roles below derive from them.
|
|
color-scheme picks the half: the system's by default, or the reader's choice (data-theme on <html>). */
|
|
:root {
|
|
color-scheme: light dark;
|
|
/* surfaces, back to front */
|
|
--surface-page: light-dark(#fbf6ea, #14120f); --surface-raised: light-dark(#fffdf7, #181510);
|
|
--surface-poem: light-dark(#f6edd6, #1c1916); --surface-sunken: light-dark(#f6efe3, #242019); /* sunken: control fills */
|
|
/* text and lines */
|
|
--text: light-dark(#17130f, #e7ded0); --text-muted: light-dark(#635543, #9e9185); --link: light-dark(#0d1d30, #f0f6fc);
|
|
--border: light-dark(#b8a78c, #9b7332); --line: light-dark(#dfcd9f, #3a322b); /* line: soft dividers */
|
|
/* brand: ornaments (wordmark, ✤, takhallus); accent: control outlines, highlights */
|
|
--brand: light-dark(#bf3f2a, #d4553a); --accent: light-dark(#b88828, #c9a050); --accent-soft: light-dark(#f5edd8, #2a2418);
|
|
/* roles: primary actions (filled), confirming (approve, publish), destructive (log out, delete, reject) */
|
|
--action: light-dark(#1f4e79, #7db3e8); --action-ink: light-dark(#fff, #0d1520);
|
|
--ok: light-dark(#2e7d32, #7cc47f); --danger: light-dark(#b3261e, #f07a6e);
|
|
/* derived roles: change these to separate a job from its colour */
|
|
--heading: var(--link); --active: var(--brand); --focus: var(--accent);
|
|
/* scales */
|
|
--r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-pill: 999px;
|
|
--fs-xs: .75rem; --fs-sm: .85rem; --fs-md: .95rem; --fs-lg: 1.1rem; --fs-xl: 1.25rem; --fs-2xl: 1.7rem;
|
|
--shadow-sm: 0 2px 8px rgb(0 0 0 / .08); --shadow-lg: 0 8px 24px rgb(0 0 0 / .18);
|
|
--font: 'Libron', 'Noto Naskh Arabic', 'Noto Nastaliq Urdu', serif; --font-ui: 'Libron', 'Noto Naskh Arabic', serif; --font-latin: 'Libron', Georgia, serif; --verse-lh: 2.1;
|
|
}
|
|
:root[data-theme='light'] { color-scheme: light; }
|
|
:root[data-theme='dark'] { color-scheme: dark; }
|
|
/* colour palettes (owner request): sepia (above) and four calmer colourful ones; chosen in the display settings (data-palette) */
|
|
:root[data-palette='teal'] {
|
|
--surface-page: light-dark(#f2f8f7, #0f1716); --surface-raised: light-dark(#fcfefe, #121c1b); --surface-poem: light-dark(#e2f0ee, #152220); --surface-sunken: light-dark(#e9f3f1, #1a2927);
|
|
--text: light-dark(#0f1f1d, #dcebe8); --text-muted: light-dark(#4a615e, #8fa8a4); --link: light-dark(#0b4f6c, #e6f4f2); --border: light-dark(#8db8b1, #2f7d72); --line: light-dark(#b6dad4, #23413c);
|
|
--brand: light-dark(#c8553d, #e07a5f); --accent: light-dark(#2a9d8f, #3fb5a5); --accent-soft: light-dark(#e4f2ef, #172b28);
|
|
--action: light-dark(#0b4f6c, #5cc2b3); --action-ink: light-dark(#fff, #0c1514);
|
|
}
|
|
:root[data-palette='lapis'] {
|
|
--surface-page: light-dark(#f3f5fb, #10131c); --surface-raised: light-dark(#fdfdff, #131724); --surface-poem: light-dark(#e6ebf8, #171c2c); --surface-sunken: light-dark(#ecf0f9, #1c2235);
|
|
--text: light-dark(#131a2e, #e1e5f2); --text-muted: light-dark(#4e5772, #98a0bb); --link: light-dark(#1d3b8b, #eef1fb); --border: light-dark(#98a6c8, #4b5c9a); --line: light-dark(#d8d0ad, #2c3350);
|
|
--brand: light-dark(#b83254, #e0607e); --accent: light-dark(#c49a2c, #d4b25a); --accent-soft: light-dark(#eef0f8, #1b2034);
|
|
--action: light-dark(#1d3b8b, #8ea9ee); --action-ink: light-dark(#fff, #0e1220);
|
|
}
|
|
:root[data-palette='green'] {
|
|
--surface-page: light-dark(#f3f7f0, #111611); --surface-raised: light-dark(#fdfefb, #141a13); --surface-poem: light-dark(#e5eede, #182017); --surface-sunken: light-dark(#ecf3e7, #1d271b);
|
|
--text: light-dark(#151f0f, #e0e8d8); --text-muted: light-dark(#54614a, #9aa88e); --link: light-dark(#1f5d3a, #eef5e8); --border: light-dark(#9db38c, #4f7a45); --line: light-dark(#d7cea2, #2c3a27);
|
|
--brand: light-dark(#b5452f, #e0705a); --accent: light-dark(#a8872e, #c9a94e); --accent-soft: light-dark(#eff1e1, #1c251a);
|
|
--action: light-dark(#1f5d3a, #84c79a); --action-ink: light-dark(#fff, #0d150f);
|
|
}
|
|
:root[data-palette='rose'] {
|
|
--surface-page: light-dark(#fbf4f6, #181214); --surface-raised: light-dark(#fffcfd, #1c1518); --surface-poem: light-dark(#f5e6ea, #22191c); --surface-sunken: light-dark(#f8edf0, #291e22);
|
|
--text: light-dark(#29141a, #efe0e4); --text-muted: light-dark(#6c5057, #b39aa1); --link: light-dark(#6b2c5e, #fbeef2); --border: light-dark(#c8a1a9, #8a5563); --line: light-dark(#e7c8ce, #3e2a30);
|
|
--brand: light-dark(#b0304a, #ef6f86); --accent: light-dark(#c27c88, #d792a0); --accent-soft: light-dark(#f7e8ec, #2a1d21);
|
|
--action: light-dark(#6b2c5e, #e3a3c3); --action-ink: light-dark(#fff, #1d1216);
|
|
}
|
|
:root.nastaliq { --font: 'Libron', 'Noto Nastaliq Urdu', var(--font-ui); --verse-lh: 2.7; }
|
|
|
|
* { box-sizing: border-box; }
|
|
body { margin: 0; background: var(--surface-page); color: var(--text); font-family: var(--font); line-height: 1.9; }
|
|
:where(a) { color: var(--link); text-decoration: none; }
|
|
:where(a):hover { color: var(--active); }
|
|
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
|
|
.muted { color: var(--text-muted); }
|
|
|
|
/* primitives. control: every button, chip, tab and pager link; a pill unless a component says otherwise; pressed, selected,
|
|
current and checked all look the same (--active). field: every text box, text area and select. Both are :where() (no
|
|
specificity), so component rules below only add size, shape and layout. */
|
|
:where(.btn, .mod-edit-btn, .save-like, .save, .wordbook, .tool, .chip, .tag-chip, .account-link, .poem-nav a, .admin-nav a, .pager .pages a, .pager .pages .current, .kb button, .dict .similar button, .dict .play, .account-form button, .admin-search button, .admin-table button, .lib-note button, .lib-remove button, .author-suggest button, .filter-actions button, .editor-tabs button, .display-panel button) {
|
|
display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-family: var(--font-ui);
|
|
font-size: var(--fs-sm); line-height: 1.8; padding: 1px 14px; border: 1.5px solid var(--border); border-radius: var(--r-pill);
|
|
background: var(--surface-sunken); color: var(--text); cursor: pointer; text-decoration: none; transition: border-color .15s, color .15s, background .15s; }
|
|
:where(.btn, .mod-edit-btn, .save-like, .save, .wordbook, .tool, .chip, .tag-chip, .account-link, .poem-nav a, .admin-nav a, .pager .pages a, .pager .pages .current, .kb button, .dict .similar button, .dict .play, .account-form button, .admin-search button, .admin-table button, .lib-note button, .lib-remove button, .author-suggest button, .filter-actions button, .editor-tabs button, .display-panel button):hover { border-color: var(--active); color: var(--active); }
|
|
:where(.btn, .mod-edit-btn, .save-like, .save, .wordbook, .tool, .chip, .tag-chip, .account-link, .poem-nav a, .admin-nav a, .pager .pages a, .pager .pages .current, .kb button, .dict .similar button, .dict .play, .account-form button, .admin-search button, .admin-table button, .lib-note button, .lib-remove button, .author-suggest button, .filter-actions button, .editor-tabs button, .display-panel button):is([aria-pressed='true'], [aria-selected='true'], [aria-current='page'], .current, .on, :has(input:checked)) {
|
|
border-color: var(--active); color: var(--active); background: color-mix(in srgb, var(--active) 10%, var(--surface-sunken)); font-weight: 700; }
|
|
:where(.btn, .mod-edit-btn, .save-like, .save, .wordbook, .tool, .chip, .tag-chip, .account-link, .poem-nav a, .admin-nav a, .pager .pages a, .pager .pages .current, .kb button, .dict .similar button, .dict .play, .account-form button, .admin-search button, .admin-table button, .lib-note button, .lib-remove button, .author-suggest button, .filter-actions button, .editor-tabs button, .display-panel button):disabled { opacity: .5; cursor: not-allowed; }
|
|
:where(input:not([type='checkbox'], [type='radio'], [type='file'], [type='range'], [type='color']), textarea, select) {
|
|
font: inherit; padding: 4px 12px; border: 1.5px solid var(--border); border-radius: var(--r-md); background: var(--surface-raised); color: var(--text); }
|
|
:where(input:not([type='checkbox'], [type='radio'], [type='file'], [type='range'], [type='color']), textarea, select):focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
|
|
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
|
|
|
|
/* header: logo + search + toggles in a gold-bordered bar */
|
|
.site-header .wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 12px; }
|
|
.wordmark { display: flex; flex: none; }
|
|
/* the logo: the shamsa with دیوان inside, sized with the viewport */
|
|
.wordmark .logo { width: clamp(48px, 12vw, 60px); height: auto; filter: drop-shadow(0 1px 3px rgb(0 0 0 / .15)); overflow: visible; }
|
|
/* on hover the two layers of rays turn opposite ways; the blue disc and the word stay still */
|
|
.logo .rays-long, .logo .rays-short { transform-box: fill-box; transform-origin: center; }
|
|
:is(.wordmark:hover, .wordmark:focus-visible, .masthead-logo:hover) .rays-long { animation: rays 9s linear infinite; }
|
|
:is(.wordmark:hover, .wordmark:focus-visible, .masthead-logo:hover) .rays-short { animation: rays 9s linear infinite reverse; }
|
|
@keyframes rays { to { transform: rotate(360deg); } }
|
|
@media (prefers-reduced-motion: reduce) { .logo g { animation: none !important; } }
|
|
.search-form { flex: 1; min-width: 0; display: flex; position: relative; }
|
|
.search-form input { background: var(--surface-sunken); }
|
|
.search-form input { flex: 1; min-width: 0; padding: 4px 14px; padding-inline-end: 116px; } /* min-width 0: shrinks instead of pushing past the icons */
|
|
.toggles { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } /* icon buttons with tooltips */
|
|
.toggles form { display: flex; margin: 0; } /* the log-out button sits in a form: no line box of its own */
|
|
/* controls keep Naskh at normal height whatever reading font is chosen */
|
|
.search-form input { font-family: var(--font-ui); line-height: 1.8; }
|
|
|
|
main { padding: 16px 0 48px; }
|
|
h1, h2 { line-height: 1.6; margin: .2em 0 .4em; font-weight: 700; text-align: center; color: var(--heading); }
|
|
h1 { font-size: clamp(1.3rem, 5vw, var(--fs-2xl)); }
|
|
h1::after { content: ''; display: block; width: 140px; height: 2px; background: var(--brand); margin: 8px auto 0; }
|
|
|
|
/* Ganjoor's gold pill headings and links (.century / .part-title-block) */
|
|
.pill, .century h2, .card {
|
|
display: block; text-align: center; color: var(--link); background: var(--accent-soft);
|
|
border: 1.5px solid var(--border); border-radius: 10px; padding: 4px 10px;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, .08); transition: transform .2s, background .2s, border-color .2s;
|
|
}
|
|
.card:hover { background: var(--line); border-color: var(--active); transform: translateY(-1px); color: var(--link); }
|
|
.card small { color: var(--text-muted); margin-inline-start: 6px; }
|
|
.century { margin-top: 28px; }
|
|
.century h2 { font-size: 1rem; margin: 0 0 12px; }
|
|
.century h2::after { display: none; }
|
|
|
|
/* poet tiles (captions only, photos hidden for now) */
|
|
.poets { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
|
|
.poet-card {
|
|
/* one size for every card: long names end in … (full name on hover) */
|
|
width: 210px; max-width: calc(50% - 4px); min-height: 5.125rem; text-align: center;
|
|
display: flex; flex-direction: column; justify-content: center; background: var(--surface-raised); border: 1.5px solid var(--border);
|
|
border-radius: 999px; padding: 6px 36px 8px; color: var(--text); transition: transform .25s; position: relative;
|
|
}
|
|
/* the bookmark sits in the top-left corner, inside the side padding (36px), so it never covers the name and a saved card keeps its size */
|
|
.poet-card.mark-bm::after { position: absolute; top: 12px; left: 16px; margin: 0; }
|
|
.poet-card:hover { transform: translateY(-3px); border-color: var(--active); color: var(--text); }
|
|
.poet-card .name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
/* years in Naskh: compact lines whatever the reading font (Nastaliq's tall line boxes made cards grow in some browsers) */
|
|
.poet-card small { display: block; color: var(--text-muted); font-family: var(--font-ui); font-size: .75rem; line-height: 1.6; white-space: nowrap; }
|
|
/* narrow phones: a rounded box instead of a pill (the pill's curve ate the name) and names wrap to two lines */
|
|
@media (max-width: 480px) {
|
|
.poet-card { padding: 6px 12px 8px; border-radius: var(--r-lg); min-height: 0; }
|
|
.poet-card .name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.7; }
|
|
.poet-card.mark-bm { padding-left: 28px; }
|
|
.poet-card small { white-space: normal; }
|
|
.poet-card.mark-bm::after { top: 10px; left: 8px; }
|
|
}
|
|
.hero { text-align: center; }
|
|
.hero-logo { display: block; width: clamp(84px, 22vw, 120px); height: auto; margin: 4px auto 0; filter: drop-shadow(0 2px 6px rgb(0 0 0 / .12)); }
|
|
.hero p { margin: 0; }
|
|
/* the home page masthead: the logo beside the headline (between two couplet lines), in a gold double frame */
|
|
.masthead { display: flex; align-items: center; justify-content: center; gap: clamp(20px, 7vw, 72px); margin: 4px 0 10px;
|
|
padding: clamp(18px, 4vw, 34px) clamp(16px, 4vw, 40px); background: var(--surface-raised);
|
|
border: 6px solid var(--accent); outline: 1.5px solid var(--accent); outline-offset: -14px; border-radius: 4px; }
|
|
.masthead-logo { flex: none; width: clamp(110px, 24vw, 210px); height: auto; filter: drop-shadow(0 2px 8px rgb(0 0 0 / .12)); }
|
|
.masthead-text { display: flex; flex-direction: column; align-items: center; }
|
|
/* the headline between two couplet lines, like a framed verse; the logo already says دیوان */
|
|
.masthead h1 { margin: 0; font-family: 'Noto Nastaliq Urdu', serif; font-weight: 700; color: var(--action); font-size: clamp(1.7rem, 6vw, 3.2rem); line-height: 2;
|
|
padding-top: .2em; padding-bottom: .2em; } /* Nastaliq hangs below its box: room above and below keeps it clear of the couplet lines */
|
|
.masthead h1::after { display: none; }
|
|
/* the couplet line: half-lines in the palette's blue, the ✤ in vermilion */
|
|
.bayt { display: block; width: clamp(160px, 80%, 320px); height: auto; margin: 6px auto; }
|
|
.bayt .misra { fill: var(--action); } .bayt .gul { fill: var(--brand); } .bayt .hole { fill: var(--surface-raised); }
|
|
.hero-count { text-align: center; color: var(--text-muted); font-size: var(--fs-sm); margin: 0 0 6px; }
|
|
@media (max-width: 520px) { .masthead { flex-direction: column; gap: 4px; } }
|
|
|
|
/* poet / category */
|
|
.intro { background: var(--surface-raised); border: 1.5px solid var(--border); border-radius: 12px; padding: 10px 18px; white-space: pre-line; text-align: justify; }
|
|
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 16px 0; }
|
|
.crumbs { text-align: center; font-size: .9rem; color: var(--text-muted); }
|
|
.crumbs a { color: var(--text-muted); }
|
|
.crumbs span + span::before { content: '»'; margin: 0 8px; }
|
|
.toc { list-style: none; padding: 0; margin: 16px auto; max-width: 700px; }
|
|
.toc li { border-bottom: 1px dashed var(--line); }
|
|
.toc li a { display: block; padding: 6px 4px; text-align: center; }
|
|
|
|
/* poem: Ganjoor couplets (half-lines meet at the centre, ✤ after each) */
|
|
.poem { background: var(--surface-poem); border: 1.5px solid var(--border); border-radius: 12px; padding: 20px clamp(12px, 3vw, 36px); margin: 16px 0; }
|
|
.couplet { display: grid; grid-template-columns: 1fr 1fr; column-gap: 10%; margin: 0 0 6px; border-radius: 6px; font-size: 1.1rem; line-height: var(--verse-lh); }
|
|
.couplet:hover { background: linear-gradient(90deg, transparent, var(--accent-soft) 15%, var(--accent-soft) 85%, transparent); }
|
|
/* each half-line is a box as wide as its text, pinned to the centre line (end of the right column, start of the left one in
|
|
RTL), with its text centred: short ones meet at the centre as before, long ones fill the column and wrap centred */
|
|
.couplet p { margin: 0; width: fit-content; max-width: 100%; justify-self: end; text-align: center; }
|
|
.couplet[data-mark]::before { content: attr(data-mark); grid-column: 1 / -1; justify-self: center; font-size: .72rem; line-height: 1.6; color: var(--brand); border: 1px solid var(--line); border-radius: 999px; padding: 0 10px; margin-bottom: 2px; }
|
|
.takhallus { color: var(--brand); }
|
|
.radif { text-align: center; margin-top: -6px; }
|
|
.radif-head { text-align: center; font-size: 1.05rem; color: var(--brand); margin: 22px 0 4px; }
|
|
.couplet p + p { justify-self: start; }
|
|
.couplet::after { content: '✤'; grid-column: 1 / -1; text-align: center; color: var(--brand); font-size: .72rem; opacity: .75; line-height: 1.2; }
|
|
.single { text-align: center; margin: 0 0 6px; font-size: 1.1rem; line-height: var(--verse-lh); }
|
|
.para { text-align: justify; margin: 0 0 12px; line-height: var(--verse-lh); }
|
|
@media (max-width: 760px) {
|
|
.couplet { grid-template-columns: 1fr; padding: 6px 0; border-bottom: 1px dashed var(--line); }
|
|
.couplet p, .couplet p + p { justify-self: center; }
|
|
.couplet::after { display: none; }
|
|
}
|
|
.poem-nav { display: flex; justify-content: center; gap: 12px; } /* RTL: پچھلا on the right, اگلا on the left */
|
|
.source { text-align: center; font-size: .85rem; color: var(--text-muted); }
|
|
|
|
/* search */
|
|
.result { border-bottom: 1px dashed var(--line); padding: 8px 0; }
|
|
.result .snippet { display: block; color: var(--text); margin-top: 4px; padding: 4px 12px; border-inline-start: 2px solid var(--line); }
|
|
.result .snippet p { margin: 0; }
|
|
mark { background: var(--accent-soft); color: inherit; border-radius: 3px; padding: 0 2px; box-shadow: inset 0 -2px var(--accent); }
|
|
.hl-note { text-align: center; font-size: .85rem; }
|
|
.hint { text-align: center; font-size: .8rem; margin: 0; }
|
|
.pager { display: flex; gap: 12px; justify-content: center; margin-top: 20px; }
|
|
|
|
/* made by a Pakistani for Pakistan: the flag beside the line (an SVG: the emoji is "PK" on Windows) */
|
|
.site-footer { border-top: 1.5px solid var(--border); padding: 20px 0 16px; margin-top: 16px; font-size: var(--fs-sm); color: var(--text-muted); background: var(--surface-raised); }
|
|
/* footer: three labelled groups of links, each with an icon and a one-line note; external links marked */
|
|
.footer-links h2 { text-align: start; font-size: var(--fs-xs); font-weight: 700; color: var(--text-muted); letter-spacing: .02em; margin: 0 0 4px; }
|
|
.footer-links h2::after { display: none; }
|
|
.footer-links ul { list-style: none; margin: 0; padding: 0; }
|
|
.footer-links a { display: flex; align-items: center; gap: 10px; padding: 4px 8px; margin-inline-start: -8px; border-radius: var(--r-sm); color: var(--text); }
|
|
.footer-links a:hover { background: var(--accent-soft); color: var(--active); }
|
|
.footer-links a > .icon:first-child { color: var(--accent); }
|
|
.footer-links a span { display: flex; flex-direction: column; line-height: 1.5; }
|
|
.footer-links small { color: var(--text-muted); font-size: var(--fs-xs); }
|
|
.footer-links .ext { align-self: flex-start; margin-top: 6px; margin-inline-start: -4px; opacity: .5; }
|
|
|
|
h1 + .muted { text-align: center; margin-top: 0; }
|
|
|
|
/* Urdu keyboard */
|
|
.in-box { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); display: flex; padding: 4px; border: 0; background: none; color: var(--text-muted); opacity: .7; cursor: pointer; border-radius: 6px; }
|
|
/* icons inside a text box, from the far left: search (top box only), keyboard, Roman-to-Urdu */
|
|
.in-box.rom { font: 600 .95rem/1 var(--font-ui); }
|
|
.search-form .in-box.go { inset-inline-end: 8px; }
|
|
.search-form #kb-toggle { inset-inline-end: 42px; }
|
|
.search-form #rom-toggle { inset-inline-end: 76px; } /* 34px apart: each icon its own tap target */
|
|
.in-box-field { position: relative; }
|
|
.in-box-field input { padding-inline-end: 80px !important; }
|
|
.in-box-field .in-box.rom { inset-inline-end: 42px; }
|
|
.in-box:hover { opacity: 1; }
|
|
.in-box[aria-pressed='true'] { color: var(--active); opacity: 1; }
|
|
/* phones: wordmark and icons on one row, the search box on its own full-width row below */
|
|
@media (max-width: 640px) {
|
|
.site-header .wrap { gap: 8px; }
|
|
.toggles { margin-inline-start: auto; gap: 4px; }
|
|
.search-form { order: 3; flex-basis: 100%; }
|
|
}
|
|
.site-header .kb:not([hidden]) { display: block; padding-bottom: 10px; } /* not the header's flex row */
|
|
.kb div { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 4px; }
|
|
.kb button { font-size: var(--fs-lg); min-width: 2.4em; padding: 2px 6px; background: var(--surface-raised); border-radius: var(--r-sm); }
|
|
.kb .wide { min-width: 12em; }
|
|
.kb .fn { min-width: 3.4em; background: var(--surface-sunken); }
|
|
/* the content editor's keyboard: docked at the bottom of the window; the page keeps the writing line above it */
|
|
.kb.kb-float { position: fixed; z-index: 40; inset-inline: 0; bottom: 0; margin: 0 auto; max-width: min(720px, 100vw); padding: 6px 10px 12px;
|
|
background: var(--surface-raised); border: 1.5px solid var(--border); border-bottom: 0; border-radius: var(--r-lg) var(--r-lg) 0 0;
|
|
box-shadow: 0 -8px 28px rgb(0 0 0 / .18); }
|
|
|
|
/* word sidebar (Wiktionary): left side on wide screens, bottom sheet on phones */
|
|
.dict { position: fixed; top: 0; left: 0; bottom: 0; width: min(340px, 92vw); z-index: 20; overflow-y: auto; padding: 14px 18px 24px;
|
|
background: var(--surface-raised); border-right: 1.5px solid var(--border); box-shadow: 4px 0 18px rgb(0 0 0 / .18); }
|
|
.dict h2 { font-size: 1.6rem; margin: 0 0 4px; color: var(--brand); text-align: start; }
|
|
.dict h2::after { display: none; }
|
|
.dict h3 { font-size: 1rem; margin: 14px 0 4px; padding-bottom: 2px; border-bottom: 1px dashed var(--line); }
|
|
.dict ol { margin: 4px 0; padding-inline-start: 22px; }
|
|
.dict .en { font-family: var(--font-latin); font-size: .88rem; line-height: 1.5; }
|
|
.dict ol.en { text-align: left; }
|
|
.dict .ipa { font-family: var(--font-latin), system-ui, sans-serif; font-size: .88rem; color: var(--text-muted); }
|
|
.dict .pron { margin: 2px 0; }
|
|
.dict .pos { font-size: .8rem; color: var(--text-muted); margin: 8px 0 0; }
|
|
.dict .note { font-size: .8rem; margin: 0; }
|
|
.dict .via { margin: 2px 0; }
|
|
.dict details.more { margin: 4px 0; }
|
|
.dict details.more summary { cursor: pointer; font-size: .8rem; color: var(--brand); }
|
|
.dict .example { font-size: .8rem; color: var(--text-muted); margin: 4px 0; border-left: 2px solid var(--line); padding-left: 8px; }
|
|
.dict .example .ex-text { font-family: var(--font-ui); font-size: .95rem; color: var(--text); }
|
|
.dict .reading { border-inline-start: 2px solid var(--line); padding-inline-start: 10px; margin: 8px 0; }
|
|
.dict .form { font-size: 1.15rem; color: var(--link); }
|
|
.dict .via .en { font-size: .78rem; }
|
|
.dict .src { font-size: .78rem; margin-top: 18px; }
|
|
.dict .ety { text-align: left; color: var(--text-muted); font-size: .8rem; }
|
|
.dict-close { position: sticky; top: 0; float: left; border: 0; background: none; color: var(--text-muted); font-size: 1rem; cursor: pointer; }
|
|
.dict .similar { display: flex; flex-wrap: wrap; gap: 6px; }
|
|
.dict .play { padding: 0 6px; border-radius: var(--r-sm); }
|
|
/* wide screens: the page moves over instead of being covered */
|
|
@media (min-width: 1100px) { body.dict-open { padding-left: min(340px, 92vw); } }
|
|
.dict ol:not(.en) { list-style-type: urdu; }
|
|
@media (max-width: 700px) {
|
|
.dict { top: auto; right: 0; width: auto; max-height: 60vh; border-right: 0; border-top: 1.5px solid var(--border); border-radius: 14px 14px 0 0; }
|
|
}
|
|
|
|
/* accounts */
|
|
.center { text-align: center; }
|
|
.account-form { max-width: 420px; margin: 18px auto; display: flex; flex-direction: column; gap: 10px; }
|
|
.account-form h2 { font-size: 1.1rem; margin: 6px 0 0; }
|
|
.account-form label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
|
|
.account-form input, .account-form textarea { padding: 6px 12px; }
|
|
.account-form textarea { line-height: 1.9; resize: vertical; }
|
|
.profile-bio { max-width: 520px; margin: 0 auto 12px; text-align: center; white-space: pre-line; }
|
|
.account-form > button { font-size: inherit; padding: 4px 14px; }
|
|
/* boxes with the keyboard buttons inside them: full width, and the small in-box buttons keep their own look */
|
|
.account-form .in-box-field { display: block; position: relative; }
|
|
.account-form .in-box-field input { width: 100%; box-sizing: border-box; }
|
|
.account-form .in-box { padding: 4px; border: 0; border-radius: 6px; background: none; color: var(--text-muted); }
|
|
.account-form.danger button { border-color: var(--danger); color: var(--danger); }
|
|
.form-error { color: var(--danger); text-align: center; }
|
|
.form-done { color: var(--accent); text-align: center; }
|
|
/* selection menu (Ganjoor's, by the selected text) */
|
|
.selmenu { position: absolute; z-index: 30; display: flex; gap: 2px; padding: 4px; border-radius: 10px;
|
|
background: rgb(14 17 17 / .92); box-shadow: 0 4px 14px rgb(0 0 0 / .25); }
|
|
.selmenu[hidden] { display: none; }
|
|
.selmenu button { font: inherit; font-size: .85rem; color: #f3ead8; background: none; border: 0; border-radius: 7px; padding: 2px 10px; cursor: pointer; }
|
|
.selmenu .plus::before { content: '+ '; font-weight: 700; color: #c9a050; }
|
|
.selmenu button:hover, .selmenu button:focus-visible { background: rgb(201 160 80 / .25); outline: none; }
|
|
|
|
/* admin panel */
|
|
.admin-nav { display: flex; justify-content: center; gap: 8px; margin: 0 0 16px; }
|
|
.admin-table button { font-size: var(--fs-xs); padding: 0 10px; }
|
|
.admin-table button.danger { color: var(--danger); }
|
|
.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; margin: 8px 0; }
|
|
.admin-table th, .admin-table td { padding: 6px 8px; border-bottom: 1px dashed var(--line); text-align: start; vertical-align: middle; }
|
|
.admin-table tr.disabled td { opacity: .55; }
|
|
.admin-table .actions { display: flex; flex-wrap: wrap; gap: 4px; }
|
|
.admin-table .actions form { margin: 0; }
|
|
.temp-password { max-width: 520px; margin: 10px auto; padding: 10px 16px; border: 1.5px solid var(--accent); border-radius: 12px; background: var(--surface-sunken); text-align: center; }
|
|
.temp-password code { font-size: 1.2rem; letter-spacing: .08em; user-select: all; }
|
|
@media (max-width: 700px) { .admin-table thead { display: none; } .admin-table tr { display: block; border-bottom: 1px dashed var(--line); padding: 6px 0; } .admin-table td { display: inline-block; border: 0; padding: 2px 6px; } }
|
|
|
|
|
|
/* bookmarks: our own rounded bookmark icon (soft corners and notch, like common app icon packs), a grey outline
|
|
when not set and filled in the brand colour when set; drawn as a mask so it follows the theme. The word book is
|
|
separate (+). */
|
|
:root { --bm-outline: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.5 3h9A2.5 2.5 0 0 1 19 5.5v14.6a1 1 0 0 1-1.55.83L12 17.3l-5.45 3.63A1 1 0 0 1 5 20.1V5.5A2.5 2.5 0 0 1 7.5 3z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E"); --bm-filled: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.5 3h9A2.5 2.5 0 0 1 19 5.5v14.6a1 1 0 0 1-1.55.83L12 17.3l-5.45 3.63A1 1 0 0 1 5 20.1V5.5A2.5 2.5 0 0 1 7.5 3z' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E"); }
|
|
.bm-icon, .save::before, .bm::before, .bmk::after, .mark-fav::after, .mark-bm::after {
|
|
content: ''; display: inline-block; width: 1.05em; height: 1.05em; vertical-align: -.18em; background-color: var(--text-muted);
|
|
-webkit-mask: var(--bm-outline) center / contain no-repeat; mask: var(--bm-outline) center / contain no-repeat; user-select: none; }
|
|
.save[aria-pressed='true']::before, .bm[aria-pressed='true']::before, .bmk::after, .mark-fav::after, .mark-bm::after, .bm-icon.on {
|
|
background-color: var(--active); -webkit-mask-image: var(--bm-filled); mask-image: var(--bm-filled); }
|
|
.save::before { margin: 0; } /* محفوظ شدہ: the control's pressed look, and the glyph fills */
|
|
/* word book (ذخیرۂ الفاظ): + to add, ✓ when added (hearts are for poets and works) */
|
|
.wordbook { margin-bottom: 6px; }
|
|
.wordbook::before { content: '+'; font-weight: 700; color: var(--accent); }
|
|
.wordbook[aria-pressed='true']::before { content: '✓'; color: inherit; }
|
|
.couplet, .poem .para, .poem .single { position: relative; }
|
|
.bm { position: absolute; inset-inline-end: -26px; top: .5em; width: 20px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer;
|
|
opacity: 0; transition: opacity .15s; user-select: none; }
|
|
.bm::before { width: 18px; height: 18px; }
|
|
.bm[aria-pressed='true'] { opacity: 1; }
|
|
.couplet:hover .bm, .poem .para:hover .bm, .poem .single:hover .bm, .bm:focus-visible { opacity: 1; }
|
|
@media (hover: none) { .bm { opacity: 1; } }
|
|
@media (max-width: 700px) { .bm { inset-inline-end: -4px; top: 0; } }
|
|
:target { background: var(--accent-soft); border-radius: 6px; }
|
|
|
|
.lib-section { margin: 22px 0; }
|
|
.lib-section h2 { font-size: 1.1rem; text-align: center; color: var(--brand); }
|
|
.lib-list { list-style: none; padding: 0; max-width: 760px; margin: 0 auto; }
|
|
.lib-list li { position: relative; padding: 10px 14px 10px 54px; margin: 8px 0; border: 1px dashed var(--line); border-radius: 12px; }
|
|
.lib-list .crumbs { text-align: start; margin: 0 0 4px; font-size: .8rem; }
|
|
.lib-title { font-weight: 700; }
|
|
.lib-couplet { display: block; color: var(--text); text-decoration: none; text-align: center; line-height: var(--verse-lh, 2.2); }
|
|
.lib-couplet p { margin: 0; }
|
|
.lib-couplet.small { font-size: .9rem; color: var(--text-muted); }
|
|
.lib-word { font: inherit; font-size: 1.25rem; font-weight: 700; color: var(--link); background: none; border: 0; padding: 0; cursor: pointer; }
|
|
.lib-note { display: flex; gap: 6px; margin-top: 6px; }
|
|
.lib-note input { flex: 1; font-size: var(--fs-sm); padding: 2px 10px; }
|
|
.lib-note button, .lib-remove button { font-size: var(--fs-xs); padding: 0 10px; }
|
|
.lib-remove { position: absolute; left: 8px; top: 8px; margin: 0; }
|
|
.lib-remove button { color: var(--danger); }
|
|
|
|
/* bookmarked phrases, and the bookmark icon where the reader's bookmarks are */
|
|
.bmk { text-decoration: underline dotted var(--brand) 2px; text-underline-offset: 6px; cursor: pointer; background: var(--accent-soft); border-radius: 4px; }
|
|
.bmk::after { width: .7em; height: .7em; vertical-align: super; margin-inline-start: 2px; }
|
|
.mark-fav::after, .mark-bm::after { width: .85em; height: .85em; margin-inline-start: 6px; vertical-align: -.1em; }
|
|
|
|
/* search: poets/writers, books/chapters, content (paged) */
|
|
.search-group { margin: 18px 0 26px; }
|
|
.search-group h2 { font-size: 1.1rem; text-align: center; color: var(--brand); }
|
|
.search-group h2 small { font-size: .8rem; font-weight: 400; }
|
|
.poet-result { display: flex; flex-direction: column; align-items: center; gap: 2px; }
|
|
.poet-result { width: 210px; max-width: calc(50% - 4px); } /* the wrapper takes the card's size (a card's 50% of a shrink-wrapped box was tiny) */
|
|
.poet-result .poet-card { width: 100%; max-width: none; }
|
|
.poet-result .small { font-size: .75rem; }
|
|
.book-results { list-style: none; padding: 0; max-width: 700px; margin: 0 auto; }
|
|
.book-results li { padding: 5px 4px; border-bottom: 1px dashed var(--line); text-align: center; }
|
|
.pager .pages { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
|
|
.pager .pages a, .pager .pages .current { min-width: 2.2em; padding: 0 8px; }
|
|
.pager .gap { padding: 0 2px; color: var(--text-muted); }
|
|
|
|
/* author filter on search */
|
|
.author-filter { max-width: 760px; margin: 0 auto 14px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 12px; text-align: center; }
|
|
.author-filter p { margin: 2px 0 8px; }
|
|
.author-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
|
|
.author-chips .chip small { color: var(--text-muted); }
|
|
.author-chips .chip input { accent-color: var(--active); margin: 0; }
|
|
.author-chips .chip.extra { display: none; }
|
|
.author-chips.all .chip.extra { display: inline-flex; }
|
|
.author-find { position: relative; display: flex; gap: 4px; max-width: 420px; margin: 10px auto 0; }
|
|
.author-find input { flex: 1; }
|
|
.author-suggest { position: absolute; top: 100%; inset-inline: 0; z-index: 10; display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; margin-top: 4px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 4px 14px rgb(0 0 0 / .15); }
|
|
.author-suggest button { padding: 0 10px; }
|
|
.filter-actions { display: flex; gap: 12px; justify-content: center; align-items: center; margin-top: 10px !important; }
|
|
|
|
/* moderation */
|
|
.status { display: inline-block; font-size: .78rem; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border); margin-inline-start: 6px; }
|
|
.s-submitted { border-color: var(--accent); color: var(--accent); }
|
|
.s-approved { border-color: var(--link); color: var(--link); }
|
|
.s-published { border-color: var(--ok); color: var(--ok); }
|
|
.s-returned, .s-rejected { border-color: var(--danger); color: var(--danger); }
|
|
.small-line { font-size: .8rem; margin: 2px 0 0; }
|
|
.mod-edit { max-width: 900px; margin: 12px auto; display: flex; flex-direction: column; gap: 8px; }
|
|
.mod-edit label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
|
|
.mod-edit input, .mod-edit textarea { padding: 6px 12px; }
|
|
.mod-edit textarea { font-size: 1.05rem; line-height: 2; min-height: 26em; resize: vertical; }
|
|
.mod-actions { max-width: 700px; }
|
|
.diff { max-width: 900px; margin: 0 auto; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
|
|
.diff div { padding: 2px 12px; white-space: pre-wrap; line-height: 1.9; }
|
|
.diff div span { display: inline-block; width: 1.2em; font-weight: 700; }
|
|
.diff .add { background: color-mix(in srgb, var(--ok) 14%, transparent); }
|
|
.diff .del { background: color-mix(in srgb, var(--danger) 12%, transparent); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--danger) 50%, transparent); }
|
|
.timeline { max-width: 760px; margin: 0 auto; padding-inline-start: 20px; font-size: .88rem; }
|
|
.timeline li { margin: 4px 0; }
|
|
.mod-h { text-align: center; color: var(--brand); }
|
|
.inline-form { display: inline; }
|
|
/* a page's action row (save, edit, history, tags): spaced as one row of buttons, wrapping on phones */
|
|
.center:has(> .save) { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
|
|
.mod-history { font-size: .85rem; margin-inline-start: 6px; }
|
|
|
|
/* moderators' guide */
|
|
.guide { max-width: 900px; margin: 0 auto; line-height: 2; }
|
|
.guide h2 { font-size: 1.15rem; color: var(--brand); text-align: start; margin-top: 28px; }
|
|
.guide code { font-family: inherit; background: var(--surface-sunken); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; unicode-bidi: plaintext; display: inline-block; } /* Latin tags read left to right, Urdu right to left */
|
|
.guide-table td:first-child { white-space: nowrap; }
|
|
.example { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; margin: 10px 0; }
|
|
.example pre { unicode-bidi: plaintext; margin: 0; padding: 12px 14px; background: var(--surface-sunken); border: 1px solid var(--border); border-radius: 10px; white-space: pre-wrap;
|
|
font-family: var(--font-ui); font-size: .95rem; line-height: 1.9; }
|
|
.example:has(> pre:only-child) { grid-template-columns: 1fr; }
|
|
.preview { margin: 0; padding: 12px 16px; }
|
|
.preview .couplet { font-size: 1rem; grid-template-columns: 1fr; }
|
|
.preview .couplet p, .preview .couplet p + p { justify-self: center; }
|
|
.preview .stanza { margin: 6px 0 12px; }
|
|
.preview .stanza p, .preview .single { text-align: center; margin: 0; }
|
|
.preview .mod-h.sub { font-size: 1rem; text-align: center; color: var(--link); }
|
|
.preview sup { color: var(--brand); font-size: .7em; }
|
|
.preview-notes { font-size: .85rem; border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 6px; }
|
|
@media (max-width: 760px) { .example { grid-template-columns: 1fr; } }
|
|
|
|
/* the structured content editor (Tiptap) */
|
|
.meta-fields { border: 1px dashed var(--line); border-radius: 10px; padding: 6px 12px; }
|
|
.meta-fields legend { font-size: .85rem; padding: 0 6px; }
|
|
.meta-row { display: grid; grid-template-columns: 9em 1fr auto; gap: 6px; margin: 4px 0; }
|
|
.meta-row input { font-size: var(--fs-md); padding: 2px 10px; }
|
|
.toolbar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: 10px; }
|
|
.toolbar .sep { width: 1px; background: var(--line); margin: 0 4px; }
|
|
.tool { padding: 0 10px; border-radius: var(--r-sm); } /* editor toolbar: squarer, denser */
|
|
.tool:has(> .icon:only-child) { min-width: 32px; height: 32px; padding: 0; } /* icon-only tools: square targets; the word is the tooltip */
|
|
.dv-editor { min-height: 20em; outline: none; margin: 8px 0; }
|
|
/* arranging (#41): one row per item, moved by dragging or the ↑ ↓ buttons */
|
|
.order-list { list-style: urdu; padding-inline-start: 2.5em; margin: 8px 0; }
|
|
.order-list li { display: flex; align-items: center; gap: 8px; padding: 2px 8px; margin: 3px 0; background: var(--surface-raised); border: 1px solid var(--border); border-radius: 8px; cursor: grab; display: list-item; }
|
|
.order-list li .order-tools { float: left; display: inline-flex; gap: 2px; }
|
|
.order-list li .tool { min-width: 1.8em; padding: 0 4px; font-size: .9rem; }
|
|
.order-list li.dragging { opacity: .5; }
|
|
.order-list li.moved { border-color: var(--active); }
|
|
/* کوڈ: Divan text beside the editor (stacked on phones) */
|
|
.editor-split.with-code { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
|
|
@media (max-width: 800px) { .editor-split.with-code { grid-template-columns: minmax(0, 1fr); } }
|
|
.live-code { position: sticky; top: 56px; max-height: 80vh; overflow: auto; margin: 8px 0; padding: 10px; white-space: pre-wrap; word-break: break-word;
|
|
font-family: 'Noto Naskh Arabic', ui-monospace, monospace; font-size: .9rem; line-height: 1.9; background: var(--surface-sunken); border: 1px solid var(--border); border-radius: 10px; unicode-bidi: plaintext; }
|
|
/* Tiptap's own CSS turns ligatures off, which breaks Nastaliq (and Naskh's لا); keep the font's shaping */
|
|
.ProseMirror.dv-editor { font-variant-ligatures: normal; font-feature-settings: normal; }
|
|
.dv-editor:focus-within { border-color: var(--accent); }
|
|
.dv-editor .unit { position: relative; margin: 0 0 10px; padding: 4px 8px; border-radius: 8px; border: 1px dashed transparent; }
|
|
.dv-editor .unit:hover { border-color: var(--line); }
|
|
.dv-editor .unit:has(> .misra:nth-child(2):last-child) { display: grid; grid-template-columns: 1fr 1fr; column-gap: 10%; }
|
|
.dv-editor .unit .misra { margin: 0; text-align: center; min-height: 1.8em; }
|
|
.dv-editor .unit:has(> .misra:nth-child(2):last-child) .misra:first-child { text-align: left; }
|
|
.dv-editor .unit:has(> .misra:nth-child(2):last-child) .misra:last-child { text-align: right; }
|
|
.dv-editor .unit:has(> .misra:nth-child(3)) { border-inline-start: 2px solid var(--line); }
|
|
.dv-editor .unit[data-mark]::before { content: attr(data-mark); grid-column: 1 / -1; justify-self: center; font-size: .72rem; color: var(--brand); border: 1px solid var(--line); border-radius: 999px; padding: 0 10px; }
|
|
.dv-editor .para { min-height: 1.8em; }
|
|
.dv-editor .dv-dict { text-decoration: underline dotted var(--link) 2px; text-underline-offset: 5px; }
|
|
.dv-editor sup.note { color: var(--brand); cursor: pointer; padding: 0 2px; }
|
|
.dv-editor .variant { border-bottom: 2px dashed var(--accent); cursor: pointer; }
|
|
.dv-editor .is-empty::before { content: attr(data-placeholder); color: var(--text-muted); opacity: .6; pointer-events: none; float: inline-start; height: 0; }
|
|
@media (max-width: 700px) { .dv-editor .unit:has(> .misra:nth-child(2):last-child) { grid-template-columns: 1fr; } .dv-editor .unit .misra { text-align: center !important; } .meta-row { grid-template-columns: 1fr; } }
|
|
/* home page sections editor (/mod/site) */
|
|
.site-section { border: 1px solid var(--border); border-radius: 10px; background: var(--surface-raised); margin: 10px 0; padding: 8px 12px; }
|
|
.site-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
|
|
.site-head .site-title { flex: 1 1 14em; }
|
|
.site-head input { width: 100%; padding: 2px 10px; }
|
|
.site-poets { list-style: urdu; margin: 8px 0; padding-inline-start: 2.5em; columns: 2 16em; }
|
|
.site-poets li { break-inside: avoid; padding: 3px 0; }
|
|
.site-poets .tool { min-width: 1.6em; padding: 0 4px; margin-inline-start: 6px; font-size: .85rem; }
|
|
.site-section .author-find { position: relative; max-width: 26em; }
|
|
.site-section .author-find input { width: 100%; padding: 2px 10px; }
|
|
/* tags (#52) */
|
|
.tag-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 6px 0; }
|
|
.tag-chip { padding: 0 10px; border-color: var(--line); }
|
|
.tag-chip small { color: var(--text-muted); }
|
|
.couplet .tag-chips { grid-column: 1 / -1; justify-content: center; margin: 2px 0 0; }
|
|
.couplet .tag-chip { font-size: var(--fs-xs); }
|
|
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
|
|
.tag-row .tag-name-box { flex: 1 1 12em; }
|
|
.tag-row .tag-name { width: 100%; font: inherit; padding: 2px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-sunken); color: var(--text); }
|
|
.tag-preview { display: flex; align-items: center; justify-content: center; gap: 6px; }
|
|
/* e-books */
|
|
.ebook-frame { display: block; width: 100%; height: 82vh; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
|
|
.ebook-text { white-space: pre-wrap; line-height: 2.2; max-width: 900px; margin: 0 auto; padding: 16px; background: var(--surface-sunken); border: 1px solid var(--border); border-radius: 10px; }
|
|
.eb-meta { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; max-width: 700px; margin: 0 auto; }
|
|
.eb-meta dt { color: var(--text-muted); }
|
|
.eb-meta dd { margin: 0; }
|
|
/* e-books: tabs, cover grid, right-to-left PDF reader */
|
|
.ebook-tabs a span[lang] { font-size: .8em; }
|
|
.ebook-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; margin: 16px 0; }
|
|
.ebook-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); text-align: center; }
|
|
.ebook-card img, .ebook-plain { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); box-shadow: 0 2px 8px rgb(0 0 0 / .12); background: var(--surface-sunken); transition: transform .2s; }
|
|
.ebook-card:hover img, .ebook-card:hover .ebook-plain { transform: translateY(-3px); }
|
|
.ebook-plain { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 12px; background: linear-gradient(160deg, var(--brand), #5a1e14); color: #fff; font-family: 'Noto Nastaliq Urdu', serif; line-height: 2; }
|
|
.ebook-plain small { opacity: .8; }
|
|
.ebook-title { font-size: .9rem; line-height: 1.6; }
|
|
.cover-small { max-height: 120px; border-radius: 4px; border: 1px solid var(--border); vertical-align: middle; }
|
|
.cover-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
|
|
.pdf-reader { margin: 12px 0; }
|
|
.pdf-bar { display: flex; justify-content: center; align-items: center; gap: 16px; margin-bottom: 8px; }
|
|
.pdf-page { width: 4.5em; padding: 0 4px; text-align: center; border-radius: var(--r-sm); }
|
|
.pdf-pages { display: flex; justify-content: center; gap: 8px; min-height: 60vh; cursor: pointer; }
|
|
.pdf-pages canvas { box-shadow: 0 2px 10px rgb(0 0 0 / .2); background: #fff; }
|
|
.pdf-reader:fullscreen { background: var(--surface-page); padding: 10px; overflow: auto; }
|
|
.pdf-reader:fullscreen .pdf-pages { min-height: calc(100vh - 70px); align-items: center; }
|
|
.eb-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
|
|
.eb-dir { border: 1px solid var(--border); border-radius: 8px; padding: 2px 12px; display: flex; gap: 14px; }
|
|
.eb-dir label { display: inline-flex; gap: 4px; align-items: center; }
|
|
.eb-co { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
|
|
.eb-co .tag-chips { justify-content: flex-start; }
|
|
.eb-co .author-find { position: relative; display: block; }
|
|
.eb-co .author-find input { width: 100%; }
|
|
.eb-people { color: var(--text-muted); }
|
|
.account-form.ebook-form, .mod-edit.account-form { max-width: 560px; }
|
|
|
|
/* buttons by role (owner request): one shape, colour says what it does
|
|
.btn secondary (outline) .btn.primary main action (filled)
|
|
.btn.ok confirms (approve, publish) .btn.danger destructive (log out, delete, reject)
|
|
.icon-btn icon only, round, with a tooltip (title) and aria-label */
|
|
.btn.primary { background: var(--action); border-color: var(--action); color: var(--action-ink); }
|
|
.btn.primary:hover { filter: brightness(1.12); border-color: var(--action); color: var(--action-ink); }
|
|
.btn.ok { border-color: var(--ok); color: var(--ok); }
|
|
.btn.ok:hover { background: var(--ok); color: var(--surface-page); }
|
|
.btn.danger { border-color: var(--danger); color: var(--danger); }
|
|
.btn.danger:hover { background: var(--danger); color: #fff; }
|
|
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 1.5px solid var(--border);
|
|
border-radius: 50%; background: var(--surface-sunken); color: var(--text); cursor: pointer; text-decoration: none; }
|
|
.icon-btn:hover, .icon-btn[aria-current='page'] { border-color: var(--active); color: var(--active); }
|
|
.icon-btn.danger { color: var(--danger); border-color: var(--danger); }
|
|
.icon-btn.danger:hover { background: var(--danger); color: #fff; }
|
|
.icon { flex: none; }
|
|
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
|
|
.icon-btn.small { width: 30px; height: 30px; }
|
|
/* PDF full screen: the button shows enter or exit */
|
|
.pdf-full .i-exit, .pdf-reader:fullscreen .pdf-full .i-enter { display: none; }
|
|
.pdf-reader:fullscreen .pdf-full .i-exit { display: block; }
|
|
/* display settings in the header: a button and its panel (font, palette swatches, light/dark/automatic) */
|
|
.display-menu { position: relative; display: flex; } /* no line box: lines up with the other header icons */
|
|
.display-menu > summary { list-style: none; }
|
|
.display-menu > summary::-webkit-details-marker { display: none; }
|
|
.display-menu[open] > summary { border-color: var(--active); color: var(--active); }
|
|
.display-panel { position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; width: 260px; padding: 10px 14px; border: 1.5px solid var(--border);
|
|
border-radius: 14px; background: var(--surface-raised); box-shadow: 0 8px 24px rgb(0 0 0 / .18); font: 400 .9rem/1.8 var(--font-ui); color: var(--text); }
|
|
.display-panel p { margin: 6px 0 4px; color: var(--text-muted); font-size: .8rem; }
|
|
.display-panel .seg { display: flex; gap: 4px; }
|
|
.display-panel button { flex: 1; gap: 4px; padding: 2px 6px; border-radius: var(--r-md); }
|
|
.display-panel .f-nastaliq { font-family: 'Noto Nastaliq Urdu', serif; line-height: 2.2; }
|
|
.display-panel .swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
|
|
.display-panel .swatches button { flex-direction: column; font-size: .7rem; padding: 4px 2px; }
|
|
.display-panel .swatches span { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, var(--a) 50%, var(--b) 50%);
|
|
box-shadow: 0 0 0 1px rgb(0 0 0 / .2); }
|
|
.glyph-icon { position: relative; display: inline-flex; }
|
|
.glyph-icon > span { position: absolute; inset: 0 0 4px 2px; display: flex; align-items: center; justify-content: center;
|
|
font: 700 11px/1 var(--font-ui); }
|
|
|
|
/* user access (admin): a list to find people, one page per user. Role colours: admin brand, senior moderator action,
|
|
moderator accent, reader muted; the avatar and the role badge share them */
|
|
[data-role] { --c: var(--text-muted); }
|
|
[data-role='admin'] { --c: var(--brand); } [data-role='mod-l1'] { --c: var(--action); } [data-role='mod-l2'] { --c: var(--accent); }
|
|
.badge { display: inline-flex; align-items: center; padding: 0 10px; border-radius: var(--r-pill); font: 600 var(--fs-xs)/1.9 var(--font-ui); white-space: nowrap;
|
|
color: var(--c, var(--text-muted)); background: color-mix(in srgb, var(--c, var(--text-muted)) 12%, transparent); }
|
|
.badge.plain { --c: var(--text-muted); font-weight: 400; }
|
|
.badge.warn { --c: var(--accent); }
|
|
.badge.danger { --c: var(--danger); }
|
|
.avatar { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font: 700 1.1rem/1 var(--font-ui);
|
|
color: var(--surface-raised); background: var(--c); }
|
|
.avatar.big { width: 64px; height: 64px; font-size: 1.6rem; }
|
|
.admin-search { position: relative; max-width: 520px; margin: 0 auto 10px; }
|
|
.admin-search input { width: 100%; padding-inline-start: 40px; border-radius: var(--r-pill); }
|
|
.field-icon { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); display: flex; color: var(--text-muted); pointer-events: none; }
|
|
.role-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 0 16px; }
|
|
.role-filter small { opacity: .7; font-weight: 400; }
|
|
.user-list { list-style: none; padding: 0; margin: 0 auto; max-width: 760px; border: 1.5px solid var(--border); border-radius: var(--r-lg);
|
|
background: var(--surface-raised); overflow: hidden; }
|
|
.user-row + .user-row { border-top: 1px solid var(--line); }
|
|
.user-row > a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: var(--text); }
|
|
.user-row > a:hover { background: var(--accent-soft); color: var(--text); }
|
|
.user-row.disabled .who, .user-row.disabled .avatar { opacity: .5; }
|
|
.who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.6; }
|
|
.who .name, .who .email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.who [dir='ltr'], .who .email { direction: ltr; text-align: right; } /* an email is cut at its end, not its start */
|
|
.who .email, .user-head .email { font: var(--fs-sm) var(--font-latin); color: var(--text-muted); }
|
|
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
|
|
.seen { font-size: var(--fs-xs); white-space: nowrap; min-width: 5.5em; text-align: end; }
|
|
.user-row .go { color: var(--text-muted); }
|
|
@media (max-width: 560px) {
|
|
.user-row > a { flex-wrap: wrap; row-gap: 4px; }
|
|
.user-row .tags { order: 4; flex-basis: 100%; padding-inline-start: 52px; }
|
|
.user-row .seen { min-width: 0; }
|
|
}
|
|
/* one user */
|
|
.back { margin: 0 0 8px; font-size: var(--fs-sm); }
|
|
.back a { display: inline-flex; align-items: center; gap: 4px; }
|
|
.user-head { display: flex; align-items: center; gap: 16px; max-width: 760px; margin: 0 auto 16px; }
|
|
.user-head h1 { text-align: start; margin: 0; font-size: var(--fs-xl); }
|
|
.user-head h1::after { display: none; }
|
|
.user-head p { margin: 4px 0 0; }
|
|
.panel { max-width: 760px; margin: 0 auto 16px; padding: 12px 18px 16px; border: 1.5px solid var(--border); border-radius: var(--r-lg); background: var(--surface-raised); }
|
|
.panel h2 { text-align: start; font-size: var(--fs-lg); margin: 0 0 10px; }
|
|
.panel h2::after { display: none; }
|
|
.role-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
|
|
.role-pick button { flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 12px; border-radius: var(--r-md); text-align: start; font-weight: 400; }
|
|
.role-pick button small { color: var(--text-muted); font-size: var(--fs-xs); line-height: 1.6; }
|
|
.role-pick button[aria-pressed='true'] { opacity: 1; cursor: default; border-color: var(--c, var(--active)); }
|
|
.role-pick button[aria-pressed='true'] .badge { color: var(--surface-raised); background: var(--c); }
|
|
.grants { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
|
|
.grant { display: flex; align-items: flex-start; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-page); }
|
|
.grant > div { flex: 1; min-width: 0; }
|
|
.grant-scope { margin: 0 0 4px; }
|
|
.grant .tag-chips { justify-content: flex-start; margin: 0; gap: 4px; }
|
|
.grant .sep { width: 1px; background: var(--line); margin: 2px 4px; }
|
|
.new-grant > summary { list-style: none; width: fit-content; }
|
|
.new-grant > summary::-webkit-details-marker { display: none; }
|
|
.new-grant[open] > summary { display: none; } /* the form replaces the button */
|
|
.grant-form { display: flex; flex-direction: column; gap: 12px; }
|
|
.grant-form fieldset { border: 0; padding: 0; margin: 0; }
|
|
.grant-form legend { font-weight: 700; padding: 0; margin-bottom: 4px; }
|
|
.grant-form .target { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
|
|
.grant-form .target small { font-weight: 400; }
|
|
.grant-form:has(input[name='scope'][value='all']:checked) .target { display: none; } /* "all poets" needs no target */
|
|
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
|
|
/* toggle chips: the chip shows the state (checked = --active), the box itself is visually hidden but focusable */
|
|
.chips .chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
|
|
.chips .chip:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
|
|
.chips .chip:has(input:checked)::before { content: '✓'; }
|
|
.account-actions { display: flex; flex-wrap: wrap; gap: 8px; }
|
|
.danger-zone { margin-top: 14px; padding-top: 12px; border-top: 1px dashed color-mix(in srgb, var(--danger) 40%, transparent); }
|
|
.danger-zone p { margin: 0 0 6px; }
|
|
|
|
/* ── motion: purposeful and short; all of it off when the reader's device asks for reduced motion ── */
|
|
/* page to page: a cross-fade, the logo stays put */
|
|
@view-transition { navigation: auto; }
|
|
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
|
|
.wordmark .logo { view-transition-name: logo; }
|
|
/* the confirm dialog */
|
|
.ask { border: 1.5px solid var(--border); border-radius: var(--r-lg); padding: 18px 22px 14px; max-width: min(420px, 92vw); background: var(--surface-raised); color: var(--text);
|
|
box-shadow: var(--shadow-lg); font-family: var(--font-ui); }
|
|
.ask::backdrop { background: rgb(0 0 0 / .35); backdrop-filter: blur(2px); }
|
|
.ask p { margin: 0 0 14px; line-height: 1.9; }
|
|
.ask-actions { display: flex; gap: 8px; justify-content: flex-start; }
|
|
.ask[open] { animation: pop-in .18s ease-out; }
|
|
@keyframes pop-in { from { opacity: 0; transform: scale(.96) translateY(6px); } }
|
|
/* toasts: bottom centre, above everything */
|
|
.toasts { position: fixed; inset-inline: 0; bottom: 20px; z-index: 50; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
|
|
.toast { margin: 0; padding: 8px 18px; border-radius: var(--r-pill); background: var(--text); color: var(--surface-page); box-shadow: var(--shadow-lg);
|
|
font: var(--fs-sm)/1.8 var(--font-ui); animation: toast-in .25s ease-out; }
|
|
.toast::before { content: '✓ '; color: var(--ok); font-weight: 700; }
|
|
.toast.error::before { content: '! '; color: var(--danger); }
|
|
.toast.out { animation: toast-out .3s ease-in forwards; }
|
|
@keyframes toast-in { from { opacity: 0; transform: translateY(14px); } }
|
|
@keyframes toast-out { to { opacity: 0; transform: translateY(14px); } }
|
|
/* errors stay by the form and nudge once */
|
|
.form-error:not(:empty) { animation: nudge .4s ease-in-out; }
|
|
@keyframes nudge { 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
|
|
/* a submitted button is busy until the page answers */
|
|
[aria-busy='true'] { position: relative; color: transparent !important; pointer-events: none; }
|
|
[aria-busy='true']::after { content: ''; position: absolute; inset: 0; margin: auto; width: 1em; height: 1em; border-radius: 50%;
|
|
border: 2px solid var(--text-muted); border-top-color: transparent; animation: spin .7s linear infinite; }
|
|
.btn.primary[aria-busy='true']::after { border-color: var(--action-ink); border-top-color: transparent; }
|
|
@keyframes spin { to { transform: rotate(360deg); } }
|
|
/* reading: the couplets rise in, one after another, on first load */
|
|
.poem > .couplet, .poem > .para { animation: rise .45s ease-out both; }
|
|
.poem > .couplet:nth-of-type(2), .poem > .para:nth-of-type(2) { animation-delay: 45ms; }
|
|
.poem > .couplet:nth-of-type(3), .poem > .para:nth-of-type(3) { animation-delay: 90ms; }
|
|
.poem > .couplet:nth-of-type(4), .poem > .para:nth-of-type(4) { animation-delay: 135ms; }
|
|
.poem > .couplet:nth-of-type(5), .poem > .para:nth-of-type(5) { animation-delay: 180ms; }
|
|
.poem > .couplet:nth-of-type(6), .poem > .para:nth-of-type(6) { animation-delay: 225ms; }
|
|
.poem > .couplet:nth-of-type(7), .poem > .para:nth-of-type(7) { animation-delay: 270ms; }
|
|
.poem > .couplet:nth-of-type(8), .poem > .para:nth-of-type(8) { animation-delay: 315ms; }
|
|
.poem > .couplet:nth-of-type(9), .poem > .para:nth-of-type(9) { animation-delay: 360ms; }
|
|
.poem > .couplet:nth-of-type(10), .poem > .para:nth-of-type(10) { animation-delay: 405ms; }
|
|
.poem > .couplet:nth-of-type(11), .poem > .para:nth-of-type(11) { animation-delay: 450ms; }
|
|
.poem > .couplet:nth-of-type(12), .poem > .para:nth-of-type(12) { animation-delay: 495ms; }
|
|
.poem > .couplet:nth-of-type(13), .poem > .para:nth-of-type(13) { animation-delay: 540ms; }
|
|
.poem > .couplet:nth-of-type(14), .poem > .para:nth-of-type(14) { animation-delay: 585ms; }
|
|
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
|
|
/* saving: the bookmark gives a small pop when it fills */
|
|
.save[aria-pressed='true']::before, .bm[aria-pressed='true']::before, .wordbook[aria-pressed='true'] { animation: pop .35s ease-out; }
|
|
@keyframes pop { 40% { transform: scale(1.35); } }
|
|
/* the word sidebar slides in (on phones it rises from the bottom) */
|
|
.dict { transition: transform .25s ease-out, opacity .25s; }
|
|
@starting-style { .dict { transform: translateX(-100%); opacity: 0; } }
|
|
@media (max-width: 700px) { @starting-style { .dict { transform: translateY(100%); } } }
|
|
/* menus and folding sections open smoothly */
|
|
.display-menu[open] .display-panel { animation: pop-in .16s ease-out; transform-origin: top left; }
|
|
:root { interpolate-size: allow-keywords; }
|
|
details::details-content { transition: block-size .25s, content-visibility .25s allow-discrete; overflow: clip; }
|
|
/* headings break into even lines */
|
|
h1, h2, h3, .ask p { text-wrap: balance; }
|
|
p, li { text-wrap: pretty; }
|
|
@media (prefers-reduced-motion: reduce) {
|
|
*, *::before, *::after, ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; transition: none !important; }
|
|
}
|
|
.ask .btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
|
|
|
|
/* notes: a glyph below each couplet's bookmark (outline: write a note; filled gold: this couplet or a phrase in it has one) */
|
|
:root { --nt-outline: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21%2015a2%202%200%200%201-2%202H7l-4%204V5a2%202%200%200%201%202-2h14a2%202%200%200%201%202%202z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M7 8h10M7 12h6' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); --nt-filled: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21%2015a2%202%200%200%201-2%202H7l-4%204V5a2%202%200%200%201%202-2h14a2%202%200%200%201%202%202z' fill='black' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M7 8h10M7 12h6' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
|
|
.nt { position: absolute; inset-inline-end: -26px; top: calc(.5em + 26px); width: 20px; height: 20px; padding: 0; border: 0; background: none; cursor: pointer;
|
|
opacity: 0; transition: opacity .15s; }
|
|
.nt::before { content: ''; display: block; width: 17px; height: 17px; margin: auto; background-color: var(--text-muted);
|
|
-webkit-mask: var(--nt-outline) center / contain no-repeat; mask: var(--nt-outline) center / contain no-repeat; }
|
|
.nt[aria-pressed='true'] { opacity: 1; }
|
|
.nt[aria-pressed='true']::before { background-color: var(--accent); -webkit-mask-image: var(--nt-filled); mask-image: var(--nt-filled); animation: pop .35s ease-out; }
|
|
.couplet:hover .nt, .poem .para:hover .nt, .poem .single:hover .nt, .nt:focus-visible { opacity: 1; }
|
|
@media (hover: none) { .nt { opacity: .55; } .nt[aria-pressed='true'] { opacity: 1; } }
|
|
@media (max-width: 700px) { .nt { inset-inline-end: -4px; top: 26px; } }
|
|
/* a highlighted phrase with a note: the note glyph instead of the bookmark */
|
|
.bmk.note-only { background: none; text-decoration-color: var(--accent); } /* a note without a bookmark: underline only */
|
|
.bmk.has-note::after { background-color: var(--accent); -webkit-mask-image: var(--nt-filled); mask-image: var(--nt-filled); }
|
|
.bmk:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
|
|
/* the note box */
|
|
.note-box { width: min(480px, 92vw); }
|
|
.note-for { font-size: var(--fs-md); color: var(--text-muted); max-height: 6.5em; overflow: auto; }
|
|
.note-box textarea { width: 100%; box-sizing: border-box; resize: vertical; line-height: 1.9; margin-bottom: 10px; }
|
|
.note-field .in-box { top: 20px; } /* at the first line of the box, not its middle */
|
|
.note-field textarea { padding-left: 80px; } /* the buttons sit on the left whatever the note's language (the box follows what is typed) */
|
|
.note-box .kb { padding: 0 0 10px; }
|
|
.note-box .kb button { min-width: 2em; font-size: 1rem; }
|
|
.note-others { list-style: none; margin: 0 0 10px; padding: 8px 0 0; border-top: 1px dashed var(--line); }
|
|
.note-others button { all: unset; display: block; cursor: pointer; font-size: var(--fs-sm); color: var(--text-muted); padding: 2px 0; }
|
|
.note-others button:hover { color: var(--active); }
|
|
.ask-actions { flex-wrap: wrap; }
|
|
.note-box .note-clear { margin-inline-start: auto; }
|
|
/* share a couplet as an image: under the note glyph, shown on hover like the bookmark */
|
|
.sh { position: absolute; inset-inline-end: -26px; top: calc(.5em + 52px); width: 20px; height: 20px; padding: 0; border: 0; background: none; cursor: pointer; opacity: 0; transition: opacity .15s; }
|
|
.sh::before { content: ''; display: block; width: 16px; height: 16px; margin: auto; background-color: var(--text-muted); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12v7a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='m16 6-4-4-4 4'/%3E%3Cpath d='M12 2v13'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12v7a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='m16 6-4-4-4 4'/%3E%3Cpath d='M12 2v13'/%3E%3C/svg%3E") center / contain no-repeat; }
|
|
.sh:hover::before { background-color: var(--active); }
|
|
.couplet:hover .sh, .poem .para:hover .sh, .poem .single:hover .sh, .sh:focus-visible { opacity: 1; }
|
|
@media (hover: none) { .sh { opacity: .55; } }
|
|
@media (max-width: 700px) { .sh { inset-inline-end: -4px; top: 52px; } }
|
|
|
|
/* moderation dashboard: count tiles that jump to their queue; queue items as cards */
|
|
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; max-width: 760px; margin: 0 auto 18px; }
|
|
.stat { display: flex; flex-direction: column; align-items: center; padding: 12px 10px 8px; border: 1.5px solid var(--border); border-radius: var(--r-lg);
|
|
background: var(--surface-raised); color: var(--text); transition: transform .2s, border-color .2s; }
|
|
.stat:hover { transform: translateY(-2px); border-color: var(--active); color: var(--text); }
|
|
.stat strong { font: 700 2.2rem/1.4 var(--font-ui); color: var(--action); }
|
|
.stat span { font-size: var(--fs-sm); color: var(--text-muted); }
|
|
.queue { max-width: 760px; margin: 0 auto 22px; scroll-margin-top: 16px; }
|
|
.queue h2 { text-align: start; font-size: var(--fs-lg); }
|
|
.queue h2::after { display: none; }
|
|
.queue-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
|
|
.queue-card { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--r-md);
|
|
background: var(--surface-raised); color: var(--text); transition: transform .2s, border-color .2s; }
|
|
.queue-card:hover { transform: translateY(-1px); border-color: var(--active); color: var(--text); }
|
|
.queue-card .kind { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
|
|
.queue-card .what { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.6; }
|
|
.queue-card .what small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-xs); }
|
|
@media (max-width: 560px) { .queue-card { flex-wrap: wrap; } .queue-card .status { margin-inline-start: 46px; } }
|
|
/* an empty queue or list: a quiet line with the ✤ */
|
|
.empty { text-align: center; color: var(--text-muted); padding: 14px; border: 1px dashed var(--line); border-radius: var(--r-md); }
|
|
.empty span { display: block; color: var(--brand); opacity: .6; font-size: 1.3rem; }
|
|
/* timelines (moderation activity, admin record): a dot per entry, coloured by what happened */
|
|
.timeline { list-style: none; max-width: 760px; margin: 8px auto; padding: 0; padding-inline-start: 22px; border-inline-start: 2px solid var(--line); }
|
|
.timeline li { position: relative; margin: 0 0 12px; padding: 8px 14px; border-radius: var(--r-md); background: var(--surface-raised); border: 1px solid var(--line); }
|
|
.timeline li::before { content: ''; position: absolute; inset-inline-start: -30px; top: 16px; width: 12px; height: 12px; border-radius: 50%;
|
|
background: var(--tone); box-shadow: 0 0 0 3px var(--surface-page); }
|
|
.timeline li p { margin: 0; line-height: 1.8; }
|
|
.timeline .who { font: var(--fs-sm) var(--font-latin); color: var(--text-muted); }
|
|
.timeline header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
|
|
.timeline time { font-size: var(--fs-xs); white-space: nowrap; }
|
|
.timeline .target { font-family: var(--font-latin); }
|
|
.timeline blockquote { margin: 4px 0; padding-inline-start: 10px; border-inline-start: 2px solid var(--tone); color: var(--text-muted); font-size: var(--fs-sm); }
|
|
[data-tone] { --tone: var(--text-muted); }
|
|
[data-tone='ok'] { --tone: var(--ok); } [data-tone='action'] { --tone: var(--action); } [data-tone='accent'] { --tone: var(--accent); } [data-tone='danger'] { --tone: var(--danger); }
|
|
|
|
/* a couplet's bookmark, note, share and download sit in one row at its left edge, on the bottom line (the ✤ line, where
|
|
there is never text): clear of the misras however long they are, the same on phones */
|
|
.c-tools { position: absolute; left: 0; bottom: -4px; z-index: 1; display: flex; align-items: center; gap: 4px; }
|
|
.c-tools > button { position: static; inset: auto; top: auto; }
|
|
.poem .para > .c-tools, .poem .single > .c-tools { bottom: -20px; }
|
|
.poem .para, .poem .single { margin-bottom: 26px; }
|
|
@media (max-width: 760px) { .c-tools { bottom: 2px; } .couplet { padding-bottom: 28px; } }
|
|
/* download the couplet's picture: beside share */
|
|
.dl { width: 20px; height: 20px; padding: 0; border: 0; background: none; cursor: pointer; opacity: 0; transition: opacity .15s; }
|
|
.dl::before { content: ''; display: block; width: 16px; height: 16px; margin: auto; background-color: var(--text-muted); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M12 15V3'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M12 15V3'/%3E%3C/svg%3E") center / contain no-repeat; }
|
|
.dl:hover::before { background-color: var(--active); }
|
|
.couplet:hover .dl, .poem .para:hover .dl, .poem .single:hover .dl, .dl:focus-visible { opacity: 1; }
|
|
@media (hover: none) { .dl { opacity: .55; } }
|
|
/* the notes page: one card per note, the couplet with the noted phrase marked, the note editable in place */
|
|
.note-list { list-style: none; padding: 0; max-width: 760px; margin: 12px auto; display: flex; flex-direction: column; gap: 12px; }
|
|
.note-card { position: relative; padding: 10px 16px 12px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface-raised); }
|
|
.note-card header { display: flex; align-items: center; gap: 8px; padding-inline-end: 40px; }
|
|
.note-card .crumbs { text-align: start; margin: 0; font-size: var(--fs-xs); flex: 1; }
|
|
.note-card .lib-couplet { margin: 6px 0 8px; }
|
|
.note-card mark { background: var(--accent-soft); box-shadow: inset 0 -2px var(--accent); }
|
|
.note-edit textarea { width: 100%; box-sizing: border-box; resize: vertical; line-height: 1.9; background: var(--surface-page); }
|
|
.note-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
|
|
.note-delete { position: absolute; top: 10px; left: 12px; margin: 0; }
|
|
|
|
/* ── reading mode: the text, the breadcrumbs and the logo; nothing else. On readable pages only (poems, books, poets),
|
|
kept across pages until switched off from the ✕ in the header ── */
|
|
.byline, .reading-exit { display: none; }
|
|
:root[data-reading]:has([data-readable]) {
|
|
.site-header .search-form, .site-header .toggles, .site-header .kb, .site-footer, .center:has(> .save), .c-tools, .tag-chips,
|
|
.hint, .hl-note, .divan-edit, .source, .dict { display: none !important; }
|
|
.reading-exit { display: inline-flex; margin-inline-start: auto; }
|
|
.site-header .wrap { flex-wrap: nowrap; padding-top: 10px; }
|
|
.wordmark .logo { width: 44px; }
|
|
main { max-width: 760px; padding-top: 4px; }
|
|
.crumbs { font-size: var(--fs-sm); }
|
|
.byline { display: block; text-align: center; margin: -4px 0 14px; color: var(--brand); font-family: 'Noto Nastaliq Urdu', serif; line-height: 2; }
|
|
.poem { background: none; border: 0; box-shadow: none; padding-inline: 0; }
|
|
.couplet, .poem .single { font-size: 1.28rem; }
|
|
.poem .para { font-size: 1.15rem; }
|
|
.couplet:hover { background: none; }
|
|
.intro { background: none; border: 0; padding-inline: 0; }
|
|
}
|
|
@media print { /* printing is reading too: the text and its source */
|
|
.site-header .search-form, .site-header .toggles, .site-footer, .center:has(> .save), .c-tools, .tag-chips, .hint, .poem-nav, .dict, .toasts { display: none !important; }
|
|
.byline { display: block; text-align: center; }
|
|
.poem { background: none; border: 0; }
|
|
}
|
|
/* 404 and error pages */
|
|
.error-page { text-align: center; padding: 32px 0 48px; }
|
|
.error-code { font: 700 4.5rem/1 'Noto Naskh Arabic', serif; color: var(--accent, var(--brand)); opacity: .35; margin: 0 0 8px; }
|
|
.error-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
|
|
|
|
/* ── the header stays at the top for everyone. Its height never changes while scrolling (that would make the page jump):
|
|
once scrolled it only gains a translucent, blurred background and a hairline shadow. --header-h (set by Base) lets
|
|
anchors and sticky toolbars clear it ── */
|
|
.site-header { position: sticky; top: 0; z-index: 15; background: var(--surface-page); transition: box-shadow .2s, background .2s; }
|
|
.site-header .wrap { padding-bottom: 10px; }
|
|
:root[data-scrolled] .site-header { background: color-mix(in srgb, var(--surface-page) 86%, transparent); backdrop-filter: saturate(1.3) blur(10px);
|
|
box-shadow: 0 1px 0 var(--line), 0 8px 20px rgb(0 0 0 / .06); }
|
|
:root { scroll-padding-top: calc(var(--header-h, 80px) + 12px); } /* #c5 and other anchors land below the header */
|
|
.toolbar { top: var(--header-h, 0px); }
|
|
.live-code { top: calc(var(--header-h, 0px) + 8px); }
|
|
|
|
/* ── footer: the brand beside three groups of links across the page's width; licence and attribution in a thin bar ── */
|
|
.site-footer .wrap { display: grid; grid-template-columns: minmax(300px, 1.2fr) 2fr; gap: 18px 40px; align-items: start; }
|
|
.footer-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; }
|
|
.footer-brand .made-in { flex-basis: 100%; margin-top: 14px; padding-inline-start: 5px; } /* its own line below the logo, starting at the
|
|
logo's visible edge (the medallion's solid lobes sit about 5px inside the image) */
|
|
.footer-logo { flex: none; display: block; }
|
|
.footer-logo img { display: block; width: 64px; height: 64px; }
|
|
.footer-tagline { margin: 4px 0 0; font: 700 1.15rem/2.2 'Noto Nastaliq Urdu', serif; color: var(--action); } /* the logo says دیوان; the tagline beside it */
|
|
.made-in { margin: 8px 0 0; display: flex; align-items: center; gap: 8px; font-family: 'Noto Nastaliq Urdu', serif; font-size: .9rem; line-height: 2; color: var(--text); }
|
|
.made-in .flag { flex: none; border-radius: 2px; box-shadow: 0 0 0 1px rgb(0 0 0 / .15); }
|
|
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
|
|
.footer-links > div:first-child { grid-row: span 2; } /* the site's five links down one column, sources and code stacked beside them */
|
|
.footer-bar { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 18px; margin: 0; padding-top: 10px;
|
|
border-top: 1px dashed var(--line); font-size: var(--fs-xs); color: var(--text-muted); }
|
|
.footer-bar a { color: var(--text-muted); }
|
|
.footer-bar a:hover { color: var(--active); }
|
|
@media (max-width: 760px) {
|
|
.site-footer .wrap { grid-template-columns: 1fr; }
|
|
.footer-bar { justify-content: center; text-align: center; }
|
|
}
|
|
|
|
/* ── phones ── */
|
|
/* e-book format tabs: one line each; the English in brackets only where there is room */
|
|
.ebook-tabs a { white-space: nowrap; }
|
|
@media (max-width: 560px) {
|
|
.ebook-tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
|
|
.ebook-tabs a span[lang] { display: none; }
|
|
}
|
|
/* touch screens have no hover: a couplet's tools show when it is tapped (the couplet is lightly marked); a set bookmark
|
|
or note stays visible; couplets without either do not keep room for the row */
|
|
@media (hover: none) {
|
|
.poem .couplet.is-active, .poem .para.is-active, .poem .single.is-active { background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: var(--r-sm); }
|
|
}
|
|
/* phones: the header slides away while scrolling down and comes back on the way up (a transform: nothing below jumps) */
|
|
@media (max-width: 640px) {
|
|
.site-header { transition: transform .25s ease, box-shadow .2s, background .2s; }
|
|
:root[data-header-hidden] .site-header { transform: translateY(-100%); box-shadow: none; }
|
|
}
|
|
|
|
/* ── a couplet's tools: one small button (⋯, with a filled bookmark and/or note glyph when set) that opens one shared
|
|
menu: bookmark, note, share, download. The button shows on hover (on touch screens when the couplet is tapped); a set
|
|
bookmark or note keeps it visible ── */
|
|
:root { --dots: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='5' cy='12' r='2.2'/%3E%3Ccircle cx='12' cy='12' r='2.2'/%3E%3Ccircle cx='19' cy='12' r='2.2'/%3E%3C/svg%3E"); --sh-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12v7a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='m16 6-4-4-4 4'/%3E%3Cpath d='M12 2v13'/%3E%3C/svg%3E"); --dl-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M12 15V3'/%3E%3C/svg%3E"); }
|
|
.c-tools > .more { align-items: center; gap: 3px; height: 24px; padding: 0 6px; border: 0; border-radius: var(--r-pill); background: none;
|
|
color: var(--text-muted); cursor: pointer; opacity: 0; transition: opacity .15s, background .15s; }
|
|
.more i, .c-menu i { flex: none; width: 15px; height: 15px; background-color: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
|
|
.more i { display: none; }
|
|
.more .g-dots { display: block; --m: var(--dots); }
|
|
.more[data-bm] .g-bm { display: block; --m: var(--bm-filled); background-color: var(--active); }
|
|
.more[data-nt] .g-nt { display: block; --m: var(--nt-filled); background-color: var(--accent); }
|
|
.more[data-bm], .more[data-nt] { opacity: 1; }
|
|
.more[data-bm] .g-dots, .more[data-nt] .g-dots { opacity: .45; }
|
|
:is(.couplet, .para, .single):hover .more, .is-active .more, .more:focus-visible { opacity: 1; }
|
|
.more:hover { background: var(--accent-soft); color: var(--active); }
|
|
/* the ⋯ and its menu are for phones; wider screens keep the four icons */
|
|
.more { display: none; }
|
|
@media (max-width: 640px), (hover: none) and (pointer: coarse) {
|
|
.c-tools > .bm, .c-tools > .nt, .c-tools > .sh, .c-tools > .dl { display: none; }
|
|
.c-tools > .more { display: inline-flex; }
|
|
.c-tools { bottom: 2px; } .poem .couplet { padding-bottom: 26px; } /* room for the button: it never sits on the text */
|
|
}
|
|
.c-menu { position: fixed; inset: auto; margin: 0; min-width: 180px; padding: 6px; border: 1px solid var(--border); border-radius: var(--r-md);
|
|
background: var(--surface-raised); color: var(--text); box-shadow: var(--shadow-lg); }
|
|
.c-menu:popover-open { display: flex; flex-direction: column; animation: pop-in .14s ease-out; }
|
|
.c-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 5px 10px; border: 0; border-radius: var(--r-sm); background: none;
|
|
color: var(--text); font: var(--fs-sm)/1.9 var(--font-ui); text-align: start; cursor: pointer; }
|
|
.c-menu button:hover, .c-menu button:focus-visible { background: var(--accent-soft); color: var(--active); outline: none; }
|
|
.c-menu i { width: 17px; height: 17px; background-color: var(--text-muted); }
|
|
.c-menu .g-bm { --m: var(--bm-outline); } .c-menu [data-on] .g-bm { --m: var(--bm-filled); background-color: var(--active); }
|
|
.c-menu .g-nt { --m: var(--nt-outline); } .c-menu .g-sh { --m: var(--sh-mask); } .c-menu .g-dl { --m: var(--dl-mask); }
|
|
/* a page's tags at the end of its content: «ٹیگ» at the start of the line; opened, the tags follow it and wrap across the width */
|
|
.tags-box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 16px 0 10px; }
|
|
.tags-box > .tag-chip { display: none; }
|
|
.tags-box > :checked ~ .tag-chip { display: inline-flex; animation: rise .2s ease-out both; }
|
|
.tags-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 1px 14px; border: 1.5px solid var(--border); border-radius: var(--r-pill);
|
|
background: var(--surface-sunken); font: var(--fs-sm)/1.8 var(--font-ui); cursor: pointer; user-select: none; }
|
|
.tags-toggle::after { content: '⌄'; transition: transform .2s; }
|
|
.tags-box > :checked + .tags-toggle { border-color: var(--active); color: var(--active); }
|
|
.tags-box > :checked + .tags-toggle::after { transform: rotate(-90deg); } /* points along the line, towards the tags */
|
|
.tags-toggle:hover { border-color: var(--active); color: var(--active); }
|
|
.tags-box > :focus-visible + .tags-toggle { outline: 2px solid var(--focus); outline-offset: 2px; }
|
|
/* how to use the site */
|
|
.help { max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
|
|
.help section { padding: 10px 16px 6px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-raised); }
|
|
.help h2 { display: flex; align-items: center; gap: 10px; text-align: start; font-size: var(--fs-lg); margin: 0 0 4px; }
|
|
.help h2::after { display: none; }
|
|
.help-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); flex: none; }
|
|
.help p { margin: 0 0 8px; line-height: 2; }
|