.filter-card,
.weather-page-card,
.hero-card,
.hero-list,
.news-card,
.channel-panel,
.player-panel {
 background: linear-gradient(155deg, rgba(255, 255, 255, 0.99), rgba(245, 249, 255, 0.98));
 border: 1px solid var(--line);
 border-radius: var(--radius);
 color: var(--text);
 box-shadow: 0 10px 30px rgba(27, 44, 77, 0.08);
 position: relative;
 overflow: hidden;
}

.filter-card::after,
.weather-page-card::after,
.hero-card::after,
.hero-list::after,
.news-card::after,
.channel-panel::after,
.player-panel::after {
 content: "";
 position: absolute;
 top: 0;
 right: 0;
 width: 130px;
 height: 130px;
 background: radial-gradient(circle, rgba(51, 95, 152, 0.16) 0%, rgba(51, 95, 152, 0) 70%);
 pointer-events: none;
}

.filter-card {
 padding: 12px;
}

.filter-form {
 display: flex;
 flex-direction: column;
 gap: 10px;
}

.search-row {
 display: flex;
 gap: 8px;
}

.search-row input[type="text"] {
 flex: 1;
 border: 1px solid var(--line);
 border-radius: var(--radius);
 padding: 10px 11px;
 font: inherit;
 background: #fff;
 transition: border-color 180ms ease, box-shadow 180ms ease;
}

.search-row input[type="text"]:focus {
 outline: none;
 border-color: rgba(51, 95, 152, 0.5);
 box-shadow: 0 0 0 4px var(--ring);
}

.search-row button {
 border: 0;
 border-radius: var(--radius);
 background: linear-gradient(135deg, var(--primary), #4873ac);
 color: #fff;
 font: inherit;
 font-size: 0.84rem;
 padding: 10px 14px;
 cursor: pointer;
 box-shadow: 0 10px 18px rgba(51, 95, 152, 0.28);
 transition: transform 180ms ease, box-shadow 180ms ease;
}

.search-row button:hover {
 transform: translateY(-1px);
 box-shadow: 0 12px 20px rgba(51, 95, 152, 0.34);
}

.select-row {
 display: grid;
 grid-template-columns: repeat(2, minmax(0, 1fr));
 gap: 8px;
}

.select-row label {
 display: flex;
 flex-direction: column;
 gap: 5px;
 font-size: 0.78rem;
 color: var(--muted);
}

.select-row select {
 border: 1px solid var(--line);
 border-radius: var(--radius);
 padding: 9px 10px;
 font: inherit;
 background: #fff;
}

.query-info {
 margin: 10px 2px;
 font-size: 0.82rem;
 color: var(--muted);
}

.query-info a {
 color: var(--primary);
}

.loop-card-link {
 display: block;
 text-decoration: none;
 color: inherit;
 transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.loop-card-link:hover {
 transform: translateY(-2px);
}

.loop-card-link:focus-visible {
 outline: none;
 box-shadow: 0 0 0 4px var(--ring);
}

.is-loop-hidden {
 display: none !important;
}

.alert-loop-card {
 border: 1px solid #e7c1c1;
 border-radius: var(--radius);
 background:
 radial-gradient(260px 140px at 100% 0%, rgba(200, 43, 43, 0.16), transparent 72%),
 linear-gradient(145deg, #fff4f4 0%, #ffe7e7 100%);
 box-shadow: 0 12px 28px rgba(103, 20, 20, 0.12);
 overflow: hidden;
}

.alert-loop-window {
 position: relative;
 min-height: 64px;
 padding: 9px 12px;
}

.alert-loop-item {
 position: absolute;
 inset: 9px 12px;
 display: flex;
 align-items: center;
 gap: 10px;
 opacity: 0;
 transform: translateY(22px);
 transition: transform 620ms ease, opacity 620ms ease;
 white-space: nowrap;
}

.alert-loop-item.is-current {
 opacity: 1;
 transform: translateY(0);
}

.alert-loop-item.is-next {
 opacity: 0;
 transform: translateY(22px);
}

.alert-loop-item.is-entering {
 opacity: 1;
 transform: translateY(0);
}

.alert-loop-item.is-leaving {
 opacity: 0;
 transform: translateY(-22px);
}

.alert-loop-badge {
 font-weight: 800;
 color: #fff7f7;
 background: #b91c1c;
 border: 1px solid #991b1b;
 border-radius: var(--radius);
 padding: 4px 10px;
}

.alert-loop-title {
 color: #641919;
 font-weight: 800;
 font-size: 0.92rem;
}

.alert-loop-message {
 margin-right: auto;
 color: #7b2f2f;
 font-size: 0.84rem;
 overflow: hidden;
 text-overflow: ellipsis;
}

.weather-loop-card {
 margin-top: 10px;
 border: 1px solid var(--line);
 border-radius: var(--radius);
 background:
 radial-gradient(200px 120px at 100% 0%, rgba(51, 95, 152, 0.13), transparent 70%),
 linear-gradient(145deg, #ffffff 0%, #f1f6ff 100%);
 box-shadow: 0 10px 24px rgba(27, 44, 77, 0.09);
 overflow: hidden;
}

.weather-loop-window {
 position: relative;
 min-height: 58px;
 padding: 8px 10px;
}

.weather-loop-item {
 position: absolute;
 inset: 8px 10px;
 display: flex;
 align-items: center;
 gap: 9px;
 opacity: 0;
 transform: translateY(22px);
 transition: transform 620ms ease, opacity 620ms ease;
 white-space: nowrap;
}

.weather-loop-item.is-current {
 opacity: 1;
 transform: translateY(0);
}

.weather-loop-item.is-next {
 opacity: 0;
 transform: translateY(22px);
}

.weather-loop-item.is-entering {
 opacity: 1;
 transform: translateY(0);
}

.weather-loop-item.is-leaving {
 opacity: 0;
 transform: translateY(-22px);
}

.weather-loop-city {
 font-weight: 700;
 color: #1e365a;
 background: #e7effb;
 border: 1px solid #cfdcf2;
 border-radius: var(--radius);
 padding: 4px 9px;
}

.weather-loop-text {
 color: #2f4d78;
 font-size: 0.84rem;
}

.weather-loop-temp {
 color: #1f3557;
 font-weight: 700;
 font-size: 0.88rem;
}

.weather-loop-meta {
 color: var(--muted);
 font-size: 0.8rem;
}

.weather-loop-aqi {
 margin-right: auto;
 font-size: 0.78rem;
 border: 1px solid #d2def2;
 border-radius: var(--radius);
 background: #f6f9ff;
 color: #29466f;
 padding: 4px 8px;
}

.crypto-loop-card {
 margin-top: 10px;
 border: 1px solid #d3e5e5;
 border-radius: var(--radius);
 background:
 radial-gradient(220px 120px at 100% 0%, rgba(23, 135, 108, 0.15), transparent 70%),
 linear-gradient(145deg, #ffffff 0%, #f2fbfa 100%);
 box-shadow: 0 10px 24px rgba(21, 84, 72, 0.08);
 overflow: hidden;
}

.crypto-loop-window {
 position: relative;
 min-height: 58px;
 padding: 8px 10px;
}

.crypto-loop-item {
 position: absolute;
 inset: 8px 10px;
 display: flex;
 align-items: center;
 gap: 9px;
 opacity: 0;
 transform: translateY(22px);
 transition: transform 620ms ease, opacity 620ms ease;
 white-space: nowrap;
}

.crypto-loop-item.is-current {
 opacity: 1;
 transform: translateY(0);
}

.crypto-loop-item.is-next {
 opacity: 0;
 transform: translateY(22px);
}

.crypto-loop-item.is-entering {
 opacity: 1;
 transform: translateY(0);
}

.crypto-loop-item.is-leaving {
 opacity: 0;
 transform: translateY(-22px);
}

.crypto-loop-symbol {
 font-weight: 800;
 color: #125247;
 background: #dff6f0;
 border: 1px solid #c3ece2;
 border-radius: var(--radius);
 padding: 4px 9px;
}

.crypto-loop-name {
 color: #456d6b;
 font-size: 0.81rem;
}

.crypto-loop-price {
 color: #13414c;
 font-weight: 700;
 font-size: 0.88rem;
}

.crypto-loop-change {
 font-size: 0.76rem;
 font-weight: 700;
 border-radius: var(--radius);
 padding: 4px 8px;
}

.crypto-loop-change.up {
 color: #0f5132;
 background: #dcfce7;
}

.crypto-loop-change.down {
 color: #991b1b;
 background: #fee2e2;
}

.crypto-loop-range {
 margin-right: auto;
 color: #4d666f;
 font-size: 0.76rem;
}

.world-time-loop-card {
 margin-top: 10px;
 border: 1px solid #ddd7ef;
 border-radius: var(--radius);
 background:
 radial-gradient(220px 120px at 100% 0%, rgba(85, 76, 180, 0.14), transparent 70%),
 linear-gradient(145deg, #ffffff 0%, #f6f4ff 100%);
 box-shadow: 0 10px 24px rgba(52, 44, 99, 0.08);
 overflow: hidden;
}

.world-time-loop-window {
 position: relative;
 min-height: 58px;
 padding: 8px 10px;
}

.world-time-loop-item {
 position: absolute;
 inset: 8px 10px;
 display: flex;
 align-items: center;
 gap: 9px;
 opacity: 0;
 transform: translateY(22px);
 transition: transform 620ms ease, opacity 620ms ease;
 white-space: nowrap;
}

.world-time-loop-item.is-current {
 opacity: 1;
 transform: translateY(0);
}

.world-time-loop-item.is-next {
 opacity: 0;
 transform: translateY(22px);
}

.world-time-loop-item.is-entering {
 opacity: 1;
 transform: translateY(0);
}

.world-time-loop-item.is-leaving {
 opacity: 0;
 transform: translateY(-22px);
}

.world-time-loop-city {
 font-weight: 800;
 color: #3b2f73;
 background: #eee9ff;
 border: 1px solid #ddd3ff;
 border-radius: var(--radius);
 padding: 4px 9px;
}

.world-time-loop-country,
.world-time-loop-offset {
 color: #625a8e;
 font-size: 0.8rem;
}

.world-time-loop-time {
 color: #241b51;
 font-weight: 700;
 font-size: 0.92rem;
}

.world-time-loop-zone {
 margin-right: auto;
 color: #655f83;
 font-size: 0.76rem;
}

.disaster-loop-card {
 margin-top: 10px;
 border: 1px solid #e6d2d2;
 border-radius: var(--radius);
 background:
 radial-gradient(220px 120px at 100% 0%, rgba(180, 60, 60, 0.12), transparent 70%),
 linear-gradient(145deg, #ffffff 0%, #fff6f6 100%);
 box-shadow: 0 10px 24px rgba(77, 27, 27, 0.08);
 overflow: hidden;
}

.disaster-loop-window {
 position: relative;
 min-height: 58px;
 padding: 8px 10px;
}

.disaster-loop-item {
 position: absolute;
 inset: 8px 10px;
 display: flex;
 align-items: center;
 gap: 8px;
 opacity: 0;
 transform: translateY(22px);
 transition: transform 620ms ease, opacity 620ms ease;
 white-space: nowrap;
}

.disaster-loop-item.is-current {
 opacity: 1;
 transform: translateY(0);
}

.disaster-loop-item.is-next {
 opacity: 0;
 transform: translateY(22px);
}

.disaster-loop-item.is-entering {
 opacity: 1;
 transform: translateY(0);
}

.disaster-loop-item.is-leaving {
 opacity: 0;
 transform: translateY(-22px);
}

.disaster-loop-type {
 font-weight: 700;
 color: #5e1818;
 background: #fde8e8;
 border: 1px solid #f7caca;
 border-radius: var(--radius);
 padding: 4px 9px;
}

.disaster-loop-name {
 color: #4f2222;
 font-size: 0.84rem;
}

.disaster-loop-alert {
 color: #7b1f1f;
 font-weight: 700;
 font-size: 0.8rem;
}

.disaster-loop-severity {
 margin-right: auto;
 color: #6f3b3b;
 font-size: 0.77rem;
}

.weather-page-card {
 margin-top: 12px;
 padding: 12px;
}

.disaster-page-card {
 margin-top: 12px;
 padding: 12px;
 background: linear-gradient(155deg, rgba(255, 255, 255, 0.99), rgba(255, 246, 246, 0.98));
 border: 1px solid #edd6d6;
 border-radius: var(--radius);
 box-shadow: 0 10px 30px rgba(77, 27, 27, 0.08);
}

.alerts-page-card {
 margin-top: 12px;
 padding: 12px;
 background: linear-gradient(155deg, rgba(255, 247, 247, 0.99), rgba(255, 237, 237, 0.98));
 border: 1px solid #ebcaca;
 border-radius: var(--radius);
 box-shadow: 0 12px 32px rgba(103, 20, 20, 0.1);
}

.alerts-grid {
 display: grid;
 grid-template-columns: minmax(0, 1fr);
 gap: 12px;
}

.alert-card {
 border: 1px solid #efcdcd;
 border-radius: var(--radius);
 background:
 radial-gradient(180px 90px at 100% 0%, rgba(198, 40, 40, 0.1), transparent 72%),
 linear-gradient(165deg, #ffffff 0%, #fff3f3 100%);
 box-shadow: 0 10px 24px rgba(103, 20, 20, 0.08);
 padding: 14px;
}

.alert-card-top {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 10px;
 margin-bottom: 10px;
}

.alert-card-badge {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 font-size: 0.76rem;
 font-weight: 800;
 color: #fff7f7;
 background: #b91c1c;
 border-radius: var(--radius);
 padding: 4px 9px;
}

.alert-card-time {
 color: #8c4b4b;
 font-size: 0.77rem;
 display: inline-flex;
 align-items: center;
 gap: 6px;
}

.alert-card h2 {
 margin: 0 0 8px;
 color: #5f1919;
 font-size: 1rem;
}

.alert-card p {
 margin: 0;
 color: #6d2a2a;
 line-height: 1.9;
 font-size: 0.9rem;
}

.alerts-empty {
 padding: 16px;
 border: 1px dashed #e5bcbc;
 border-radius: var(--radius);
 background: rgba(255, 255, 255, 0.78);
 color: #7a3535;
 text-align: center;
}

.crypto-page-card {
 margin-top: 12px;
 padding: 12px;
 background: linear-gradient(155deg, rgba(255, 255, 255, 0.99), rgba(245, 249, 255, 0.98));
 border: 1px solid var(--line);
 border-radius: var(--radius);
 box-shadow: 0 10px 30px rgba(27, 44, 77, 0.08);
}

.crypto-grid {
 display: grid;
 grid-template-columns: repeat(3, minmax(0, 1fr));
 gap: 12px;
}

.crypto-page-intro {
 margin: 2px 0 12px;
 color: #4f6475;
 font-size: 0.84rem;
 line-height: 1.85;
}

.world-time-page-card {
 margin-top: 12px;
 padding: 12px;
 background: linear-gradient(155deg, rgba(255, 255, 255, 0.99), rgba(248, 245, 255, 0.98));
 border: 1px solid #ddd7ef;
 border-radius: var(--radius);
 box-shadow: 0 10px 30px rgba(48, 37, 92, 0.08);
}

.iran-calendar-hero {
 display: grid;
 grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
 gap: 12px;
 margin-bottom: 12px;
}

.iran-calendar-panel {
 border: 1px solid #ddd7ef;
 border-radius: var(--radius);
 background:
 radial-gradient(180px 120px at 100% 0%, rgba(91, 73, 179, 0.1), transparent 68%),
 linear-gradient(165deg, #ffffff 0%, #f8f5ff 100%);
 padding: 14px;
 box-shadow: 0 10px 24px rgba(48, 37, 92, 0.08);
 display: flex;
 flex-direction: column;
}

.iran-calendar-head {
 display: flex;
 align-items: flex-start;
 justify-content: space-between;
 gap: 10px;
}

.iran-calendar-head h2 {
 margin: 0;
 color: #342765;
 font-size: 1rem;
}

.iran-calendar-head p {
 margin: 4px 0 0;
 color: #6a658d;
 font-size: 0.78rem;
}

.iran-calendar-offset {
 font-size: 0.76rem;
 color: #4d457a;
 background: #efeaff;
 border: 1px solid #ddd3ff;
 border-radius: var(--radius);
 padding: 4px 8px;
}

.iran-calendar-clock {
 margin-top: 12px;
 display: flex;
 align-items: center;
 gap: 8px;
}

.iran-calendar-live-time {
 font-size: 1.7rem;
 color: #22184f;
 letter-spacing: 1px;
}

.iran-calendar-live-period {
 color: #61578b;
 font-size: 0.78rem;
 background: #f3efff;
 border: 1px solid #e3dbff;
 border-radius: var(--radius);
 padding: 3px 8px;
}

.iran-calendar-meta {
 margin-top: 9px;
 display: flex;
 justify-content: space-between;
 gap: 8px;
 color: #5d5f83;
 font-size: 0.8rem;
}

.iran-calendar-types {
 margin-top: auto;
 display: grid;
 grid-template-columns: repeat(3, minmax(0, 1fr));
 gap: 8px;
}

.iran-calendar-convert-results {
 margin-top: 12px;
 display: grid;
 grid-template-columns: repeat(3, minmax(0, 1fr));
 gap: 8px;
}

.iran-calendar-type-card,
.iran-calendar-result-card {
 border: 1px solid #ddd7ef;
 border-radius: var(--radius);
 background: rgba(255, 255, 255, 0.92);
 padding: 9px 10px;
 display: flex;
 flex-direction: column;
 gap: 5px;
}

.iran-calendar-type-card strong,
.iran-calendar-result-card strong {
 color: #5f5a84;
 font-size: 0.72rem;
}

.iran-calendar-type-card span,
.iran-calendar-result-card span {
 color: #21174d;
 font-size: 0.9rem;
 font-weight: 700;
}

.iran-calendar-form {
 margin-top: 12px;
 display: flex;
 flex-direction: column;
 gap: 12px;
}

.iran-calendar-form-grid {
 display: grid;
 grid-template-columns: repeat(4, minmax(0, 1fr));
 gap: 8px;
}

.iran-calendar-form label {
 display: flex;
 flex-direction: column;
 gap: 5px;
}

.iran-calendar-form span {
 color: #5f5a84;
 font-size: 0.72rem;
}

.iran-calendar-form input,
.iran-calendar-form select {
 border: 1px solid #ddd7ef;
 border-radius: var(--radius);
 padding: 9px 10px;
 font: inherit;
 background: #fff;
 color: #1d2550;
}

.iran-calendar-submit {
 border: 1px solid transparent;
 border-radius: var(--radius);
 padding: 9px 13px;
 font: inherit;
 font-weight: 700;
 color: #fff;
 background: linear-gradient(135deg, #5a49b3, #6e60cf);
 cursor: pointer;
 box-shadow: 0 10px 20px rgba(90, 73, 179, 0.2);
}

.iran-calendar-alert {
 margin: 12px 0 0;
 border-radius: var(--radius);
 padding: 9px 10px;
 font-size: 0.78rem;
}

.iran-calendar-alert--error {
 background: #fff1f2;
 color: #9f1239;
 border: 1px solid #fecdd3;
}

.world-time-grid {
 display: grid;
 grid-template-columns: repeat(3, minmax(0, 1fr));
 gap: 12px;
}

.world-time-card {
 border: 1px solid #ddd7ef;
 border-radius: var(--radius);
 background:
 radial-gradient(160px 120px at 100% 0%, rgba(91, 73, 179, 0.12), transparent 68%),
 linear-gradient(165deg, #ffffff 0%, #f7f5ff 100%);
 padding: 12px;
 box-shadow: 0 10px 24px rgba(48, 37, 92, 0.09);
}

.world-time-top {
 display: flex;
 align-items: flex-start;
 justify-content: space-between;
 gap: 8px;
}

.world-time-top h2 {
 margin: 0;
 font-size: 1.02rem;
 color: #342765;
}

.world-time-country {
 margin: 4px 0 0;
 color: #6a658d;
 font-size: 0.78rem;
}

.world-time-offset {
 font-size: 0.76rem;
 color: #4d457a;
 background: #efeaff;
 border: 1px solid #ddd3ff;
 border-radius: var(--radius);
 padding: 4px 8px;
}

.world-time-clock {
 margin-top: 12px;
 display: flex;
 align-items: center;
 gap: 8px;
}

.world-time-clock-meta {
 margin-inline-start: auto;
 display: flex;
 align-items: center;
 justify-content: flex-start;
 gap: 8px;
}

.world-time-live-time {
 font-size: 1.55rem;
 color: #22184f;
 letter-spacing: 1px;
}

.world-time-day-state {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 flex: 0 0 auto;
 transition: color 180ms ease;
}

.world-time-day-state.is-day {
 color: #c77d00;
}

.world-time-day-state.is-night {
 color: #3347a8;
}

.world-time-day-icon {
 width: 18px;
 height: 18px;
 fill: currentColor;
 display: none;
}

.world-time-day-state.is-day .world-time-day-icon--sun {
 display: block;
}

.world-time-day-state.is-night .world-time-day-icon--moon {
 display: block;
}

.world-time-live-period {
 color: #61578b;
 font-size: 0.78rem;
 background: #f3efff;
 border: 1px solid #e3dbff;
 border-radius: var(--radius);
 padding: 3px 8px;
}

.world-time-meta {
 margin-top: 9px;
 display: flex;
 justify-content: space-between;
 gap: 8px;
 color: #5d5f83;
 font-size: 0.8rem;
}

.world-time-foot {
 margin-top: 10px;
 padding-top: 10px;
 border-top: 1px dashed #ddd7ef;
 display: flex;
 flex-direction: column;
 gap: 4px;
 color: #706a90;
 font-size: 0.72rem;
}

.weather-city-card,
.disaster-card,
.crypto-card {
 border: 1px solid #cfdcef;
 border-radius: var(--radius);
 background:
 radial-gradient(180px 120px at 100% 0%, rgba(51, 95, 152, 0.14), transparent 70%),
 linear-gradient(165deg, #ffffff 0%, #f4f8ff 100%);
 padding: 12px;
 box-shadow: 0 10px 24px rgba(27, 44, 77, 0.1);
 transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.weather-city-card {
 display: flex;
 flex-direction: column;
 gap: 10px;
 height: 100%;
}

.weather-city-card:hover,
.disaster-card:hover,
.crypto-card:hover {
 transform: translateY(-2px);
 border-color: rgba(51, 95, 152, 0.4);
 box-shadow: 0 14px 28px rgba(27, 44, 77, 0.14);
}

.crypto-top {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 8px;
}

.crypto-top h2 {
 margin: 0;
 font-size: 1.06rem;
 color: #1f3557;
 letter-spacing: 0.2px;
}

.crypto-change-chip {
 font-size: 0.73rem;
 font-weight: 700;
 border: 1px solid transparent;
 border-radius: var(--radius);
 padding: 4px 8px;
}

.crypto-change-chip.up {
 color: #0f5132;
 background: #dcfce7;
 border-color: #86efac;
}

.crypto-change-chip.down {
 color: #991b1b;
 background: #fee2e2;
 border-color: #fca5a5;
}

.crypto-change-chip.neutral {
 color: #334155;
 background: #e2e8f0;
 border-color: #cbd5e1;
}

.crypto-name {
 margin: 3px 0 7px;
 font-size: 0.76rem;
 color: #5a6e8f;
}

.crypto-price-row {
 display: flex;
 align-items: baseline;
 justify-content: space-between;
 gap: 8px;
}

.crypto-price {
 font-size: 1.2rem;
 font-weight: 700;
 color: #17335b;
}

.crypto-window {
 font-size: 0.72rem;
 color: #5c7092;
 border: 1px solid #d7e2f3;
 border-radius: var(--radius);
 background: #f4f8ff;
 padding: 3px 7px;
}

.crypto-range {
 margin-top: 7px;
 display: flex;
 justify-content: space-between;
 gap: 8px;
 font-size: 0.72rem;
 color: #5f6f8a;
}

.crypto-band {
 margin-top: 6px;
 position: relative;
 height: 10px;
}

.crypto-band-line {
 position: absolute;
 left: 0;
 right: 0;
 top: 4px;
 height: 2px;
 border-radius: var(--radius);
 background: linear-gradient(90deg, #c53030, #dba33a, #148f52);
}

.crypto-band-point {
 position: absolute;
 top: 0;
 transform: translateX(-50%);
 width: 10px;
 height: 10px;
 border-radius: var(--radius);
 background: #173b6d;
 border: 2px solid #fff;
 box-shadow: 0 0 0 1px rgba(23, 59, 109, 0.2);
}

.crypto-chart-wrap {
 margin-top: 8px;
 border: 1px dashed #d0ddee;
 border-radius: var(--radius);
 background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(243, 248, 255, 0.88));
 padding: 5px;
}

.crypto-chart {
 width: 100%;
 height: 96px;
 display: block;
}

.crypto-stats {
 margin-top: 10px;
 display: grid;
 grid-template-columns: repeat(2, minmax(0, 1fr));
 gap: 8px;
}

.crypto-stats > div {
 border: 1px solid #dbe5f3;
 border-radius: var(--radius);
 background: rgba(255, 255, 255, 0.9);
 padding: 7px 8px;
 display: flex;
 flex-direction: column;
 gap: 4px;
}

.crypto-stats strong {
 color: #557086;
 font-size: 0.71rem;
}

.crypto-stats span {
 color: #17335b;
 font-size: 0.8rem;
 font-weight: 700;
}

.crypto-footnote {
 margin-top: 8px;
 color: #607189;
 font-size: 0.72rem;
 display: flex;
 align-items: center;
 gap: 8px;
}

.disaster-empty {
 border: 1px dashed #edc8c8;
 border-radius: var(--radius);
 background: #fff8f8;
 color: #7a3a3a;
 padding: 12px;
 text-align: center;
 font-size: 0.85rem;
}

.disaster-grid {
 display: grid;
 grid-template-columns: repeat(3, minmax(0, 1fr));
 gap: 12px;
}

.disaster-section-title {
 margin: 4px 0 10px;
 color: #5a2323;
 font-size: 0.95rem;
}

.disaster-top {
 display: flex;
 align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
 margin-bottom: 8px;
}

.disaster-type {
 font-size: 0.76rem;
 color: #6b2323;
 background: #fdeeee;
 border: 1px solid #f6d4d4;
 border-radius: var(--radius);
 padding: 3px 8px;
}

.disaster-alert {
 font-size: 0.76rem;
 border-radius: var(--radius);
 padding: 3px 8px;
 border: 1px solid transparent;
}

.disaster-alert-green {
 color: #14532d;
 background: #dcfce7;
 border-color: #86efac;
}

.disaster-alert-orange {
 color: #9a3412;
 background: #ffedd5;
 border-color: #fdba74;
}

.disaster-alert-red {
 color: #991b1b;
 background: #fee2e2;
 border-color: #fca5a5;
}

.disaster-alert-unknown {
 color: #334155;
 background: #e2e8f0;
 border-color: #cbd5e1;
}

.disaster-card h2 {
 margin: 0 0 8px;
 font-size: 0.98rem;
 color: #3f1f1f;
 line-height: 1.7;
}

.disaster-meta {
 display: flex;
 flex-direction: column;
 gap: 5px;
 font-size: 0.78rem;
 color: #684040;
}

.disaster-severity {
 margin: 8px 0 0;
 border: 1px dashed #f0cfcf;
 border-radius: var(--radius);
 background: #fffdfd;
 color: #4e3030;
 padding: 7px 8px;
 font-size: 0.8rem;
 line-height: 1.8;
}

.disaster-actions {
 margin-top: 9px;
 display: flex;
 gap: 8px;
 flex-wrap: wrap;
}

.disaster-status {
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: var(--radius);
    padding: 3px 8px;
    line-height: 1;
    color: var(--text);
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.disaster-status--upcoming {
    color: #9a3412;
    background: #ffedd5;
    border-color: #fdba74;
}

.disaster-status--current {
    color: #14532d;
    background: #dcfce7;
    border-color: #86efac;
}

.disaster-status--history {
    color: #334155;
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.disaster-actions a {
 text-decoration: none;
 color: #6d1f1f;
 font-size: 0.76rem;
 border: 1px solid #f1cdcd;
 border-radius: var(--radius);
 background: #fff;
 padding: 5px 9px;
}

.weather-source {
 margin: 0;
 color: var(--muted);
 font-size: 0.78rem;
 text-align: center;
}

.weather-source--bottom {
 margin-top: 10px;
}

.weather-overview {
 margin-bottom: 12px;
 border: 1px solid rgba(51, 95, 152, 0.18);
 border-radius: var(--radius);
 display: flex;
 flex-direction: column;
 gap: 6px;
 background:
 radial-gradient(380px 180px at 100% 0%, rgba(86, 142, 214, 0.18), transparent 70%),
 radial-gradient(260px 160px at 0% 100%, rgba(20, 120, 196, 0.12), transparent 70%),
 linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(236, 244, 255, 0.95));
 box-shadow: 0 18px 44px rgba(27, 44, 77, 0.1);
 overflow: hidden;
}

.weather-overview__hero {
 display: grid;
 grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
 gap: 14px;
 padding: 18px;
}

.weather-overview__copy h2 {
 margin: 6px 0 8px;
 font-size: 1.7rem;
 color: #1a3458;
}

.weather-overview__copy p {
 margin: 0;
 max-width: 60ch;
 color: #49627f;
 line-height: 2;
}

.weather-overview__eyebrow {
 display: inline-flex;
 padding: 6px 10px;
 border-radius: var(--radius);
 background: rgba(51, 95, 152, 0.1);
 color: #2c4a73;
 font-size: 0.78rem;
 font-weight: 700;
}

.weather-overview__stats {
 display: grid;
 grid-template-columns: repeat(3, minmax(0, 1fr));
 gap: 10px;
}

.weather-overview__stat {
 border: 1px solid rgba(51, 95, 152, 0.18);
 border-radius: var(--radius);
 background: rgba(255, 255, 255, 0.8);
 padding: 12px;
}

.weather-overview__stat strong {
 display: block;
 font-size: 1rem;
 color: #193558;
}

.weather-overview__stat span {
 display: block;
 margin-top: 5px;
 color: #516b87;
 font-size: 0.78rem;
 line-height: 1.8;
}

.weather-city-grid {
 display: grid;
 grid-template-columns: repeat(3, minmax(0, 1fr));
 gap: 12px;
 align-items: stretch;
}

.weather-city-top {
 display: flex;
 align-items: flex-start;
 justify-content: space-between;
 gap: 8px;
 min-height: 46px;
}

.weather-city-headline {
 display: flex;
 align-items: center;
 gap: 10px;
 flex: 1 1 auto;
 min-width: 0;
}

.weather-city-glyph {
 width: 42px;
 height: 42px;
 border-radius: var(--radius);
 display: inline-flex;
 align-items: center;
 justify-content: center;
 background: linear-gradient(145deg, #eff6ff, #dbeafe);
 border: 1px solid #c7d8f5;
 box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.weather-icon {
 width: 1.1em;
 height: 1.1em;
 fill: currentColor;
 flex: 0 0 auto;
}

.weather-icon--hero {
 width: 22px;
 height: 22px;
 color: #335f98;
}

.weather-city-top h2 {
 margin: 0;
 font-size: 1.02rem;
 color: #203554;
 display: inline-flex;
 align-items: center;
 gap: 6px;
}

.weather-city-subline {
 margin-top: 4px;
 font-size: 0.74rem;
 color: #59718d;
}

.weather-city-icon {
 font-size: 0.9rem;
}

.weather-aqi {
 font-size: 0.72rem;
 border-radius: var(--radius);
 padding: 6px 10px;
 border: 1px solid transparent;
 font-weight: 700;
 white-space: nowrap;
 display: inline-flex;
 align-items: center;
 gap: 6px;
}

.weather-aqi em {
 font-style: normal;
 font-weight: 500;
 opacity: 0.86;
}

.weather-aqi.aqi-good {
 color: #0f5132;
 background: #d1fae5;
 border-color: #86efac;
}

.weather-aqi.aqi-moderate {
 color: #854d0e;
 background: #fef3c7;
 border-color: #fcd34d;
}

.weather-aqi.aqi-usg {
 color: #9a3412;
 background: #ffedd5;
 border-color: #fdba74;
}

.weather-aqi.aqi-unhealthy {
 color: #991b1b;
 background: #fee2e2;
 border-color: #fca5a5;
}

.weather-aqi.aqi-very-unhealthy {
 color: #581c87;
 background: #f3e8ff;
 border-color: #d8b4fe;
}

.weather-aqi.aqi-hazardous {
 color: #ffffff;
 background: #7f1d1d;
 border-color: #7f1d1d;
}

.weather-aqi.aqi-unknown {
 color: #334155;
 background: #e2e8f0;
 border-color: #cbd5e1;
}

.weather-today-hero {
 border: 1px solid rgba(51, 95, 152, 0.2);
 background:
 radial-gradient(180px 90px at 100% 0%, rgba(97, 162, 239, 0.18), transparent 72%),
 linear-gradient(145deg, rgba(51, 95, 152, 0.14), rgba(51, 95, 152, 0.04));
 border-radius: var(--radius);
 padding: 12px;
 min-height: 168px;
}

.weather-today-content {
 display: flex;
 flex-direction: column;
 gap: 10px;
 min-height: 100%;
}

.weather-today-main {
 display: flex;
 align-items: end;
 gap: 10px;
 margin-bottom: 10px;
 flex-wrap: wrap;
}

.weather-today-label {
 font-size: 0.77rem;
 color: #2f4d77;
}

.weather-today-temp {
 margin-right: auto;
 display: inline-flex;
 align-items: center;
 gap: 8px;
 flex-wrap: wrap;
}

.weather-today-status {
 font-size: 0.84rem;
 color: #284268;
 display: inline-flex;
 align-items: center;
 gap: 6px;
 border: 1px solid rgba(51, 95, 152, 0.14);
 background: rgba(255, 255, 255, 0.74);
 border-radius: var(--radius);
 padding: 6px 10px;
}

.weather-status-icon {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 line-height: 1;
}

.weather-icon--status {
 width: 18px;
 height: 18px;
}

.weather-inline-icon {
 width: 1em;
 height: 1em;
 fill: currentColor;
 flex: 0 0 auto;
}

.weather-today-metrics {
 display: grid;
 grid-template-columns: repeat(2, minmax(0, 1fr));
 gap: 6px;
 margin-top: auto;
}

.weather-today-metrics > div {
 border: 1px solid rgba(51, 95, 152, 0.2);
 border-radius: var(--radius);
 background: rgba(255, 255, 255, 0.82);
 padding: 7px 8px;
 display: flex;
 justify-content: space-between;
 gap: 8px;
 font-size: 0.76rem;
 color: #243d62;
}

.weather-today-metrics strong {
 font-weight: 700;
 display: inline-flex;
 align-items: center;
 gap: 4px;
}

.weather-today-metrics span {
 font-weight: 500;
}

.weather-aqi-panel {
 border: 1px solid transparent;
 border-radius: var(--radius);
 padding: 10px 12px;
 display: flex;
 flex-direction: row;
 align-items: center;
 gap: 10px;
 justify-content: space-between;
 text-align: right;
 min-height: 64px;
 box-shadow: 0 10px 24px rgba(27, 44, 77, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.weather-aqi-panel__label {
 font-size: 0.76rem;
 font-weight: 700;
 opacity: 0.84;
 white-space: nowrap;
}

.weather-aqi-panel__value {
 margin-top: 0;
 font-size: 1.5rem;
 font-weight: 800;
 line-height: 1;
 white-space: nowrap;
}

.weather-aqi-panel__text {
 margin-top: 0;
 font-size: 0.8rem;
 line-height: 1.6;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
}

.weather-aqi-panel.aqi-good {
 color: #0f5132;
 background: linear-gradient(145deg, #d1fae5, #ecfdf5);
 border-color: #86efac;
}

.weather-aqi-panel.aqi-moderate {
 color: #854d0e;
 background: linear-gradient(145deg, #fef3c7, #fff8dd);
 border-color: #fcd34d;
}

.weather-aqi-panel.aqi-usg {
 color: #9a3412;
 background:
 radial-gradient(140px 80px at 100% 0%, rgba(251, 146, 60, 0.28), transparent 72%),
 linear-gradient(145deg, #ffedd5, #fff6ed);
 border-color: #fb923c;
}

.weather-aqi-panel.aqi-unhealthy {
 color: #991b1b;
 background: linear-gradient(145deg, #fee2e2, #fff1f2);
 border-color: #fca5a5;
}

.weather-aqi-panel.aqi-very-unhealthy {
 color: #581c87;
 background: linear-gradient(145deg, #f3e8ff, #faf5ff);
 border-color: #d8b4fe;
}

.weather-aqi-panel.aqi-hazardous {
 color: #fff;
 background: linear-gradient(145deg, #7f1d1d, #991b1b);
 border-color: #7f1d1d;
}

.weather-aqi-panel.aqi-unknown {
 color: #334155;
 background: linear-gradient(145deg, #e2e8f0, #f8fafc);
 border-color: #cbd5e1;
}

.weather-metric-icon {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 line-height: 1;
}

.weather-icon--metric {
 width: 16px;
 height: 16px;
}

.weather-temp-chip,
.weather-forecast-temp-chip {
 display: inline-flex;
 align-items: center;
 gap: 5px;
 border-radius: var(--radius);
 padding: 6px 9px;
 font-weight: 800;
 line-height: 1;
}

.weather-temp-chip {
 font-size: 1.15rem;
}

.weather-temp-chip--max,
.weather-forecast-temp-chip--max {
 color: #9a3412;
 background: #ffedd5;
}

.weather-temp-chip--min,
.weather-forecast-temp-chip--min {
 color: #1d4ed8;
 background: #dbeafe;
}

.weather-temp-sep {
 color: #6b7f98;
 font-size: 1rem;
}

.weather-forecast-title {
 font-size: 0.8rem;
 color: var(--muted);
 margin-bottom: 6px;
 min-height: 18px;
}

.weather-forecast-list {
 display: flex;
 flex-direction: column;
 gap: 8px;
 margin-top: auto;
}

.weather-forecast-row {
 display: flex;
 align-items: center;
 justify-content: space-between;
 flex-wrap: wrap;
 gap: 10px;
 font-size: 0.74rem;
 border: 1px solid rgba(51, 95, 152, 0.12);
 border-radius: var(--radius);
 padding: 10px;
 background:
 radial-gradient(120px 60px at 100% 0%, rgba(113, 164, 228, 0.14), transparent 72%),
 linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(240, 246, 255, 0.92));
 box-shadow: 0 8px 18px rgba(27, 44, 77, 0.06);
}

.weather-forecast-day {
 display: flex;
 flex-direction: column;
 gap: 6px;
 min-width: 112px;
}

.weather-forecast-date {
 color: #27446d;
 font-weight: 700;
 font-size: 0.82rem;
}

.weather-forecast-temp {
 display: flex;
 align-items: center;
 gap: 6px;
 flex-wrap: wrap;
 min-width: 0;
 justify-content: center;
}

.weather-forecast-state {
 display: inline-flex;
 align-items: center;
 gap: 4px;
 color: #2c4a73;
 font-size: 0.76rem;
 line-height: 1.7;
}

.weather-forecast-icon {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 line-height: 1;
}

.weather-icon--forecast {
 width: 16px;
 height: 16px;
}

.weather-forecast-extras {
 display: flex;
 align-items: center;
 justify-content: flex-end;
 flex-wrap: wrap;
 gap: 6px;
 min-width: 0;
}

.weather-forecast-extra {
 display: inline-flex;
 align-items: center;
 gap: 8px;
 align-items: center;
 min-width: 0;
 padding: 7px 8px;
 border-radius: var(--radius);
 background: rgba(255, 255, 255, 0.78);
 border: 1px solid rgba(51, 95, 152, 0.1);
 color: #36557f;
 font-size: 0.72rem;
 white-space: nowrap;
}

.weather-forecast-extra strong {
 font-weight: 700;
 white-space: nowrap;
}

.hero-grid {
 margin-top: 8px;
 display: grid;
 grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
 gap: 12px;
}

.hero-card {
 overflow: hidden;
}

.hero-media {
 height: 280px;
 overflow: hidden;
}

.hero-media img {
 width: 100%;
 height: 100%;
 object-fit: cover;
}

.hero-body {
 padding: 14px 14px 12px;
}

.hero-body h2 {
 margin: 0 0 8px;
 font-size: 1.26rem;
 line-height: 1.5;
}

.hero-body p {
 margin: 0;
 color: var(--muted);
 font-size: 0.88rem;
 line-height: 1.9;
}

.hero-list {
 padding: 12px;
}

.hero-list h3 {
 margin: 0 0 8px;
 font-size: 0.95rem;
}

.hero-list ul {
 list-style: none;
 margin: 0;
 padding: 0;
 display: flex;
 flex-direction: column;
 gap: 7px;
}

.hero-list li {
 border: 1px solid var(--line);
 border-radius: var(--radius);
 background: var(--surface-soft);
 padding: 7px 8px;
}

.hero-list a {
 text-decoration: none;
 color: var(--text);
 font-size: 0.82rem;
 display: block;
}

.hero-list time {
 font-size: 0.72rem;
 color: var(--muted);
}

.news-grid {
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
 gap: 14px;
}

.news-card {
 padding: 13px 12px 12px;
 display: flex;
 flex-direction: column;
 gap: 8px;
 transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.news-card[hidden],
.news-card.is-user-hidden {
 display: none !important;
}

.news-card:hover {
 transform: translateY(-3px);
 border-color: rgba(51, 95, 152, 0.35);
 box-shadow: 0 16px 32px rgba(27, 44, 77, 0.12);
}

.news-card.news-card--ad {
 border-style: dashed;
 border-color: rgba(51, 95, 152, 0.28);
 background: linear-gradient(135deg, rgba(51, 95, 152, 0.05), rgba(255, 255, 255, 0.98));
}

html[data-theme="dark"] .news-card.news-card--ad {
 border-color: rgba(134, 174, 232, 0.35);
 background: linear-gradient(135deg, rgba(134, 174, 232, 0.08), rgba(18, 29, 45, 0.98));
}

.news-card.is-new {
 animation: newsInsertFlash 1.6s ease;
}

.news-load-more-sentinel {
    height: 1px;
    width: 100%;
}

/* Skeleton loading for progressive news list. */
@keyframes newsSkeletonShimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: 200px 0;
    }
}

.news-card--skeleton {
    border: 1px solid rgba(51, 95, 152, 0.16);
    background: rgba(51, 95, 152, 0.04);
    box-shadow: none;
}

.news-card--skeleton:hover {
    transform: none;
    border-color: rgba(51, 95, 152, 0.16);
    box-shadow: none;
}

.news-card--skeleton .news-thumb.is-skeleton {
    background: rgba(51, 95, 152, 0.12);
}

.news-card--skeleton .is-skeleton {
    border-radius: var(--radius);
    background: linear-gradient(90deg,
        rgba(51, 95, 152, 0.06) 0%,
        rgba(255, 255, 255, 0.75) 40%,
        rgba(51, 95, 152, 0.06) 80%
    );
    background-size: 200px 100%;
    animation: newsSkeletonShimmer 1.2s linear infinite;
}

.news-skeleton-line {
    display: block;
}

.news-skeleton-line--title {
    height: 14px;
    width: 82%;
}

.news-skeleton-line--summary {
    height: 34px;
    width: 100%;
}

.news-skeleton-line--meta {
    height: 14px;
    width: 60%;
    margin-top: 2px;
}

.news-thumb {
 display: block;
 aspect-ratio: 16 / 9;
 border-radius: var(--radius);
 overflow: hidden;
 background: rgba(51, 95, 152, 0.08);
}

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

/* Article page: show the thumbnail much smaller than homepage cards. */
.news-thumb--article-small {
    /* Keep 16:9 and don't let the flex layout collapse. */
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
}

.news-article-media-row .news-thumb--article-small {
    /* Thumbnail in the main article header: keep a stable width in column layout. */
    width: 228px;
    max-width: 100%;
    align-self: flex-start;
}

.news-article-media-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    margin-top: 6px;
}

.news-article-summary {
    flex: 1;
    min-width: 0;
    line-height: 2;
    font-size: 0.95rem;
    color: var(--text);
}

.news-card h3 {
 margin: 0;
 font-size: 1rem;
 line-height: 1.75;
 position: relative;
 padding-right: 12px;
}

.news-card h3 a {
    color: var(--text);
    text-decoration: none;
}

.news-card h3 a:hover {
    color: var(--primary);
}

.news-card h3::before {
 content: "";
 position: absolute;
 top: 6px;
 right: 0;
 width: 4px;
 height: calc(100% - 12px);
 border-radius: var(--radius);
 background: var(--feed-accent, var(--primary));
}

.news-card__time {
 display: block;
 margin: 0;
 font-size: 0.78rem;
 line-height: 1.5;
 color: var(--muted);
 font-variant-numeric: tabular-nums;
}

/* صفحهٔ مقاله: «زمان:» و مقدار در یک سطر (کارت ایندکس همچنان block) */
.news-article-header__time-line {
 white-space: nowrap;
}
.news-card-header .news-article-header__time.news-card__time {
 display: inline;
 margin: 0;
 font-size: inherit;
 line-height: inherit;
 vertical-align: baseline;
}

.news-card p {
 margin: 0;
 color: var(--muted);
 font-size: 0.84rem;
 line-height: 1.85;
}

.meta-row {
 margin-top: auto;
 display: flex;
 justify-content: flex-start;
 align-items: center;
 gap: 8px;
 font-size: 0.77rem;
 padding-top: 8px;
 border-top: 1px dashed rgba(51, 95, 152, 0.22);
}

.meta-row a {
 color: var(--primary);
 text-decoration: none;
}

.back-link {
 color: var(--primary);
 text-decoration: none;
 font-size: 0.82rem;
 border: 1px solid var(--line);
 border-radius: var(--radius);
 padding: 6px 10px;
 background: #fff;
 transition: all 180ms ease;
}

.back-link:hover {
 border-color: rgba(51, 95, 152, 0.4);
 box-shadow: 0 8px 20px rgba(51, 95, 152, 0.12);
}

.legal-page-card {
 padding: 16px;
}

.legal-page-content {
 line-height: 2;
 white-space: pre-line;
 color: #223049;
}



.legal-footer {
 margin-top: 18px;
 padding: 12px 10px 20px;
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 14px;
 flex-wrap: wrap;
 border-top: 1px solid rgba(51, 95, 152, 0.2);
}

.legal-footer-note {
 color: #536a87;
 font-size: 0.84rem;
 line-height: 1.9;
}

.legal-footer-links {
 display: flex;
 gap: 12px;
 flex-wrap: wrap;
}

.legal-footer a {
 color: var(--primary);
 text-decoration: none;
 font-size: 0.82rem;
 border: 1px solid rgba(51, 95, 152, 0.22);
 border-radius: var(--radius);
 background: rgba(255, 255, 255, 0.82);
 padding: 6px 10px;
}

.legal-footer a:hover {
 border-color: rgba(51, 95, 152, 0.4);
}

.smart-refresh {
 position: fixed;
 right: 14px;
 bottom: 16px;
 z-index: 1200;
 border: 1px solid rgba(51, 95, 152, 0.2);
 border-radius: var(--radius);
 background:
 radial-gradient(120px 60px at 100% 0%, rgba(255, 255, 255, 0.22), transparent 62%),
 linear-gradient(135deg, rgba(31, 68, 118, 0.96), rgba(51, 95, 152, 0.94));
 color: #eff7ff;
 font: inherit;
 display: inline-flex;
 align-items: center;
 gap: 10px;
 min-height: 56px;
 padding: 10px 12px 10px 10px;
 cursor: pointer;
 box-shadow: 0 18px 36px rgba(26, 51, 89, 0.24);
 transform: translateX(-8px);
 backdrop-filter: blur(14px);
 transition: transform 220ms ease, box-shadow 220ms ease, opacity 180ms ease, background 220ms ease, border-color 220ms ease;
}

.smart-refresh:hover,
.smart-refresh:focus {
 transform: translateX(0);
 box-shadow: 0 22px 42px rgba(26, 51, 89, 0.3);
}

.smart-refresh:focus {
 outline: 2px solid rgba(51, 95, 152, 0.55);
 outline-offset: 2px;
}

.smart-refresh__icon-wrap {
 width: 34px;
 height: 34px;
 border-radius: var(--radius);
 background: rgba(255, 255, 255, 0.14);
 border: 1px solid rgba(255, 255, 255, 0.16);
 display: inline-flex;
 align-items: center;
 justify-content: center;
 flex: 0 0 auto;
}

.smart-refresh__icon {
 width: 18px;
 height: 18px;
 line-height: 1;
 display: inline-flex;
 align-items: center;
 justify-content: center;
}

.smart-refresh__icon svg {
 width: 18px;
 height: 18px;
 fill: currentColor;
}

.smart-refresh__copy {
 display: flex;
 flex-direction: column;
 align-items: flex-start;
 gap: 2px;
 min-width: 0;
}

.smart-refresh__label {
 font-size: 0.84rem;
 font-weight: 800;
 white-space: nowrap;
}

.smart-refresh__meta {
 font-size: 0.71rem;
 color: rgba(239, 247, 255, 0.8);
 white-space: nowrap;
}

.smart-refresh__badge {
 min-width: 24px;
 height: 24px;
 padding: 0 7px;
 border-radius: var(--radius);
 background: rgba(255, 255, 255, 0.16);
 color: #fff;
 font-size: 0.76rem;
 font-weight: 800;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.smart-refresh.has-updates {
 background:
 radial-gradient(120px 60px at 100% 0%, rgba(255, 237, 237, 0.22), transparent 62%),
 linear-gradient(135deg, rgba(147, 24, 24, 0.97), rgba(209, 59, 47, 0.96));
 border-color: rgba(255, 212, 212, 0.22);
 box-shadow: 0 20px 38px rgba(127, 29, 29, 0.28);
}

.smart-refresh.has-updates .smart-refresh__badge {
 background: rgba(255, 255, 255, 0.26);
}

.smart-refresh.has-updates .smart-refresh__icon-wrap {
 animation: smartRefreshPulse 1.6s ease-in-out infinite;
}

.smart-refresh.is-loading {
 cursor: progress;
}

.smart-refresh.is-loading .smart-refresh__icon {
 animation: spin360 700ms linear infinite;
}

.smart-refresh.is-loading .smart-refresh__icon-wrap {
 animation: none;
}

@keyframes smartRefreshPulse {
 0%,
 100% {
 transform: scale(1);
 box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
 }
 50% {
 transform: scale(1.06);
 box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.08);
 }
}

@keyframes spin360 {
 from {
 transform: rotate(0deg);
 }
 to {
 transform: rotate(360deg);
 }
}

@keyframes newsInsertFlash {
    0% {
        transform: translateY(-6px);
        box-shadow: 0 0 0 2px rgba(51, 95, 152, 0.35);
    }
    100% {
        transform: translateY(0);
        box-shadow: none;
    }
}

@media (max-width: 900px) {
 .weather-overview__hero {
 grid-template-columns: 1fr;
 }

 .weather-overview__stats {
 grid-template-columns: repeat(2, minmax(0, 1fr));
 }

 .hero-grid,
 .dashboard-toolbar,
 .homepage-dashboard {
 grid-template-columns: minmax(0, 1fr);
 }

 .alerts-grid,
 .weather-city-grid,
 .disaster-grid,
 .crypto-grid,
 .world-time-grid {
 grid-template-columns: repeat(2, minmax(0, 1fr));
 }

 .iran-calendar-hero {
  grid-template-columns: repeat(1, 1fr) !important;
 }

 .iran-calendar-form-grid {
 grid-template-columns: repeat(2, minmax(0, 1fr));
 }

 .weather-loop-item {
 gap: 7px;
 }

 .weather-loop-meta {
 display: none;
 }

 .alert-loop-item {
 gap: 8px;
 }

 .crypto-loop-item {
 gap: 7px;
 }

 .world-time-loop-item {
 gap: 7px;
 }

 .disaster-loop-item {
 gap: 7px;
 }

 .disaster-loop-severity {
 display: none;
 }
}

@media (max-width: 980px) {
    /* World-time: در عرضهای حدود تبلت هم پنل ها جداگانه در یک سطر بیایند. */
    .iran-calendar-hero {
        grid-template-columns: repeat(1, 1fr) !important;
    }
}

@media (max-width: 680px) {
 .weather-overview__stats {
 grid-template-columns: minmax(0, 1fr);
 }

 .weather-overview__copy h2 {
 font-size: 1.4rem;
 }

 .weather-aqi-panel {
 flex-wrap: wrap;
 }

 .site-title {
 font-size: 1.22rem;
 }

 .select-row {
 grid-template-columns: minmax(0, 1fr);
 }

 .homepage-dashboard {
 gap: 10px;
 }

 .dashboard-customize-panel__head,
 .dashboard-customize-item,
 .dashboard-theme-picker {
 flex-direction: column;
 align-items: stretch;
 }

 .dashboard-loop-pref {
 grid-template-columns: minmax(0, 1fr);
 }

 .site-settings-module-list,
 .site-settings-loop-preferences {
 grid-template-columns: minmax(0, 1fr);
 }

 .dashboard-customize-item__actions,
 .dashboard-toolbar-actions,
 .dashboard-smart-alerts__status {
 justify-content: space-between;
 }

 .dashboard-smart-alerts__status {
 position: static;
 }

 .dashboard-smart-alerts__toggles {
 flex-wrap: wrap;
 gap: 10px 14px;
 }

 .dashboard-toolbar-grid {
 grid-template-columns: minmax(0, 1fr);
 }

 .head-drawer-nav {
 display: grid;
 grid-template-columns: repeat(2, minmax(0, 1fr));
 }

 .head-drawer-nav__social {
 text-align: center;
 width: 100%;
 margin-inline-start: 0;
 }

 .legal-footer {
 flex-direction: column;
 align-items: flex-start;
 }

 .legal-footer-links {
 width: 100%;
 }

 .show-desktop-only {
 display: none !important;
 }

 .alerts-grid,
 .weather-city-grid,
 .disaster-grid,
 .crypto-grid,
 .world-time-grid {
 grid-template-columns: minmax(0, 1fr);
 }

 .weather-city-top {
 flex-direction: column;
 align-items: stretch;
 min-height: 0;
 }

 .weather-forecast-row {
 align-items: stretch;
 gap: 8px;
 }

 .alert-loop-window {
 min-height: 108px;
 padding: 9px 10px;
 }

 .alert-loop-item {
 inset: 9px 10px;
 display: grid;
 grid-template-columns: auto 1fr;
 row-gap: 6px;
 column-gap: 8px;
 white-space: normal;
 align-items: start;
 align-content: start;
 line-height: 1.55;
 }

 .alert-loop-badge {
 grid-column: 1;
 align-self: start;
 font-size: 0.7rem;
 padding: 4px 8px;
 }

 .alert-loop-title {
 grid-column: 2;
 font-size: 0.82rem;
 line-height: 1.5;
 display: -webkit-box;
 -webkit-box-orient: vertical;
 -webkit-line-clamp: 2;
 overflow: hidden;
 }

 .alert-loop-message {
 grid-column: 1 / -1;
 margin-right: 0;
 font-size: 0.75rem;
 color: #8a3b3b;
 display: -webkit-box;
 -webkit-box-orient: vertical;
 -webkit-line-clamp: 2;
 overflow: hidden;
 }

 .weather-loop-window {
 min-height: 98px;
 padding: 7px 8px;
 }

 .weather-loop-item {
 inset: 7px 8px;
 display: grid;
 grid-template-columns: auto 1fr auto;
 row-gap: 4px;
 column-gap: 6px;
 white-space: normal;
 align-items: center;
 align-content: center;
 line-height: 1.45;
 }

 .weather-loop-city {
 grid-column: 1;
 font-size: 0.74rem;
 padding: 3px 7px;
 }

 .weather-loop-aqi {
 grid-column: 3;
 justify-self: end;
 font-size: 0.69rem;
 padding: 3px 6px;
 margin-right: 0;
 }

 .weather-loop-text {
 grid-column: 1 / -1;
 font-size: 0.75rem;
 color: #355884;
 }

 .weather-loop-temp {
 grid-column: 1 / 3;
 font-size: 0.76rem;
 }

 .crypto-loop-window {
 min-height: 98px;
 padding: 7px 8px;
 }

 .crypto-loop-item {
 inset: 7px 8px;
 display: grid;
 grid-template-columns: auto 1fr auto;
 row-gap: 4px;
 column-gap: 6px;
 white-space: normal;
 align-items: center;
 align-content: center;
 line-height: 1.45;
 }

 .crypto-loop-symbol {
 grid-column: 1;
 font-size: 0.74rem;
 padding: 3px 7px;
 }

 .crypto-loop-change {
 grid-column: 3;
 justify-self: end;
 font-size: 0.69rem;
 padding: 3px 6px;
 }

 .crypto-loop-name {
 grid-column: 1 / -1;
 font-size: 0.75rem;
 }

 .crypto-loop-price {
 grid-column: 1 / 3;
 font-size: 0.76rem;
 }

 .crypto-loop-range {
 grid-column: 1 / -1;
 margin-right: 0;
 font-size: 0.72rem;
 }

 .world-time-loop-window {
 min-height: 98px;
 padding: 7px 8px;
 }

 .world-time-loop-item {
 inset: 7px 8px;
 display: grid;
 grid-template-columns: auto 1fr auto;
 row-gap: 4px;
 column-gap: 6px;
 white-space: normal;
 align-items: center;
 align-content: center;
 line-height: 1.45;
 }

 .world-time-loop-city {
 grid-column: 1;
 font-size: 0.74rem;
 padding: 3px 7px;
 }

 .world-time-loop-offset {
 grid-column: 3;
 justify-self: end;
 font-size: 0.69rem;
 }

 .world-time-loop-country {
 grid-column: 1 / -1;
 font-size: 0.75rem;
 }

 .world-time-loop-time {
 grid-column: 1 / 3;
 font-size: 0.78rem;
 }

 .world-time-loop-zone {
 grid-column: 1 / -1;
 margin-right: 0;
 font-size: 0.72rem;
 }

 .iran-calendar-clock {
 flex-direction: column;
 align-items: flex-start;
 }

 .iran-calendar-types,
 .iran-calendar-convert-results,
 .iran-calendar-form-grid {
 grid-template-columns: minmax(0, 1fr);
 }

 .iran-calendar-meta {
 flex-direction: column;
 }

 .disaster-loop-window {
 min-height: 94px;
 padding: 7px 8px;
 }

 .disaster-loop-item {
 inset: 7px 8px;
 display: grid;
 grid-template-columns: auto 1fr auto;
 row-gap: 4px;
 column-gap: 6px;
 white-space: normal;
 align-items: center;
 align-content: center;
 line-height: 1.45;
 }

 .disaster-loop-type {
 grid-column: 1;
 font-size: 0.72rem;
 padding: 3px 7px;
 }

 .disaster-loop-alert {
 grid-column: 3;
 justify-self: end;
 font-size: 0.72rem;
 }

 .disaster-loop-name {
 grid-column: 1 / -1;
 width: auto;
 font-size: 0.75rem;
 }

 .disaster-loop-severity {
 grid-column: 1 / -1;
 font-size: 0.7rem;
 margin-right: 0;
 }

 .weather-forecast-row {
 gap: 6px;
 }

 .weather-today-main {
 flex-direction: column;
 align-items: flex-start;
 gap: 4px;
 }

 .weather-today-temp {
 margin-right: 0;
 font-size: 1.45rem;
 }

 .weather-today-metrics {
 grid-template-columns: minmax(0, 1fr);
 }

 .weather-aqi-panel,
 .weather-today-hero {
 min-height: 0;
 }

 .crypto-range {
 flex-direction: column;
 gap: 3px;
 }

 .smart-refresh {
 position: fixed;
 right: 10px;
 left: auto;
 top: auto;
 bottom: calc(12px + env(safe-area-inset-bottom, 0px));
 transform: none;
 min-height: 52px;
 padding: 9px 11px 9px 9px;
 max-width: calc(100vw - 20px);
 }

 .smart-refresh__meta {
 display: none;
 }
}

html[data-theme="dark"] .dashboard-smart-alerts__badge,
html[data-theme="dark"] .dashboard-smart-alerts__badge.is-active,
html[data-theme="dark"] .dashboard-smart-alerts__badge.is-blocked,
html[data-theme="dark"] .main-tabs a,
html[data-theme="dark"] .back-link,
html[data-theme="dark"] .weather-aqi-panel,
html[data-theme="dark"] .weather-today-status,
html[data-theme="dark"] .weather-today-metrics > div,
html[data-theme="dark"] .weather-forecast-row,
html[data-theme="dark"] .weather-forecast-extra,
html[data-theme="dark"] .iran-calendar-form input,
html[data-theme="dark"] .iran-calendar-form select,
html[data-theme="dark"] .iran-calendar-alert,
html[data-theme="dark"] .legal-page-card,
html[data-theme="dark"] .hero-list li {
 background: rgba(23, 36, 54, 0.94) !important;
 border-color: var(--line) !important;
 color: var(--text) !important;
}

html[data-theme="dark"] .weather-temp-chip--max,
html[data-theme="dark"] .weather-forecast-temp-chip--max,
html[data-theme="dark"] .weather-temp-chip--min,
html[data-theme="dark"] .weather-forecast-temp-chip--min {
 border: 1px solid transparent;
}

html[data-theme="dark"] .alert-loop-card,
html[data-theme="dark"] .weather-loop-card,
html[data-theme="dark"] .crypto-loop-card,
html[data-theme="dark"] .world-time-loop-card,
html[data-theme="dark"] .disaster-loop-card,
html[data-theme="dark"] .alerts-page-card,
html[data-theme="dark"] .disaster-page-card,
html[data-theme="dark"] .crypto-page-card,
html[data-theme="dark"] .world-time-page-card,
html[data-theme="dark"] .weather-overview,
html[data-theme="dark"] .iran-calendar-panel,
html[data-theme="dark"] .weather-city-card,
html[data-theme="dark"] .disaster-card,
html[data-theme="dark"] .crypto-card,
html[data-theme="dark"] .world-time-card,
html[data-theme="dark"] .alert-card {
 border-color: var(--line) !important;
 background:
 radial-gradient(220px 120px at 100% 0%, rgba(134, 174, 232, 0.14), transparent 72%),
 linear-gradient(160deg, rgba(18, 29, 45, 0.98), rgba(14, 22, 35, 0.96)) !important;
 color: var(--text);
 box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .alert-loop-badge,
html[data-theme="dark"] .alert-card-badge {
 background: #b73f4d;
 border-color: #8e2f3b;
 color: #fff2f3;
}

html[data-theme="dark"] .weather-loop-city,
html[data-theme="dark"] .crypto-loop-symbol,
html[data-theme="dark"] .world-time-loop-city,
html[data-theme="dark"] .disaster-loop-type,
html[data-theme="dark"] .iran-calendar-offset,
html[data-theme="dark"] .iran-calendar-live-period,
html[data-theme="dark"] .world-time-offset,
html[data-theme="dark"] .world-time-live-period,
html[data-theme="dark"] .crypto-window,
html[data-theme="dark"] .disaster-type,
html[data-theme="dark"] .weather-overview__eyebrow,
html[data-theme="dark"] .weather-city-glyph,
html[data-theme="dark"] .weather-aqi,
html[data-theme="dark"] .crypto-change-chip,
html[data-theme="dark"] .disaster-alert,
html[data-theme="dark"] .weather-overview__stat,
html[data-theme="dark"] .crypto-stats > div,
html[data-theme="dark"] .iran-calendar-type-card,
html[data-theme="dark"] .iran-calendar-result-card {
 background: rgba(23, 36, 54, 0.94) !important;
 border-color: var(--line) !important;
 color: var(--text) !important;
}

html[data-theme="dark"] .alert-loop-title,
html[data-theme="dark"] .alert-loop-message,
html[data-theme="dark"] .weather-loop-text,
html[data-theme="dark"] .weather-loop-temp,
html[data-theme="dark"] .weather-loop-meta,
html[data-theme="dark"] .weather-loop-aqi,
html[data-theme="dark"] .crypto-loop-name,
html[data-theme="dark"] .crypto-loop-price,
html[data-theme="dark"] .crypto-loop-range,
html[data-theme="dark"] .world-time-loop-country,
html[data-theme="dark"] .world-time-loop-offset,
html[data-theme="dark"] .world-time-loop-time,
html[data-theme="dark"] .world-time-loop-zone,
html[data-theme="dark"] .disaster-loop-name,
html[data-theme="dark"] .disaster-loop-alert,
html[data-theme="dark"] .disaster-loop-severity,
html[data-theme="dark"] .alert-card-time,
html[data-theme="dark"] .alert-card h2,
html[data-theme="dark"] .alert-card p,
html[data-theme="dark"] .world-time-top h2,
html[data-theme="dark"] .world-time-country,
html[data-theme="dark"] .world-time-live-time,
html[data-theme="dark"] .world-time-meta,
html[data-theme="dark"] .world-time-foot,
html[data-theme="dark"] .crypto-top h2,
html[data-theme="dark"] .crypto-name,
html[data-theme="dark"] .crypto-price,
html[data-theme="dark"] .crypto-range,
html[data-theme="dark"] .crypto-footnote,
html[data-theme="dark"] .disaster-section-title,
html[data-theme="dark"] .disaster-card h2,
html[data-theme="dark"] .disaster-meta,
html[data-theme="dark"] .disaster-severity,
html[data-theme="dark"] .weather-overview__copy h2,
html[data-theme="dark"] .weather-overview__copy p,
html[data-theme="dark"] .weather-overview__stat strong,
html[data-theme="dark"] .weather-overview__stat span,
html[data-theme="dark"] .weather-city-top h2,
html[data-theme="dark"] .weather-city-subline,
html[data-theme="dark"] .crypto-stats strong,
html[data-theme="dark"] .crypto-stats span,
html[data-theme="dark"] .iran-calendar-head h2,
html[data-theme="dark"] .iran-calendar-head p,
html[data-theme="dark"] .iran-calendar-live-time,
html[data-theme="dark"] .iran-calendar-meta,
html[data-theme="dark"] .iran-calendar-type-card strong,
html[data-theme="dark"] .iran-calendar-result-card strong,
html[data-theme="dark"] .iran-calendar-type-card span,
html[data-theme="dark"] .iran-calendar-result-card span {
 color: var(--text) !important;
}

html[data-theme="dark"] .disaster-actions a,
html[data-theme="dark"] .alerts-empty,
html[data-theme="dark"] .disaster-empty,
html[data-theme="dark"] .crypto-chart-wrap {
 background: rgba(23, 36, 54, 0.94) !important;
 border-color: var(--line) !important;
 color: var(--text) !important;
}

html[data-theme="dark"] .legal-page-content,
html[data-theme="dark"] .select-row label,
html[data-theme="dark"] .dashboard-toolbar-summary,
html[data-theme="dark"] .weather-aqi-panel__label,
html[data-theme="dark"] .weather-aqi-panel__value,
html[data-theme="dark"] .weather-aqi-panel__text,
html[data-theme="dark"] .weather-today-label,
html[data-theme="dark"] .weather-today-status,
html[data-theme="dark"] .weather-today-metrics > div,
html[data-theme="dark"] .weather-forecast-date,
html[data-theme="dark"] .weather-forecast-state,
html[data-theme="dark"] .weather-forecast-extra,
html[data-theme="dark"] .hero-body p,
html[data-theme="dark"] .hero-list h3,
html[data-theme="dark"] .hero-list a,
html[data-theme="dark"] .hero-list time,
html[data-theme="dark"] .back-link {
 color: var(--text) !important;
}

html[data-theme="dark"] .weather-loop-aqi {
 background: rgba(26, 44, 68, 0.94) !important;
 border-color: #38557c !important;
 color: #d7e8ff !important;
}

html[data-theme="dark"] .disaster-severity {
 background: rgba(61, 29, 29, 0.72) !important;
 border-color: #7b4b4b !important;
 color: #ffd7d7 !important;
}

html[data-theme="dark"] .weather-temp-chip--max,
html[data-theme="dark"] .weather-forecast-temp-chip--max {
 background: rgba(122, 63, 22, 0.88) !important;
 border-color: #d08a55 !important;
 color: #fff1e5 !important;
}

html[data-theme="dark"] .weather-temp-chip--min,
html[data-theme="dark"] .weather-forecast-temp-chip--min {
 background: rgba(24, 66, 126, 0.88) !important;
 border-color: #6da7f2 !important;
 color: #eef6ff !important;
}

.analysis-page {
 display: grid;
 gap: 14px;
}

.map-page .map-card,
.map-page .map-side-card {
    padding: 0;
    overflow: hidden;
    margin: 18px 0 24px; /* همان عرض container / منو را می‌گیرد */
}

main.map-page.main-layout {
    display: block;
}

.map-page .map-card,
.map-page .map-side-card {
    display: flex;
    flex-direction: column;
    height: auto;
}

/* برای دسکتاپ ارتفاع نقشه باید مشخص باشد تا Leaflet بتواند رندر کند. */
.map-page .map-card .map-container {
    flex: 1 1 auto;
    height: clamp(360px, 55vh, 620px);
}

/* موبایل: نقشه ۱۶:۹ بالا، خبرها زیر آن */
@media (max-width: 899px) {
    .map-page .map-card {
        margin-bottom: 12px;
    }

    .map-page .map-card .map-container {
        position: relative;
        width: 100%;
        height: auto;
        padding-top: 56.25%; /* 16:9 */
    }

    .map-page .map-card .map-container .leaflet-container,
    .map-page .map-card .map-container .maplibregl-canvas {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }

    .map-page .map-side-card {
        margin-top: 0;
    }
}

.map-page .map-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.map-page .map-container .maplibregl-canvas {
    outline: none;
}

.map-marker-add-circle {
    width: 18px;
    height: 18px;
    cursor: pointer;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.7); /* قرمز با شفافیت حدود ۷۰٪ */
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.45);
    animation: map-pulse 2.4s ease-out infinite;
}

@keyframes map-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.45);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(220, 38, 38, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

.map-marker-disaster-triangle {
    width: 18px;
    height: 16px;
    cursor: pointer;
    /* Rounded triangle marker (SVG) to avoid sharp edges. */
    background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2018%2016'%3E%3Cpath%20fill='%23F97316'%20d='M9%201%20Q12%201%2012.8%203.2%20L16.8%2014%20Q15.8%2015.8%2013.8%2015.8%20H4.2%20Q2.2%2015.8%201.2%2014%20L5.2%203.2%20Q6%201%209%201%20Z'/%3E%3C/svg%3E") center/contain no-repeat;
    animation: map-disaster-pulse 2.4s ease-out infinite;
    filter: drop-shadow(0 0 4px rgba(124, 45, 18, 0.6));
}

@keyframes map-disaster-pulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(124, 45, 18, 0.55));
    }
    35% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 6px rgba(124, 45, 18, 0.65));
    }
    70% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(124, 45, 18, 0));
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(124, 45, 18, 0));
    }
}

.map-side-panel {
    position: relative;
    border-inline-start: 1px solid var(--line);
    padding: 10px 10px 10px 4px;
    font-size: 0.88rem;
    line-height: 1.8;
    overflow-y: auto; /* اگر محتوای داخلی بیشتر از ارتفاع بود، اسکرول بخورد */
}

.map-side-panel .disaster-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.map-side-panel .disaster-link-row a {
    display: inline-block;
    padding: 6px 10px;
    border-radius: var(--radius);
    border: 1px solid rgba(51, 95, 152, 0.18);
    background: rgba(51, 95, 152, 0.06);
    color: var(--primary);
    text-decoration: none;
    font-size: 0.78rem;
    line-height: 1;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.map-side-panel .disaster-link-row a:hover,
.map-side-panel .disaster-link-row a:focus-visible {
    background: rgba(51, 95, 152, 0.14);
    border-color: rgba(51, 95, 152, 0.35);
    transform: translateY(-1px);
}

.map-side-empty {
    color: var(--muted);
    font-size: 0.86rem;
}

.map-panel-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.map-panel-head h2 {
    margin: 0 0 4px;
    font-size: 0.95rem;
}

.map-panel-head p {
    margin: 0 0 8px;
    font-size: 0.8rem;
    color: var(--muted);
}

.map-panel-list {
    flex: 1 1 auto;
    overflow-y: visible;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-inline-end: 4px;
}

.map-panel-item {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr); /* تصویر کمی کوچک‌تر */
    gap: 8px;
    align-items: stretch;
}

.map-panel-item--disaster {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 10px 10px 12px;
    border: 1px solid rgba(51, 95, 152, 0.16);
    border-radius: var(--radius);
    background: rgba(51, 95, 152, 0.05);
    align-items: start;
}

.map-panel-item--disaster .map-panel-body p {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.7;
}

.map-panel-item--disaster .map-panel-body p + p {
    margin-top: 6px;
}

.map-panel-item--disaster .map-panel-body p strong {
    color: var(--text);
    font-weight: 800;
}

.map-panel-item--disaster .disaster-link-row {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(51, 95, 152, 0.22);
}

.map-panel-thumb {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    border-radius: var(--radius);
    overflow: hidden;
    background: rgba(15, 23, 42, 0.12);
}

.map-panel-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-panel-thumb-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    border-radius: inherit;
}

.map-panel-time {
    display: block;
    margin-top: 4px;
    font-size: 0.72rem;
    line-height: 1.45;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.map-panel-body h3 {
    margin: 0 0 4px;
    font-size: 0.86rem;
}

.map-panel-body a {
    font-size: 0.8rem;
    color: var(--primary);
}

/* دسکتاپ: نقشه و پنل کنار هم، با ارتفاع ثابت */
@media (min-width: 900px) {
    main.map-page.main-layout {
        display: grid;
        grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr);
        gap: 12px;
        align-items: stretch;
    }

    .map-page .map-card,
    .map-page .map-side-card {
        height: min(70vh, 640px);
    }
}

.analysis-hero-card {
 display: grid;
 grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.9fr);
 gap: 14px;
 padding: 18px;
 background:
 radial-gradient(280px 160px at 100% 0%, rgba(51, 95, 152, 0.16), transparent 72%),
 linear-gradient(145deg, rgba(255, 255, 255, 0.99), rgba(241, 247, 255, 0.98));
}

.analysis-eyebrow {
 display: inline-flex;
 align-items: center;
 gap: 6px;
 padding: 5px 10px;
 border-radius: var(--radius);
 border: 1px solid rgba(51, 95, 152, 0.16);
 background: rgba(51, 95, 152, 0.08);
 color: var(--primary);
 font-size: 0.76rem;
 font-weight: 800;
}

.analysis-hero-copy h1,
.analysis-panel h2 {
 margin: 10px 0 6px;
 font-size: 1.28rem;
 color: #183253;
}

.analysis-hero-copy p,
.analysis-panel p,
.analysis-stat-card small {
 margin: 0;
 color: var(--muted);
 line-height: 1.9;
}

.analysis-hero-meta {
 display: grid;
 gap: 10px;
}

.analysis-hero-meta > div,
.analysis-stat-card {
 padding: 12px 14px;
 border: 1px solid rgba(51, 95, 152, 0.12);
 border-radius: var(--radius);
 background: rgba(255, 255, 255, 0.74);
}

.analysis-hero-meta span,
.analysis-stat-card span {
 display: block;
 font-size: 0.77rem;
 color: var(--muted);
}

.analysis-hero-meta strong,
.analysis-stat-card strong {
 display: block;
 margin-top: 6px;
 color: #183253;
 font-size: 1.1rem;
}

.analysis-stat-grid,
.analysis-grid {
 display: grid;
 grid-template-columns: repeat(2, minmax(0, 1fr));
 gap: 14px;
}

.analysis-stat-grid {
 grid-template-columns: repeat(4, minmax(0, 1fr));
}

.analysis-panel {
 padding: 16px;
}

.analysis-panel--chart {
 padding: 18px;
}

.analysis-volume-header {
 margin-bottom: 16px;
}

.analysis-volume-header__top {
 display: flex;
 align-items: flex-start;
 justify-content: space-between;
 gap: 12px;
 flex-wrap: wrap;
}

.analysis-volume-header__titles {
 flex: 1 1 260px;
 min-width: 0;
}

.analysis-volume-header__titles h2 {
 margin: 0 0 6px;
}

.analysis-volume-header__date {
 margin: 0;
 font-size: 0.88rem;
 line-height: 1.5;
 color: var(--muted);
}

.analysis-volume-header__iso {
 font-weight: 600;
 color: var(--text-strong);
 letter-spacing: 0.02em;
}

.analysis-volume-header__sep {
 margin: 0 6px;
 color: #94a3b8;
}

.analysis-volume-header__zone {
 margin-inline-start: 6px;
 font-size: 0.78rem;
 color: var(--muted);
}

.analysis-volume-header__hint {
 margin: 10px 0 0;
 padding: 10px 12px;
 border-radius: var(--radius);
 border: 1px solid rgba(51, 95, 152, 0.12);
 background: rgba(51, 95, 152, 0.05);
 font-size: 0.82rem;
 line-height: 1.6;
 color: var(--muted);
}

.analysis-volume-header__hint strong {
 color: var(--text-strong);
 font-weight: 700;
}

.analysis-volume-header__refresh {
 margin: 8px 0 0;
 font-size: 0.78rem;
 color: var(--muted);
}

.analysis-volume-header__refresh time {
 font-weight: 600;
 color: var(--text-strong);
}

.analysis-panel-head {
 display: flex;
 align-items: flex-start;
 justify-content: space-between;
 gap: 10px;
 margin-bottom: 14px;
}

.analysis-panel-head h2 {
 margin: 0 0 4px;
}

.analysis-panel-badge {
 display: inline-flex;
 align-items: center;
 padding: 6px 10px;
 border-radius: var(--radius);
 background: rgba(51, 95, 152, 0.08);
 border: 1px solid rgba(51, 95, 152, 0.14);
 color: var(--primary);
 font-size: 0.76rem;
 white-space: nowrap;
}

/* نمودار حجم خبر ساعتی (۲۴ میله) */
.analysis-volume-intro {
 margin: 4px 0 0;
 font-size: 0.88rem;
 line-height: 1.65;
 color: var(--muted);
}

.analysis-volume-intro strong {
 color: var(--text-strong);
 font-weight: 700;
}

.analysis-volume-intro__meta {
 display: block;
 margin-top: 6px;
 font-size: 0.8rem;
 color: var(--muted);
}

.analysis-volume-layout {
 display: grid;
 grid-template-columns: minmax(0, 1.75fr) minmax(260px, 320px);
 gap: 16px;
 align-items: start;
}

.analysis-volume-card {
 border: 1px solid rgba(51, 95, 152, 0.12);
 border-radius: var(--radius);
 background: linear-gradient(180deg, rgba(248, 251, 255, 0.95), rgba(255, 255, 255, 0.98));
 padding: 14px 12px 12px;
}

.analysis-volume-chart__stats {
 display: flex;
 flex-wrap: wrap;
 gap: 8px 10px;
 margin-bottom: 10px;
}

.analysis-volume-chart__stats > span {
 display: inline-flex;
 align-items: center;
 gap: 4px;
 padding: 6px 10px;
 border-radius: var(--radius);
 border: 1px solid rgba(51, 95, 152, 0.12);
 background: rgba(51, 95, 152, 0.05);
 font-size: 0.76rem;
 color: var(--muted);
}

.analysis-volume-chart__stats strong {
 color: #183253;
 font-weight: 700;
}

.analysis-volume-chart__hint {
 margin: 0 0 12px;
 font-size: 0.78rem;
 line-height: 1.6;
 color: var(--muted);
}

.analysis-volume-chart__scroller {
 overflow-x: auto;
 overflow-y: hidden;
 -webkit-overflow-scrolling: touch;
 padding-bottom: 6px;
 margin: 0 -4px;
 padding-left: 4px;
 padding-right: 4px;
 scrollbar-width: thin;
}

.analysis-volume-chart__bars {
 display: grid;
 grid-template-columns: repeat(24, minmax(0, 1fr));
 gap: 4px;
 align-items: end;
 width: 100%;
 min-width: 640px;
 min-height: 0;
}

.analysis-volume-chart__slot {
 display: flex;
 flex-direction: column;
 align-items: stretch;
 gap: 4px;
 min-width: 0;
}

.analysis-volume-chart__hit {
 position: relative;
 display: flex;
 flex-direction: column;
 align-items: stretch;
 justify-content: flex-end;
 width: 100%;
 min-height: 210px;
 padding: 0 0 2px;
 border: 0;
 border-radius: 8px;
 background: transparent;
 cursor: pointer;
 transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.analysis-volume-chart__hit:focus-visible {
 outline: 2px solid rgba(51, 95, 152, 0.45);
 outline-offset: 2px;
}

.analysis-volume-chart__meter {
 width: 100%;
 height: 180px;
 display: flex;
 flex-direction: column;
 justify-content: flex-end;
 border-radius: 6px 6px 2px 2px;
 background: rgba(51, 95, 152, 0.07);
 overflow: hidden;
}

.analysis-volume-chart__fill {
 width: 100%;
 height: calc(var(--bar, 0) * 1.8px);
 min-height: 2px;
 background: linear-gradient(180deg, #5b88c4 0%, #335f98 100%);
 border-radius: 4px 4px 0 0;
 transition: height 0.2s ease, filter 0.15s ease;
}

.analysis-volume-chart__hit:hover .analysis-volume-chart__fill,
.analysis-volume-chart__hit:focus-visible .analysis-volume-chart__fill {
 filter: brightness(1.05);
}

.analysis-volume-chart__hit.is-active {
 background: rgba(51, 95, 152, 0.06);
}

.analysis-volume-chart__hit.is-active .analysis-volume-chart__fill {
 box-shadow: inset 0 0 0 1px rgba(51, 95, 152, 0.35);
}

.analysis-volume-chart__value {
 position: absolute;
 top: 4px;
 left: 50%;
 transform: translateX(-50%);
 font-size: 0.65rem;
 font-weight: 700;
 color: #183253;
 white-space: nowrap;
 pointer-events: none;
 text-shadow: 0 0 4px rgba(255, 255, 255, 0.9);
}

.analysis-volume-chart__tick {
 display: block;
 text-align: center;
 font-size: 0.62rem;
 line-height: 1.2;
 color: var(--muted);
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
}

.analysis-volume-detail {
 display: grid;
 gap: 12px;
 padding: 14px;
 border: 1px solid rgba(51, 95, 152, 0.1);
 border-radius: var(--radius);
 background:
 radial-gradient(180px 110px at 100% 0%, rgba(51, 95, 152, 0.12), transparent 72%),
 linear-gradient(180deg, rgba(246, 250, 255, 0.98), rgba(255, 255, 255, 0.98));
}

.analysis-volume-detail__eyebrow {
 font-size: 0.76rem;
 color: var(--muted);
}

.analysis-volume-detail__time {
 display: block;
 color: #183253;
 font-size: 1.45rem;
}

.analysis-volume-detail__grid {
 display: grid;
 grid-template-columns: repeat(2, minmax(0, 1fr));
 gap: 10px;
}

.analysis-volume-detail__grid div,
.analysis-volume-detail__feed {
 padding: 10px 11px;
 border-radius: var(--radius);
 border: 1px solid rgba(51, 95, 152, 0.1);
 background: rgba(255, 255, 255, 0.78);
}

.analysis-volume-detail__grid span,
.analysis-volume-detail__feed span,
.analysis-volume-detail__feed small {
 display: block;
 color: var(--muted);
 font-size: 0.76rem;
}

.analysis-volume-detail__grid strong,
.analysis-volume-detail__feed strong {
 display: block;
 margin-top: 6px;
 color: #183253;
 font-size: 1rem;
}

.analysis-volume-detail__feed small {
 margin-top: 6px;
 line-height: 1.7;
}

[data-detail-delta][data-trend="up"] {
 color: #0f766e;
}

[data-detail-delta][data-trend="down"] {
 color: #b45309;
}

[data-detail-delta][data-trend="flat"] {
 color: #183253;
}

.analysis-keyword-bubble__tooltip {
 position: absolute;
 z-index: 3;
 transform: translate(-50%, calc(-100% - 14px));
 min-width: 140px;
 max-width: 220px;
 padding: 8px 10px;
 border-radius: var(--radius);
 border: 1px solid rgba(51, 95, 152, 0.14);
 background: rgba(255, 255, 255, 0.96);
 box-shadow: 0 14px 28px rgba(27, 44, 77, 0.16);
 pointer-events: none;
}

.analysis-keyword-bubble__tooltip strong {
 display: block;
 color: #183253;
 font-size: 0.82rem;
}

.analysis-keyword-bubble__tooltip span,
.analysis-keyword-bubble__tooltip small {
 display: block;
 margin-top: 3px;
 color: var(--muted);
 font-size: 0.74rem;
 line-height: 1.6;
}

.map-range-switch {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    padding: 10px 0 6px;
}

.map-range-link {
    display: inline-block;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(51, 95, 152, 0.14);
    background: rgba(51, 95, 152, 0.06);
    color: var(--muted);
}

.map-range-link.is-active {
    background: rgba(51, 95, 152, 0.18);
    border-color: rgba(51, 95, 152, 0.32);
    color: var(--text) !important;
}

.map-side-disaster-hint {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.6;
}

.analysis-keyword-layout {
 display: flex;
 flex-direction: column;
 gap: 18px;
}

.analysis-keyword-cooccurrence {
 border-top: 1px solid var(--line-soft);
 padding-top: 14px;
}

.analysis-keyword-cooccurrence h3 {
 margin: 0 0 6px;
 font-size: 0.96rem;
}

.analysis-keyword-cooccurrence p {
 margin: 0 0 10px;
 font-size: 0.8rem;
 color: var(--muted);
}

.analysis-keyword-pairs {
 display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
 gap: 8px;
}

.analysis-keyword-pair {
 border-radius: var(--radius);
 border: 1px solid var(--line-soft);
 padding: 6px 8px;
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 8px;
 background: rgba(243, 248, 255, 0.96);
}

.analysis-keyword-pair__terms {
 display: inline-flex;
 align-items: center;
 gap: 4px;
 font-size: 0.8rem;
 font-weight: 600;
 color: var(--text-strong);
}

.analysis-keyword-pair small {
 font-size: 0.75rem;
 color: var(--muted);
}

@media (min-width: 960px) {
 .analysis-keyword-layout {
 flex-direction: row;
 align-items: flex-start;
 }

 .analysis-keyword-list--full {
 flex: 2;
 }

 .analysis-keyword-cooccurrence {
 flex: 1;
 border-top: 0;
 border-right: 1px solid var(--line-soft);
 padding-top: 0;
 padding-right: 14px;
 margin-right: 6px;
 }
}

.analysis-rank-list {
 display: grid;
 grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
 gap: 10px 14px;
}

@media (min-width: 900px) {
    .analysis-rank-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.analysis-rank-item {
 display: flex;
 flex-direction: column;
 gap: 6px;
}

.analysis-rank-top {
 display: flex;
 align-items: baseline;
 justify-content: space-between;
 gap: 6px;
 font-size: 0.82rem;
}

.analysis-rank-track {
 position: relative;
 height: 7px;
 border-radius: 999px;
 background: #e3ebf7;
 overflow: hidden;
}

.analysis-rank-track > div {
 height: 100%;
 border-radius: inherit;
 background: linear-gradient(90deg, #335f98, #1f8a70);
}

.analysis-panel--keywords {
 padding: 18px;
}

.analysis-keyword-layout {
 display: grid;
 grid-template-columns: minmax(320px, 1.1fr) minmax(0, 1fr);
 gap: 16px;
 align-items: stretch;
}

.analysis-keyword-pie {
 display: grid;
 gap: 14px;
 padding: 14px;
 border: 1px solid rgba(51, 95, 152, 0.1);
 border-radius: var(--radius);
 background:
 radial-gradient(240px 140px at 20% 10%, rgba(52, 116, 185, 0.14), transparent 72%),
 radial-gradient(220px 160px at 90% 18%, rgba(27, 180, 169, 0.12), transparent 70%),
 linear-gradient(145deg, rgba(248, 251, 255, 0.98), rgba(255, 255, 255, 0.96));
}

.analysis-keyword-pie__chart {
 position: relative;
 width: min(100%, 340px);
 aspect-ratio: 1 / 1;
 margin: 0 auto;
 border-radius: 50%;
 box-shadow: inset 0 0 0 1px rgba(51, 95, 152, 0.08), 0 16px 28px rgba(27, 44, 77, 0.12);
 overflow: hidden;
}

.analysis-keyword-pie__svg {
 width: 100%;
 height: 100%;
 display: block;
 transform: rotate(-90deg);
}

.analysis-keyword-pie__center {
 position: absolute;
 inset: 50%;
 width: 110px;
 height: 110px;
 transform: translate(-50%, -50%);
 z-index: 1;
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 text-align: center;
 border-radius: 50%;
 background: rgba(255, 255, 255, 0.9);
 box-shadow: 0 12px 24px rgba(27, 44, 77, 0.12), inset 0 0 0 1px rgba(51, 95, 152, 0.08);
}

.analysis-keyword-pie__center span {
 color: var(--muted);
 font-size: 0.8rem;
}

.analysis-keyword-pie__center strong {
 margin-top: 6px;
 color: #183253;
 font-size: 1.6rem;
}

.analysis-keyword-pie__slice {
 cursor: pointer;
 transition: opacity 160ms ease, transform 160ms ease, filter 160ms ease;
 transform-origin: 120px 120px;
}

.analysis-keyword-pie__slice:hover,
.analysis-keyword-pie__slice:focus,
.analysis-keyword-pie__slice.is-active {
 opacity: 1;
 filter: brightness(1.05);
}

.analysis-keyword-pie__slice:not(.is-active) {
 opacity: 0.92;
}

.analysis-keyword-pie__legend {
 display: grid;
 grid-template-columns: repeat(2, minmax(0, 1fr));
 gap: 8px 10px;
}

.analysis-keyword-pie__legend-item {
 display: grid;
 grid-template-columns: 12px minmax(0, 1fr) auto;
 align-items: center;
 gap: 8px;
 padding: 8px 10px;
 border: 1px solid rgba(51, 95, 152, 0.1);
 border-radius: var(--radius);
 background: rgba(255, 255, 255, 0.72);
 cursor: pointer;
 text-align: right;
}

.analysis-keyword-pie__legend-item.is-active {
 border-color: rgba(51, 95, 152, 0.24);
 box-shadow: 0 10px 20px rgba(27, 44, 77, 0.08);
}

.analysis-keyword-pie__legend-item:focus-visible {
 outline: none;
 border-color: rgba(51, 95, 152, 0.3);
}

.analysis-keyword-pie__swatch {
 width: 12px;
 height: 12px;
 border-radius: 999px;
}

.analysis-keyword-pie__label {
 min-width: 0;
 color: #183253;
 font-size: 0.8rem;
 font-weight: 700;
}

.analysis-keyword-pie__legend-item strong {
 color: var(--primary);
 font-size: 0.78rem;
}

.analysis-keyword-pie__detail {
 padding: 12px;
 border: 1px solid rgba(51, 95, 152, 0.1);
 border-radius: var(--radius);
 background: rgba(255, 255, 255, 0.78);
}

.analysis-keyword-pie__detail-label {
 display: block;
 color: var(--muted);
 font-size: 0.76rem;
}

.analysis-keyword-pie__detail strong {
 display: block;
 margin-top: 6px;
 color: #183253;
 font-size: 1rem;
}

.analysis-keyword-pie__detail small {
 display: block;
 margin-top: 5px;
 color: var(--muted);
 font-size: 0.76rem;
 line-height: 1.7;
}

.analysis-keyword-list {
 display: grid;
 grid-template-columns: repeat(2, minmax(0, 1fr));
 gap: 10px 12px;
 align-content: start;
}

.analysis-keyword-list--full {
 width: 100%;
}

.analysis-keyword-list--six {
 grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* دسکتاپ: دقیقاً ۳ ستون برای ۶ کلیدواژه (۲ ردیف) */
@media (min-width: 900px) {
 .analysis-keyword-list--six {
  grid-template-columns: repeat(3, minmax(0, 1fr));
 }
}

.analysis-keyword-card {
 display: grid;
 grid-template-columns: 34px minmax(0, 1fr) auto;
 align-items: center;
 gap: 10px;
 padding: 12px;
 border: 1px solid rgba(51, 95, 152, 0.1);
 border-radius: var(--radius);
 background: rgba(255, 255, 255, 0.78);
}

.analysis-keyword-card__rank,
.analysis-keyword-card__score {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 border-radius: var(--radius);
 font-size: 0.76rem;
 white-space: nowrap;
}

.analysis-keyword-card__rank {
 width: 34px;
 height: 34px;
 background: rgba(51, 95, 152, 0.08);
 color: var(--primary);
 font-weight: 800;
}

.analysis-keyword-card__body {
 min-width: 0;
}

.analysis-keyword-card__body strong {
 display: block;
 color: #183253;
 font-size: 0.9rem;
}

.analysis-keyword-card__body small {
 display: block;
 margin-top: 4px;
 color: var(--muted);
 font-size: 0.75rem;
}

.analysis-keyword-card__score {
 padding: 6px 10px;
 border: 1px solid rgba(15, 118, 110, 0.14);
 background: rgba(15, 118, 110, 0.08);
 color: #0f766e;
 font-weight: 700;
}

[data-detail-delta][data-trend="up"] {
 color: #127a48;
}

[data-detail-delta][data-trend="down"] {
 color: #b42318;
}

.analysis-rank-list,
.analysis-article-list {
 display: grid;
 gap: 10px;
}

.analysis-rank-item,
.analysis-article-item {
 padding: 10px 12px;
 border: 1px solid rgba(51, 95, 152, 0.1);
 border-radius: var(--radius);
 background: rgba(255, 255, 255, 0.72);
}

.analysis-rank-top,
.analysis-article-head,
.analysis-article-meta {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 10px;
}

.analysis-rank-top span,
.analysis-article-head time,
.analysis-article-meta span {
 color: var(--muted);
 font-size: 0.77rem;
}

.analysis-rank-track {
 margin-top: 8px;
 height: 10px;
 border-radius: 999px;
 background: rgba(51, 95, 152, 0.08);
 overflow: hidden;
}

.analysis-rank-track > div {
 height: 100%;
 border-radius: inherit;
 background: linear-gradient(90deg, #335f98, #5f83b5);
}

.analysis-rank-track--accent > div {
 background: linear-gradient(90deg, #0e7490, #46a7bc);
}

.analysis-article-list {
 grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analysis-article-item h3 {
 margin: 0;
 font-size: 0.96rem;
}

.analysis-article-item h3 a {
 color: #183253;
 text-decoration: none;
}

.analysis-article-item h3 a:hover {
 color: var(--primary);
}

.analysis-article-meta {
 justify-content: flex-start;
 flex-wrap: wrap;
 margin-top: 8px;
}

.analysis-article-meta span,
.analysis-tag-list span {
 display: inline-flex;
 align-items: center;
 padding: 4px 9px;
 border-radius: var(--radius);
 border: 1px solid rgba(51, 95, 152, 0.12);
 background: rgba(51, 95, 152, 0.06);
}

.analysis-tag-list {
 display: flex;
 flex-wrap: wrap;
 gap: 8px;
 margin-top: 10px;
}

.analysis-tag-list span {
 color: #24456f;
 font-size: 0.76rem;
 font-weight: 700;
}

.analysis-empty {
 color: var(--muted);
 margin: 0;
}

.analysis-empty--inline {
 margin-top: 10px;
 font-size: 0.82rem;
}

@media (max-width: 980px) {
 .analysis-hero-card,
 .analysis-stat-grid,
 .analysis-grid,
 .analysis-volume-layout,
 .analysis-keyword-layout,
 .analysis-article-list,
 .analysis-keyword-pairs {
 grid-template-columns: minmax(0, 1fr);
 }

 .analysis-keyword-pie__legend {
 grid-template-columns: minmax(0, 1fr);
 }
}

@media (max-width: 640px) {
 .analysis-panel-head,
 .analysis-volume-header__top,
 .analysis-rank-top,
 .analysis-article-head {
 flex-direction: column;
 align-items: flex-start;
 }

 .analysis-hero-card,
 .analysis-panel,
 .analysis-stat-card {
 padding: 14px;
 }

 .analysis-keyword-list,
 .analysis-volume-detail__grid {
 grid-template-columns: minmax(0, 1fr);
 }

 .analysis-keyword-card {
 grid-template-columns: 32px minmax(0, 1fr);
 }

 .analysis-keyword-card__score {
 grid-column: 1 / -1;
 justify-self: start;
 }
}

html[data-theme="dark"] .analysis-hero-card,
html[data-theme="dark"] .analysis-panel,
html[data-theme="dark"] .analysis-stat-card,
html[data-theme="dark"] .analysis-hero-meta > div,
html[data-theme="dark"] .analysis-rank-item,
html[data-theme="dark"] .analysis-article-item,
html[data-theme="dark"] .analysis-volume-header__hint {
 border-color: var(--line);
 background: rgba(134, 174, 232, 0.08);
}

html[data-theme="dark"] .analysis-volume-header__iso,
html[data-theme="dark"] .analysis-volume-header__refresh time {
 color: var(--text) !important;
}

html[data-theme="dark"] .analysis-volume-card,
html[data-theme="dark"] .analysis-volume-detail,
html[data-theme="dark"] .analysis-volume-detail__grid div,
html[data-theme="dark"] .analysis-volume-detail__feed,
html[data-theme="dark"] .analysis-keyword-pie,
html[data-theme="dark"] .analysis-keyword-card,
html[data-theme="dark"] .analysis-keyword-pie__detail {
 background:
 radial-gradient(220px 120px at 100% 0%, rgba(134, 174, 232, 0.14), transparent 72%),
 linear-gradient(160deg, rgba(18, 29, 45, 0.98), rgba(14, 22, 35, 0.96)) !important;
 border-color: var(--line) !important;
 color: var(--text) !important;
}

html[data-theme="dark"] .analysis-hero-copy h1,
html[data-theme="dark"] .analysis-panel h2,
html[data-theme="dark"] .analysis-hero-meta strong,
html[data-theme="dark"] .analysis-stat-card strong,
html[data-theme="dark"] .analysis-article-item h3 a,
html[data-theme="dark"] .analysis-tag-list span,
html[data-theme="dark"] .analysis-volume-chart__stats strong,
html[data-theme="dark"] .analysis-volume-detail__time,
html[data-theme="dark"] .analysis-volume-detail__grid strong,
html[data-theme="dark"] .analysis-volume-detail__feed strong,
html[data-theme="dark"] .analysis-keyword-card__body strong,
html[data-theme="dark"] .analysis-keyword-pie__center strong,
html[data-theme="dark"] .analysis-keyword-pie__detail strong,
html[data-theme="dark"] .analysis-keyword-pie__label {
 color: var(--text) !important;
}

html[data-theme="dark"] .analysis-eyebrow,
html[data-theme="dark"] .analysis-panel-badge,
html[data-theme="dark"] .analysis-article-meta span,
html[data-theme="dark"] .analysis-tag-list span,
html[data-theme="dark"] .analysis-volume-chart__stats > span {
 background: rgba(134, 174, 232, 0.12) !important;
 border-color: var(--line) !important;
 color: #d8e7ff !important;
}

html[data-theme="dark"] .analysis-rank-track {
 background: rgba(134, 174, 232, 0.14) !important;
}

html[data-theme="dark"] .analysis-keyword-card__rank,
html[data-theme="dark"] .analysis-keyword-card__score,
html[data-theme="dark"] .analysis-keyword-pie__legend-item,
html[data-theme="dark"] .analysis-keyword-pie__center {
 border-color: var(--line) !important;
}

html[data-theme="dark"] .analysis-keyword-card__score {
 background: rgba(45, 136, 129, 0.16) !important;
 color: #baf3ed !important;
}

html[data-theme="dark"] .analysis-volume-chart__meter {
 background: rgba(134, 174, 232, 0.1);
}

html[data-theme="dark"] .analysis-volume-chart__fill {
 background: linear-gradient(180deg, #7a9fd4 0%, #5b7fb3 100%);
}

html[data-theme="dark"] .analysis-volume-chart__value {
 color: #e8f0ff;
 text-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
}

html[data-theme="dark"] .analysis-volume-chart__hit.is-active {
 background: rgba(134, 174, 232, 0.1);
}

html[data-theme="dark"] .analysis-keyword-pie__legend-item {
 background: rgba(18, 29, 45, 0.9) !important;
}

html[data-theme="dark"] .analysis-keyword-pie__center {
 background: rgba(18, 29, 45, 0.9) !important;
 box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24), inset 0 0 0 1px rgba(159, 192, 243, 0.08) !important;
}

/* Minimal "button" link (e.g. external source link) */
a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  min-height: 26px;
  line-height: 26px;
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  gap: 6px;
  border: 1px solid rgba(51, 95, 152, 0.35);
  border-radius: var(--radius); /* 8px */
  background: rgba(51, 95, 152, 0.08);
  color: var(--primary-strong);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

a.button:visited {
  color: var(--primary-strong);
}

a.button:hover {
  background: rgba(51, 95, 152, 0.14);
  border-color: rgba(51, 95, 152, 0.52);
  color: var(--primary-strong);
}

a.button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--ring);
}

html[data-theme="dark"] a.button {
  background: rgba(134, 174, 232, 0.12);
  border-color: rgba(134, 174, 232, 0.45);
  color: var(--primary);
}

html[data-theme="dark"] a.button:hover {
  background: rgba(134, 174, 232, 0.18);
  border-color: rgba(134, 174, 232, 0.6);
  color: var(--primary-strong);
}
