/* Zeyd typography. Local, full-glyph fonts; downloaded only when a face is used. */
@font-face {
  font-family: "Zeyd Cinzel";
  src: url("../assets/fonts/cinzel/Cinzel-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Zeyd Cinzel";
  src: url("../assets/fonts/cinzel/Cinzel-SemiBold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Zeyd Alegreya";
  src: url("../assets/fonts/alegreya/Alegreya-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Zeyd Alegreya";
  src: url("../assets/fonts/alegreya/Alegreya-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

/* Higher than legacy :root tokens, including stylesheets loaded by lazy panels. */
html:root {
  --font-heading: "Zeyd Cinzel", Georgia, serif;
  --font-body: "Zeyd Alegreya", Georgia, serif;
  --font-readable-sans: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font-heading);
  --font-ui: var(--font-body);
  --ui-serif: var(--font-heading);
  --ui-sans: var(--font-body);
  font-synthesis: none;
}
html:root body { font-family: var(--font-body); }

/*
 * Oyun metnini kutulari olceklendirmeden okunur hale getirir. Alegreya ve
 * Cinzel'in kucuk x-yuksekligi, ozellikle 1080p ekranlarda tanimlanan piksel
 * degerinden daha ufak algilaniyordu. font-size-adjust tum mevcut hiyerarsiyi
 * korurken gliflerin gorunen boyunu yaklasik %20 arttirir.
 */
html:root body :is(.game-shell, .modal-root, [data-ui-panel]) {
  font-size-adjust: .56;
}

/* Heading and action roles; no box, spacing, or positioning changes. */
html:root body :is(h1, h2, h3, h4, button, [role="tab"], .p-btn,
  .hero__title-main, .hero__title-sub, .p-heading, .p-eyebrow,
  .p-nav__brand, .p-footer__brand, .p-footer__heading,
  .panel__brand, .panel__title, .frame__brand, .frame__title, .modal-title,
  .acs-brand, .acs-brand__mark, .apl-brand__mark, .apl-brand__title,
  .characters__name, .race-card__name, .char-create-inline__title,
  .char-create-inline__class-name, .ui-login-aside__name,
  .town-hotspot__label, .town-map__title, .town-map__selected-name,
  .town-player__name, .town-sidebar__brand strong, .town-quick__row,
  .cp-identity__name, .cp-section__title, .cp-block__title, .cp-preview__title,
  .cp-detail__name, .bs-title, .bs-menu__name, .bs-shop__name,
  .forge-side__title, .forge-result__title, .forge-preview-stats__title,
  .merchant-panel__title, .merchant-entry__name, .merchant-detail__text strong,
  .mc-section__title, .shop-inv__title, .dg-title, .ar-title, .rk-title,
  .rk-section-title, .dg-door__name, .dg-enemy__name, .dg-hero__name,
  .dg-fighter__name, .ar-fighter__name, .ar-opponent__name,
  .dg-result__title, .ar-result__title, .dg-levelup__title,
  .rift-map__title, .rift-boss__name, .afk-title, .afk-kicker,
  .admin-brand strong, .admin-brand span, .admin-drop-source b,
  .admin-page-head small, .admin-card-head small) {
  font-family: var(--font-heading);
  font-weight: 600;
}
/* Keep action/title roles stronger than the lazy panel material rules. */
html:root body [data-ui-panel] :is(button, h1, h2, h3, h4,
  .frame__title, .bs-title, .dg-title, .ar-title, .rk-title,
  .cp-section__title, .cp-block__title, .cp-preview__title, .forge-side__title,
  .mc-section__title, .merchant-panel__title, .char-create-inline__title,
  .char-create-inline__class-name, .characters__name,
  .ar-opponent__name, .dg-door__name, .dg-enemy__name,
  .ar-result__title, .dg-result__title) {
  font-family: var(--font-heading);
  font-weight: 600;
}
html:root body .screen--start :is(.hero__title-main, .hero__title-sub),
html:root body [data-ui-panel="login"] .ui-login-aside__name {
  font-weight: 400;
}
html:root body .screen--town .town-quick__row {
  font-family: var(--font-heading);
  font-weight: 600;
}

/* Reading roles. Tooltips and labels must not inherit fantasy display type. */
html:root body :is(input, textarea, select, .hero__tagline, .legal, .noscript,
  .ui-login-aside p, .field__label, .checkbox__label, .stat-list__label,
  .notice__body, .community-help, .community-message, .merchant-entry__desc,
  .forge-live-quote__label, .forge-transition__label, .forge-transition__class,
  .item-job, .it-tooltip, .it-tooltip *, .cp-tooltip, .cp-tooltip *,
  .bs-tooltip, .bs-tooltip *, .shop-tooltip, .shop-tooltip *,
  .it-tip__class, .cp-tip__class, .shop-tip__class, .cp-item-class,
  .town-live-announcement, .bottom-hud__alpha-notice) {
  font-family: var(--font-body);
}
html:root body [data-ui-panel] :is(.ui-login-aside p, .hero__tagline,
  .field__label, .checkbox__label, .stat-list__label, .it-tooltip, .it-tooltip *) {
  font-family: var(--font-body);
}
html:root body .legal-document__section::first-line { font-family: var(--font-body); }

/* Descriptions nested inside action cards are still reading text. */
html:root body .game-shell :is(.weapon-choice small, .skin-choice small,
  .perk-choice small, .ammo-pack-choice small, .ship-choice small,
  .weapon-choice em, .skin-choice em, .perk-choice em, .ammo-pack-choice em) {
  font-family: var(--font-body);
  letter-spacing: .025em;
}
html:root body .game-shell :is(.weapon-choice small, .skin-choice small,
  .perk-choice small, .ammo-pack-choice small, .ship-choice small) {
  font-weight: 400;
}
html:root body .game-shell :is(.weapon-choice strong, .skin-choice strong,
  .perk-choice strong, .ammo-pack-choice strong, .ship-choice > strong,
  .panel-section-heading, .achievement-heading, .kicker) {
  font-family: var(--font-heading);
  font-weight: 600;
}
html:root body .game-shell :is(.hud-caption, .attribute-copy small,
  .attribute-summary-cell small, .ship-stat-list, .ship-tradeoffs,
  .shop-price small, .ammo-pack-status, .panel-live-badge) {
  font-family: var(--font-readable-sans);
}

/* Numeric readouts retain their existing monospace where explicitly assigned. */
html:root body :is(.daily-reward__gold, .admin-drop-metrics strong,
  .town-player__level-badge, .town-player__bar-label, .town-resource dt,
  .char-select-level, .char-select-slot__number, .gm-tools__metric > strong,
  .dg-floater, .ar-floater) {
  font-family: var(--font-body);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Dense chat copy keeps the proven small-size sans; titles still use Cinzel. */
html:root body :is(.game-chat__messages, .game-chat__log, .game-chat__message,
  .game-chat__composer, .game-chat__input, .game-chat__input input,
  .private-chat__log, .private-chat__log *, .private-chat__input,
  .private-chat__status, .private-chat__send) {
  font-family: var(--font-readable-sans);
  font-size-adjust: .62;
}

/* Item ozellikleri tum envanter, banka, satici ve kirici ekranlarinda ayni
   okunabilir olcegi kullanir. Genislik de ayni oranda artarak gereksiz satir
   kirilmalarini ve tooltip'in imlecten uzaklasmasini engeller. */
html:root body .cp-tooltip {
  max-width: 18rem;
  font-size: clamp(.648rem, 1.38vh, .816rem);
  line-height: 1.25;
}
html:root body .it-tooltip {
  max-width: 18rem;
  font-size: clamp(.552rem, 1.26vh, .72rem);
  line-height: 1.25;
}
html:root body .bs-tooltip {
  max-width: 19.2rem;
  font-size: clamp(.624rem, 1.38vh, .792rem);
  line-height: 1.25;
}
html:root body .shop-inv__tooltip {
  max-width: 18rem;
  font-size: clamp(.624rem, 1.32vh, .768rem);
  line-height: 1.25;
}
html:root body :is(.cp-tooltip, .it-tooltip, .bs-tooltip, .shop-inv__tooltip) .item-job {
  font-size: clamp(.552rem, 1.26vh, .72rem);
}

/* Measured with all 12 locales: fit the existing mobile tab widths. */
@media (max-height: 620px) and (orientation: landscape) {
  html:root body [data-ui-panel="inventory"] .cp-bag-tabs .cp-bag-tab {
    font-size: clamp(.5rem, 1.025vw, .6rem);
    letter-spacing: .04em;
  }
  html:root body .screen--town .game-chat__tab {
    font-family: var(--font-readable-sans);
    font-weight: 400;
    letter-spacing: .02em;
  }
}
@media (max-width: 720px) and (orientation: landscape) {
  html:root body [data-ui-panel="party"] > header h3 {
    font-size: .6rem;
    letter-spacing: .04em;
  }
}
@media (max-width: 900px) {
  html:root body .admin-card-head h2 {
    font-size: .9rem;
    letter-spacing: .04em;
  }
}
