/*
Theme Name: تلاوين
Theme URI: https://animyat.net
Author: Project Team
Author URI: https://example.com
Description: ثيم عربي RTL للمدونة (Classic Theme) — تلاوين — مصمم لعرض المقالات بشكل أنيق وبسيط.
Version: 1.0.3
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: anmyat
Domain Path: /languages
Tags: blog, rtl-language-support, custom-logo, custom-menu, featured-images, translation-ready
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* Base typography */
:root {
  --anmyat-bg: #fafafa;
  --anmyat-surface: #ffffff;
  --anmyat-card: #ffffff;
  --anmyat-text: #1a1a1a;
  --anmyat-muted: #6b7280;
  --anmyat-primary: #d01924;
  --anmyat-primary-2: #a8121c;
  --anmyat-primary-soft: #fef2f2;
  --anmyat-primary-light: #fca5a5;
  --anmyat-primary-rgb: 208, 25, 36;
  --anmyat-accent-rgb: 17, 17, 17;
  --anmyat-accent: #111111;
  --anmyat-border: #e5e7eb;
  --anmyat-soft: #fef2f2;

  --anmyat-radius: 16px;
  --anmyat-radius-sm: 12px;
  --anmyat-shadow: 0 8px 24px rgba(var(--anmyat-primary-rgb), 0.1);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 100% 0%, rgba(var(--anmyat-accent-rgb), 0.04), transparent 60%),
    radial-gradient(900px 420px at 0% 0%, rgba(var(--anmyat-primary-rgb), 0.07), transparent 55%),
    var(--anmyat-bg);
  color: var(--anmyat-text);
  font-family: "Tajawal", system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.8;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid rgba(var(--anmyat-primary-rgb), 0.45);
  outline-offset: 3px;
  border-radius: 10px;
}

.anmyat-container img {
  max-width: 100%;
  height: auto;
}

.anmyat-entry ul,
.anmyat-entry ol {
  padding-inline-start: 1.25rem;
}

.anmyat-entry li {
  margin: 0.25rem 0;
}

.anmyat-entry blockquote {
  margin: 1.1rem 0;
  padding: 0.75rem 1rem;
  border-inline-start: 4px solid rgba(var(--anmyat-primary-rgb), 0.45);
  background: var(--anmyat-soft);
  border-radius: 12px;
}

.anmyat-entry pre,
.anmyat-entry code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.anmyat-entry pre {
  overflow: auto;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--anmyat-border);
  background: #f9fafb;
}

.anmyat-entry table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--anmyat-border);
}

.anmyat-entry th,
.anmyat-entry td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--anmyat-border);
}

.anmyat-entry th {
  text-align: start;
  color: var(--anmyat-text);
  background: var(--anmyat-soft);
}

.wp-block-image .aligncenter,
.wp-block-image.aligncenter,
img.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  margin: 8px 0 0;
  color: var(--anmyat-muted);
  font-size: 0.95rem;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--anmyat-primary);
}

.anmyat-container {
  max-width: 1160px;
  padding: 0 18px;
  margin: 0 auto;
}

.anmyat-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--anmyat-border);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

.anmyat-header--static {
  position: relative;
  top: auto;
}

.anmyat-topbar {
  background: linear-gradient(135deg, var(--anmyat-primary), var(--anmyat-accent));
  color: #fff;
  font-size: 0.92rem;
}

.anmyat-topbar__text {
  margin: 0;
  padding: 8px 0;
  font-weight: 500;
  text-align: center;
  width: 100%;
}

.anmyat-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  min-height: 88px;
}

.anmyat-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.anmyat-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: var(--anmyat-logo-max-w, 300px);
  flex-shrink: 0;
  text-decoration: none;
}

.anmyat-brand--has-logo {
  padding: 0;
}

.anmyat-brand__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  max-width: 100%;
  max-height: var(--anmyat-logo-h);
}

.anmyat-brand__logo img,
.anmyat-brand__logo .custom-logo {
  display: block;
  width: auto;
  height: auto;
  max-height: var(--anmyat-logo-h);
  max-width: min(var(--anmyat-logo-max-w), 42vw);
  object-fit: contain;
  object-position: center;
}

.anmyat-brand__title {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--anmyat-primary);
}

@media (max-width: 640px) {
  .anmyat-header__inner {
    min-height: 72px;
    padding: 10px 0;
  }

  .anmyat-brand {
    --anmyat-logo-h: 54px;
    --anmyat-logo-max-w: 210px;
  }
}

.anmyat-nav {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: flex-start;
}

.anmyat-social {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.anmyat-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: var(--anmyat-footer-text, #f9fafb);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.anmyat-social__link:hover {
  transform: translateY(-2px);
  background: var(--anmyat-social-brand, var(--anmyat-primary));
  border-color: var(--anmyat-social-brand, var(--anmyat-primary));
  color: #fff;
}

.anmyat-social__link--x:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.anmyat-social--footer {
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 100%;
}

.anmyat-social__link--empty {
  opacity: 0.42;
  cursor: default;
  pointer-events: none;
  border-style: dashed;
  position: relative;
}

.anmyat-social__empty-label {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1;
  color: rgba(249, 250, 251, 0.55);
  white-space: nowrap;
}

.anmyat-social__link--empty .anmyat-social__icon {
  opacity: 0.75;
}

/* Footer — 4 columns, flat (no card boxes) */
.anmyat-footer__columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.75rem 2rem;
  text-align: right;
  align-items: start;
}

.anmyat-footer__column {
  min-width: 0;
}

.anmyat-footer .anmyat-widget--footer,
.anmyat-footer__column .widget {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
}

.anmyat-footer .anmyat-widget--footer .anmyat-widget__title,
.anmyat-footer__column .widget .widgettitle,
.anmyat-footer__column .widget .wp-block-heading {
  font-size: 1rem;
  font-weight: 800;
  margin: 0 0 0.85rem;
  padding: 0 0 0.5rem;
  border-bottom: 2px solid var(--anmyat-primary);
  color: var(--anmyat-footer-text, #f5f5f5);
  background: none;
}

.anmyat-footer .anmyat-widget--footer,
.anmyat-footer__column .widget {
  font-size: 0.86rem;
  line-height: 1.65;
  color: rgba(245, 245, 245, 0.78);
}

.anmyat-footer .anmyat-widget--footer a,
.anmyat-footer__column .widget a {
  color: rgba(245, 245, 245, 0.88);
  text-decoration: none;
}

.anmyat-footer .anmyat-widget--footer a:hover,
.anmyat-footer__column .widget a:hover {
  color: var(--anmyat-primary);
}

.anmyat-footer .anmyat-widget--footer ul,
.anmyat-footer__column .widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.anmyat-footer .anmyat-widget--footer li,
.anmyat-footer__column .widget li {
  margin: 0 0 0.4rem;
}

.anmyat-footer-about__text {
  margin: 0 0 0.65rem;
}

.anmyat-footer-about__link {
  margin: 0;
}

.anmyat-footer-about__link a {
  color: var(--anmyat-primary);
  font-weight: 700;
}

.anmyat-footer .anmyat-widget--footer .post-date,
.anmyat-footer__column .widget .post-date {
  display: block;
  font-size: 0.72rem;
  color: rgba(245, 245, 245, 0.5);
  margin-top: 0.1rem;
}

@media (max-width: 1024px) {
  .anmyat-footer__columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .anmyat-footer__columns {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.anmyat-footer__bottom {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.anmyat-footer__social {
  margin-bottom: 14px;
}

.anmyat-footer__copy {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(249, 250, 251, 0.65);
}

.anmyat-nav .menu {
  list-style: none;
  display: flex;
  gap: 14px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.anmyat-nav .menu a {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--anmyat-text);
  border: 1px solid transparent;
  font-weight: 500;
}

.anmyat-nav .menu a:hover,
.anmyat-nav .current-menu-item > a,
.anmyat-nav .current_page_item > a,
.anmyat-nav .current-menu-ancestor > a {
  background: var(--anmyat-soft);
  border-color: rgba(var(--anmyat-primary-rgb), 0.18);
  color: var(--anmyat-primary);
}

.anmyat-nav .menu .sub-menu {
  list-style: none;
  margin: 0;
  padding: 8px;
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-end: 0;
  min-width: 220px;
  background: var(--anmyat-surface);
  border: 1px solid var(--anmyat-border);
  border-radius: var(--anmyat-radius-sm);
  box-shadow: var(--anmyat-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  z-index: 50;
}

.anmyat-nav .menu li {
  position: relative;
}

.anmyat-nav .menu li.menu-item-has-children > a::after {
  content: "▾";
  margin-inline-start: 6px;
  font-size: 0.85em;
}

.anmyat-nav .menu li:hover > .sub-menu,
.anmyat-nav .menu li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.anmyat-nav .menu .sub-menu a {
  display: block;
  width: 100%;
  border-radius: 10px;
}

.anmyat-hero {
  padding: 34px 0 18px;
}

.anmyat-hero__title {
  font-size: clamp(28px, 3vw, 44px);
  margin: 0 0 12px;
  line-height: 1.25;
  font-weight: 900;
}

.anmyat-hero__subtitle {
  margin: 0;
  color: var(--anmyat-muted);
  max-width: 60ch;
}

.anmyat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 18px 0 44px;
}

@media (max-width: 980px) {
  .anmyat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .anmyat-grid {
    grid-template-columns: 1fr;
  }
}

.anmyat-card {
  border: 1px solid var(--anmyat-border);
  background: var(--anmyat-card);
  border-radius: var(--anmyat-radius);
  overflow: hidden;
  box-shadow: var(--anmyat-shadow);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.anmyat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--anmyat-primary-rgb), 0.25);
  box-shadow: 0 14px 30px rgba(var(--anmyat-primary-rgb), 0.12);
}

.anmyat-card__thumb {
  aspect-ratio: 16 / 9;
  background: var(--anmyat-soft);
}

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

.anmyat-card__body {
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.anmyat-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--anmyat-muted);
  font-size: 0.92rem;
}

.anmyat-card__title {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.45;
  font-weight: 900;
}

.anmyat-card__excerpt {
  margin: 0;
  color: var(--anmyat-muted);
  font-size: 0.98rem;
}

.anmyat-card__cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(var(--anmyat-primary-rgb), 0.2);
  background: var(--anmyat-soft);
  color: var(--anmyat-primary);
  width: fit-content;
  font-weight: 700;
}

.anmyat-card__cta:hover {
  background: rgba(var(--anmyat-primary-rgb), 0.12);
  border-color: rgba(var(--anmyat-primary-rgb), 0.35);
  color: var(--anmyat-primary-2);
}

.anmyat-content {
  padding: 22px 0 44px;
}

.anmyat-article {
  border: 1px solid var(--anmyat-border);
  border-radius: var(--anmyat-radius);
  background: var(--anmyat-surface);
  box-shadow: var(--anmyat-shadow);
  overflow: hidden;
}

.anmyat-article__inner {
  padding: 22px;
}

.anmyat-article__title {
  margin: 0 0 10px;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.25;
  font-weight: 950;
}

.anmyat-article__thumb {
  aspect-ratio: 21 / 9;
  background: var(--anmyat-soft);
}

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

.anmyat-entry {
  color: var(--anmyat-text);
  font-size: 1.05rem;
}

.anmyat-entry .lwptoc {
  width: 100%;
  float: none;
  clear: both;
  margin: 0 0 1.35rem;
}

.anmyat-entry .lwptoc-notInherit.lwptoc-light {
  border-radius: 12px;
}

.anmyat-entry [id] {
  scroll-margin-top: calc(var(--anmyat-header-offset, 96px) + 12px);
}

.anmyat-entry h2,
.anmyat-entry h3,
.anmyat-entry h4 {
  margin: 1.25em 0 0.55em;
  line-height: 1.35;
}

.anmyat-entry p {
  margin: 0 0 1em;
}

.anmyat-entry a {
  color: var(--anmyat-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.anmyat-entry .aynet-social-card-link {
  text-decoration: none;
}

.anmyat-entry .aynet-social-wrap {
  max-width: 100%;
  overflow: hidden;
}

.anmyat-entry .aynet-social-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.anmyat-entry .aynet-social-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  overflow: hidden;
}

.anmyat-social__link .bi,
.anmyat-social__icon.bi {
  font-size: 1.25rem;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
  color: currentColor;
}

.anmyat-entry .aynet-social-icon .bi {
  font-size: 1.15rem;
  line-height: 1;
  display: block;
  color: #fff;
}

.anmyat-entry .aynet-social-icon--sc .bi {
  color: #000;
}

@media (max-width: 900px) {
  .anmyat-entry .aynet-social-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .anmyat-entry .aynet-social-grid {
    grid-template-columns: 1fr;
  }
}

.anmyat-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 0 56px;
}

.anmyat-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--anmyat-border);
  background: var(--anmyat-surface);
  color: var(--anmyat-text);
}

.anmyat-pagination .page-numbers.current {
  background: var(--anmyat-soft);
  border-color: rgba(var(--anmyat-primary-rgb), 0.35);
  color: var(--anmyat-primary);
}

.anmyat-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--anmyat-footer-bg, #111827);
  color: #f9fafb;
  padding: 30px 0;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Homepage layout */
.anmyat-home {
  padding: 24px 0 48px;
}

.anmyat-home-hero {
  margin-bottom: 28px;
}

.anmyat-home-hero .anmyat-slider {
  width: 100%;
}

.anmyat-home-layout,
.anmyat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--anmyat-sidebar-width, 320px);
  gap: 24px;
  align-items: start;
}

.anmyat-home-layout--no-sidebar,
.anmyat-layout--no-sidebar {
  grid-template-columns: 1fr;
}

.anmyat-page-wrap {
  padding: 24px 0 48px;
}

.anmyat-layout__main {
  min-width: 0;
}

/* Stack sidebar under main content on phones AND tablets (incl. landscape iPad / iPad Pro 11"). */
@media (max-width: 1199px) {
  .anmyat-home-layout,
  .anmyat-layout {
    grid-template-columns: 1fr;
  }

  .anmyat-sidebar {
    position: static;
    top: auto;
  }
}

.anmyat-home-main {
  min-width: 0;
}

.anmyat-home-section {
  margin-top: 0;
}

.anmyat-section-head {
  margin-bottom: 18px;
}

.anmyat-section-head__title {
  margin: 0 0 6px;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--anmyat-text);
}

.anmyat-section-head__subtitle {
  margin: 0;
  color: var(--anmyat-muted);
}

.anmyat-grid--home {
  padding: 0;
}

@media (max-width: 720px) {
  .anmyat-grid--home {
    grid-template-columns: 1fr;
  }
}

/* Sidebar */
.anmyat-sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 18px;
}

@media (max-width: 980px) {
  .anmyat-sidebar {
    position: static;
  }
}

.anmyat-sidebar .anmyat-widget,
.anmyat-sidebar .widget {
  background: var(--anmyat-surface);
  border: 1px solid var(--anmyat-border);
  border-radius: var(--anmyat-radius);
  box-shadow: var(--anmyat-shadow);
  padding: 18px;
}

.anmyat-widget__title {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--anmyat-primary);
}

.anmyat-widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.anmyat-widget li a {
  color: var(--anmyat-text);
}

.anmyat-widget li a:hover {
  color: var(--anmyat-primary);
}

/* Search */
.anmyat-search {
  display: grid;
  gap: 10px;
}

.anmyat-search__input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--anmyat-border);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
  color: var(--anmyat-text);
}

.anmyat-search__input:focus {
  outline: none;
  border-color: rgba(var(--anmyat-primary-rgb), 0.45);
  box-shadow: 0 0 0 3px rgba(var(--anmyat-primary-rgb), 0.12);
}

.anmyat-search__button {
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, var(--anmyat-primary), var(--anmyat-accent));
  color: #fff;
}

.anmyat-search__button:hover {
  filter: brightness(1.03);
}

/* Slider */
.anmyat-slider {
  position: relative;
  border-radius: var(--anmyat-radius);
  overflow: hidden;
  border: 1px solid var(--anmyat-border);
  box-shadow: var(--anmyat-shadow);
  background: var(--anmyat-surface);
}

.anmyat-slider__track {
  position: relative;
  min-height: 360px;
}

.anmyat-slider__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 450ms ease, visibility 450ms ease;
}

.anmyat-slider__slide.is-active {
  opacity: 1;
  visibility: visible;
  position: relative;
}

.anmyat-slider__link {
  display: block;
  color: inherit;
}

.anmyat-slider__media {
  aspect-ratio: 16 / 7;
  overflow: hidden;
  background: var(--anmyat-soft);
}

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

.anmyat-slider__caption {
  padding: 18px 20px 22px;
}

.anmyat-slider__badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--anmyat-soft);
  color: var(--anmyat-primary);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.anmyat-slider__title {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  line-height: 1.35;
  font-weight: 800;
}

.anmyat-slider__excerpt {
  margin: 0;
  color: var(--anmyat-muted);
}

.anmyat-slider__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--anmyat-border);
}

.anmyat-slider__arrow {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--anmyat-border);
  background: #fff;
  color: var(--anmyat-primary);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.anmyat-slider__dots {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.anmyat-slider__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  background: #d1d5db;
  cursor: pointer;
  padding: 0;
}

.anmyat-slider__dot.is-active {
  width: 24px;
  background: linear-gradient(135deg, var(--anmyat-primary), var(--anmyat-accent));
}

/* ── v1.3: cards meta, stats, mobile nav, single extras ── */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  word-wrap: normal !important;
}

.anmyat-skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -100px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--anmyat-primary);
  color: #fff;
  border-radius: 10px;
}
.anmyat-skip-link:focus {
  top: 12px;
}

.anmyat-header__tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.anmyat-header-search {
  display: none;
}

.anmyat-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--anmyat-border);
  border-radius: 12px;
  background: var(--anmyat-surface);
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.anmyat-nav-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--anmyat-text);
  border-radius: 2px;
}

.anmyat-search {
  display: flex;
  align-items: center;
  gap: 8px;
}
.anmyat-search__input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--anmyat-border);
  border-radius: 999px;
  padding: 10px 14px;
  background: #fff;
  font: inherit;
}
.anmyat-search__button {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--anmyat-primary);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.anmyat-card__category {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.anmyat-card__category a {
  color: var(--anmyat-primary);
}
.anmyat-card__category a:hover {
  color: var(--anmyat-primary-2);
}

.anmyat-card__meta,
.anmyat-article__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}

.anmyat-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--anmyat-muted);
  font-size: 0.88rem;
}
.anmyat-meta-line__sep { opacity: 0.55; }
.anmyat-meta-line__cat a { color: var(--anmyat-primary); font-weight: 600; }

.anmyat-author-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.anmyat-author-inline a { font-weight: 600; color: var(--anmyat-text); }
.anmyat-author-inline a:hover { color: var(--anmyat-primary); }
.anmyat-author__avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
}

.anmyat-post-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  font-size: 0.84rem;
  color: var(--anmyat-muted);
}
.anmyat-post-stats__rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.anmyat-post-stats__views {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.anmyat-post-stats__value { font-weight: 700; color: var(--anmyat-text); }
.anmyat-post-stats__count { font-size: 0.8rem; }

.anmyat-stars {
  position: relative;
  display: inline-block;
  width: 72px;
  height: 14px;
  background: linear-gradient(90deg, #f4c500 0, #f4c500 100%) left/100% 100% no-repeat;
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 14px, transparent 14px 16px);
  mask: repeating-linear-gradient(90deg, #000 0 14px, transparent 14px 16px);
  opacity: 0.25;
}
.anmyat-stars > span {
  position: absolute;
  inset: 0 auto 0 0;
  background: #f4c500;
  -webkit-mask: inherit;
  mask: inherit;
  opacity: 1;
}

.anmyat-tags {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--anmyat-border);
}
.anmyat-tags__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--anmyat-muted);
}
.anmyat-tags__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.anmyat-tags__item {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--anmyat-border);
  background: var(--anmyat-soft);
  font-size: 0.86rem;
  font-weight: 600;
}
.anmyat-tags__item:hover {
  border-color: rgba(var(--anmyat-primary-rgb), 0.35);
  color: var(--anmyat-primary);
}

.anmyat-author-box {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--anmyat-border);
  border-radius: var(--anmyat-radius-sm);
  background: var(--anmyat-soft);
}
.anmyat-author-box__avatar {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
}
.anmyat-author-box__label {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--anmyat-muted);
}
.anmyat-author-box__name {
  margin: 0 0 8px;
  font-size: 1.05rem;
}
.anmyat-author-box__bio {
  margin: 0;
  color: var(--anmyat-muted);
  font-size: 0.92rem;
}

.anmyat-related {
  margin-top: 28px;
}
.anmyat-related__title {
  margin: 0 0 16px;
  font-size: 1.35rem;
  font-weight: 900;
}
.anmyat-grid--related {
  padding-top: 0;
  padding-bottom: 0;
}

.anmyat-nav__search-mobile {
  display: none;
}

@media (max-width: 900px) {
  .anmyat-header__inner {
    flex-wrap: wrap;
    min-height: 72px;
    padding: 10px 0;
  }

  .anmyat-nav-toggle {
    display: inline-flex;
  }

  .anmyat-header-search {
    display: none;
  }

  .anmyat-nav {
    display: none;
    width: 100%;
    order: 3;
    padding: 12px 0 8px;
    border-top: 1px solid var(--anmyat-border);
  }

  .anmyat-nav.is-open {
    display: block;
  }

  .anmyat-nav .menu {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .anmyat-nav .menu a {
    width: 100%;
    border-radius: 12px;
    min-height: 44px;
  }

  .anmyat-nav .menu .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    padding: 0 0 0 12px;
    margin-top: 4px;
  }

  .anmyat-nav__search-mobile {
    display: block;
    margin-top: 12px;
  }

  body.anmyat-nav-open {
    overflow: hidden;
  }
}

@media (min-width: 901px) {
  .anmyat-header-search {
    display: block;
    min-width: 220px;
    max-width: 280px;
  }
  .anmyat-nav__search-mobile {
    display: none !important;
  }
}

@supports (padding: max(0px)) {
  .anmyat-container {
    padding-left: max(18px, env(safe-area-inset-left));
    padding-right: max(18px, env(safe-area-inset-right));
  }
  .anmyat-header {
    padding-top: env(safe-area-inset-top);
  }
}

