/* Scoped public stories and support UI; native dialog supplies modal focus/inertness. */
.gt-eng-dialog,
.gt-chat-launcher,
.gt-stories { font-family: var(--font-persian, "Estedad", Tahoma, sans-serif); }
.gt-eng-dialog *, .gt-stories * { box-sizing: border-box; }
.gt-eng-dialog [hidden], .gt-stories [hidden] { display: none !important; }
.gt-eng-dialog { color: var(--ink, #171419); border: 1px solid #e4dee8; padding: 0; max-width: calc(100vw - 24px); background: #fff; overscroll-behavior: contain; }
.gt-eng-dialog::backdrop { background: rgb(23 14 29 / 65%); backdrop-filter: blur(5px); }
.gt-eng-dialog button,
.gt-eng-dialog input,
.gt-eng-dialog textarea,
.gt-eng-dialog select,
.gt-stories button { font: inherit; }
.gt-eng-dialog button, .gt-stories button { cursor: pointer; }
.gt-eng-dialog button:disabled { cursor: not-allowed; opacity: .55; }
.gt-eng-dialog :is(button, a, input, textarea, select, [tabindex]):focus-visible,
.gt-chat-launcher:focus-visible,
.gt-story-open:focus-visible { outline: 3px solid var(--gold, #c9973b); outline-offset: 3px; }
.gt-eng-button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 10px 17px; border: 1px solid transparent; border-radius: 10px; background: var(--plum, #501b6f); color: #fff; text-decoration: none; font-size: .86rem; font-weight: 700; line-height: 1.8; }
.gt-eng-button-subtle { border-color: #ded3e5; background: #f7f2fa; color: var(--plum, #501b6f); }
.gt-eng-text-button { min-height: 44px; border: 0; padding: 6px 3px; background: transparent; color: var(--plum, #501b6f); font-size: .84rem; text-align: right; }
.gt-eng-icon-button { flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 1px solid rgb(255 255 255 / 30%); border-radius: 50%; background: rgb(255 255 255 / 10%); color: inherit; font-size: 1.9rem !important; line-height: 1; }
.gt-eng-eyebrow { margin: 0 0 7px; color: var(--plum, #501b6f); font-size: .8rem; font-weight: 700; }

.gt-stories { border-bottom: 1px solid var(--line, #d9d6d0); background: #fcfaf7; padding-block: 30px; }
.gt-stories-inner { display: flex; align-items: center; gap: 36px; }
.gt-stories-heading { flex: 0 0 auto; }
.gt-stories-heading h2 { margin: 0; font-size: clamp(1.1rem, 2vw, 1.4rem); line-height: 1.6; }
.gt-stories-strip { display: flex; gap: 19px; min-width: 0; padding: 5px 5px 10px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #c5b3cf transparent; }
.gt-story-item { flex: 0 0 90px; }
.gt-story-open { width: 90px; display: grid; justify-items: center; gap: 9px; border: 0; padding: 0; background: transparent; color: var(--ink, #171419); border-radius: 10px; }
.gt-story-ring { width: 82px; height: 82px; position: relative; display: block; padding: 4px; border-radius: 50%; background: linear-gradient(140deg, #501b6f 5%, #805895 46%, #c9973b 75%, #e7c47f); }
.gt-story-thumb { display: block; width: 100%; height: 100%; object-fit: cover; border: 3px solid #fcfaf7; border-radius: 50%; background: #ede5f1; }
.gt-story-video-badge { position: absolute; bottom: 0; left: 0; display: grid; place-items: center; width: 25px; height: 25px; border: 2px solid #fcfaf7; border-radius: 50%; background: var(--plum, #501b6f); color: #fff; font: 10px Arial, sans-serif; }
.gt-story-label { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .77rem; line-height: 1.8; }
.gt-story-viewer { width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); margin: auto; border-color: #382a42; border-radius: 20px; background: #1b1222; color: #fff; }
.gt-story-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.gt-story-count { margin: 0; color: #ead9f2; font-size: .8rem; }
.gt-story-media { position: relative; display: grid; place-items: center; height: min(51dvh, 490px); min-height: 120px; background: #100b14; }
.gt-story-media > img, .gt-story-media > video { display: block; width: 100%; height: 100%; max-height: min(51dvh, 490px); object-fit: contain; }
.gt-story-media-error { position: absolute; inset: auto 20px 20px; padding: 10px; border-radius: 8px; background: #2c2036; font-size: .8rem; text-align: center; }
.gt-story-body { padding: 16px 20px 4px; }
.gt-story-body h3 { margin: 0 0 7px; font-size: 1rem; line-height: 1.8; overflow-wrap: anywhere; }
.gt-story-caption { margin: 0 0 9px; color: #e2d9e7; font-size: .85rem; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.gt-story-link { display: inline-flex; align-items: center; min-height: 44px; color: #f0cb87; font-size: .88rem; }
.gt-story-controls { display: flex; justify-content: space-between; gap: 12px; padding: 12px 20px 18px; }
.gt-story-controls .gt-eng-button-subtle { min-width: 98px; background: #302239; color: #f3eaf8; border-color: #5c426c; }

.gt-chat-launcher { position: fixed; bottom: max(24px, env(safe-area-inset-bottom)); left: max(24px, env(safe-area-inset-left)); z-index: 46; display: inline-flex; align-items: center; justify-content: center; gap: 11px; min-height: 54px; padding: 12px 20px; border: 1px solid rgb(255 255 255 / 24%); border-radius: 28px; background: var(--plum, #501b6f); color: #fff; box-shadow: 0 6px 26px rgb(53 19 73 / 25%); font-size: .9rem; font-weight: 700; cursor: pointer; }
.gt-chat-symbol { display: inline-block; position: relative; width: 23px; height: 19px; border: 2px solid currentColor; border-radius: 6px; }
.gt-chat-symbol::after { content: ""; position: absolute; left: 3px; bottom: -5px; width: 6px; height: 6px; border-left: 2px solid currentColor; background: var(--plum, #501b6f); transform: skewY(-35deg); }
.gt-chat-dialog { position: fixed; width: 430px; height: min(730px, calc(100dvh - 36px)); max-height: calc(100dvh - 36px); inset: auto auto 18px 18px; margin: 0; border-radius: 20px; box-shadow: 0 24px 100px rgb(24 11 31 / 25%); }
.gt-chat-dialog[open] { display: flex; flex-direction: column; }
.gt-chat-header { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; gap: 12px; padding: 18px; background: var(--plum, #501b6f); color: #fff; }
.gt-chat-header h2 { margin: 0; font-size: 1.05rem; line-height: 1.8; }
.gt-chat-header p { margin: 3px 0 0; color: #ece0f1; font-size: .74rem; line-height: 1.8; }
.gt-chat-status { flex: 0 0 auto; margin: 0; padding: 10px 18px; background: #f5eff9; color: #501b6f; font-size: .78rem; line-height: 1.9; overflow-wrap: anywhere; }
.gt-chat-status.is-error { background: #fff3e9; color: #773b16; }
.gt-chat-fallback { flex: 0 0 auto; display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 16px; }
.gt-chat-fallback .gt-eng-button { flex: 1 1 auto; padding-inline: 10px; font-size: .76rem; }
.gt-chat-main { flex: 1 1 auto; overflow-y: auto; min-height: 90px; padding: 18px; overscroll-behavior-y: contain; }
.gt-chat-section-title { margin: 0 0 14px; color: var(--ink, #171419); font-size: .9rem; line-height: 1.9; overflow-wrap: anywhere; }
.gt-chat-empty { margin: 6px 0 20px; padding: 25px 17px; border: 1px dashed #d8cce0; border-radius: 12px; background: #fcfafc; color: var(--muted, #6f6a72); font-size: .84rem; line-height: 2; text-align: center; }
.gt-chat-list { display: grid; gap: 9px; margin-bottom: 16px; }
.gt-chat-conversation { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; border: 1px solid #e1d9e6; border-radius: 12px; background: #fff; color: var(--ink, #171419); text-align: right; }
.gt-chat-conversation > span:first-child { display: grid; min-width: 0; gap: 6px; }
.gt-chat-conversation strong { font-size: .85rem; line-height: 1.8; overflow-wrap: anywhere; }
.gt-chat-conversation small { color: var(--muted, #6f6a72); font-size: .73rem; }
.gt-chat-new { width: 100%; }
.gt-chat-compose { display: grid; gap: 13px; }
.gt-chat-compose > .gt-chat-section-title { margin: 0; }
.gt-eng-field { display: grid; gap: 6px; min-width: 0; color: var(--ink, #171419); font-size: .8rem; font-weight: 600; }
.gt-eng-field :is(input, select, textarea) { width: 100%; max-width: 100%; min-height: 44px; border: 1px solid #d6cddd; border-radius: 9px; padding: 10px 12px; background: #fff; color: #171419; font-weight: 400; font-size: 16px; line-height: 1.8; }
.gt-eng-field textarea { resize: vertical; min-height: 75px; max-height: 240px; }
.gt-chat-details { display: grid; grid-template-columns: 1fr 1.2fr; gap: 10px; }
.gt-chat-thread { display: flex; flex-direction: column; min-height: 100%; }
.gt-chat-thread-top { flex: 0 0 auto; }
.gt-chat-thread-top .gt-chat-section-title { margin-bottom: 2px; }
.gt-chat-thread-status { margin: 0 0 14px; color: var(--muted, #6f6a72); font-size: .73rem; }
.gt-chat-messages { display: flex; flex: 1 1 auto; flex-direction: column; gap: 12px; min-height: 100px; max-height: 330px; padding: 5px 4px 15px; overflow-y: auto; overscroll-behavior: contain; }
.gt-chat-message { flex: 0 0 auto; max-width: 91%; align-self: flex-start; padding: 11px 13px; border: 1px solid #e5daeb; border-radius: 13px 3px 13px 13px; background: #f5eef9; }
.gt-chat-message.is-admin { align-self: flex-end; border-color: #e8deca; border-radius: 3px 13px 13px 13px; background: #fbf7ec; }
.gt-chat-message-author { display: block; color: #501b6f; font-size: .7rem; }
.gt-chat-message.is-admin .gt-chat-message-author { color: #6d5124; }
.gt-chat-message p { margin: 6px 0 5px; color: #27202c; font-size: .86rem; line-height: 1.95; white-space: pre-wrap; overflow-wrap: anywhere; }
.gt-chat-message time { display: block; color: #776e7c; font-size: .65rem; text-align: left; }
.gt-chat-reply { display: grid; gap: 9px; flex: 0 0 auto; padding-top: 13px; border-top: 1px solid #ece5f0; }
.gt-chat-reply > .gt-eng-button { justify-self: end; min-width: 95px; }
.gt-chat-privacy { flex: 0 0 auto; margin: 0; padding: 12px 18px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid #e9e2ee; background: #faf8fb; color: #766b7c; font-size: .68rem; line-height: 1.9; }
@media (max-width: 680px) {
  .gt-stories { padding-block: 22px 15px; }
  .gt-stories-inner { display: block; }
  .gt-stories-heading { margin-bottom: 16px; }
  .gt-eng-eyebrow { margin-bottom: 3px; }
  .gt-stories-strip { gap: 12px; }
  .gt-story-item, .gt-story-open { width: 78px; flex-basis: 78px; }
  .gt-story-ring { width: 72px; height: 72px; }
  .gt-story-label { font-size: .71rem; }
  /* Always clear the site's full-width mobile quote action, including its transition. */
  .gt-chat-launcher { left: max(14px, env(safe-area-inset-left)); bottom: calc(82px + env(safe-area-inset-bottom)); min-height: 48px; padding: 10px 15px; gap: 9px; font-size: .8rem; }
  .gt-chat-dialog { inset: auto 0 0; width: 100%; max-width: 100%; height: min(760px, 91dvh); max-height: 91dvh; margin: 0; border-radius: 20px 20px 0 0; }
  .gt-chat-header { padding: 15px 16px; }
  .gt-chat-main { padding: 14px; }
  .gt-chat-details { grid-template-columns: 1fr; }
  .gt-chat-messages { max-height: 31dvh; }
  .gt-story-viewer { width: calc(100vw - 16px); max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
}
@media (prefers-reduced-motion: reduce) {
  .gt-eng-dialog *, .gt-stories *, .gt-chat-launcher { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
