:root {
  --bg: #323232;
  --panel: #363535;
  --panel-soft: #54595f;
  --ink: #ffffff;
  --muted: #c3c5c7;
  --line: #54595f;
  --brand: #ffff00;
  --brand-dark: #ffff99;
  --accent: #ffff00;
  --warning: #ffff99;
  --danger: #ff6b5f;
  --success: #ffff00;
  --white: #ffffff;
  --black: #323232;
  --mid: #54595f;
  --soft: #999999;
  --logo-gray: #c3c5c7;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  --radius: 0;
  font-family: Lato, Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
}

body:has(.workspace) {
  overflow: hidden;
}

html,
body,
.app-shell {
  height: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  min-height: 100vh;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  background: linear-gradient(90deg, #f8fbfa 0%, #f8fbfa 38%, #dcebe7 38%, #dcebe7 100%);
}

.login-panel {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.brand-lockup {
  display: grid;
  gap: 6px;
}

.brand-title {
  margin: 0;
  font-size: 32px;
  line-height: 1.05;
}

.brand-subtitle {
  margin: 0;
  color: var(--muted);
}

.auth-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--panel-soft);
  border-radius: 7px;
  padding: 4px;
  margin-bottom: 18px;
}

.auth-tab {
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  min-height: 38px;
}

.auth-tab.is-active {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(24, 33, 31, 0.14);
}

.field-grid {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label,
.label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  min-height: 42px;
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
}

.field textarea {
  min-height: 94px;
  resize: vertical;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  padding: 3px;
}

.language-flag {
  width: 34px;
  height: 30px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid transparent;
  font-size: 18px;
  line-height: 1;
}

.language-flag:hover,
.language-flag:focus,
.language-flag.is-active {
  background: var(--brand);
  border-color: var(--brand);
}

.btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 7px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.btn:hover {
  background: var(--brand-dark);
}

.btn.secondary {
  background: #e7efed;
  color: var(--ink);
}

.btn.secondary:hover {
  background: #dbe8e5;
}

.btn.ghost {
  background: transparent;
  color: var(--brand-dark);
  border: 1px solid var(--line);
}

.btn.danger {
  background: var(--danger);
}

.btn.warning {
  background: var(--warning);
}

.hero-preview {
  padding: 48px;
  display: grid;
  align-content: center;
}

.preview-board {
  width: min(840px, 100%);
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.11) 1px, transparent 1px),
    linear-gradient(rgba(15, 118, 110, 0.11) 1px, transparent 1px),
    #fbfdfc;
  background-size: 42px 42px;
  border: 1px solid rgba(15, 118, 110, 0.25);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.preview-board::before {
  content: "";
  position: absolute;
  inset: 12% 9%;
  border: 4px solid #2e6d67;
  border-left-width: 10px;
  opacity: 0.35;
}

.preview-marker {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  border: 4px solid #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.preview-marker.one { left: 27%; top: 36%; }
.preview-marker.two { left: 58%; top: 52%; background: var(--brand); }
.preview-marker.three { left: 71%; top: 28%; background: #3153a4; }

.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar h1 {
  margin: 0;
  font-size: 20px;
}

.topbar-meta {
  color: var(--muted);
  font-size: 13px;
}

.workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 310px;
  height: calc(100dvh - 76px);
  min-height: 0;
  overflow: hidden;
}

.sidebar,
.inspector {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 16px;
  overflow: auto;
  min-height: 0;
}

.inspector {
  border-right: 0;
  border-left: 1px solid var(--line);
}

.main {
  min-width: 0;
  min-height: 0;
  padding: 16px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
}

.section-title {
  margin: 0 0 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--muted);
}

.project-list,
.plan-list,
.marker-list,
.user-list {
  display: grid;
  gap: 8px;
}

.marker-group,
.project-group,
.pool-choice-list,
.marker-library-summary {
  display: grid;
  gap: 8px;
}

.marker-group-toggle,
.project-group-toggle,
.inspector-section-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #f6faf9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  text-align: left;
}

.marker-group-toggle {
  align-items: flex-start;
}

.marker-group-toggle .item-meta {
  flex: 0 0 auto;
}

.project-group-toggle .project-group-title,
.inspector-section-toggle .section-title {
  margin: 0;
}

.inspector-section {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.inspector-section-body {
  display: grid;
  gap: 10px;
}

.plan-tabs {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: stretch;
  gap: 6px;
}

.plan-tab-list {
  min-width: 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
  padding-bottom: 2px;
}

.plan-tab,
.plan-tab-scroll {
  min-height: 38px;
  border: 1px solid var(--line);
  border-bottom: 2px solid var(--brand);
  background: #fff;
  color: var(--ink);
  font-weight: 750;
}

.plan-tab {
  flex: 0 0 auto;
  max-width: 180px;
  padding: 0 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  scroll-snap-align: center;
}

.plan-tab.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--black);
}

.plan-tab-scroll {
  display: grid;
  place-items: center;
  font-size: 18px;
}

.marker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 8px;
}

.project-group-title {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.empty-mini {
  color: var(--muted);
  font-size: 12px;
  padding: 2px 2px 6px;
}

.marker-group-title {
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-top: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 7px;
  row-gap: 2px;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.marker-category-de,
.marker-category-en {
  min-width: 0;
  overflow-wrap: anywhere;
}

.marker-category-separator {
  color: var(--brand);
  margin-left: 5px;
}

.marker-category-en {
  font-size: 10px;
  text-transform: none;
  color: #b8c0c0;
  letter-spacing: 0;
  line-height: 1.25;
}

.pool-choice-group {
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 10px;
  display: grid;
  gap: 8px;
  justify-items: start;
  text-align: left;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  justify-content: flex-start;
  text-align: left;
}

.check-row input {
  margin-top: 2px;
  accent-color: var(--brand);
}

.project-item,
.plan-item,
.user-item {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 10px;
  display: grid;
  gap: 4px;
}

.project-item:hover,
.plan-item:hover {
  border-color: var(--brand);
}

.project-item.is-active,
.plan-item.is-active {
  border-color: var(--brand);
  background: #eff8f6;
}

.item-title {
  font-weight: 750;
}

.item-meta {
  color: var(--muted);
  font-size: 12px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
}

.toolbar-title {
  display: grid;
  gap: 2px;
}

.toolbar-title strong {
  font-size: 17px;
}

.zoom-control {
  min-height: 40px;
  display: grid;
  grid-template-columns: auto 110px 48px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.zoom-control label,
.zoom-control output {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.zoom-control input {
  width: 110px;
}

.canvas-wrap {
  background: #d8e2df;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: scroll;
  scrollbar-gutter: stable both-edges;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  height: 100%;
  min-height: 0;
  padding: 20px;
  touch-action: pan-x pan-y;
  max-width: 100%;
  max-height: 100%;
}

.plan-stage {
  width: min(100%, 1120px);
  aspect-ratio: 1.414 / 1;
  margin: 0 auto;
  position: relative;
  touch-action: manipulation;
  background: #fff;
  border: 1px solid #b8c7c3;
  box-shadow: 0 10px 28px rgba(24, 33, 31, 0.15);
  overflow: hidden;
}

.plan-stage.viewer {
  cursor: default;
}

.print-export {
  display: grid;
  gap: 22px;
}

.print-page {
  display: grid;
  gap: 10px;
}

.print-page h2 {
  margin: 0;
  font-size: 16px;
}

.plan-source {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  pointer-events: none;
  background: #fff;
}

.sample-plan {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(19, 83, 78, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(19, 83, 78, 0.08) 1px, transparent 1px),
    #fbfdfd;
  background-size: 40px 40px;
}

.sample-hall {
  position: absolute;
  border: 3px solid rgba(15, 118, 110, 0.55);
  background: rgba(15, 118, 110, 0.06);
}

.sample-hall.a { left: 8%; top: 12%; width: 36%; height: 34%; }
.sample-hall.b { left: 50%; top: 12%; width: 39%; height: 34%; }
.sample-hall.c { left: 11%; top: 56%; width: 29%; height: 27%; }
.sample-hall.d { left: 47%; top: 55%; width: 43%; height: 28%; }

.sample-label {
  position: absolute;
  color: rgba(24, 33, 31, 0.55);
  font-weight: 800;
  font-size: 22px;
  padding: 12px;
}

.marker-layer {
  position: absolute;
  inset: 0;
}

.annotation-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.arrow-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.plan-stage.is-arrow-editing .arrow-layer {
  z-index: 9;
}

.plan-arrow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.plan-arrow-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: auto;
}

.plan-arrow line {
  stroke: #c81e1e;
  stroke-width: 0.24;
  stroke-linecap: round;
}

.arrow-hit-line {
  stroke: transparent;
  stroke-width: 3;
  stroke-linecap: round;
  pointer-events: stroke;
  cursor: pointer;
}

.plan-arrow.is-selected line {
  filter: drop-shadow(0 0 3px rgba(200, 30, 30, 0.45));
}

.arrow-handle {
  position: absolute;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  margin-top: -5px;
  border-radius: 999px;
  border: 1px solid #fff;
  background: #c81e1e;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 4;
  pointer-events: auto;
  cursor: pointer;
}

.arrow-delete {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 2px solid #fff;
  background: var(--danger);
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  transform: translate(-50%, -50%);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.26);
  z-index: 5;
  pointer-events: auto;
  cursor: pointer;
}

.placed-marker {
  position: absolute;
  z-index: 4;
  width: 50px;
  height: 28px;
  transform: translate(-50%, -50%) scale(var(--marker-scale, 1));
  transform-origin: center;
  touch-action: manipulation;
  user-select: none;
  padding: 0;
  background: transparent;
}

.placed-marker img {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 5px 6px rgba(0, 0, 0, 0.26));
}

.plan-text-annotation {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  min-width: 34px;
  min-height: 22px;
  border: 1px solid transparent;
  padding: 3px 5px;
  background: transparent;
  font-family: Arial, sans-serif;
  font-weight: 800;
  line-height: 1.16;
  text-align: left;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.82), 0 -1px 2px rgba(0, 0, 0, 0.18);
  white-space: pre-wrap;
  overflow: hidden;
  touch-action: manipulation;
  cursor: default;
}

.plan-text-annotation.can-edit {
  cursor: grab;
}

.plan-text-annotation.is-selected {
  border-color: rgba(49, 83, 164, 0.72);
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 2px rgba(49, 83, 164, 0.14);
}

.annotation-resize-handle {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  background: #3153a4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
  cursor: nwse-resize;
}

.photo-marker {
  position: absolute;
  z-index: 4;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border: 1px solid #000;
  background: #ffff00;
  color: #000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.24);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  touch-action: manipulation;
}

.photo-marker.can-edit {
  cursor: grab;
}

.photo-marker.is-selected {
  outline: 2px solid rgba(0, 0, 0, 0.72);
  outline-offset: 2px;
}

.icon-tool.photo-tool {
  background: #ffff00;
  color: #000;
  border-color: #000;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
}

.icon-tool.photo-tool:hover,
.icon-tool.photo-tool:focus,
.icon-tool.photo-tool.is-active {
  background: #ffff00;
  color: #000;
  border-color: #000;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.22);
}

.photo-marker-icon {
  position: relative;
  width: 15px;
  height: 12px;
  display: block;
  flex: 0 0 auto;
  margin: auto;
  border: 1.5px solid currentColor;
}

.photo-tool-wrap {
  position: relative;
  display: inline-flex;
}

.photo-choice-menu {
  position: absolute;
  left: 50%;
  top: calc(100% + 7px);
  transform: translateX(-50%);
  z-index: 30;
  display: grid;
  gap: 4px;
  min-width: 138px;
  padding: 6px;
  background: #2f2f2f;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.photo-choice-button {
  min-height: 32px;
  padding: 0 9px;
  background: #363535;
  color: var(--white);
  border: 1px solid var(--line);
  border-bottom: 2px solid var(--brand);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.photo-choice-button:hover,
.photo-choice-button:focus {
  border-color: var(--brand);
  color: var(--brand);
}

.mobile-label {
  display: none;
}

.photo-marker-sun {
  position: absolute;
  right: 2px;
  top: 2px;
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.photo-marker-mountain {
  position: absolute;
  left: 2px;
  bottom: 2px;
  width: 9px;
  height: 5px;
  background: currentColor;
  clip-path: polygon(0 100%, 38% 30%, 58% 66%, 76% 44%, 100% 100%);
}

.photo-marker-label {
  position: absolute;
  left: 50%;
  top: calc(100% + 2px);
  transform: translateX(-50%);
  min-width: 24px;
  padding: 1px 3px;
  background: #ffff00;
  color: #000;
  border: 1px solid #000;
  font-size: 8px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
  pointer-events: none;
}

.field-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.color-swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.color-swatch {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}

.color-swatch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.color-swatch span {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(0, 0, 0, 0.34);
}

.color-swatch.is-active {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 0, 0.24);
}

.photo-list {
  display: grid;
  gap: 8px;
}

.photo-list-item,
.photo-preview-button {
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}

.photo-list-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  text-align: left;
}

.photo-list-item.is-active {
  border-color: var(--brand);
  background: #eff8f6;
}

.photo-list-thumb {
  position: relative;
  display: block;
  width: 58px;
  height: 42px;
}

.photo-list-thumb img {
  width: 58px;
  height: 42px;
  object-fit: cover;
  background: #eef2f1;
}

.photo-list-thumb strong,
.photo-preview-button span {
  position: absolute;
  left: 0;
  top: 0;
  padding: 2px 4px;
  background: #ffff00;
  color: #000;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.photo-list-item strong,
.photo-list-item small {
  display: block;
}

.photo-list-item small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.photo-preview-button {
  position: relative;
  padding: 0;
  overflow: hidden;
}

.photo-preview-button img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  background: #eef2f1;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 52px 24px 24px;
  background: rgba(10, 20, 18, 0.84);
}

.photo-lightbox img {
  max-width: min(1100px, 94vw);
  max-height: 86vh;
  object-fit: contain;
  background: #fff;
  box-shadow: var(--shadow);
}

.photo-lightbox-close {
  position: fixed;
  right: 18px;
  top: 18px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: #fff;
  color: #18211f;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.presence-badge {
  position: absolute;
  right: -10px;
  top: -10px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #18211f;
  color: #fff;
  border: 2px solid #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.18);
}

.comment-badge {
  position: absolute;
  left: -9px;
  bottom: -10px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #ffffff;
  color: #3153a4;
  border: 1px solid #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.14);
  cursor: pointer;
  pointer-events: auto;
}

.placed-marker.can-edit {
  cursor: grab;
}

.placed-marker.can-edit:active {
  cursor: grabbing;
}

.placed-marker.is-selected img {
  outline: 3px solid rgba(15, 118, 110, 0.38);
  outline-offset: 2px;
}

.marker-pill {
  position: relative;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: grab;
  min-height: 48px;
}

.marker-pill img {
  width: 46px;
  height: 26px;
  object-fit: contain;
}

.marker-pill:active {
  cursor: grabbing;
}

.marker-pill.is-active {
  border-color: var(--brand);
  background: #eff8f6;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.24);
}

.marker-pill.is-used {
  background: #f1f3f3;
  color: inherit;
  cursor: default;
  opacity: 0.58;
}

.marker-pill.is-used img {
  filter: grayscale(1) saturate(0.35);
  opacity: 0.55;
}

.marker-return {
  position: absolute;
  right: -4px;
  top: -4px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--brand-dark);
  border: 1px solid var(--line);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  opacity: 1;
  z-index: 2;
}

.marker-return:hover {
  border-color: var(--brand);
  background: #eff8f6;
}

.marker-type-remove {
  position: absolute;
  left: -6px;
  top: -6px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--danger);
  color: #fff;
  border: 2px solid #fff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.26);
  cursor: pointer;
}

.marker-pill.is-used .marker-type-remove {
  left: -6px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e7efed;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.status-pill.success {
  background: #e6f4ed;
  color: var(--success);
}

.status-pill.warning {
  background: #fff4dc;
  color: var(--warning);
}

.status-pill.danger {
  background: #fdeceb;
  color: var(--danger);
}

.notice {
  border: 1px solid #b9d7d1;
  background: #eef8f6;
  border-radius: var(--radius);
  padding: 10px;
  color: #174d48;
  font-size: 13px;
}

.notice.warning {
  border-color: #efd197;
  background: #fff7e6;
  color: #704700;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
  min-height: 240px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  padding: 24px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 18, 0.5);
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal {
  position: relative;
  width: min(720px, 100%);
  max-height: min(820px, 92vh);
  overflow: auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 18px;
}

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--brand);
  color: var(--black);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.modal h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.legal-copy {
  display: grid;
  gap: 10px;
  font-size: 14px;
  line-height: 1.55;
}

.legal-copy h3 {
  margin: 10px 0 0;
  font-size: 16px;
}

.legal-copy p {
  margin: 0;
}

.legal-copy a,
.legal-links a,
.link-button {
  color: var(--brand-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.4;
}

.check-row input {
  margin-top: 2px;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.legal-footer {
  position: fixed;
  left: 50%;
  bottom: 1px;
  z-index: 20;
  display: inline-flex;
  gap: 12px;
  align-items: center;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  opacity: 0.82;
  white-space: nowrap;
  background: rgba(50, 50, 50, 0.72);
  padding: 2px 8px;
}

.modal input[type="checkbox"],
.modal input[type="radio"],
.check-row input[type="checkbox"],
.check-row input[type="radio"] {
  accent-color: var(--brand);
}

.link-button {
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.auth-actions {
  margin-top: 12px;
}

.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.upload-plan-list {
  display: grid;
  gap: 12px;
}

.upload-plan-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  padding: 12px;
  background: #2f2f2f;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 14px 0;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: #14201e;
  color: #fff;
  border-radius: 999px;
  min-height: 42px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow);
  z-index: 80;
}

.cookie-banner {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: #2f2f2f;
  color: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.cookie-banner-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.cookie-banner-copy strong {
  color: var(--brand);
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.cookie-banner-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.consent-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.consent-choice {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  background: #363535;
  color: var(--white);
}

.consent-choice input {
  margin-top: 3px;
}

.consent-choice strong,
.consent-choice small {
  display: block;
}

.consent-choice strong {
  color: var(--white);
}

.consent-choice small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.consent-choice.is-required {
  border-color: rgba(255, 255, 0, 0.55);
}

.comment-overlay {
  position: fixed;
  left: 50%;
  bottom: 72px;
  transform: translateX(-50%);
  z-index: 70;
  width: min(420px, calc(100vw - 24px));
}

.comment-overlay-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.comment-overlay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.comment-overlay-body {
  padding: 12px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.comment-overlay-close {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #f3f6f5;
  border: 1px solid var(--line);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
}

.marker-comment-tooltip {
  position: absolute;
  z-index: 12;
  width: min(320px, 52%);
  min-width: 210px;
  max-width: calc(100% - 24px);
  transform: translate(-50%, calc(-100% - 22px));
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.marker-comment-tooltip.below {
  transform: translate(-50%, 22px);
}

.hidden {
  display: none !important;
}

/* Atelier Fetzer CI layer */
body {
  background:
    linear-gradient(172deg, transparent 0 78%, var(--brand) 78.08% 79.1%, var(--mid) 79.2% 100%),
    var(--bg);
}

.brand-logo {
  width: min(360px, 82vw);
  max-height: 82px;
  height: auto;
  display: block;
  object-fit: contain;
}

.brand-lockup {
  gap: 14px;
}

.brand-title,
.topbar h1,
.section-title,
.project-group-title,
.marker-group-title,
.toolbar-title strong,
.modal h2,
.print-page h2 {
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 4px;
}

.brand-title {
  color: var(--white);
  font-size: 42px;
  line-height: 1.1;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 15px;
}

.login-screen {
  background:
    linear-gradient(172deg, transparent 0 74%, var(--brand) 74.15% 75.25%, var(--mid) 75.35% 100%),
    var(--bg);
}

.login-panel {
  background: var(--black);
}

.auth-box,
.toolbar,
.sidebar,
.inspector,
.modal,
.comment-overlay-card {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.auth-box {
  border-top: 4px solid var(--brand);
}

.auth-tabs {
  background: #292929;
  border: 1px solid var(--line);
  border-radius: 0;
}

.auth-tab {
  border-radius: 0;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
}

.auth-tab.is-active {
  background: var(--brand);
  color: var(--black);
  box-shadow: none;
}

.field label,
.label,
.zoom-control label,
.zoom-control output {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  background: #323232;
  border-width: 0 0 1px;
  border-color: var(--line);
  border-radius: 0;
  color: var(--white);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  background: #363535;
  border-color: var(--brand);
}

.btn,
.icon-tool {
  min-height: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  background: var(--brand);
  color: var(--black);
  border: 0;
  border-bottom: 2px solid var(--brand);
  font-family: Lato, Arial, Helvetica, sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.icon-tool {
  min-width: 40px;
  padding: 0 10px;
  line-height: 1;
}

.btn:hover,
.btn:focus,
.icon-tool:hover,
.icon-tool:focus,
.icon-tool.is-active {
  background: var(--mid);
  color: #000000;
  border-bottom-color: var(--brand);
}

.icon-tool.photo-tool,
.icon-tool.photo-tool:hover,
.icon-tool.photo-tool:focus,
.icon-tool.photo-tool.is-active {
  background: #ffff00;
  color: #000000;
  border: 1px solid #000000;
  border-bottom: 2px solid #000000;
}

.icon-tool.photo-tool {
  padding: 0;
  width: 40px;
}

.btn.secondary,
.btn.ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--line);
  border-bottom: 2px solid var(--brand);
}

.btn.secondary:hover,
.btn.ghost:hover,
.btn.secondary:focus,
.btn.ghost:focus {
  background: var(--brand);
  color: var(--black);
  border-color: var(--brand);
}

.btn.danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  border-bottom: 2px solid var(--danger);
}

.btn.warning {
  background: var(--warning);
  color: var(--black);
}

.btn.compact {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

.marker-manage-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.topbar {
  min-height: 76px;
  background: var(--black);
  border-bottom: 1px solid var(--line);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  flex: 1 1 auto;
}

.topbar-brand > div {
  margin-left: auto;
  padding-right: 24px;
  text-align: right;
}

.mobile-topbar-controls,
.mobile-menu-panel {
  display: none;
}

.topbar-actions {
  margin-left: 24px;
}

.burger-button {
  width: 38px;
  height: 34px;
  display: grid;
  place-content: center;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--line);
  border-bottom: 2px solid var(--brand);
  color: var(--white);
}

.burger-button span {
  width: 18px;
  height: 2px;
  background: currentColor;
  display: block;
}

.burger-button.is-active {
  background: var(--brand);
  color: var(--black);
}

.topbar-logo {
  width: 154px;
  max-height: 38px;
  height: auto;
  display: block;
  object-fit: contain;
}

.topbar h1 {
  color: var(--white);
  font-size: 22px;
  line-height: 1.05;
}

.topbar-meta,
.item-meta,
.empty-mini {
  color: var(--muted);
}

.workspace {
  min-height: calc(100vh - 76px);
}

.sidebar,
.inspector {
  background: #2f2f2f;
}

.main {
  background: #3a3a3a;
}

.section-title,
.project-group-title,
.marker-group-title {
  color: var(--brand);
}

.marker-group-title {
  color: var(--white);
}

.marker-group-title .marker-category-en {
  color: #b8c0c0;
}

.section-title {
  font-size: 15px;
}

.project-item,
.plan-item,
.user-item,
.pool-choice-group,
.marker-group-toggle,
.project-group-toggle,
.inspector-section-toggle,
.marker-pill,
.zoom-control,
.plan-tab,
.plan-tab-scroll {
  background: #363535;
  color: var(--white);
  border-color: var(--line);
  border-radius: 0;
}

.project-item:hover,
.plan-item:hover,
.marker-group-toggle:hover,
.project-group-toggle:hover,
.inspector-section-toggle:hover,
.plan-tab:hover,
.plan-tab-scroll:hover,
.marker-pill:hover {
  border-color: var(--brand);
}

.project-item.is-active,
.plan-item.is-active,
.plan-tab.is-active,
.marker-pill.is-active {
  background: #454545;
  border-color: var(--brand);
  box-shadow: inset 4px 0 0 var(--brand);
}

.plan-tab.is-active {
  color: var(--brand);
}

.item-title {
  color: var(--white);
  font-weight: 600;
}

.status-pill {
  width: fit-content;
  border-radius: 0;
  background: #242424;
  color: var(--muted);
  border: 1px solid var(--line);
  font-weight: 600;
}

.status-pill.success,
.status-pill.warning {
  background: var(--brand);
  color: var(--black);
}

.canvas-wrap {
  background: #54595f;
  border-color: #686d72;
  border-radius: 0;
}

.plan-stage {
  border-color: var(--logo-gray);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.38);
}

.marker-comment-tooltip {
  background: var(--panel);
  border-color: var(--line);
  color: var(--white);
}

.sample-plan {
  background:
    linear-gradient(90deg, rgba(84, 89, 95, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(84, 89, 95, 0.12) 1px, transparent 1px),
    #ffffff;
}

.blank-plan {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(84, 89, 95, 0.10) 1px, transparent 1px),
    linear-gradient(rgba(84, 89, 95, 0.10) 1px, transparent 1px),
    #ffffff;
  background-size: 44px 44px;
}

.sample-hall {
  border-color: rgba(50, 50, 50, 0.55);
  background: rgba(255, 255, 0, 0.09);
}

.sample-label {
  color: rgba(50, 50, 50, 0.6);
  font-family: Oswald, "Arial Narrow", Arial, sans-serif;
}

.placed-marker.is-selected img {
  outline-color: rgba(255, 255, 0, 0.68);
}

.marker-pill.is-used {
  background: #2a2a2a;
  color: rgba(255, 255, 255, 0.58);
  border-color: #4a4f53;
  cursor: default;
  opacity: 0.62;
}

.marker-pill.is-used img {
  filter: grayscale(1) saturate(0.25);
  opacity: 0.48;
}

.marker-return,
.comment-overlay-close {
  border-radius: 0;
  background: var(--brand);
  color: var(--black);
  border-color: var(--brand);
  opacity: 1;
}

.marker-return:hover,
.comment-overlay-close:hover {
  background: var(--mid);
  color: #000000;
}

.comment-badge,
.presence-badge {
  border-radius: 0;
}

.comment-badge {
  background: var(--brand);
  color: var(--black);
  border-color: var(--brand);
}

.notice {
  border-color: var(--line);
  background: #2c2c2c;
  color: var(--muted);
  border-radius: 0;
  border-left: 4px solid var(--brand);
}

.notice.warning {
  border-color: var(--brand);
  background: #3d3d25;
  color: var(--white);
}

.empty-state {
  border-color: var(--line);
  border-radius: 0;
  background: #363535;
  color: var(--muted);
}

.modal-backdrop {
  background: rgba(0, 0, 0, 0.7);
}

.legal-copy,
.legal-copy p,
.legal-copy h3,
.legal-links {
  color: var(--white);
}

.legal-copy a,
.legal-links a,
.link-button {
  color: var(--brand);
}

.divider,
.comment-overlay-head {
  background: var(--line);
  border-color: var(--line);
}

.comment-overlay-body {
  color: var(--white);
}

.toast {
  background: var(--brand);
  color: var(--black);
  border-radius: 0;
  font-weight: 600;
}

.hero-preview {
  align-content: stretch;
}

.preview-board {
  align-self: center;
  border-radius: 0;
  border-color: var(--line);
  background:
    linear-gradient(90deg, rgba(255, 255, 0, 0.16) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 0, 0.16) 1px, transparent 1px),
    #323232;
}

.preview-board::before {
  border-color: var(--logo-gray);
}

.preview-marker {
  border-radius: 0;
  background: var(--brand);
  border-color: var(--black);
}

.preview-marker.two {
  background: var(--logo-gray);
}

.preview-marker.three {
  background: var(--white);
}

input[type="range"] {
  accent-color: var(--brand);
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--brand);
}

.plan-mode-field .check-row,
.plan-pool-field .check-row {
  width: 100%;
  justify-content: flex-start;
}

.plan-mode-field .check-row {
  gap: 7px;
}

.plan-pool-field .pool-choice-group {
  padding: 12px;
  gap: 9px;
}

.plan-pool-field .pool-choice-group strong {
  margin-bottom: 2px;
}

.plan-pool-field .check-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  line-height: 1.25;
}

.plan-pool-field input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #363535;
}

.plan-pool-field input[type="checkbox"]:checked {
  border-color: var(--brand);
  background-color: var(--brand);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 18 18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.2 9.2 7.1 13 15 4.4' fill='none' stroke='%23323232' stroke-width='2.5' stroke-linecap='square'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
}

.plan-mode-field input[type="radio"] {
  appearance: none;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #363535;
}

.plan-mode-field input[type="radio"]:checked {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: inset 0 0 0 4px #363535;
}

@media (max-width: 1100px) {
  html,
  body,
  .app-shell {
    height: 100%;
    overflow: hidden;
  }

  .workspace {
    grid-template-columns: 240px minmax(0, 1fr);
    height: calc(100dvh - 76px);
    min-height: 0;
    overflow: hidden;
  }

  .sidebar,
  .inspector {
    max-height: 100%;
    overflow: auto;
  }

  .inspector {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid var(--line);
    max-height: 28dvh;
  }

  .main {
    min-height: 0;
    overflow: hidden;
  }

  .canvas-wrap {
    height: 100%;
    min-height: 0;
    overflow: scroll;
    overscroll-behavior: contain;
  }
}

@media (max-width: 760px) {
  .login-screen {
    grid-template-columns: 1fr;
    background: #f8fbfa;
  }

  .hero-preview {
    display: none;
  }

  .login-panel {
    padding: 22px;
  }

  .workspace {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    height: calc(100dvh - 62px);
    min-height: 0;
    overflow: hidden;
  }

  .inspector {
    border: 0;
    border-bottom: 1px solid var(--line);
    max-height: 18dvh;
    overflow: auto;
  }

  .sidebar {
    display: none;
  }

  .topbar {
    min-height: 62px;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    flex-direction: row;
  }

  .topbar-logo {
    width: 82px;
    max-height: 22px;
  }

  .topbar-brand {
    gap: 8px;
    flex: 1 1 auto;
  }

  .topbar-brand > div {
    margin-left: 0;
    padding-right: 0;
    text-align: left;
  }

  .topbar h1 {
    font-size: 15px;
    line-height: 1;
  }

  .topbar-meta {
    font-size: 10px;
    line-height: 1.18;
    max-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .desktop-actions {
    display: none;
  }

  .mobile-topbar-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
  }

  .mobile-topbar-controls .language-switcher {
    padding: 2px;
  }

  .mobile-topbar-controls .language-flag {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }

  .mobile-menu-panel {
    position: fixed;
    top: 62px;
    left: 0;
    right: 0;
    z-index: 19;
    display: block;
    max-height: calc(100dvh - 62px);
    overflow: auto;
    padding: 12px;
    background: #2f2f2f;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.3);
  }

  .mobile-menu-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .mobile-menu-panel .project-list {
    gap: 7px;
  }

  .zoom-control {
    display: none;
  }

  .main {
    padding: 10px;
    min-height: 0;
    overflow: hidden;
  }

  .toolbar {
    gap: 5px;
    padding: 6px;
  }

  .toolbar-title {
    width: 100%;
    gap: 1px;
  }

  .toolbar-title strong {
    font-size: 13px;
    line-height: 1.1;
  }

  .toolbar-title .item-meta {
    font-size: 10px;
    line-height: 1.15;
  }

  .toolbar .button-row {
    width: 100%;
    gap: 4px;
    flex-wrap: wrap;
  }

  .toolbar .icon-tool {
    min-width: 31px;
    width: 31px;
    height: 31px;
    min-height: 31px;
    padding: 0;
    font-size: 13px;
  }

  .toolbar .icon-tool.photo-tool {
    width: 31px;
  }

  .toolbar .btn {
    min-height: 31px;
    height: 31px;
    padding: 0 7px;
    font-size: 10px;
    line-height: 1;
  }

  .toolbar .mobile-main-action {
    flex: 0 0 auto;
    min-width: 0;
  }

  .toolbar .desktop-label {
    display: none;
  }

  .toolbar .mobile-label {
    display: inline;
  }

  .toolbar .mobile-hidden,
  .toolbar .mobile-original-pdf {
    display: none;
  }

  .canvas-wrap {
    padding: 6px;
    height: 100%;
    min-height: 0;
    overflow: auto;
    touch-action: pan-x pan-y;
  }

  .plan-stage {
    min-width: 0;
    touch-action: pan-x pan-y;
  }

  .photo-tool-wrap {
    flex: 0 0 auto;
  }

  .photo-choice-menu {
    left: auto;
    right: 0;
    transform: none;
    min-width: 126px;
  }

  .placed-marker.can-edit {
    touch-action: none;
  }

  .comment-overlay {
    bottom: 18px;
    width: calc(100vw - 20px);
  }

  .marker-comment-tooltip {
    width: min(280px, 76%);
    min-width: 190px;
  }

  .split-grid {
    grid-template-columns: 1fr;
  }

  .upload-plan-row {
    grid-template-columns: 1fr;
  }

  .cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    grid-template-columns: 1fr;
  }

  .cookie-banner-actions {
    justify-content: stretch;
  }

  .cookie-banner-actions .btn,
  .cookie-banner-actions .link-button {
    width: 100%;
    justify-content: center;
  }
}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .sidebar,
  .inspector,
  .toolbar,
  .modal-backdrop,
  .photo-lightbox,
  .toast,
  .cookie-banner {
    display: none !important;
  }

  .workspace,
  .main {
    display: block;
    padding: 0;
  }

  .canvas-wrap {
    border: 0;
    overflow: visible;
    padding: 0;
    background: #fff;
  }

  .plan-stage {
    width: 100%;
    page-break-after: always;
    box-shadow: none;
  }

  .print-page {
    break-after: page;
  }

  .print-page h2 {
    font-size: 13px;
    margin: 0 0 8px;
  }
}
