/* =====================================================================
   Couplina — هم‌سان‌سازی ظاهر در Safari (iPhone / iPad / Mac) با Chrome (Android / Windows)
   فقط تفاوت‌های موتور WebKit را خنثی می‌کند؛ طراحی اصلی را عوض نمی‌کند.
   قانون‌های مخصوص iOS داخل @supports (-webkit-touch-callout:none) هستند
   و روی اندروید/ویندوز اصلاً اجرا نمی‌شوند.
   ===================================================================== */

/* همه‌ی مرورگرها: موبایل در حالت افقی متن را بزرگ نکند (iOS این کار را می‌کند) */
/* [EN] Keep text size fixed when a phone is rotated (iOS enlarges it by default). */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}

/* Safari قدیمی (قبل از ۱۶) overflow:clip را نمی‌شناسد و صفحه به چپ و راست اسکرول می‌خورد */
/* [EN] Old Safari (< 16) does not know overflow:clip, which caused sideways page scrolling. */
@supports not (overflow:clip){
  html{overflow-x:hidden}
}

/* ---- فقط iOS / iPadOS ---- */
/* [EN] iOS / iPadOS only. -webkit-touch-callout is supported only by iOS WebKit, so these rules never run on
   Android or desktop browsers. They remove iOS default input styling, fix empty date fields, hide the grey tap
   highlight, and use dynamic viewport height (dvh) for full-screen pages so the Safari address bar does not hide content. */
@supports (-webkit-touch-callout:none){
  /* ظاهر پیش‌فرض iOS (سایه‌ی داخلی و گوشه‌ی گرد) روی فیلدهای متنی حذف شود؛ مثل کروم اندروید */
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=date]):not([type=time]):not([type=month]):not([type=datetime-local]):not([type=button]):not([type=submit]):not([type=reset]),
  textarea{-webkit-appearance:none;appearance:none}

  /* فیلد تاریخ در iOS وقتی خالی است جمع می‌شود */
  input[type=date],input[type=time],input[type=month],input[type=datetime-local]{
    min-height:1.6em;
    -webkit-min-logical-width:calc(100% - 16px);
  }
  input[type=date]::-webkit-date-and-time-value,
  input[type=time]::-webkit-date-and-time-value{text-align:inherit;min-height:1.2em}

  /* هایلایت خاکستریِ لمس روی لینک و دکمه‌ها */
  a,button,[role=button],label,summary,[onclick]{-webkit-tap-highlight-color:transparent}

  /* منوی نگه‌داشتن انگشت روی تصویرِ تزئینی و دکمه‌ها */
  button,.gl-open img,.spooky-sides img{-webkit-touch-callout:none}

  /* ارتفاع صفحه‌های تمام‌صفحه: نوار آدرس Safari از 100vh جا می‌خورد */
  .lobby,.countdown{min-height:100vh;min-height:100dvh}

}
