/* Ready-made pages: Unicode converter, date converter, exchange rates, e-paper. Follows the site's colors and dark mode. */
.ntp-tool { padding-top: 22px; padding-bottom: 44px; }
.ntp-tool-card { padding: 20px; border: 1px solid var(--ntp-border); border-radius: var(--ntp-radius); background: var(--ntp-surface); box-shadow: var(--ntp-shadow); }
.ntp-tool h2 { margin: 0; color: var(--ntp-heading); font-size: 21px; font-weight: 800; line-height: 1.3; }
.ntp-tool h2 small { color: var(--ntp-muted); font-size: 13.5px; font-weight: 500; }
.ntp-tool-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 0 18px; border: 1px solid var(--ntp-primary); border-radius: 10px; background: var(--ntp-primary); color: #fff !important; font: inherit; font-size: 15.5px; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; transition: filter .15s; }
.ntp-tool-btn:hover { filter: brightness(.92); }
.ntp-tool-btn.is-ghost { background: transparent; color: var(--ntp-heading) !important; border-color: var(--ntp-border); }
.ntp-tool-btn:disabled { opacity: .4; cursor: default; }
.ntp-tool-note { margin: 10px 0 0; color: var(--ntp-muted); font-size: 13.5px; line-height: 1.6; }
.ntp-tool-note a { color: var(--ntp-secondary); }
.ntp-tool-empty { max-width: 620px; margin: 0 auto; text-align: center; }
.ntp-tool-empty h2 { margin-bottom: 8px; }
.ntp-tool-empty p { margin: 0 0 14px; color: var(--ntp-text); }
.ntp-tool :is(input, select, textarea) { box-sizing: border-box; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--ntp-border); border-radius: 10px; background: var(--ntp-surface); color: var(--ntp-heading); font: inherit; font-size: 16px; }
.ntp-tool :is(input, select, textarea):focus { border-color: var(--ntp-secondary); outline: 2px solid color-mix(in srgb, var(--ntp-secondary) 25%, transparent); outline-offset: 0; }
.ntp-tool label { display: block; color: var(--ntp-muted); font-size: 13.5px; font-weight: 700; }

/* Unicode converter */
.ntp-tool-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; max-width: 720px; margin: 0 auto 16px; padding: 4px; border-radius: 14px; background: var(--ntp-soft); }
.ntp-tool-tabs button { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; padding: 8px 6px; border: 0; border-radius: 11px; background: none; color: var(--ntp-heading); font: inherit; font-size: 16px; font-weight: 700; line-height: 1.3; cursor: pointer; }
.ntp-tool-tabs button small { color: var(--ntp-muted); font-size: 12px; font-weight: 500; }
.ntp-tool-tabs button[aria-selected="true"] { background: var(--ntp-primary); color: #fff; }
.ntp-tool-tabs button[aria-selected="true"] small { color: rgba(255, 255, 255, .85); }
.ntp-tool-tabs button:focus-visible { outline: 2px solid var(--ntp-secondary); outline-offset: 1px; }
.ntp-uc-pane[hidden] { display: none; }
.ntp-uc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.ntp-uc-box label { margin-bottom: 7px; color: var(--ntp-heading); font-size: 15.5px; }
.ntp-uc-box textarea { display: block; height: min(52vh, 420px); min-height: 200px; padding: 14px; font-size: 18px; line-height: 1.7; resize: vertical; }
.ntp-uc-box textarea[readonly] { background: var(--ntp-soft); }
.ntp-uc-box textarea.is-preeti { font-family: Preeti, preeti, var(--ntp-font); }
.ntp-uc-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ntp-uc-acts button { min-height: 34px; padding: 0 12px; border: 1px solid var(--ntp-border); border-radius: 8px; background: var(--ntp-soft); color: var(--ntp-heading); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.ntp-uc-acts button:hover { border-color: var(--ntp-muted); }
.ntp-uc-acts button.is-done { border-color: #15803d; background: #15803d; color: #fff; }
.ntp-uc-acts button.is-clear { color: var(--ntp-primary); }
.ntp-uc-help { margin: 14px 0 0; color: var(--ntp-muted); font-size: 14.5px; line-height: 1.7; }
.ntp-uc-help b { color: var(--ntp-heading); }

/* Date converter */
.ntp-date-today { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 16px; color: var(--ntp-text); font-size: 15.5px; text-align: center; }
.ntp-date-today .ntp-ico { flex: none; width: 18px; height: 18px; color: var(--ntp-primary); }
.ntp-date-today b { color: var(--ntp-heading); }
.ntp-dc {
	--dc-card: linear-gradient(165deg, #fbf6ec, #f5ebd9); --dc-line: #e7dbc3; --dc-soft: #f3e8d2; --dc-field: #fff; --dc-ink: #2f2418; --dc-muted: #6f5e48; --dc-1: #a02433; --dc-2: #6f1420; --dc-gold: #c8961d;
	max-width: 560px; margin: 0 auto; padding: 22px; border: 1px solid var(--dc-line); border-radius: 20px; background: var(--dc-card); color: var(--dc-ink); box-shadow: 0 18px 40px -28px rgba(70, 35, 10, .5);
}
html.ntp-dark .ntp-dc { --dc-card: linear-gradient(165deg, #261d14, #1c1610); --dc-line: #3d3124; --dc-soft: #2e2419; --dc-field: #16110c; --dc-ink: #f3e9d8; --dc-muted: #c4b299; --dc-1: #c23a4a; --dc-2: #8c1c2b; --dc-gold: #dcae3c; }
.ntp-dc [hidden] { display: none !important; }
.ntp-tool .ntp-dc-title { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; color: var(--dc-ink); }
.ntp-dc-title .ntp-ico { flex: none; width: 23px; height: 23px; color: var(--dc-1); }
.ntp-dc button:focus-visible, .ntp-dc select:focus-visible, .ntp-dc input:focus-visible { outline: 2px solid var(--dc-1); outline-offset: 2px; }
.ntp-dc-ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.ntp-dc-ways button { min-height: 54px; padding: 4px 8px; border: 1px solid var(--dc-line); border-radius: 14px; background: var(--dc-soft); color: var(--dc-muted); font: inherit; font-size: 16px; font-weight: 800; line-height: 1.25; cursor: pointer; transition: background .18s, color .18s, box-shadow .18s; }
.ntp-dc-ways button i { margin: 0 3px; color: var(--dc-gold); font-style: normal; }
.ntp-dc-ways button:hover { color: var(--dc-ink); }
.ntp-dc-ways button[aria-pressed="true"] { border-color: transparent; background: linear-gradient(135deg, var(--dc-1), var(--dc-2)); color: #fff; box-shadow: 0 10px 20px -10px rgba(111, 20, 32, .75); }
.ntp-dc-ways button[aria-pressed="true"] i { color: inherit; }
.ntp-dc-how { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin-bottom: 16px; padding: 4px; border: 1px solid var(--dc-line); border-radius: 999px; background: var(--dc-soft); }
.ntp-dc-how button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 8px; border: 0; border-radius: 999px; background: none; color: var(--dc-muted); font: inherit; font-size: 14.5px; font-weight: 700; line-height: 1.2; cursor: pointer; transition: background .18s, color .18s; }
.ntp-dc-how .ntp-ico, .ntp-dc-how svg { flex: none; width: 16px; height: 16px; }
.ntp-dc-how button[aria-pressed="true"] { background: var(--dc-field); color: var(--dc-1); box-shadow: 0 2px 7px rgba(70, 35, 10, .16); }
.ntp-dc-ymd { display: grid; grid-template-columns: 1fr 1.25fr .9fr; gap: 10px; }
.ntp-dc-form label { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; color: var(--dc-muted); font-size: 14.5px; font-weight: 700; }
.ntp-tool .ntp-dc-form select, .ntp-tool .ntp-dc-form input[type="date"] { box-sizing: border-box; width: 100%; height: 50px; min-height: 0; margin: 0; padding: 0 12px; border: 1px solid var(--dc-line); border-radius: 12px; background-color: var(--dc-field); color: var(--dc-ink); font: inherit; font-size: 16px; font-weight: 700; color-scheme: light; }
html.ntp-dark .ntp-tool .ntp-dc-form select, html.ntp-dark .ntp-tool .ntp-dc-form input[type="date"] { color-scheme: dark; }
.ntp-tool .ntp-dc-form select { -webkit-appearance: none; appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23c8961d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.ntp-tool .ntp-dc-form input[type="date"] { padding-left: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23c8961d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 13px center; }
.ntp-dc-go { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; margin-top: 16px; padding: 0 16px; border: 0; border-radius: 14px; background: linear-gradient(135deg, var(--dc-1), var(--dc-2)); color: #fff; font: inherit; font-size: 17px; font-weight: 800; cursor: pointer; box-shadow: 0 12px 22px -12px rgba(111, 20, 32, .8); transition: filter .15s, transform .15s; }
.ntp-dc-go:hover { filter: brightness(1.08); }
.ntp-dc-go:active { transform: translateY(1px); }
.ntp-dc-go .ntp-ico { width: 18px; height: 18px; }
.ntp-dc-out { position: relative; margin-top: 16px; padding: 16px 16px 14px; border: 1px dashed var(--dc-gold); border-radius: 14px; background: var(--dc-field); text-align: center; }
.ntp-dc-out span { display: block; margin-bottom: 4px; color: var(--dc-muted); font-size: 16px; font-weight: 600; }
.ntp-dc-out b { display: block; color: var(--dc-1); font-size: 28px; font-weight: 800; line-height: 1.3; }
.ntp-dc-out.is-bad { border-color: var(--dc-1); color: var(--dc-1); font-weight: 700; }
.ntp-dc-acts { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.ntp-dc-copy { padding: 4px 14px; border: 1px solid var(--dc-line); border-radius: 999px; background: none; color: var(--dc-muted); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.ntp-dc-copy:hover { color: var(--dc-ink); }
/* The Print button: the two dates alone on the page. */
@media print {
	html.ntp-dc-printing body *:not(:has(.ntp-dc-out)):not(.ntp-dc-out, .ntp-dc-out *) { display: none !important; }
	html.ntp-dc-printing .ntp-dc-acts { display: none !important; }
	html.ntp-dc-printing .ntp-dc, html.ntp-dc-printing .ntp-dc-out { max-width: none; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
	html.ntp-dc-printing .ntp-dc-out b { color: #a02433; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	html.ntp-dc-printing .ntp-dc-out span { color: #333; }
}

/* Exchange rates */
.ntp-forex-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 14px; }
.ntp-forex-when { display: flex; flex-direction: column; gap: 1px; }
.ntp-forex-when span, .ntp-forex-when small { color: var(--ntp-muted); font-size: 13.5px; }
.ntp-forex-when strong { color: var(--ntp-heading); font-size: 22px; font-weight: 800; line-height: 1.3; }
.ntp-forex-pick { display: flex; flex-direction: column; gap: 4px; width: 190px; }
.ntp-forex-main[hidden], .ntp-forex-fail[hidden] { display: none; }
.ntp-forex-table[aria-busy="true"] tbody { opacity: .45; }
.ntp-forex-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 16px; }
.ntp-forex-table-card { padding: 6px 6px 14px; }
.ntp-forex-table-card .ntp-tool-note { padding: 0 12px; }
.ntp-table-scroll { overflow-x: auto; }
.ntp-forex-table { width: 100%; border-collapse: collapse; font-size: 15.5px; font-variant-numeric: tabular-nums; }
.ntp-forex-table th, .ntp-forex-table td { padding: 10px 12px; border-bottom: 1px solid var(--ntp-border); text-align: right; white-space: nowrap; }
.ntp-forex-table thead th { color: var(--ntp-muted); font-size: 13px; font-weight: 700; }
.ntp-forex-table :is(thead th:first-child, tbody th) { text-align: left; }
.ntp-forex-table tbody th { color: var(--ntp-heading); font-weight: 600; }
.ntp-forex-table tbody tr:hover { background: var(--ntp-soft); }
.ntp-forex-iso { display: inline-block; min-width: 40px; margin-right: 8px; padding: 1px 6px; border-radius: 6px; background: var(--ntp-soft); color: var(--ntp-heading); font-size: 12.5px; font-weight: 800; text-align: center; }
.ntp-forex-table .is-up { color: #15803d; }
.ntp-forex-table .is-down { color: #b91c1c; }
.ntp-forex-table .is-same { color: var(--ntp-muted); }
html.ntp-dark .ntp-forex-table .is-up { color: #4ade80; }
html.ntp-dark .ntp-forex-table .is-down { color: #f87171; }
.ntp-forex-calc { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 76px; }
.ntp-forex-calc label { display: flex; flex-direction: column; gap: 5px; }
.ntp-fx-way { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; padding: 3px; border-radius: 10px; background: var(--ntp-soft); }
.ntp-fx-way button { min-height: 36px; padding: 2px 4px; border: 0; border-radius: 8px; background: none; color: var(--ntp-heading); font: inherit; font-size: 13.5px; font-weight: 700; line-height: 1.25; cursor: pointer; }
.ntp-fx-way button.is-on { background: var(--ntp-secondary); color: #fff; }
.ntp-fx-out { display: grid; gap: 8px; margin: 0; }
.ntp-fx-out div { padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--ntp-primary) 8%, var(--ntp-surface)); }
.ntp-fx-out dt { color: var(--ntp-muted); font-size: 13px; }
.ntp-fx-out dd { margin: 0; color: var(--ntp-heading); font-size: 22px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }

/* E-paper */
.ntp-epaper-date { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: 16px; }
.ntp-epaper-date label { display: inline-flex; align-items: center; gap: 6px; }
.ntp-epaper-date .ntp-ico { width: 18px; height: 18px; color: var(--ntp-primary); }
.ntp-epaper-date input { width: auto; }
.ntp-epaper-clear { color: var(--ntp-primary); font-size: 14px; font-weight: 700; }
.ntp-epaper-view { margin-bottom: 30px; }
.ntp-epaper-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ntp-epaper-book { overflow: hidden; border: 1px solid var(--ntp-border); border-radius: var(--ntp-radius); background: var(--ntp-surface); }
.ntp-epaper-book ._df_book, .ntp-epaper-book .dflip-book { margin-bottom: 0 !important; }
.ntp-epaper-list h2 { margin-bottom: 14px; }
.ntp-epaper-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ntp-epaper-list[data-cols="3"] .ntp-epaper-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1000px; margin: 0 auto; }
.ntp-epaper-list[data-cols="2"] .ntp-epaper-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 720px; margin: 0 auto; }
.ntp-epaper-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--ntp-border); border-radius: var(--ntp-radius); background: var(--ntp-surface); box-shadow: var(--ntp-shadow); color: var(--ntp-heading); text-decoration: none; transition: transform .2s, border-color .2s; }
.ntp-epaper-card[hidden] { display: none; }
.ntp-epaper-card:hover { transform: translateY(-3px); border-color: var(--ntp-primary); }
.ntp-epaper-card.is-on { border-color: var(--ntp-primary); box-shadow: 0 0 0 2px var(--ntp-primary); }
.ntp-epaper-cover { display: grid; place-items: center; aspect-ratio: 3 / 4; overflow: hidden; background: var(--ntp-soft); color: var(--ntp-muted); }
.ntp-epaper-cover img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.ntp-epaper-name { padding: 10px 12px; font-size: 15px; font-weight: 700; line-height: 1.4; text-align: center; }
.ntp-epaper-card.is-on .ntp-epaper-name { background: var(--ntp-primary); color: #fff; }
.ntp-epaper-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; color: var(--ntp-muted); font-weight: 700; }
.ntp-epaper-pager[hidden] { display: none; }

@media (max-width: 900px) {
	.ntp-forex-grid { grid-template-columns: minmax(0, 1fr); }
	.ntp-forex-calc { position: static; order: -1; }
	.ntp-epaper-list[data-cols="4"] .ntp-epaper-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
	.ntp-uc-grid { grid-template-columns: minmax(0, 1fr); }
	.ntp-uc-box textarea { height: 200px; }
	.ntp-tool-tabs button { font-size: 14px; }
	.ntp-tool-card { padding: 14px; }
	.ntp-forex-table { font-size: 14.5px; }
	.ntp-forex-table th, .ntp-forex-table td { padding: 8px; }
	.ntp-epaper-list[data-cols] .ntp-epaper-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.ntp-epaper-date { justify-content: flex-start; }
	.ntp-dc { padding: 16px; border-radius: 16px; }
	.ntp-dc-ways button { min-height: 50px; font-size: 15px; }
	.ntp-dc-ymd { gap: 8px; }
	.ntp-dc-form select { padding-right: 26px; padding-left: 10px; background-position: right 8px center; font-size: 15.5px; }
	.ntp-dc-out b { font-size: 23px; }
}
