/* Hallmark · shape: app screen · theme: grafietatelier (custom) · signature: de focusring verbeeldt verstreken tijd · v2.0.0 */
/* Ontwerpcontrole: rustige werkruimte, kleur in de tools en de gekozen actie. */
html, body { overflow-x: clip; }
.tg-shell {
  --tg-font: Inter, "Segoe UI", Arial, sans-serif;
  --tg-text: #eeedf5;
  --tg-secondary: #c3c0cb;
  --tg-muted: #a8a6b3;
  --tg-line: #3b3b45;
  --tg-edge: #4a4953;
  --tg-header: #17181e;
  --tg-canvas: #1b1c22;
  --tg-panel: #25252d;
  --tg-raised: #2c2b33;
  --tg-hover: #373640;
  --tg-brand: #b696f4;
  --tg-focus: #caadfb;
  --tg-soft: #44384f;
  --tg-rim: #635371;
  --tg-pale: #dac4f6;
  --tg-onbrand: #261c32;
  --tg-brim: #c4a5f4;
  --tg-bright: #c7aafa;
  --tg-grid-dot: #ffffff20;
  --tg-sheen: #ffffff09;
  --tg-shadow: #08080c40;
  --tg-darkshadow: #06050b75;
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  color: var(--tg-text);
  background: var(--tg-canvas);
  font-family: var(--tg-font);
  font-size: 14px;
  line-height: 1.4;
  isolation: isolate;
  color-scheme: dark;
}

.tg-shell *, .tg-shell *::before, .tg-shell *::after { box-sizing: border-box; }
.tg-shell [hidden] { display: none !important; }
.tg-shell button, .tg-shell input { font: inherit; }
.tg-shell button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  min-width: 0;
  min-height: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  line-height: 1.2;
}
.tg-shell button:focus-visible, .tg-shell input:focus-visible, .tg-card-head:focus-visible {
  outline: 2px solid var(--tg-focus);
  outline-offset: 3px;
}
.tg-shell svg { display: block; flex: none; pointer-events: none; }

.tg-top {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  flex: 0 0 67px;
  gap: 26px;
  padding: 0 31px;
  background: var(--tg-header);
  border-bottom: 1px solid var(--tg-line);
}
.tg-brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 11px;
  color: var(--tg-text);
  font-size: 22px;
  font-weight: 680;
  line-height: 1;
  letter-spacing: -1.3px;
}
.tg-logo {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--tg-onbrand);
  background: var(--tg-brand);
  border-radius: 8px;
}
.tg-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-left: 24px;
  border-left: 1px solid var(--tg-line);
}
.tg-shell .tg-nav-link {
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--tg-muted);
  font-size: 13px;
  font-weight: 550;
}
.tg-nav-link svg { width: 15px; height: 15px; }
.tg-shell .tg-nav-link:hover, .tg-shell .tg-nav-link.is-current { color: var(--tg-text); background: var(--tg-raised); }
.tg-shell .tg-nav-link.is-current { border-color: var(--tg-line); }
.tg-nav-link.is-current svg { color: var(--tg-brand); }
.tg-top-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.tg-shell .tg-create {
  gap: 7px;
  min-height: 35px;
  padding: 0 13px 0 11px;
  color: var(--tg-text);
  background: var(--tg-raised);
  border: 1px solid var(--tg-edge);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 var(--tg-sheen);
  font-size: 13px;
  font-weight: 660;
  white-space: nowrap;
}
.tg-shell .tg-create:hover { background: var(--tg-hover); }
.tg-create svg { width: 16px; height: 16px; }
.tg-shell .tg-profile { gap: 6px; color: var(--tg-muted); }
.tg-avatar {
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  color: var(--tg-pale);
  background: var(--tg-soft);
  border: 1px solid var(--tg-rim);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 650;
}

.tg-viewport {
  --tg-grid: 22px;
  --tg-grid-x: 0px;
  --tg-grid-y: 0px;
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  outline: none;
  isolation: isolate;
  background-color: var(--tg-canvas);
  background-image: radial-gradient(circle, var(--tg-grid-dot) .85px, transparent 1.22px);
  background-size: var(--tg-grid) var(--tg-grid);
  background-position: var(--tg-grid-x) var(--tg-grid-y);
  touch-action: none;
  overscroll-behavior: none;
}
.tg-world {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  transform-origin: 0 0;
}
.tg-heading {
  position: absolute;
  z-index: 2;
  top: 29px;
  left: 33px;
  pointer-events: none;
  user-select: none;
}
.tg-heading h1 {
  margin: 0;
  color: var(--tg-text);
  font-size: 34px;
  font-weight: 620;
  line-height: 1.13;
  letter-spacing: -1.65px;
}
.tg-meta, .tg-private { display: flex; align-items: center; }
.tg-meta { gap: 9px; margin-top: 9px; color: var(--tg-muted); font-size: 12px; font-weight: 480; }
.tg-private { gap: 5px; }
.tg-private svg { color: var(--tg-muted); }
.tg-tool-count { padding-left: 10px; border-left: 1px solid var(--tg-edge); }

.tg-tools, .tg-zoom, .tg-composer, .tg-minimap {
  position: absolute;
  z-index: 4;
  background: var(--tg-panel);
  border: 1px solid var(--tg-line);
  box-shadow: 0 5px 16px var(--tg-shadow), inset 0 1px 0 var(--tg-sheen);
}
.tg-tools {
  top: clamp(126px, 20%, 185px);
  left: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border-radius: 13px;
}
.tg-shell .tg-tool-button {
  width: 35px;
  height: 35px;
  color: var(--tg-secondary);
  border: 1px solid transparent;
  border-radius: 8px;
}
.tg-shell .tg-tool-button:hover, .tg-shell .tg-zoom-btn:hover, .tg-shell .tg-percent:hover {
  color: var(--tg-text);
  background: var(--tg-hover);
}
.tg-shell .tg-tool-button[aria-pressed=true] {
  color: var(--tg-pale);
  background: var(--tg-soft);
  border-color: var(--tg-rim);
}
.tg-tools .tg-divider { width: 22px; height: 1px; margin: 2px 0; background: var(--tg-line); }
.tg-zoom {
  bottom: max(22px, env(safe-area-inset-bottom));
  left: 25px;
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 4px 5px;
  border-radius: 10px;
}
.tg-shell .tg-zoom-btn, .tg-shell .tg-percent { height: 29px; border-radius: 5px; color: var(--tg-secondary); }
.tg-shell .tg-zoom-btn { width: 28px; }
.tg-shell .tg-percent { min-width: 44px; font-size: 12px; font-variant-numeric: tabular-nums; }
.tg-zoom-btn svg { width: 15px; height: 15px; }
.tg-zoom .tg-divider { width: 1px; height: 15px; margin: 0 4px; background: var(--tg-line); }
.tg-shell .tg-zoom-btn:disabled { opacity: .3; cursor: default; }
.tg-zoom:focus-within, .tg-tools:focus-within, .tg-composer:focus-within { z-index: 5; }

.tg-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: visible;
  background: var(--tg-panel);
  border: 1px solid var(--tg-edge);
  border-radius: 13px;
  box-shadow: 0 9px 24px var(--tg-shadow), 0 2px 4px var(--tg-shadow);
}
.tg-card::after {
  position: absolute;
  z-index: 1;
  inset: -2px;
  border: 1.5px solid var(--tg-brand);
  border-radius: 14px;
  pointer-events: none;
  content: "";
  opacity: 0;
}
.tg-card.is-selected::after, .tg-card:has(.tg-card-head:focus-visible)::after, .tg-card:has(.tg-resize:focus-visible)::after { opacity: 1; }
.tg-card.is-dragged { box-shadow: 0 18px 42px var(--tg-darkshadow); }
.tg-card-head {
  display: flex;
  flex: 0 0 48px;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  color: var(--tg-text);
  background: var(--tg-raised);
  border-bottom: 1px solid var(--tg-line);
  border-radius: 12px 12px 0 0;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.tg-card-head:focus-visible { outline-offset: -3px; }
.tg-card-head h2 {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: inherit;
  font: 620 14.5px/1.2 var(--tg-font);
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tg-card-icon {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--tool-color);
  background: var(--tg-hover);
  background: color-mix(in srgb, var(--tool-color) 14%, var(--tg-panel));
  border-radius: 7px;
}
.tg-shell .tg-card-more {
  width: 28px;
  height: 28px;
  flex: none;
  color: var(--tg-muted);
  border-radius: 6px;
}
.tg-card-more:hover { background: var(--tg-hover); }
.tg-card-more svg { width: 16px; }
.tg-frame {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  color: var(--tg-text);
  background: var(--tg-panel);
  border-radius: 0 0 12px 12px;
}
.tg-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.tg-shell .tg-resize {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 3;
  width: 19px;
  height: 19px;
  color: var(--tg-secondary);
  background: var(--tg-hover);
  border-radius: 6px 0 12px;
  opacity: 0;
  cursor: nwse-resize;
  touch-action: none;
}
.tg-card:hover .tg-resize, .tg-card.is-selected .tg-resize, .tg-resize:focus-visible { opacity: 1; }
.tg-hand, .tg-hand .tg-card-head { cursor: grab; }
.tg-hand .tg-frame::after, .tg-gesturing .tg-frame::after { position: absolute; z-index: 4; inset: 0; content: ""; }
.tg-hand .tg-resize { display: none; }
.tg-gesturing, .tg-gesturing .tg-card-head { cursor: grabbing; }

.tg-composer {
  bottom: max(21px, env(safe-area-inset-bottom));
  left: 50%;
  display: flex;
  align-items: center;
  gap: 11px;
  width: min(420px, calc(100% - 450px));
  min-width: 210px;
  margin: 0;
  padding: 7px 8px;
  transform: translateX(-50%);
  background: var(--tg-raised);
  border-color: var(--tg-edge);
  border-radius: 14px;
  box-shadow: 0 7px 26px var(--tg-shadow), inset 0 1px 0 var(--tg-sheen);
}
.tg-composer:focus-within { border-color: var(--tg-focus); }
.tg-composer-mark {
  display: grid;
  flex: none;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--tg-pale);
  background: var(--tg-soft);
  border-radius: 9px;
}
.tg-shell .tg-prompt {
  display: block;
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 32px;
  margin: 0;
  padding: 0;
  color: var(--tg-text);
  background: transparent;
  border: 0;
  border-radius: 0;
  outline: none;
  box-shadow: none;
  font-size: 13px;
}
.tg-prompt::placeholder { color: var(--tg-secondary); opacity: 1; }
.tg-shell .tg-prompt-send {
  width: 32px;
  height: 32px;
  flex: none;
  color: var(--tg-onbrand);
  background: var(--tg-brand);
  border: 1px solid var(--tg-brim);
  border-radius: 9px;
}
.tg-prompt-send:hover { filter: brightness(1.1); }
.tg-shell .tg-minimap {
  position: absolute;
  right: 25px;
  bottom: max(22px, env(safe-area-inset-bottom));
  width: 120px;
  height: 68px;
  overflow: hidden;
  background: var(--tg-panel);
  border: 1px solid var(--tg-line);
  border-radius: 9px;
  cursor: crosshair;
}
.tg-minimap svg { width: 100%; height: 100%; }

.tg-pop {
  position: fixed;
  z-index: 12;
  min-width: 175px;
  max-width: calc(100vw - 16px);
  padding: 5px;
  color: var(--tg-text);
  background: var(--tg-raised);
  border: 1px solid var(--tg-edge);
  border-radius: 10px;
  box-shadow: 0 10px 30px var(--tg-darkshadow);
}
.tg-menu-account { padding: 8px 9px 9px; margin-bottom: 3px; border-bottom: 1px solid var(--tg-line); color: var(--tg-secondary); font-size: 12px; overflow-wrap: anywhere; }
.tg-shell .tg-menu-item { justify-content: flex-start; gap: 9px; width: 100%; min-height: 34px; padding: 5px 9px; border-radius: 5px; font-size: 13px; }
.tg-shell .tg-menu-item:hover, .tg-shell .tg-menu-item:focus-visible { background: var(--tg-hover); }
.tg-menu-item svg { width: 15px; height: 15px; color: var(--tg-secondary); }
.tg-help-pop { width: 264px; padding: 14px; }
.tg-help-pop h2 { margin: 0 0 10px; font-size: 16px; letter-spacing: -.3px; }
.tg-help-pop p { margin: 10px 0 0; padding-top: 9px; border-top: 1px solid var(--tg-line); color: var(--tg-secondary); font-size: 12px; }
.tg-shortcut { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 25px; font-size: 12px; }
.tg-shortcut kbd { padding: 2px 5px; border: 1px solid var(--tg-edge); border-radius: 4px; color: var(--tg-secondary); font: inherit; font-size: 11px; }
.tg-empty {
  position: absolute;
  top: 43%;
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 13px;
  transform: translate(-50%,-50%);
}
.tg-empty-mark { display: grid; width: 48px; height: 48px; place-items: center; color: var(--tg-brand); background: var(--tg-soft); border: 1px solid var(--tg-rim); border-radius: 13px; }
.tg-empty h2 { margin: 0; color: var(--tg-text); font-size: 21px; font-weight: 600; letter-spacing: -.6px; white-space: nowrap; }

@media (max-width: 840px) {
  .tg-top { gap: 16px; padding: 0 20px; }
  .tg-nav { padding-left: 14px; }
  .tg-zoom { left: 15px; }
  .tg-shell .tg-minimap { right: 15px; width: 90px; height: 54px; }
  .tg-composer { width: min(345px, calc(100% - 316px)); }
}
@media (max-width: 660px) {
  .tg-top { flex-basis: 56px; gap: 10px; padding: 0 12px; }
  .tg-brand { gap: 7px; font-size: 19px; letter-spacing: -1px; }
  .tg-logo { width: 29px; height: 29px; border-radius: 8px; }
  .tg-logo svg { width: 21px; height: 21px; }
  .tg-nav { gap: 1px; padding-left: 8px; }
  .tg-shell .tg-nav-link { min-width: 34px; min-height: 40px; padding: 0 6px; }
  .tg-nav-link span { display: none; }
  .tg-nav-link svg { width: 16px; height: 16px; }
  .tg-top-actions { gap: 9px; }
  .tg-shell .tg-create { gap: 4px; min-height: 32px; padding: 0 8px; font-size: 12px; }
  .tg-avatar { width: 29px; height: 29px; font-size: 12px; }
  .tg-profile > svg { display: none; }
  .tg-heading { top: 20px; left: 17px; }
  .tg-heading h1 { font-size: 28px; letter-spacing: -1.3px; }
  .tg-meta { margin-top: 5px; font-size: 11px; }
  .tg-tools { top: auto; right: auto; bottom: calc(68px + env(safe-area-inset-bottom)); left: 12px; flex-direction: row; gap: 1px; padding: 3px; border-radius: 9px; }
  .tg-shell .tg-tool-button { width: 38px; height: 38px; border-radius: 6px; }
  .tg-tool-button svg { width: 15px; height: 15px; }
  .tg-tools .tg-divider, .tg-tools button:nth-of-type(3) { display: none; }
  .tg-composer { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); left: 12px; width: auto; padding: 6px; transform: none; }
  .tg-zoom { right: 12px; bottom: calc(68px + env(safe-area-inset-bottom)); left: auto; }
  .tg-shell .tg-zoom-btn { width: 33px; height: 36px; }
  .tg-shell .tg-percent { min-width: 40px; height: 36px; }
  .tg-shell .tg-minimap { top: 23px; right: 14px; bottom: auto; width: 69px; height: 42px; }
  .tg-shell .tg-resize { width: 23px; height: 23px; opacity: .68; }
  .tg-help-pop { width: 240px; }
}
@media (max-width: 355px) {
  .tg-top { gap: 5px; }
  .tg-nav { padding-left: 4px; }
  .tg-brand { font-size: 17px; }
  .tg-tools { left: 8px; }
  .tg-tools .tg-tool-button { width: 33px; }
}
@media (max-height: 540px) and (min-width: 661px) {
  .tg-top { flex-basis: 48px; }
  .tg-heading { top: 12px; }
  .tg-heading h1 { font-size: 25px; }
  .tg-tools { top: 89px; }
  .tg-zoom, .tg-shell .tg-minimap, .tg-composer { bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .tg-shell *, .tg-shell *::before, .tg-shell *::after { scroll-behavior: auto; animation: none; transition: none; }
}
