:root {
  --ink: #17213b;
  --ink-soft: #5f687d;
  --navy: #192541;
  --cream: #f5f3ee;
  --paper: #fffefa;
  --line: #d9dce3;
  --line-strong: #bbc1ce;
  --coral: #ee745b;
  --coral-soft: #fff0eb;
  --blue: #4568e8;
  --blue-soft: #eaf0ff;
  --green: #2d9b75;
  --green-soft: #e7f6f0;
  --gold: #c48b2f;
  --gold-soft: #fff5df;
  --shadow-sm: 0 2px 8px rgba(24, 33, 58, 0.08);
  --shadow-lg: 0 20px 46px rgba(24, 33, 58, 0.16), 0 2px 7px rgba(24, 33, 58, 0.08);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

button {
  font: inherit;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid rgba(69, 104, 232, 0.35);
  outline-offset: 2px;
}

.app-shell {
  width: 100%;
  height: 100%;
  background: var(--cream);
}

.topbar {
  position: relative;
  z-index: 20;
  height: 66px;
  display: grid;
  grid-template-columns: 272px 1fr 272px;
  align-items: center;
  padding: 0 18px 0 20px;
  background: rgba(255, 254, 250, 0.96);
  border-bottom: 1px solid rgba(187, 193, 206, 0.58);
  backdrop-filter: blur(18px);
}

.brand,
.topbar-actions,
.project-identity,
.project-title,
.share-button,
.save-status {
  display: flex;
  align-items: center;
}

.brand {
  gap: 11px;
}

.brand-mark {
  position: relative;
  width: 31px;
  height: 31px;
}

.brand-mark span {
  position: absolute;
  width: 17px;
  height: 17px;
  border: 2px solid var(--navy);
  border-radius: 4px;
  background: var(--paper);
}

.brand-mark span:nth-child(1) {
  left: 0;
  top: 0;
}

.brand-mark span:nth-child(2) {
  right: 0;
  top: 7px;
  background: var(--coral);
  border-color: var(--coral);
}

.brand-mark span:nth-child(3) {
  left: 4px;
  bottom: 0;
  width: 21px;
  height: 10px;
  background: var(--navy);
}

.brand-name {
  font-family: "Manrope", sans-serif;
  font-size: 17px;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.brand-name strong {
  color: var(--coral);
}

.project-identity {
  justify-content: center;
  gap: 10px;
  min-width: 0;
}

.project-label {
  color: var(--ink-soft);
  font-size: 12px;
}

.project-title {
  border: 0;
  padding: 6px 8px;
  gap: 5px;
  border-radius: 7px;
  color: var(--ink);
  background: transparent;
  font-weight: 600;
  cursor: pointer;
}

.project-title:hover {
  background: #f1f1ee;
}

.project-title svg,
.share-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.save-status {
  gap: 5px;
  color: var(--ink-soft);
  font-size: 11px;
}

.save-status > span {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--green);
}

.topbar-actions {
  justify-content: flex-end;
  gap: 9px;
}

.icon-button,
.tool-button,
.nav-arrow,
.zoom-controls button {
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.icon-button {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.icon-button:hover {
  background: #f0f0ec;
}

.icon-button svg,
.tool-button svg,
.nav-arrow svg,
.fit-button svg,
.add-sheet-button svg,
.orientation-button svg,
.canvas-hint svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--coral);
  box-shadow: 0 0 0 2px var(--paper);
}

.share-button {
  height: 36px;
  padding: 0 14px;
  gap: 7px;
  color: #fff;
  background: var(--navy);
  border: 0;
  border-radius: 9px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(25, 37, 65, 0.18);
}

.share-button:hover {
  background: #243354;
}

.avatar {
  width: 35px;
  height: 35px;
  padding: 0;
  border: 2px solid var(--paper);
  border-radius: 99px;
  color: #fff;
  background: #a66048;
  box-shadow: 0 0 0 1px #d9c7bf;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.workspace {
  height: calc(100% - 66px);
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  position: relative;
  z-index: 12;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 24px 15px 16px;
  background: rgba(255, 254, 250, 0.91);
  border-right: 1px solid rgba(187, 193, 206, 0.64);
  backdrop-filter: blur(16px);
}

.sidebar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0 9px 19px;
}

.eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.05px;
  text-transform: uppercase;
}

.sidebar h1 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 17px;
  letter-spacing: -0.35px;
}

.sidebar-close,
.mobile-only {
  display: none;
}

.sheet-tree {
  flex: 1;
  overflow-y: auto;
  padding: 2px 0;
  scrollbar-width: thin;
}

.tree-item {
  position: relative;
}

.tree-item::before {
  content: "";
  position: absolute;
  left: 19px;
  top: -8px;
  bottom: 50%;
  width: 1px;
  background: #d8dbe2;
}

.tree-item:first-child::before {
  display: none;
}

.tree-button {
  position: relative;
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

.tree-button:hover {
  background: #f1f1ed;
}

.tree-button.is-active {
  background: var(--coral-soft);
  color: #a84231;
}

.tree-number {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 9px;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(24, 33, 58, 0.05);
}

.tree-button.is-active .tree-number {
  color: #fff;
  background: var(--coral);
  border-color: var(--coral);
}

.tree-copy {
  min-width: 0;
}

.tree-copy strong,
.tree-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-copy strong {
  font-size: 12px;
  font-weight: 600;
}

.tree-copy span {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 10px;
}

.tree-button.is-active .tree-copy span {
  color: #b96a5c;
}

.tree-branch {
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  opacity: 0.55;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 12px 5px 0;
  padding: 14px 10px 2px;
  border-top: 1px solid var(--line);
}

.team-stack {
  display: flex;
  padding-left: 6px;
}

.team-avatar {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  margin-left: -6px;
  border: 2px solid var(--paper);
  border-radius: 99px;
  color: #fff;
  font-size: 7px;
  font-weight: 700;
}

.team-avatar.peach { background: #d7846a; }
.team-avatar.blue { background: #637fc0; }
.team-avatar.green { background: #5d9a82; }
.team-avatar.more { background: var(--navy); }

.sidebar-footer strong,
.sidebar-footer span {
  display: block;
}

.sidebar-footer strong {
  font-size: 10px;
  font-weight: 600;
}

.sidebar-footer > div:last-child span {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 9px;
}

.canvas-area {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background-color: #efeee9;
  background-image: radial-gradient(circle, rgba(83, 91, 109, 0.19) 1px, transparent 1.2px);
  background-size: 23px 23px;
}

.canvas-area::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 40%, rgba(71, 76, 90, 0.045) 100%);
}

.canvas-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}

.canvas-viewport.is-dragging {
  cursor: grabbing;
}

.canvas-stage {
  position: absolute;
  left: 0;
  top: 0;
  width: 2350px;
  height: 1340px;
  transform-origin: 0 0;
  will-change: transform;
}

.canvas-stage.is-animated {
  transition: transform 440ms cubic-bezier(0.22, 1, 0.36, 1);
}

.connections {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.connection-path {
  fill: none;
  stroke: #aeb4c0;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.connection-dot {
  fill: #aeb4c0;
  stroke: #efeee9;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.sheet {
  position: absolute;
  width: 420px;
  height: 270px;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(180, 184, 195, 0.88);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transform-origin: center;
  transition: box-shadow 180ms ease, border-color 180ms ease, transform 180ms ease;
  user-select: none;
}

.sheet:hover {
  border-color: #9ea5b3;
  box-shadow: 0 9px 28px rgba(24, 33, 58, 0.13);
  transform: translateY(-2px);
}

.sheet.is-active {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(238, 116, 91, 0.2), var(--shadow-lg);
}

.sheet::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--sheet-accent, var(--coral));
}

.sheet-header {
  height: 67px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px 9px 20px;
  border-bottom: 1px solid #ecebe6;
}

.sheet-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--sheet-accent, var(--coral));
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.85px;
  text-transform: uppercase;
}

.sheet-header h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 17px;
  line-height: 1.15;
  letter-spacing: -0.35px;
}

.sheet-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  color: var(--ink-soft);
  font-size: 8px;
}

.sheet-meta-avatar {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  color: #fff;
  background: var(--meta-color, #637fc0);
  border-radius: 50%;
  font-size: 7px;
  font-weight: 700;
}

.sheet-body {
  height: calc(100% - 67px);
  padding: 15px 19px 16px 20px;
}

.summary-layout {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 18px;
  height: 100%;
}

.summary-intro p {
  margin: 0 0 15px;
  color: #4f596e;
  font-size: 10px;
  line-height: 1.5;
}

.mini-label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.65px;
  text-transform: uppercase;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag {
  padding: 4px 7px;
  border-radius: 99px;
  color: #46516a;
  background: #f0f1f4;
  font-size: 7px;
  font-weight: 600;
}

.metric-stack {
  display: grid;
  align-content: start;
  gap: 7px;
}

.metric-box {
  padding: 9px 10px;
  background: #f5f3ef;
  border-radius: 6px;
}

.metric-box strong,
.metric-box span {
  display: block;
}

.metric-box strong {
  font-family: "Manrope", sans-serif;
  font-size: 15px;
}

.metric-box span {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 7px;
}

.chart-layout {
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 18px;
  height: 100%;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 126px;
  padding: 8px 2px 20px;
  border-bottom: 1px solid #dfe1e6;
  background-image: linear-gradient(to bottom, transparent 32%, #eceef2 33%, transparent 34%, transparent 65%, #eceef2 66%, transparent 67%);
}

.bar-group {
  position: relative;
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.bar {
  width: 28px;
  height: var(--height);
  min-height: 8px;
  border-radius: 4px 4px 1px 1px;
  background: var(--bar-color, var(--blue));
}

.bar-value {
  position: absolute;
  bottom: calc(var(--height) + 5px);
  font-size: 7px;
  font-weight: 700;
}

.bar-name {
  position: absolute;
  top: calc(100% + 5px);
  color: var(--ink-soft);
  font-size: 7px;
  white-space: nowrap;
}

.chart-note {
  align-self: start;
  padding: 11px;
  background: var(--blue-soft);
  border-radius: 6px;
  font-size: 8px;
  line-height: 1.45;
}

.chart-note strong {
  display: block;
  margin-bottom: 3px;
  font-size: 10px;
}

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-top: 22px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 8px;
  height: 2px;
  background: #d9dde5;
}

.milestone {
  position: relative;
  padding-top: 22px;
}

.milestone-dot {
  position: absolute;
  z-index: 1;
  left: 2px;
  top: 2px;
  width: 13px;
  height: 13px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--milestone-color, var(--blue));
  box-shadow: 0 0 0 1px var(--milestone-color, var(--blue));
}

.milestone time,
.milestone strong,
.milestone span {
  display: block;
}

.milestone time {
  color: var(--ink-soft);
  font-size: 7px;
}

.milestone strong {
  margin-top: 4px;
  font-size: 9px;
}

.milestone span {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 7px;
  line-height: 1.35;
}

.budget-layout {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 24px;
  height: 100%;
}

.donut-wrap {
  position: relative;
  width: 112px;
  height: 112px;
}

.donut {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(var(--coral) 0 38%, var(--blue) 38% 68%, var(--green) 68% 87%, #e2b459 87% 100%);
}

.donut::after {
  content: "";
  position: absolute;
  inset: 19px;
  border-radius: 50%;
  background: var(--paper);
}

.donut-total {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.donut-total span {
  margin-top: 1px;
  color: var(--ink-soft);
  font-family: "DM Sans", sans-serif;
  font-size: 7px;
  font-weight: 400;
}

.legend-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}

.legend-item {
  display: grid;
  grid-template-columns: 7px 1fr auto;
  align-items: center;
  gap: 5px;
  font-size: 8px;
}

.legend-item i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--legend-color);
}

.legend-item strong {
  font-size: 8px;
}

.research-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8px;
}

.research-table th {
  padding: 0 7px 7px;
  color: var(--ink-soft);
  text-align: left;
  font-size: 7px;
  font-weight: 600;
}

.research-table td {
  padding: 8px 7px;
  border-top: 1px solid #e8e8e4;
}

.research-table td:first-child {
  font-weight: 600;
}

.signal {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.signal::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal-color, var(--green));
}

.image-layout {
  position: relative;
  height: 100%;
  margin: -15px -19px -16px -20px;
  overflow: hidden;
  background: #253253;
}

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

.image-caption {
  position: absolute;
  left: 16px;
  bottom: 14px;
  max-width: 210px;
  padding: 9px 11px;
  color: var(--ink);
  background: rgba(255, 254, 250, 0.92);
  border-radius: 5px;
  box-shadow: 0 5px 18px rgba(19, 29, 52, 0.18);
  backdrop-filter: blur(8px);
}

.image-caption strong,
.image-caption span {
  display: block;
}

.image-caption strong {
  font-size: 10px;
}

.image-caption span {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 7px;
}

.quote-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  height: 100%;
}

.quote-layout blockquote {
  position: relative;
  margin: 0;
  padding: 10px 0 0 23px;
  color: #354057;
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: -0.2px;
}

.quote-layout blockquote::before {
  content: "“";
  position: absolute;
  left: 0;
  top: -7px;
  color: var(--coral);
  font-size: 38px;
}

.quote-layout cite {
  display: block;
  margin-top: 9px;
  color: var(--ink-soft);
  font-family: "DM Sans", sans-serif;
  font-size: 7px;
  font-style: normal;
}

.principles {
  display: grid;
  gap: 7px;
  align-content: center;
}

.principle {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border-radius: 5px;
  background: #f3f2ee;
  font-size: 8px;
  font-weight: 600;
}

.principle::before {
  content: "✓";
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-size: 8px;
}

.generic-layout {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 20px;
  height: 100%;
}

.generic-lines span {
  display: block;
  height: 7px;
  margin-bottom: 9px;
  border-radius: 99px;
  background: #e9e9e5;
}

.generic-lines span:nth-child(2) { width: 82%; }
.generic-lines span:nth-child(3) { width: 66%; }

.generic-tile {
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 28px;
}

.canvas-toolbar {
  position: absolute;
  z-index: 10;
  left: 50%;
  top: 16px;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 43px;
  padding: 5px;
  background: rgba(255, 254, 250, 0.94);
  border: 1px solid rgba(187, 193, 206, 0.75);
  border-radius: 11px;
  box-shadow: 0 8px 24px rgba(24, 33, 58, 0.12);
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}

.tool-button {
  width: 32px;
  height: 32px;
  border-radius: 7px;
}

.tool-button:hover,
.tool-button.is-active {
  color: var(--blue);
  background: var(--blue-soft);
}

.toolbar-separator {
  width: 1px;
  height: 22px;
  margin: 0 3px;
  background: var(--line);
}

.add-sheet-button,
.orientation-button {
  height: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.add-sheet-button {
  color: #fff;
  background: var(--coral);
}

.add-sheet-button:hover {
  background: #dc644f;
}

.orientation-button:hover {
  background: #f0f0ec;
}

.orientation-button svg {
  width: 19px;
}

.canvas-hint {
  position: absolute;
  z-index: 9;
  left: 50%;
  bottom: 91px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 9px 8px 11px;
  color: #667087;
  background: rgba(255, 254, 250, 0.9);
  border: 1px solid rgba(187, 193, 206, 0.64);
  border-radius: 99px;
  box-shadow: var(--shadow-sm);
  font-size: 9px;
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.canvas-hint.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 5px);
}

.canvas-hint svg {
  width: 14px;
  height: 14px;
}

.canvas-hint button {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #7b8496;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.canvas-hint button:hover {
  color: var(--ink);
  background: #e8e8e4;
}

.bottom-controls {
  position: absolute;
  z-index: 10;
  left: 18px;
  right: 18px;
  bottom: 17px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  pointer-events: none;
}

.sequence-nav,
.zoom-controls {
  display: flex;
  align-items: center;
  pointer-events: auto;
  background: rgba(255, 254, 250, 0.94);
  border: 1px solid rgba(187, 193, 206, 0.75);
  border-radius: 11px;
  box-shadow: 0 8px 24px rgba(24, 33, 58, 0.11);
  backdrop-filter: blur(14px);
}

.sequence-nav {
  padding: 5px;
}

.nav-arrow {
  width: 34px;
  height: 38px;
  border-radius: 7px;
}

.nav-arrow:hover {
  background: #f0f0ec;
}

.current-sheet {
  width: 172px;
  height: 38px;
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  color: var(--ink);
  text-align: left;
  background: #f3f2ee;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}

.current-sheet span {
  color: var(--coral);
  font-size: 8px;
  font-weight: 700;
}

.current-sheet strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 600;
}

.zoom-controls {
  height: 45px;
  padding: 5px;
}

.zoom-controls button {
  min-width: 31px;
  height: 33px;
  border-radius: 7px;
  font-size: 16px;
}

.zoom-controls button:hover {
  background: #f0f0ec;
}

.zoom-controls > span:not(.toolbar-separator) {
  width: 43px;
  color: var(--ink-soft);
  text-align: center;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.zoom-controls .fit-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  font-size: 10px;
}

.fit-button svg {
  width: 15px;
  height: 15px;
}

.minimap {
  position: absolute;
  z-index: 8;
  right: 19px;
  bottom: 76px;
  width: 148px;
  height: 84px;
  overflow: hidden;
  background: rgba(255, 254, 250, 0.84);
  border: 1px solid rgba(187, 193, 206, 0.7);
  border-radius: 9px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.minimap-sheet {
  position: absolute;
  width: 16px;
  height: 10px;
  border-radius: 1px;
  background: #b8bdc7;
}

.minimap-sheet.is-active {
  background: var(--coral);
  box-shadow: 0 0 0 2px rgba(238, 116, 91, 0.2);
}

.toast {
  position: absolute;
  z-index: 30;
  left: 50%;
  top: 76px;
  padding: 9px 13px;
  color: #fff;
  background: var(--navy);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(24, 33, 58, 0.22);
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 920px) {
  .topbar {
    grid-template-columns: 210px 1fr auto;
  }

  .workspace {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .project-label,
  .save-status,
  .orientation-button span {
    display: none;
  }

  .orientation-button {
    width: 32px;
    justify-content: center;
    padding: 0;
  }

  .minimap {
    display: none;
  }
}

@media (max-width: 720px) {
  .topbar {
    grid-template-columns: 1fr auto;
    padding-left: 12px;
  }

  .brand {
    gap: 8px;
  }

  .brand-name {
    font-size: 15px;
  }

  .project-identity {
    display: none;
  }

  .share-button {
    width: 36px;
    padding: 0;
    justify-content: center;
    font-size: 0;
  }

  .topbar-actions {
    gap: 5px;
  }

  .mobile-only,
  .sidebar-close {
    display: inline-grid;
  }

  .workspace {
    display: block;
  }

  .sidebar {
    position: absolute;
    z-index: 40;
    left: 0;
    top: 66px;
    bottom: 0;
    width: min(290px, 86vw);
    box-shadow: 18px 0 40px rgba(24, 33, 58, 0.16);
    transform: translateX(-105%);
    transition: transform 240ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .canvas-area {
    height: 100%;
  }

  .canvas-toolbar {
    left: 12px;
    transform: none;
  }

  .canvas-hint {
    display: none;
  }

  .bottom-controls {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  .current-sheet {
    width: 135px;
  }

  .current-sheet span {
    display: none;
  }

  .current-sheet {
    grid-template-columns: 1fr;
  }

  .zoom-controls .fit-button,
  .zoom-controls .toolbar-separator {
    display: none;
  }
}

@media (max-width: 480px) {
  .brand-name,
  .topbar-actions > .icon-button {
    display: none;
  }

  .canvas-toolbar .toolbar-separator,
  .orientation-button {
    display: none;
  }

  .zoom-controls > span:not(.toolbar-separator) {
    width: 37px;
  }

  .current-sheet {
    width: 118px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
