:root {
  --bg: #0c0f12;
  --surface: #151b22;
  --surface2: #1f2835;
  --text: #eef2f7;
  --muted: #8b98a8;
  --accent: #c94c4c;
  --accent-hover: #e05a5a;
  --gold: #d4a853;
  --gold-dim: rgba(212, 168, 83, 0.25);
  --blue-deep: #2a4a6e;
  --ok: #3d9a6e;
  --radius: 14px;
  --font: "DM Sans", "Noto Sans Georgian", system-ui, sans-serif;
  /* Header / hero / ana içerik: yan boşluk bırakarak ekranı doldurur */
  --layout-max: min(1800px, calc(100vw - 2.5rem));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  position: relative;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

.bg-pattern {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(201, 76, 76, 0.18), transparent 50%),
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(42, 74, 110, 0.35), transparent 45%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(212, 168, 83, 0.08), transparent 50%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--surface2);
  background: rgba(12, 15, 18, 0.88);
  backdrop-filter: blur(12px);
}

.header-inner {
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.brand-block {
  min-width: 0;
}

.logo {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.logo-sub {
  font-family: "Noto Sans Georgian", serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gold);
  opacity: 0.95;
}

.logo:hover {
  color: #fff;
}

.tagline {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  max-width: 36ch;
}

.auth-slot-btns {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.notif-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.btn-notif {
  position: relative;
  padding-inline: 0.65rem;
}

.notif-bell {
  font-size: 1rem;
  line-height: 1;
}

.notif-badge {
  position: absolute;
  top: -0.2rem;
  right: -0.15rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.1rem;
  text-align: center;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 2px var(--surface);
}

.notif-badge.hidden {
  display: none;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  width: min(22rem, calc(100vw - 2rem));
  max-height: min(70vh, 24rem);
  overflow: auto;
  z-index: 80;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.notif-dropdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
}

.notif-dropdown-inner {
  padding: 0.35rem 0;
}

.notif-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.65rem;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: var(--surface2);
}

.notif-item.unread {
  background: rgba(201, 76, 76, 0.08);
}

.notif-item-meta {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.notif-item-preview {
  font-size: 0.82rem;
  line-height: 1.35;
  word-break: break-word;
}

.notif-empty {
  padding: 0.75rem 0.65rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.notif-mark-all {
  margin: 0.25rem 0.65rem 0.5rem;
  font-size: 0.78rem;
}

.profile-avatar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.profile-avatar-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--surface2);
  background: var(--bg);
  flex-shrink: 0;
}

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

.profile-avatar-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
}

.profile-avatar-upload {
  cursor: pointer;
}

.profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0;
}

.stat-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--surface2);
}

.profile-bio-label {
  display: block;
  margin-top: 0.65rem;
}

.profile-share-wrap {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--surface2);
}

.profile-share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.35rem;
}

.profile-share-row .dev-link-input {
  flex: 1 1 180px;
  min-width: 0;
}

.user-public-card {
  max-width: min(520px, 96vw);
}

.user-public-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin: 0.5rem 0 0.75rem;
}

.user-public-face {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--surface2);
  flex-shrink: 0;
}

.user-public-face-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--accent);
}

.user-public-uname {
  margin: 0 0 0.25rem;
  font-weight: 600;
}

.user-public-hint {
  margin: 0.5rem 0 0.35rem;
}

.user-contrib-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: min(48vh, 380px);
  overflow-y: auto;
  margin-top: 0.5rem;
}

.user-contrib-item {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
}

.user-contrib-item .user-contrib-row {
  flex: 1 1 auto;
  min-width: 0;
}

.user-contrib-link-copy {
  flex: 0 0 auto;
  align-self: center;
  padding: 0.25rem 0.4rem;
  font-size: 0.72rem;
  white-space: nowrap;
}

.user-contrib-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.55rem;
  border: 1px solid var(--surface2);
  border-radius: 8px;
  background: var(--bg);
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.user-contrib-row:hover {
  border-color: rgba(212, 168, 83, 0.35);
  background: var(--surface2);
}

.user-contrib-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.user-contrib-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.user-contrib-lang {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.user-contrib-text {
  font-size: 0.85rem;
  line-height: 1.35;
  word-break: break-word;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem 0.85rem;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
}

.nav-link:hover {
  color: var(--text);
}

.hero {
  position: relative;
  z-index: 1;
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
  display: grid;
  gap: 2rem;
}

@media (min-width: 880px) {
  .hero {
    grid-template-columns: 1fr 220px;
    align-items: center;
    padding-top: 3rem;
    padding-bottom: 3.5rem;
  }
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero-lead {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 42ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.hero-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.hero-stats strong {
  display: block;
  font-size: 1.35rem;
  color: var(--text);
  font-weight: 700;
}

.stat-hint {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--muted);
}

.hero-deco {
  position: relative;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 880px) {
  .hero-deco {
    height: 260px;
  }
}

.deco-ring {
  position: absolute;
  width: min(200px, 50vw);
  height: min(200px, 50vw);
  border-radius: 50%;
  border: 2px solid var(--gold-dim);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.deco-dots {
  position: absolute;
  width: 120px;
  height: 120px;
  background-image: radial-gradient(var(--muted) 1.5px, transparent 1.5px);
  background-size: 14px 14px;
  opacity: 0.25;
  border-radius: var(--radius);
}

.main {
  position: relative;
  z-index: 1;
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: 0 1.25rem max(3rem, calc(3rem + env(safe-area-inset-bottom, 0)));
}

.banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  background: var(--surface2);
  border: 1px solid rgba(201, 76, 76, 0.35);
}

.banner.ok {
  border-color: rgba(61, 154, 110, 0.45);
}

.banner p {
  margin: 0;
  font-size: 0.95rem;
}

.btn-ghost {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
  flex-shrink: 0;
}

.layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Dar ekranda önce giriş / kayıt — çok kaydırmadan erişim */
@media (max-width: 959px) {
  .layout-aside {
    order: -1;
  }
}

.main-feed {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 960px) {
  .layout {
    display: grid;
    grid-template-columns: 1fr min(300px, 32%);
    gap: 2rem 1.75rem;
    align-items: start;
  }

  .layout-main {
    min-width: 0;
  }

  /* Sol: topluluk sütunu | sağ: galeri — ikisi layout-main içinde */
  .main-feed {
    display: grid;
    grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
    gap: 1.25rem 1.5rem;
    align-items: start;
    min-width: 0;
  }

  .main-feed .community {
    position: sticky;
    top: 5.5rem;
    align-self: start;
    margin-bottom: 0;
    min-width: 0;
  }

  .main-feed .gallery-section {
    min-width: 0;
  }

  .layout-aside {
    position: sticky;
    top: 5.5rem;
  }
}

.section-head {
  margin-bottom: 1rem;
}

.section-head h2,
#gallery-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.section-sub {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.gallery-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.community {
  margin-bottom: 0.5rem;
}

.leaderboard-block {
  width: 100%;
}

.leaderboard-scroll {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-x: hidden;
  overflow-y: visible;
  padding-bottom: 0.25rem;
}

.lb-card-collapsed {
  display: none !important;
}

.lb-more-btn {
  width: 100%;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.lb-card {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 0.65rem;
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.lb-card:hover {
  border-color: rgba(212, 168, 83, 0.35);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.lb-rank {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}

.lb-face {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 0.4rem;
  border: 2px solid var(--surface2);
  background: var(--bg);
}

.lb-face-fallback {
  line-height: 40px;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
}

.lb-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  word-break: break-word;
}

.lb-points {
  font-size: 0.8rem;
  color: var(--muted);
}

.lb-lang {
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.35rem;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 1.25rem;
}

.filter-label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--surface2);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.chip:hover {
  color: var(--text);
  border-color: var(--muted);
}

.chip.active {
  background: var(--gold-dim);
  border-color: rgba(212, 168, 83, 0.45);
  color: var(--gold);
}

.gallery {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  max-width: 540px;
  margin: 0 auto;
  padding: 0 0.5rem 1.5rem;
}

@media (min-width: 720px) {
  .gallery {
    max-width: 600px;
    gap: 1.25rem;
  }
}

.card {
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s, box-shadow 0.16s;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 168, 83, 0.22);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
}

.card-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.feed-head-user,
.feed-head-user-plain {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.feed-head-user-plain {
  cursor: default;
}

.feed-head-user:hover .feed-head-name {
  color: var(--gold);
}

.feed-head-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.feed-head-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
}

.feed-head-name {
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-head-time {
  font-size: 0.78rem;
  color: var(--muted);
  flex-shrink: 0;
}

.user-public-actions {
  margin: 0.35rem 0 0.5rem;
}

.user-public-actions .btn {
  min-width: 8rem;
}

.card[hidden] {
  display: none !important;
}

.card-visual {
  position: relative;
}

.card-avatars {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  z-index: 2;
  display: flex;
  flex-direction: row;
  align-items: center;
  pointer-events: auto;
}

.card-avatar-hit {
  margin-left: -10px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  line-height: 0;
  flex-shrink: 0;
}

.card-avatar-hit:first-child {
  margin-left: 0;
}

.card-avatar-hit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.card-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(0, 0, 0, 0.55);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  background: var(--surface2);
  display: block;
  pointer-events: none;
}

.card-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
}

.card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.card-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.65rem 0.7rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.35rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
}

.pill {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.badge-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold);
  background: rgba(0, 0, 0, 0.45);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.card-meta {
  padding: 0.55rem 0.7rem 0.65rem;
  margin: 0;
}

.lang-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.35rem;
}

.lang-dot {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  background: var(--surface2);
  color: var(--muted);
}

.lang-dot.on {
  background: rgba(201, 76, 76, 0.2);
  color: #f0a0a0;
}

.card-hint {
  font-size: 0.72rem;
  color: var(--muted);
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--surface);
  border: 1px dashed var(--surface2);
  border-radius: var(--radius);
  max-width: 420px;
  margin: 0 auto;
}

.empty-state h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.empty-state p {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--surface2), var(--blue-deep));
  opacity: 0.85;
  position: relative;
}

.empty-icon::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 2px dashed var(--muted);
  border-radius: 8px;
  opacity: 0.5;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
}

.panel-tight .panel-title {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-weight: 600;
}

/* —— Gönderi oluştur (önizleme + açıklama) —— */
.upload-hint {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
}

.upload-composer {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.upload-preview-box {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--surface2);
  background: var(--bg);
  aspect-ratio: 1;
  max-height: 280px;
}

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

.upload-file-label {
  position: relative;
  display: block;
  cursor: pointer;
  margin: 0;
}

.upload-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.upload-file-btn {
  display: block;
  text-align: center;
  pointer-events: none;
}

.upload-caption-label {
  margin: 0;
  gap: 0.4rem;
}

.upload-caption-heading {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.upload-caption-input {
  resize: vertical;
  min-height: 4.5rem;
}

.upload-lang-select {
  width: 100%;
  max-width: 100%;
}

.upload-share-btn {
  margin-top: 0.15rem;
}

.tabs {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.tab {
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--surface2);
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  background: var(--surface2);
  color: var(--text);
}

.form-tab {
  display: none;
  flex-direction: column;
  gap: 0.8rem;
}

.form-tab.active {
  display: flex;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
}

input,
select,
textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--surface2);
  background: var(--bg);
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.btn {
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn.stretch {
  width: 100%;
}

.btn-lg {
  padding: 0.7rem 1.35rem;
  font-size: 0.98rem;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
}

.btn.primary:hover {
  background: var(--accent-hover);
}

.btn.outline {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--surface2);
}

.btn.outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn.secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--surface2);
}

.btn.secondary:hover {
  border-color: var(--muted);
}

.hint {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

.forgot-line {
  margin: 0.5rem 0 0;
  text-align: center;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--gold);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-btn:hover {
  color: #e8c46e;
}

.forgot-block {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--surface2);
}

.subhead {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.dev-link {
  margin-top: 0.75rem;
}

.dev-link-input {
  width: 100%;
  font-size: 0.75rem;
}

.forgot-status {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.4;
  background: var(--surface2);
  border: 1px solid var(--surface2);
  color: var(--text);
}

.forgot-status.ok {
  border-color: rgba(61, 154, 110, 0.45);
  background: rgba(61, 154, 110, 0.12);
}

.forgot-status.err {
  border-color: rgba(201, 76, 76, 0.45);
  background: rgba(201, 76, 76, 0.1);
}

.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem 1rem max(2.5rem, calc(1.5rem + env(safe-area-inset-bottom, 0)));
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--surface2);
}

.site-footer a {
  color: var(--gold);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.modal[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  overflow-y: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: min(960px, 98vw);
  max-height: calc(100vh - 1rem);
  overflow-y: auto;
  margin: 0.35rem auto;
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem 1.5rem;
  z-index: 1;
}

.modal-x {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.modal-image-stage {
  margin: 0.75rem 0;
}

.modal-image-wrap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--surface2);
  min-height: min(42vh, 420px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.modal-image-wrap img {
  width: 100%;
  height: auto;
  max-height: min(68vh, 760px);
  object-fit: contain;
  background: var(--bg);
  display: block;
}

.modal-crop-layer {
  position: absolute;
  inset: 0;
  cursor: crosshair;
  z-index: 4;
  background: transparent;
  /* Dokunmatikte kaydırma/zoom ile çakışmasın; alan seçimi için gerekli */
  touch-action: none;
}

.modal-crop-sketch {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.modal-crop-marquee,
.modal-entry-highlight {
  position: absolute;
  border: 2px dashed var(--accent);
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
  z-index: 3;
  box-sizing: border-box;
}

.modal-entry-highlight {
  border-color: var(--text);
  background: rgba(100, 180, 255, 0.2);
}

.modal-crop-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.35rem;
}

.modal-crop-bar .link-btn {
  font-size: 0.85rem;
}

.entry-crop-badge {
  display: inline-block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  background: var(--surface2);
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.entry-item-main .entry-crop-badge {
  margin-right: 0.35rem;
  vertical-align: middle;
}

.modal-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.entries-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  max-height: min(34vh, 320px);
  overflow-y: auto;
}

.entry-item {
  padding: 0.65rem 0.75rem;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--surface2);
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.entry-item.is-highlighting {
  border-color: rgba(120, 170, 255, 0.55);
  box-shadow:
    0 0 0 1px rgba(120, 170, 255, 0.28),
    0 8px 24px rgba(0, 0, 0, 0.14);
}

.entry-item-focused {
  box-shadow:
    0 0 0 2px rgba(212, 168, 83, 0.55),
    0 10px 28px rgba(0, 0, 0, 0.16);
  border-radius: 10px;
  transition: box-shadow 0.2s ease;
}

/* Sanal klavye açıkken: görsel + yazılacak alan önde; Kapat / Gönder / Esc ile body sınıfı kalkar */
body.site-vkbd-composer-focus #modal .modal-card > #modal-title,
body.site-vkbd-composer-focus #modal .modal-meta,
body.site-vkbd-composer-focus #modal .modal-crop-bar {
  display: none !important;
}

body.site-vkbd-composer-focus[data-vkbd-composer="modal-entry"] #modal #entries-list {
  display: none !important;
}

body.site-vkbd-composer-focus[data-vkbd-composer="modal-entry"] #modal #form-entry > h3 {
  display: none !important;
}

body.site-vkbd-composer-focus[data-vkbd-composer="modal-comment"] #modal #entries-list .entry-item:not(.entry-item-composer-active) {
  display: none !important;
}

body.site-vkbd-composer-focus[data-vkbd-composer="modal-comment"] #modal #form-entry {
  display: none !important;
}

body.site-vkbd-composer-focus[data-vkbd-composer="modal-comment"] #modal .entry-item-composer-active .entry-item-head,
body.site-vkbd-composer-focus[data-vkbd-composer="modal-comment"] #modal .entry-item-composer-active .btn-entry-comments,
body.site-vkbd-composer-focus[data-vkbd-composer="modal-comment"] #modal .entry-item-composer-active .comments-list-inner,
body.site-vkbd-composer-focus[data-vkbd-composer="modal-comment"] #modal .entry-item-composer-active .comments-label {
  display: none !important;
}

body.site-vkbd-composer-focus[data-vkbd-composer="modal-comment"] #modal #entries-list {
  max-height: none;
  overflow: visible;
}

body.site-vkbd-composer-focus[data-vkbd-composer="modal-comment"] #modal .entry-item-composer-active {
  border-color: rgba(212, 168, 83, 0.45);
  box-shadow: 0 0 0 1px rgba(212, 168, 83, 0.22);
}

body.site-vkbd-composer-focus #modal .modal-image-stage {
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}

body.site-vkbd-composer-focus #modal .modal-image-wrap {
  min-height: min(34vh, 360px);
}

body.site-vkbd-composer-focus #modal .modal-image-wrap img {
  max-height: min(46vh, 500px);
}

body.site-vkbd-composer-focus[data-vkbd-composer="upload"] #upload-panel > .panel-title,
body.site-vkbd-composer-focus[data-vkbd-composer="upload"] #upload-panel > .upload-hint {
  display: none !important;
}

body.site-vkbd-composer-focus[data-vkbd-composer="upload"] #upload-panel #upload-preview-box:not([hidden]) + .upload-file-label {
  display: none !important;
}

body.site-vkbd-composer-focus[data-vkbd-composer="upload"] #upload-panel .upload-preview-img {
  max-height: min(42vh, 420px);
  object-fit: contain;
}

.entry-item-head {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
}

.entry-item-head .entry-item-main {
  flex: 1 1 auto;
  min-width: 0;
}

.entry-author-hit {
  flex-shrink: 0;
  margin-top: 0.1rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  line-height: 0;
}

.entry-author-hit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.entry-author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid rgba(0, 0, 0, 0.45);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  background: var(--surface2);
  pointer-events: none;
}

.entry-author-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
}

.entry-item-main {
  cursor: pointer;
  border-radius: 6px;
  padding: 0.15rem 0;
}

.entry-item-main:hover {
  background: var(--surface2);
}

.entry-item .lang {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.entry-item .entry-text {
  margin: 0.15rem 0 0;
}

.btn-entry-comments {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.4rem;
  padding: 0.2rem 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.btn-entry-comments:hover,
.btn-entry-comments.is-open {
  color: var(--accent);
}

.entry-comments-panel {
  margin-top: 0.45rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--surface2);
}

.entry-comments-panel[hidden] {
  display: none !important;
}

.entry-comments-panel .comments-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.comments-list-inner {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.comment-line {
  position: relative;
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  font-size: 0.82rem;
  line-height: 1.35;
}

.comment-author-hit {
  flex-shrink: 0;
  margin-top: 0.05rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  line-height: 0;
}

.comment-author-hit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.comment-play-telaffuz {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 0.02rem;
  padding: 0.1rem 0.32rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.88;
  transition: opacity 0.12s ease, background 0.12s ease, transform 0.12s ease;
}

.comment-play-telaffuz:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
}

.comment-play-telaffuz.is-playing {
  opacity: 1;
  background: rgba(212, 168, 83, 0.2);
}

.comment-play-telaffuz:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.comment-audio-el {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.comment-audio-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0;
  border-radius: 8px;
  transition: box-shadow 0.2s ease;
}

.comment-audio-toolbar--recording {
  animation: comment-toolbar-rec-glow 1.15s ease-in-out infinite;
}

@keyframes comment-toolbar-rec-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(220, 70, 70, 0.22);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(220, 70, 70, 0.1);
  }
}

.comment-audio-toolbar--recording .comment-audio-stop {
  animation: comment-rec-btn-shake 2.4s ease-in-out infinite;
}

@keyframes comment-rec-btn-shake {
  0%,
  100% {
    transform: translate(0, 0);
  }
  20% {
    transform: translate(-0.5px, 0.5px);
  }
  40% {
    transform: translate(0.5px, -0.5px);
  }
  60% {
    transform: translate(-0.5px, -0.5px);
  }
  80% {
    transform: translate(0.5px, 0.5px);
  }
}

.comment-rec-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.12rem 0.55rem 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(180, 45, 45, 0.22);
  border: 1px solid rgba(230, 90, 90, 0.35);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f0b0b0;
}

.comment-rec-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e53935;
  box-shadow: 0 0 6px rgba(229, 57, 53, 0.75);
  animation: comment-rec-dot-pulse 0.85s ease-in-out infinite;
}

@keyframes comment-rec-dot-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.88);
  }
}

.comment-audio-meter {
  display: block;
  flex: 1 1 140px;
  max-width: 180px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--surface2);
  vertical-align: middle;
}

.comment-audio-toolbar .comment-audio-status {
  flex: 1 1 100%;
  margin: 0;
}

.comment-audio-preview {
  width: 100%;
  max-width: 280px;
  height: 34px;
  margin-top: 0.15rem;
}

.comment-audio-wrap {
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  align-items: flex-start;
}

.comment-audio {
  width: 100%;
  max-width: min(100%, 260px);
  height: 32px;
}

.comment-audio-note {
  font-size: 0.68rem;
}

.comment-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid rgba(0, 0, 0, 0.4);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  background: var(--surface2);
  pointer-events: none;
}

.comment-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--gold);
}

.comment-body {
  flex: 1 1 auto;
  min-width: 0;
}

.comment-line .comment-user {
  font-weight: 600;
  color: var(--accent);
  margin-right: 0.35rem;
}

.comment-form-inline {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin-top: 0.5rem;
}

.comment-field-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.comment-telaffuz-box {
  margin-top: 0.35rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(212, 168, 83, 0.28);
  background: rgba(212, 168, 83, 0.06);
}

.comment-telaffuz-intro {
  margin: 0 0 0.4rem;
  line-height: 1.35;
}

.comment-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.15rem;
}

.comment-form-inline .comment-input {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--surface2);
  background: var(--surface);
  color: inherit;
  font: inherit;
  resize: vertical;
  min-height: 2.5rem;
}

.comment-form-inline.comment-form-send-in-vkbd {
  position: relative;
  gap: 0.28rem;
  margin-top: 0.35rem;
}

.comment-form-inline.comment-form-send-in-vkbd .comment-send {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.guest-comments-note {
  margin: 0.35rem 0 0;
}

.entry-form {
  border-top: 1px solid var(--surface2);
  padding-top: 1rem;
}

.entry-form h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.entry-form.guest-only {
  opacity: 0.55;
  pointer-events: none;
}

.entry-form .note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

/* —— Mobil / dokunmatik: daha rahat dokunma hedefleri —— */
@media (max-width: 959px) {
  .hero {
    padding-top: 1.75rem;
    padding-bottom: 2rem;
  }

  .hero h1 {
    font-size: clamp(1.55rem, 5.5vw, 2.1rem);
  }

  .header-inner {
    padding-inline: max(1rem, env(safe-area-inset-left, 0));
    padding-right: max(1.25rem, env(safe-area-inset-right, 0));
  }

  .nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.35rem 0.5rem;
    margin: -0.35rem -0.5rem;
    border-radius: 8px;
  }

  .nav-link:active {
    background: var(--surface2);
  }

  .panel {
    padding: 1.35rem 1.15rem;
  }

  .chip {
    min-height: 44px;
    padding: 0.45rem 1rem;
    font-size: 0.88rem;
  }

  .tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.5rem 1rem;
    flex: 1 1 auto;
  }

  .tabs {
    gap: 0.35rem;
  }

  .btn:not(.btn-lg) {
    min-height: 46px;
    padding-block: 0.65rem;
  }

  .btn-lg {
    min-height: 48px;
  }

  input:not([type="file"]):not([type="hidden"]),
  select,
  textarea {
    min-height: 46px;
    padding: 0.65rem 0.75rem;
    font-size: 1rem;
  }

  textarea {
    min-height: 5.5rem;
  }

  .link-btn {
    min-height: 44px;
    padding: 0.35rem 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .gallery {
    max-width: 100%;
    padding-inline: 0;
  }

  .btn.secondary,
  .btn.primary {
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.08);
  }

  .lb-card {
    width: 100%;
    padding: 0.85rem 0.75rem;
  }
}

/* —— Site içi sanal klavye —— */
/* Dar şerit: sadece modlar (+ Daralt); geniş: harf tuşları açık */
body.site-vkbd-open:not(.site-vkbd-open--expanded):not(.site-vkbd-open--inline) {
  padding-bottom: 5.75rem;
}

body.site-vkbd-open.site-vkbd-open--expanded:not(.site-vkbd-open--inline) {
  padding-bottom: min(30vh, 240px);
}

.site-vkbd {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8000;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0.65rem calc(0.5rem + env(safe-area-inset-bottom, 0));
  border-radius: 16px 16px 0 0;
  border-top: 1px solid rgba(212, 168, 83, 0.35);
  background: linear-gradient(165deg, #1a222c 0%, var(--surface) 38%);
  box-shadow:
    0 -12px 40px rgba(0, 0, 0, 0.55),
    0 -1px 0 rgba(255, 255, 255, 0.04) inset;
}

/* Yorum: klavye metin alanı ile telaffuz kutusu arasında; başlık/ipucu gizli */
.site-vkbd.site-vkbd--inline {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  transform: none;
  width: 100%;
  max-width: none;
  max-height: none;
  overflow: visible;
  z-index: 2;
  margin-top: 0.05rem;
  padding: 0.28rem 0.35rem 0.38rem;
  border-radius: 8px;
  border: 1px solid var(--surface2);
  background: var(--surface);
  box-shadow: none;
}

.site-vkbd.site-vkbd--inline .site-vkbd-title {
  display: none;
}

.site-vkbd.site-vkbd--inline .site-vkbd-hint {
  display: none;
}

.site-vkbd.site-vkbd--inline .site-vkbd-toolbar {
  justify-content: flex-end;
  margin-bottom: 0.1rem;
  padding-bottom: 0.15rem;
  border-bottom: none;
}

.site-vkbd.site-vkbd--inline .site-vkbd-toolbar .btn {
  padding: 0.18rem 0.42rem;
  min-height: 0;
  font-size: 0.76rem;
}

.site-vkbd.site-vkbd--inline .site-vkbd-deck {
  margin-bottom: 0.15rem;
}

.site-vkbd.site-vkbd--inline .site-vkbd-modes {
  margin-bottom: 0.2rem;
  padding: 0.32rem 0.38rem;
  gap: 0.32rem;
}

.site-vkbd.site-vkbd--inline .site-vkbd-mode {
  padding: 0.32rem 0.75rem;
  font-size: 0.78rem;
}

.site-vkbd.site-vkbd--inline .site-vkbd-keys {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  padding-top: 0.05rem;
}

.site-vkbd.site-vkbd--inline .site-vkbd-comment-footer {
  margin-top: 0.12rem;
  padding-top: 0.28rem;
}

.site-vkbd--compact {
  max-height: none;
}

/* Sabit panel: tüm klavye görünsün; gerekirse tek blok olarak kaydır (sadece tuş içi değil) */
.site-vkbd:not(.site-vkbd--compact):not(.site-vkbd--inline) {
  max-height: min(52dvh, 440px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .site-vkbd:not(.site-vkbd--compact):not(.site-vkbd--inline) {
    max-height: min(62dvh, 520px);
  }
}

@media (min-width: 769px) {
  body.site-vkbd-open.site-vkbd-open--expanded:not(.site-vkbd-open--inline) {
    padding-bottom: min(38vh, 300px);
  }

  .site-vkbd:not(.site-vkbd--inline) {
    left: 50%;
    right: auto;
    width: min(100vw - 1.5rem, 520px);
    transform: translateX(-50%);
    padding: 0.65rem 0.85rem calc(0.65rem + env(safe-area-inset-bottom, 0));
  }

  .site-vkbd:not(.site-vkbd--inline):not(.site-vkbd--compact) {
    max-height: min(48dvh, 420px);
  }

  .site-vkbd-modes {
    gap: 0.45rem;
    padding: 0.5rem 0.55rem;
  }

  .site-vkbd-mode {
    padding: 0.48rem 1.05rem;
    font-size: 0.86rem;
  }

  .site-vkbd-row {
    gap: 0.3rem;
    margin-bottom: 0.26rem;
  }

  .site-vkbd-key {
    flex: 1 1 1.95rem;
    min-width: 1.95rem;
    max-width: 3rem;
    min-height: 2.28rem;
    padding: 0.28rem 0.22rem;
    font-size: clamp(0.84rem, 1.25vw, 1rem);
    border-radius: 11px;
  }

  .site-vkbd-key.site-vkbd-wide {
    flex: 2 1 5rem;
    min-width: 5rem;
    min-height: 2.2rem;
    font-size: 0.84rem;
  }

  .site-vkbd-hint {
    font-size: 0.82rem;
  }
}

.site-vkbd[hidden] {
  display: none !important;
}

.site-vkbd-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  margin-bottom: 0.5rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-vkbd-title {
  margin: 0;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.site-vkbd-toolbar-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.site-vkbd-close {
  flex-shrink: 0;
}

.site-vkbd--compact .site-vkbd-keys {
  display: none !important;
}

@media (max-width: 768px) {
  .site-vkbd--compact .site-vkbd-hint {
    display: none;
  }

  .site-vkbd--compact .site-vkbd-deck {
    margin-bottom: 0.15rem;
  }
}

.site-vkbd-deck {
  flex-shrink: 0;
  margin-bottom: 0.35rem;
}

.site-vkbd-modes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.5rem;
  margin-bottom: 0.35rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.site-vkbd-mode {
  flex: 0 1 auto;
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: "Noto Sans Georgian", "DM Sans", system-ui, sans-serif;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  cursor: pointer;
  line-height: 1.25;
  white-space: nowrap;
  transition:
    background 0.12s ease,
    color 0.12s ease,
    border-color 0.12s ease,
    box-shadow 0.12s ease;
}

.site-vkbd-mode:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(212, 168, 83, 0.35);
}

.site-vkbd-mode.is-active {
  color: #1a1510;
  background: linear-gradient(180deg, #f0d28f, var(--gold));
  border-color: rgba(212, 168, 83, 0.9);
  box-shadow: 0 0 0 1px rgba(212, 168, 83, 0.2);
}

.site-vkbd-hint {
  margin: 0;
  padding: 0 0.15rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted);
  text-align: center;
}

.site-vkbd-comment-footer {
  flex-shrink: 0;
  margin-top: 0.25rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-vkbd-keys {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  overflow-x: hidden;
  padding-top: 0.08rem;
}

.site-vkbd-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.26rem;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  max-width: 42rem;
  margin: 0 auto 0.22rem;
}

.site-vkbd-row-actions {
  max-width: 28rem;
  margin-top: 0.06rem;
}

.site-vkbd-key {
  flex: 1 1 1.75rem;
  min-width: 1.75rem;
  max-width: 2.75rem;
  min-height: 2.05rem;
  padding: 0.22rem 0.16rem;
  font-size: clamp(0.78rem, 2.1vw, 0.95rem);
  font-family: "Noto Sans Georgian", "DM Sans", system-ui, sans-serif;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: linear-gradient(180deg, #2a3544 0%, #1f2835 100%);
  color: var(--text);
  cursor: pointer;
  line-height: 1.15;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  transition:
    background 0.1s ease,
    border-color 0.1s ease,
    transform 0.08s ease;
}

.site-vkbd-key:hover {
  border-color: rgba(212, 168, 83, 0.45);
  background: linear-gradient(180deg, #354556 0%, #273240 100%);
}

.site-vkbd-key:active {
  transform: scale(0.96);
}

.site-vkbd-key.site-vkbd-wide {
  flex: 2 1 4.5rem;
  max-width: none;
  min-width: 4.5rem;
  min-height: 2rem;
  font-size: 0.78rem;
  font-weight: 600;
}
