/* Grafik uygulaması (/grafik/) */

html, .app-body { height: 100%; }
.app-body { overflow: hidden; overscroll-behavior: none; }
.app {
  height: 100vh; height: 100dvh;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr);
  --wl-w: 300px;
  --tools-w: 46px;
}
.app.wl-collapsed { --wl-w: 0px; }

/* Üst çubuk */
.topbar {
  display: flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 6px; min-width: 0;
  border-bottom: 1px solid var(--border); background: var(--surface); position: relative; z-index: 20;
}
.topbar-main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar-controls { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.app-brand { display: inline-flex; align-items: center; gap: 8px; padding: 0 8px 0 4px; height: 36px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 14.5px; border-radius: var(--radius); }
.app-brand:hover { background: var(--surface-2); }
.app-brand .brand-mark { width: 22px; height: 22px; }
.app-brand-name { display: inline-flex; }
.app-brand .brand-word { display: block; height: 14px; width: auto; aspect-ratio: 8124 / 1560; color: var(--text); }

.topbar .search-input { width: 160px; text-transform: uppercase; font-weight: 600; }
.topbar .search-input::placeholder { text-transform: none; font-weight: 400; }

.quote { display: flex; align-items: baseline; gap: 8px; padding: 0 8px; white-space: nowrap; min-width: 0; }
.quote-name { font-size: 13px; color: var(--text-2); max-width: 180px; overflow: hidden; text-overflow: ellipsis; align-self: center; }
.quote-price { font-size: 15px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.quote-change { font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.quote .badge { align-self: center; }

.divider { width: 1px; height: 20px; background: var(--border); margin: 0 4px; flex: none; }
.intervals { display: flex; gap: 1px; }
.tb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; min-width: 32px; padding: 0 8px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-2); font-size: 13px; font-weight: 500; white-space: nowrap; flex: none;
}
.tb-btn:hover { background: var(--surface-2); color: var(--text); }
.tb-btn[aria-pressed='true'], .tb-btn[aria-expanded='true'] { color: var(--accent-text); background: var(--accent-soft); }
[data-theme-toggle].tb-btn[aria-pressed] { color: var(--text-2); background: transparent; }
[data-theme-toggle].tb-btn:hover { color: var(--text); background: var(--surface-2); }
.tb-btn svg { width: 18px; height: 18px; flex: none; }
.tb-icon { padding: 0; width: 32px; }
.intervals .tb-btn { font-size: 13px; min-width: 34px; padding: 0 6px; }
.topbar-controls .wl-toggle-desktop { margin-left: auto; }
.topbar-controls .account-wrap { margin-left: auto; }
.topbar-controls .account-wrap + .wl-toggle-desktop { margin-left: 2px; }
.account-wrap { display: flex; align-items: center; gap: 4px; }
.account-wrap a.tb-btn { text-decoration: none; }
.tb-signup { min-height: 28px; height: 28px; padding: 0 10px; font-size: 13px; flex: none; }
.tb-signup[hidden] { display: none; }
.tb-signup .lbl-short { display: none; }
.chart-type { display: flex; gap: 1px; }
.tb-btn[hidden] { display: none; }
.account-menu { min-width: 220px; }
.account-who { display: grid; gap: 2px; padding: 6px 8px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.account-name { font-size: 14px; font-weight: 600; color: var(--text); }
.account-email { font-size: 12px; color: var(--text-3); }
.account-name, .account-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.menu-item {
  display: flex; align-items: center; width: 100%; min-height: 38px; padding: 0 8px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--text); font: inherit; font-size: 14px; text-align: left; text-decoration: none; cursor: pointer;
}
.menu-item:hover { background: var(--surface-2); text-decoration: none; }
.menu-item:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }

.menu-wrap { position: relative; }
.popover {
  position: fixed; z-index: 60; min-width: 260px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow);
}
.popover[hidden] { display: none; }
.popover-title { font-size: 12px; font-weight: 600; color: var(--text-3); padding: 6px 8px; }
.ind-list { border: 0; margin: 0; padding: 0; min-width: 0; }
.ind-option { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 8px; border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; }
.ind-option:hover { background: var(--surface-2); }
.ind-option input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.ind-option .ind-code { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); margin-left: auto; }
.ind-note { margin: 0 0 6px; padding: 0 8px; font-size: 12px; color: var(--text-3); }
.ind-note[hidden] { display: none; }
.ind-group { font-size: 11px; color: var(--text-3); padding: 8px 8px 2px; }

/* Gösterge seçici: arama + açık olanlar (ayarlarıyla) + eklenebilirler. Popover ve mobil sheet aynı içerik. */
.ind-popover { width: 340px; max-height: min(72vh, 600px); overflow-y: auto; overscroll-behavior: contain; }
.ind-search { position: relative; padding: 2px 2px 8px; }
.ind-search svg { position: absolute; left: 10px; top: 50%; width: 15px; height: 15px; margin-top: -11px; color: var(--text-3); pointer-events: none; }
.ind-search .input-sm { width: 100%; padding-left: 30px; text-transform: none; font-weight: 400; height: 34px; min-height: 34px; }
.ind-section[hidden], .ind-empty[hidden] { display: none; }
.ind-ul { list-style: none; margin: 0; padding: 0; }
.ind-item { border-radius: var(--radius-sm); }
.ind-item:has(.ind-form) { background: var(--surface-2); }
.ind-row { display: flex; align-items: center; gap: 2px; min-height: 40px; padding: 0 2px 0 8px; }
.ind-name { display: grid; min-width: 0; flex: 1; font-size: 14px; color: var(--text); line-height: 1.25; }
.ind-name > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ind-params { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ind-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px;
  border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-3);
}
.ind-icon:hover { background: var(--surface-3); color: var(--text); }
.ind-icon[data-act='remove']:hover { color: var(--down); }
.ind-icon[aria-expanded='true'] { color: var(--accent-text); background: var(--accent-soft); }
.ind-icon svg { width: 17px; height: 17px; }
.ind-add {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 6px 0 8px; border: 0;
  border-radius: var(--radius-sm); background: transparent; color: var(--text); text-align: left; font: inherit;
}
.ind-add:hover { background: var(--surface-2); }
.ind-add:focus-visible, .ind-icon:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.ind-add .ind-code { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.ind-plus { display: inline-flex; color: var(--accent-text); }
.ind-plus svg { width: 16px; height: 16px; }
.ind-add[data-locked='true'] .ind-plus { color: var(--text-3); }
.ind-form { display: grid; gap: 8px; padding: 2px 8px 10px; }
.ind-fields { display: flex; flex-wrap: wrap; gap: 8px; }
.ind-field { display: grid; gap: 4px; flex: 1 1 80px; min-width: 0; font-size: 12px; color: var(--text-2); }
.ind-field-wide { flex-basis: 100%; }
.ind-field .input-sm { width: 100%; text-transform: none; font-variant-numeric: tabular-nums; }
.ind-help { margin: -2px 0 0; font-size: 11.5px; color: var(--text-3); }
.ind-error { margin: 0; font-size: 12.5px; color: var(--down); }
.ind-error[hidden] { display: none; }
.ind-form-actions { display: flex; justify-content: flex-end; gap: 6px; }
.ind-empty { margin: 4px 8px 8px; font-size: 13px; color: var(--text-3); }

/* Çalışma alanı */
.workspace {
  display: grid; grid-template-columns: var(--tools-w) minmax(0, 1fr) var(--wl-w);
  min-height: 0; position: relative;
}

.tools {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0;
  border-right: 1px solid var(--border); background: var(--surface); overflow-y: auto; overflow-x: hidden;
}
.tool-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-2);
}
.tool-btn:hover { background: var(--surface-2); color: var(--text); }
.tool-btn[aria-pressed='true'] { background: var(--accent-soft); color: var(--accent-text); }
.tool-btn[aria-pressed='true']::before { content: ''; position: absolute; left: -5px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--accent); }
.tool-btn:disabled { opacity: 0.4; cursor: default; background: transparent; }
.tool-btn svg { width: 20px; height: 20px; }
.tools-sep { width: 24px; height: 1px; background: var(--border); margin: 6px 0; flex: none; }

.chart-region { position: relative; min-width: 0; min-height: 0; background: var(--chart-bg); }
.chart { position: absolute; inset: 0; }
.chart-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; background: color-mix(in srgb, var(--chart-bg) 80%, transparent); z-index: 5; }
.chart-overlay[hidden] { display: none; }
.chart-overlay-box { max-width: 420px; text-align: center; display: grid; gap: 14px; justify-items: center; color: var(--text-2); font-size: 15px; }
.chart-overlay[data-state='error'] .chart-overlay-box p::before { content: ''; display: block; width: 28px; height: 2px; background: var(--down); margin: 0 auto 14px; }
.draw-hint {
  position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 6; margin: 0;
  padding: 6px 12px; border-radius: var(--radius); background: var(--surface-3); color: var(--text); font-size: 13px; pointer-events: none;
  max-width: calc(100% - 24px); text-align: center;
}
.draw-hint[hidden] { display: none; }
.chart-region[data-tool='brush'] .chart { cursor: crosshair; }

/* Seçili çizim: renk, kalınlık, kilit, sil. Masaüstünde grafiğin üstünde ortada. */
.draw-bar {
  position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 7;
  display: flex; align-items: center; gap: 2px; padding: 4px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow);
}
.draw-bar[hidden], .draw-quick[hidden] { display: none; }
.chart-region:has(.draw-bar:not([hidden])) .draw-hint { top: 60px; }
.db-style { display: flex; align-items: center; gap: 2px; }
.db-style[hidden] { display: none; }
.db-group { display: flex; align-items: center; gap: 1px; }
.db-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; flex: none; }
.db-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-2);
}
.db-btn:hover { background: var(--surface-2); color: var(--text); }
.db-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.db-btn:disabled { opacity: 0.35; cursor: default; background: transparent; }
.db-btn svg { width: 18px; height: 18px; }
.db-swatch span { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25); }
.db-swatch[aria-pressed='true'] { box-shadow: inset 0 0 0 2px var(--text); }
.db-size span { width: 18px; min-height: 1px; border-radius: 2px; background: currentColor; }
.db-size[aria-pressed='true'], #db-lock[aria-pressed='true'] { color: var(--accent-text); background: var(--accent-soft); }
.db-danger:hover { color: var(--down); }
.draw-quick { display: none; }
.db-hist { display: none; } /* masaüstünde geri al / yinele sol rayda */

/* İzleme listesi */
.watchlist {
  display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden;
  border-left: 1px solid var(--border); background: var(--surface);
}
.app.wl-collapsed .watchlist { display: none; }
.wl-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 6px; }
.wl-head h2 { font-size: 13px; font-weight: 600; }
.wl-close { display: none; }
.wl-add { display: flex; gap: 6px; padding: 4px 12px 10px; }
.input-sm { min-height: 30px; height: 30px; font-size: 13px; padding: 0 8px; text-transform: uppercase; font-weight: 600; }
.input-sm::placeholder { text-transform: none; font-weight: 400; }
.wl-add .btn { min-height: 30px; }
.wl-cols, .wl-row { display: grid; grid-template-columns: minmax(0, 1fr) 84px 64px 28px; align-items: center; gap: 4px; }
.wl-cols { padding: 6px 12px; font-size: 11px; color: var(--text-3); border-bottom: 1px solid var(--border); }
.wl-cols span:nth-child(2), .wl-cols span:nth-child(3) { text-align: right; }
.wl-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 0; }
.wl-item { position: relative; border-bottom: 1px solid var(--border); }
.wl-row {
  width: 100%; min-height: 40px; padding: 3px 0 3px 12px; border: 0; background: transparent; text-align: left; color: var(--text);
}
.wl-item:hover { background: var(--surface-2); }
.wl-item[aria-current='true'] { background: var(--accent-soft); }
.wl-item[aria-current='true']::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent); }
.wl-sym { display: grid; min-width: 0; }
.wl-sym b { font-weight: 600; font-size: 13px; }
.wl-sym small { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-price, .wl-chg { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; }
.wl-remove {
  position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-3);
  display: inline-flex; align-items: center; justify-content: center; opacity: 0;
}
.wl-item:hover .wl-remove, .wl-remove:focus-visible { opacity: 1; }
.wl-remove:hover { color: var(--down); background: var(--surface-3); }
.wl-remove svg { width: 14px; height: 14px; }
@media (hover: none) { .wl-remove { opacity: 1; } }
.wl-status { padding: 8px 12px; font-size: 12px; color: var(--text-3); min-height: 32px; border-top: 1px solid var(--border); }
.wl-pages { display: flex; justify-content: space-between; align-items: center; padding: 4px 12px; font-size: 12px; }
.wl-pages[hidden] { display: none; }
.wl-empty { padding: 16px 12px; font-size: 13px; color: var(--text-2); }

.backdrop { display: none; }

/* Durum çubuğu */
.statusbar {
  display: flex; flex-wrap: nowrap; gap: 16px; align-items: center; height: 26px; padding: 0 12px;
  border-top: 1px solid var(--border); background: var(--surface); font-size: 12px; color: var(--text-3);
  white-space: nowrap; overflow: hidden;
}
.statusbar-note { margin-left: auto; }
#status-updated[data-lag] { color: var(--warn); }
/* Yumuşak kayıt çağrısı durum çubuğunun üstünde */
.app-body .signup-nudge { bottom: 36px; }
.sync-status { color: var(--warn); overflow: hidden; text-overflow: ellipsis; }
.sync-status[hidden] { display: none; }

/* Diyaloglar */
.dialog {
  width: min(420px, calc(100vw - 32px)); padding: 18px; border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow);
}
.dialog::backdrop { background: var(--overlay); }
.dialog h2 { font-size: 17px; margin-bottom: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.dialog-wide { width: min(640px, calc(100vw - 32px)); max-height: min(80vh, 720px); padding: 0; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px 20px; position: sticky; top: 0; background: var(--surface); }
.dialog-head h2 { margin: 0; }
.dialog-body { padding: 0 20px 20px; font-size: 15px; color: var(--text-2); }
.dialog-body > * + * { margin-top: 12px; }
.dialog-body h3 { font-size: 15px; color: var(--text); margin-top: 20px; }
.dialog-body h2 { font-size: 16px; color: var(--text); margin-top: 20px; }
.dialog-body ul, .dialog-body ol { padding-left: 20px; }
.dialog-body kbd { font-size: 12px; padding: 1px 5px; border: 1px solid var(--border-strong); border-radius: 3px; background: var(--bg); }
.todo { font-family: var(--font-mono); font-size: 12px; color: var(--warn); }

/* Orta genişlik */
@media (max-width: 1519px) {
  .tb-signup .lbl-long { display: none; }
  .tb-signup .lbl-short { display: inline; }
  .quote-name { display: none; }
}
@media (max-width: 1360px) {
  /* Kayıt düğmesine yer: marka adı gizlenir (logo kalır), arama daralır */
  .app-brand-name { display: none; }
  .app-brand { padding: 0 4px; }
  .topbar .search-input { width: 130px; }
}
@media (max-width: 1180px) {
  /* Göstergeler düğmesi yalnızca simge; etiket ekran okuyucuda kalır */
  #indicators-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .app { --wl-w: 260px; }
  .app.wl-collapsed { --wl-w: 0px; }
}
@media (min-width: 900px) and (max-width: 1180px) {
  .topbar { flex-wrap: wrap; padding: 0 6px; row-gap: 0; }
  .topbar-main { width: 100%; height: 48px; }
  .topbar-controls { height: 44px; border-top: 1px solid var(--border); margin: 0 -6px; padding: 0 6px; width: calc(100% + 12px); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .topbar-controls::-webkit-scrollbar { display: none; }
  .quote { margin-left: auto; }
}

/* Yalnızca mobil kabukta görünen parçalar */
.interval-strip, .mobilebar, .sheet, .sheet-backdrop, .app-menu-btn, .delay-short, .tool-label { display: none; }
.wl-toggle-mobile { display: none; }

/* ---------------------------------------------------------------- Mobil kabuk (< 900px)
   Üst: ev · arama · fiyat · menü ve aralık şeridi. Alt: Grafik tipi · Göstergeler · Çizim · İzleme. */
@media (max-width: 899px) {
  .app {
    --tools-w: 0px; --wl-w: 0px;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
  }
  .topbar {
    flex-direction: column; gap: 0; min-height: 0; padding: var(--safe-t) max(6px, var(--safe-r)) 0 max(6px, var(--safe-l));
  }
  .topbar-main { width: 100%; height: 52px; gap: 6px; }
  .topbar-controls { display: none; }
  .interval-strip {
    display: block; width: 100%; overflow-x: auto; overscroll-behavior-x: contain;
    border-top: 1px solid var(--border); scrollbar-width: none;
  }
  .interval-strip .intervals { width: max-content; min-width: 100%; padding-block: 2px; }
  .interval-strip .tb-btn { flex: 1 0 44px; min-height: 40px; }
  .interval-strip .tb-btn:focus-visible { outline-offset: -2px; }
  .app-brand { padding: 0; width: 40px; height: 44px; justify-content: center; flex: none; }
  .app-brand-name { display: none; }
  .app-brand .brand-mark { width: 26px; height: 26px; }
  .topbar .search { flex: 1 1 100px; min-width: 0; }
  .topbar .search-input { width: 100%; min-width: 0; height: 40px; font-size: 16px; padding-right: 8px; border-radius: 8px; }
  .quote {
    flex: none; padding: 0 2px; margin: 0; display: grid; grid-template-columns: auto; justify-items: end; row-gap: 0; line-height: 1.2;
  }
  .quote-name, .quote .badge { display: none; }
  .quote-price { font-size: 15px; }
  .quote-change { font-size: 12px; }
  .quote-change:empty { display: none; }
  .delay-short {
    display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-3); white-space: nowrap;
  }
  .delay-short::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }
  .delay-short[data-kind='realtime']::before { background: var(--up); }
  .delay-short[data-kind='daily']::before { background: var(--accent-text); }
  .quote { grid-template-columns: auto auto; column-gap: 6px; align-items: baseline; }
  .quote-price { grid-column: 1 / -1; justify-self: end; }
  .app-menu-btn { display: inline-flex; width: 44px; height: 44px; flex: none; color: var(--text); }
  .app-menu-btn svg { width: 22px; height: 22px; }

  .workspace { grid-template-columns: minmax(0, 1fr); }
  .statusbar { flex-wrap: wrap; gap: 2px 8px; height: auto; min-height: 26px; padding-block: 3px; }
  .statusbar-tz, .statusbar-note { display: none; }

  /* Alt çubuk */
  .mobilebar {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
    padding: 0 var(--safe-r) var(--safe-b) var(--safe-l);
    border-top: 1px solid var(--border); background: var(--surface); position: relative; z-index: 20;
  }
  .mb-btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    height: 56px; border: 0; background: transparent; color: var(--text-2); font-size: 11.5px; font-weight: 500; padding: 0;
  }
  .mb-btn svg { width: 22px; height: 22px; }
  .mb-btn[aria-expanded='true'] { color: var(--accent-text); }
  .mb-btn:active { background: var(--surface-2); }

  /* Sheet */
  .sheet-backdrop { display: block; position: fixed; inset: 0; z-index: 90; background: var(--overlay); }
  .sheet-backdrop[hidden] { display: none; }
  .sheet {
    display: flex; flex-direction: column; position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
    max-height: calc(100dvh - var(--safe-t) - 48px);
    background: var(--surface); border-top: 1px solid var(--border-strong);
    border-radius: 14px 14px 0 0; box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.35);
    padding-bottom: var(--safe-b); animation: sheet-up 0.2s ease-out;
  }
  .sheet[hidden] { display: none; }
  .sheet-tall { height: min(78dvh, 640px); }
  .sheet-head {
    position: relative; flex: none; display: flex; align-items: center; justify-content: space-between;
    padding: 18px 8px 6px 20px;
  }
  .sheet-head::before {
    content: ''; position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px;
    border-radius: 2px; background: var(--border-strong);
  }
  .sheet-head h2 { font-size: 17px; font-weight: 700; }
  .sheet-close { width: 44px; height: 44px; }
  .sheet-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 20px 20px; display: grid; gap: 16px; align-content: start; }
  .sheet-body-flush { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
  .sheet-hint { font-size: 13px; color: var(--text-3); }

  /* Grafik tipi sheet'i */
  .sheet .chart-type .tb-btn {
    height: 48px; width: auto; min-width: 0; border: 1px solid var(--border-strong); border-radius: 8px; font-size: 15px; font-weight: 600; color: var(--text);
  }
  .sheet .chart-type .tb-btn[aria-pressed='true'] { border-color: var(--accent); }
  .sheet .chart-type { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .sheet .chart-type .tb-btn::after { font-size: 14px; font-weight: 500; }
  .sheet .chart-type [data-chart-type='candle']::after { content: 'Mum'; }
  .sheet .chart-type [data-chart-type='area']::after { content: 'Çizgi'; }

  /* Gösterge sheet'i */
  .sheet .ind-option { min-height: 52px; font-size: 16px; padding: 0 4px; }
  .sheet .ind-option input { width: 20px; height: 20px; }
  .sheet .ind-group { padding: 12px 4px 4px; font-size: 12px; }

  /* Çizim sheet'i: etiketli ızgara */
  .sheet .tools {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 0; border: 0; background: transparent; overflow: visible;
  }
  .sheet .tool-btn {
    width: auto; height: auto; min-height: 72px; flex-direction: column; gap: 6px; padding: 8px 4px;
    border: 1px solid var(--border-strong); border-radius: 8px; color: var(--text);
  }
  .sheet .tool-btn svg { width: 22px; height: 22px; }
  .sheet .tool-btn[aria-pressed='true'] { border-color: var(--accent); }
  .sheet .tool-btn[aria-pressed='true']::before { display: none; }
  .sheet .tool-label { display: block; font-size: 12px; line-height: 1.2; text-align: center; }
  .sheet .tools-sep { display: none; }
  .sheet .tool-btn:disabled { opacity: 0.4; }

  /* İzleme sheet'i */
  .sheet .watchlist { display: flex; flex: 1; border: 0; background: transparent; }
  .sheet .wl-head { display: none; }
  .sheet .wl-add { padding: 4px 20px 12px; gap: 8px; }
  .sheet .input-sm { height: 44px; min-height: 44px; font-size: 16px; }
  .sheet .wl-add .btn { min-height: 44px; padding: 0 16px; }
  .sheet .wl-cols { padding: 6px 20px; }
  .sheet .wl-row { min-height: 56px; padding-left: 20px; }
  .sheet .wl-cols, .sheet .wl-row { grid-template-columns: minmax(0, 1fr) 84px 64px 44px; }
  .sheet .wl-remove { width: 44px; height: 44px; right: 0; opacity: 1; }
  .sheet .wl-sym b { font-size: 15px; }
  .sheet .wl-price, .sheet .wl-chg { font-size: 14px; }
  .sheet .wl-pages .btn { min-height: 44px; }
  .sheet .wl-status { padding: 8px 20px; }

  /* Menü sheet'i */
  .sm-account { display: grid; gap: 8px; }
  .sm-account[hidden] { display: none; }
  .sm-big { min-height: 48px; font-size: 16px; }
  .sm-list { display: grid; border-top: 1px solid var(--border); }
  .sm-list .menu-item { min-height: 52px; font-size: 16px; border-radius: 0; border-bottom: 1px solid var(--border); padding: 0 4px; }
  .sm-row { justify-content: space-between; }
  .sm-value { color: var(--text-2); font-size: 15px; }
  .sm-status { font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
  .sm-status.sync-status { color: var(--warn); }
  .sm-status[hidden] { display: none; }

  .popover { left: 8px !important; right: 8px; min-width: 0; }

  /* Çizim işlemleri grafiğin altında kendi satırında kalır. */
  .chart-region { display: grid; grid-template-rows: minmax(0, 1fr) 46px; }
  .chart { position: relative; }
  .chart-overlay { bottom: 46px; }
  .draw-bar, .draw-quick {
    grid-row: 2; display: flex; position: static; transform: none;
    min-width: 0; align-items: center; gap: 2px; overflow-x: auto;
    background: var(--surface); border: 0; border-top: 1px solid var(--border);
    border-radius: 0; box-shadow: none; padding: 0 4px;
  }
  .draw-bar .db-style { order: 1; }
  .draw-bar .db-hist { display: inline-flex; }
  .db-btn { flex: none; width: 44px; height: 44px; }
  .db-btn svg { width: 21px; height: 21px; }
  .db-swatch span { width: 22px; height: 22px; }
  .chart-region:has(.draw-bar:not([hidden])) .draw-quick { display: none; }
  .chart-region:has(.draw-bar:not([hidden])) .draw-hint { top: 8px; }

  /* Gösterge sheet'i: seçici */
  .sheet .ind-list > legend { display: none; } /* sheet başlığı zaten "Göstergeler" */
  .sheet .ind-search .input-sm { height: 44px; min-height: 44px; font-size: 16px; padding-left: 34px; }
  .sheet .ind-search svg { left: 11px; width: 17px; height: 17px; margin-top: -12px; }
  .sheet .ind-row { min-height: 52px; padding-left: 4px; }
  .sheet .ind-name { font-size: 16px; }
  .sheet .ind-icon { width: 44px; height: 44px; }
  .sheet .ind-icon svg { width: 20px; height: 20px; }
  .sheet .ind-add { min-height: 52px; font-size: 16px; padding-left: 4px; }
  .sheet .ind-form { padding: 2px 4px 12px; }
  .sheet .ind-field { font-size: 13px; }
  .sheet .ind-field .input-sm { height: 44px; min-height: 44px; font-size: 16px; }
  .sheet .ind-form-actions .btn { min-height: 44px; padding: 0 16px; }
  .draw-hint { top: 8px; font-size: 13px; }
  .app:has(> .signup-nudge:not([hidden])) { grid-template-rows: auto minmax(0, 1fr) auto auto auto; }
  .app-body .signup-nudge {
    position: static; transform: none; width: auto; border-radius: 0; box-shadow: none;
  }
}
@media (min-width: 600px) and (max-width: 899px) {
  .sheet { left: 50%; right: auto; width: 560px; margin-left: -280px; }
}
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
@media (max-width: 360px) {
  .quote-price { font-size: 14px; }
  .topbar-main { gap: 4px; }
  .app-brand { width: 34px; }
}

#quote-retry[hidden], #watchlist-retry[hidden] { display: none; }
.wl-sym [data-quote-meta] { white-space: nowrap; }
