* {
  box-sizing: border-box;
}

:root {
  --day-width: 260px;
}

html[data-theme="white"],
html[data-theme=""] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f8f8;
  --bg-tertiary: #f0f0f0;
  --bg-panel: rgba(255, 255, 255, 0.8);
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-overlay: rgba(0, 0, 0, 0.4);
  --bg-modal: #ffffff;
  --bg-input: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: rgba(26, 26, 26, 0.7);
  --text-tertiary: rgba(26, 26, 26, 0.5);
  --accent: #a68f50;
  --accent-light: #f5e4b0;
  --accent-dark: #d4b870;
  --accent-glow: rgba(166, 143, 80, 0.6);
  --accent-glow-strong: rgba(166, 143, 80, 0.9);
  --border-primary: rgba(0, 0, 0, 0.1);
  --border-secondary: rgba(0, 0, 0, 0.15);
  --border-accent: rgba(166, 143, 80, 0.6);
  --shadow-primary: rgba(0, 0, 0, 0.1);
  --shadow-accent: rgba(166, 143, 80, 0.4);
  --header-bg: linear-gradient(90deg, rgba(166, 143, 80, 0.15), rgba(255, 255, 255, 0.95));
  --sidebar-bg: linear-gradient(180deg, rgba(166, 143, 80, 0.08), rgba(248, 248, 248, 0.98));
  --app-bg: linear-gradient(135deg, #ffffff, #f8f8f8);
}

html[data-theme="gray"] {
  --bg-primary: #2a2a2a;
  --bg-secondary: #1f1f1f;
  --bg-tertiary: #333333;
  --bg-panel: rgba(42, 42, 42, 0.8);
  --bg-card: rgba(31, 31, 31, 0.95);
  --bg-overlay: rgba(0, 0, 0, 0.6);
  --bg-modal: #2a2a2a;
  --bg-input: rgba(42, 42, 42, 0.96);
  --text-primary: #e0e0e0;
  --text-secondary: rgba(224, 224, 224, 0.7);
  --text-tertiary: rgba(224, 224, 224, 0.5);
  --accent: #888888;
  --accent-light: #b0b0b0;
  --accent-dark: #666666;
  --accent-glow: rgba(136, 136, 136, 0.6);
  --accent-glow-strong: rgba(136, 136, 136, 0.9);
  --border-primary: rgba(255, 255, 255, 0.1);
  --border-secondary: rgba(255, 255, 255, 0.15);
  --border-accent: rgba(136, 136, 136, 0.6);
  --shadow-primary: rgba(0, 0, 0, 0.5);
  --shadow-accent: rgba(136, 136, 136, 0.4);
  --header-bg: linear-gradient(90deg, rgba(136, 136, 136, 0.2), rgba(42, 42, 42, 0.95));
  --sidebar-bg: linear-gradient(180deg, rgba(136, 136, 136, 0.15), rgba(31, 31, 31, 0.98));
  --app-bg: radial-gradient(circle at top left, #333333, #1f1f1f);
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #fff;
  color: #000;
  font-family: "HalvarBreit", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.4;
}

body {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

.app-root {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  border-radius: 0;
  background: #fff;
  border: 2px solid #000;
  box-shadow: none;
  overflow: hidden;
}

.app-header {
  padding: 12px 16px;
  border-bottom: 8px solid #000;
  background: #fff;
  backdrop-filter: none;
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header-center {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  flex: 1;
  max-width: 400px;
  margin: 0 auto;
  align-self: flex-end;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 0;
  background: #000;
  box-shadow: none;
  border: 2px solid #000;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-subtitle {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-secondary);
}

.week-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.week-label {
  padding: 6px 12px;
  border-radius: 0;
  border: 1px solid #000;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  background: #fff;
  color: #000;
}

.header-controls {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mode-selector {
  position: relative;
}

.mode-selector-button {
  border: 2px solid #000;
  background: #fff;
  color: #000;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  min-width: 200px;
}

.mode-selector-button span:last-child {
  transition: transform 0.2s ease;
  margin-left: auto;
}

.mode-selector-button:hover {
  background: #f8f8f8;
  border-color: var(--accent);
  box-shadow: 2px 2px 0 rgba(166, 143, 80, 0.2);
}

.mode-selector.open .mode-selector-button {
  border-color: var(--accent);
  background: #fafafa;
}

.mode-selector.open .mode-selector-button span:last-child {
  transform: rotate(180deg);
}

.mode-selector-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  border: 2px solid #000;
  background: #fff;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1);
  min-width: 280px;
  z-index: 20;
  padding: 4px;
}

.mode-selector-menu::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #000;
}

.mode-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  background: transparent;
  color: #000;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  border-radius: 2px;
  margin-bottom: 2px;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.mode-icon {
  font-size: 18px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.mode-text {
  flex: 1;
}

.mode-option:hover .mode-icon {
  transform: scale(1.1);
}

.mode-option::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 0.2s ease;
}

.mode-option:hover {
  background: #f5f5f5;
  padding-left: 18px;
  transform: translateX(4px);
}

.mode-option:hover::before {
  transform: scaleY(1);
}

.mode-option-active {
  background: #000;
  color: #fff;
  font-weight: 700;
  padding-left: 18px;
}

.mode-option-active::before {
  transform: scaleY(1);
  background: var(--accent);
}

.mode-option-active:hover {
  background: #1a1a1a;
}

.mode-option-active .mode-icon {
  filter: grayscale(0) brightness(1.2);
}

.view-toggle {
  display: inline-flex;
  padding: 2px;
  border-radius: 0;
  background: #fff;
  border: 1px solid #000;
  gap: 2px;
}

#theme-toggle-iframe {
  width: 120px;
  height: 45px;
  border: none;
  pointer-events: auto;
  background: transparent;
  overflow: hidden;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chip {
  border: 1px solid #000;
  background: #fff;
  color: #000;
  padding: 6px 12px;
  border-radius: 0;
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.chip:hover {
  background: #f0f0f0;
}

.chip-active {
  background: #000;
  color: #fff;
  box-shadow: none;
  font-weight: bold;
}

.primary-button,
.ghost-button,
.text-button,
.icon-button {
  font-family: inherit;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.08s ease, border-color 0.18s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  color: var(--bg-secondary);
  box-shadow: 0 0 22px var(--accent-glow-strong);
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 26px var(--accent-glow-strong);
}

.ghost-button {
  background: var(--bg-panel);
  border: 1px solid var(--border-primary);
  color: var(--text-secondary);
}

.ghost-button:hover {
  background: var(--bg-tertiary);
}

.text-button {
  padding: 10px;
  background: #fff;
  color: #000;
  border-radius: 0;
  border: 2px solid #000;
  font-weight: bold;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
  transition: all 0.15s ease;
  width: 100%;
  justify-content: center;
  margin-top: 12px;
}

.text-button:hover {
  transform: none;
  box-shadow: none;
  background: #000;
  color: #fff;
}

.icon-button {
  width: 30px;
  height: 30px;
  border-radius: 0;
  background: #fff;
  color: #000;
  padding: 0;
  font-size: 16px;
  border: 1px solid #000;
  font-weight: bold;
}

.icon-button:hover {
  background: #000;
  color: #fff;
}

.app-layout {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}

.sidebar {
  padding: 16px;
  border-right: 2px solid #000;
  background: #fff;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #000 transparent;
  font-size: 13px;
  line-height: 1.4;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: #000;
  border-radius: 0;
}

.panel {
  border: 2px solid #000;
  padding: 12px;
  background: #fff;
  margin-bottom: 16px;
  width: 100%;
  box-sizing: border-box;
}

.panel-title {
  font-size: 20px;
  font-weight: bold;
  margin: 0 0 8px 0;
  padding-bottom: 8px;
  border-bottom: 8px solid #000;
  color: #000;
  text-transform: none;
  letter-spacing: 0;
}

.group-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 12px;
}

.group-row {
  display: flex;
  align-items: center;
  position: relative;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #000;
  background: #fff;
  border-left: none;
  border-right: none;
  border-bottom: none;
  cursor: pointer;
  min-height: auto;
  transition: background 0.15s ease;
}

.group-row:first-child {
  border-top: none;
}

.group-row:hover {
  background: #f0f0f0;
}

.group-row-active {
  background: #f0f0f0;
  font-weight: bold;
}

.group-row-selected {
  background: #000;
  color: #fff;
  font-weight: bold;
}

.group-row-selected .group-name,
.group-row-selected .group-count {
  color: #fff;
}

.group-row-selected .group-color {
  border: 2px solid #fff;
}

.group-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.group-color {
  width: 16px;
  height: 16px;
  border-radius: 0;
  background: var(--accent);
  border: 1px solid #000;
  flex-shrink: 0;
  box-shadow: none;
}

.group-name {
  font-size: 13px;
  font-weight: normal;
  color: #000;
  letter-spacing: 0;
}

.group-count {
  font-size: 13px;
  font-weight: bold;
  color: #000;
  background: transparent;
  padding: 0;
  border-radius: 0;
  min-width: auto;
  text-align: right;
  box-shadow: none;
}

.group-delete-btn {
  display: flex;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  border-radius: 0;
  border: 1px solid #000;
  background: #fff;
  color: #000;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  margin-left: 4px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.15s ease;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  font-family: Arial, sans-serif;
  font-weight: bold;
}

.group-row:hover .group-delete-btn {
  opacity: 1;
  visibility: visible;
}

.group-delete-btn:hover {
  background: #000;
  color: #fff;
  transform: none;
}

.filter-group {
  margin-bottom: 16px;
}

.filter-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  margin-bottom: 10px;
  font-weight: 600;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.chip-small {
  font-size: 12px;
  padding: 6px 10px;
  font-weight: normal;
  min-height: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 0;
}

.chip-muted {
  background: #fff;
  border-radius: 0;
  border: 1px solid #000;
  transition: all 0.15s ease;
}

.chip-muted:hover {
  background: #f0f0f0;
  transform: none;
  box-shadow: none;
}

.chip-muted-active {
  background: #000;
  border-color: #000;
  color: #fff;
  box-shadow: none;
  font-weight: bold;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag-pill {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.main {
  padding: 16px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #fff;
}

.board-view {
  flex: 1;
  max-height: none;
  border-radius: 0;
  background: #fff;
  border: 2px solid #000;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: none;
  }
  
.board-view iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: var(--bg-panel);
}

.app-mode {
  padding: 16px;
}

.mode-panel {
  border: 2px solid #000;
  background: #fff;
  padding: 12px 14px;
}

.mode-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
  border-bottom: 8px solid #000;
  padding-bottom: 6px;
}

.list-view {
  flex: 1;
  border-radius: 0;
  background: #fff;
  border: 2px solid #000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: none;
}

.list-header {
  display: grid;
  grid-template-columns: 2.6fr 0.9fr 0.9fr 1.1fr 1fr 1fr;
  padding: 8px 10px;
  border-bottom: 5px solid #000;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  color: #000;
  font-weight: bold;
}

.list-body {
  flex: 1;
  overflow-y: auto;
}

.grid-view {
  flex: 1;
  border-radius: 0;
  background: #fff;
  border: 2px solid #000;
  position: relative;
  overflow: hidden;
  margin-right: 20px;
  margin-bottom: 20px;
  box-shadow: none;
}

.grid-view iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: var(--bg-panel);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cinema-view {
  flex: 1;
  border-radius: 0;
  background: #fff;
  border: 2px solid #000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  box-shadow: none;
}

.cinema-view-container {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.cinema-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  display: flex;
  gap: 6px;
  background: #fff;
  padding: 4px;
  border-radius: 0;
  border: 2px solid #000;
  box-shadow: none;
}

.cinema-view iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: var(--bg-primary);
  flex: 1;
  min-height: 0;
}

.cinema-pip-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 400px;
  height: 300px;
  background: #fff;
  border: 2px solid #000;
  border-radius: 0;
  box-shadow: none;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cinema-pip-header {
  padding: 8px 12px;
  background: #fff;
  border-bottom: 8px solid #000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: bold;
  color: #000;
}

.cinema-pip-container iframe {
  flex: 1;
  width: 100%;
  border: none;
  background: var(--bg-primary);
}

.cinema-view:fullscreen {
  background: var(--bg-primary);
}

.cinema-view:fullscreen .cinema-controls {
  top: 20px;
  right: 20px;
}

.timeline-view {
  flex: 1;
  border-radius: 0;
  background: #fff;
  border: 2px solid #000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  box-shadow: none;
}

.timeline-view iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: var(--bg-primary);
  flex: 1;
  min-height: 0;
}

.grid-header-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.grid-header-wrapper::-webkit-scrollbar {
  height: 8px;
}

.grid-header-wrapper::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

.grid-header-wrapper::-webkit-scrollbar-thumb {
  background: var(--accent-glow);
  border-radius: 4px;
}

.grid-header-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.grid-header {
  display: grid;
  grid-template-columns: 80px repeat(var(--grid-days-count, 34), var(--grid-column-width, 180px));
  padding: 6px 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-secondary);
  min-width: max-content;
}

.grid-header-cell {
  padding-left: 4px;
}

.grid-header-cell:first-child {
  padding-left: 0;
  position: sticky;
  left: 0;
  background: var(--bg-panel);
  backdrop-filter: blur(8px);
  z-index: 10;
  border-right: 1px solid var(--border-secondary);
}

.time-grid-wrapper {
  flex: 1;
  overflow: auto;
  position: relative;
}

.time-grid-wrapper::-webkit-scrollbar {
  height: 8px;
}

.time-grid-wrapper::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

.time-grid-wrapper::-webkit-scrollbar-thumb {
  background: var(--accent-glow);
  border-radius: 4px;
}

.time-grid-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.time-grid {
  padding: 4px 10px 10px;
  display: grid;
  grid-template-columns: 80px repeat(var(--grid-days-count, 34), var(--grid-column-width, 180px));
  grid-auto-rows: 28px;
  min-width: max-content;
}

.time-grid-time {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-right: 6px;
  position: sticky;
  left: 0;
  background: var(--bg-panel);
  backdrop-filter: blur(8px);
  z-index: 10;
  padding-left: 10px;
  margin-left: -10px;
  border-right: 1px solid var(--border-secondary);
}

.time-grid-cell {
  border-top: 1px solid var(--border-primary);
  border-right: 1px solid var(--border-primary);
  cursor: pointer;
  position: relative;
}

.time-grid-cell-selected {
  border: 2px solid var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  z-index: 20;
  position: relative;
}

.time-grid-cell-block-selected {
  border: 2px solid var(--accent) !important;
  box-shadow: 0 0 12px var(--accent-glow) !important;
  z-index: 20;
  position: relative;
}

.cell-handle {
  position: absolute;
  background: var(--accent);
  border: 2px solid var(--bg-secondary);
  border-radius: 50%;
  width: 12px;
  height: 12px;
  cursor: ns-resize;
  z-index: 25;
  box-shadow: 0 0 8px var(--accent-glow);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  pointer-events: auto;
}

.cell-handle:hover {
  transform: scale(1.3);
  box-shadow: 0 0 12px var(--accent-glow-strong);
}

.cell-handle-top {
  cursor: ns-resize;
}

.cell-handle-bottom {
  cursor: ns-resize;
}

.cell-handle-left {
  cursor: ew-resize;
}

.cell-handle-right {
  cursor: ew-resize;
}

.time-grid-cell-block {
  position: relative;
  margin: 1px 2px;
  border-radius: 4px;
  cursor: pointer;
  z-index: 15;
  transition: box-shadow 0.15s ease;
}

.time-grid-cell-block:hover {
  box-shadow: 0 0 16px var(--accent-glow) !important;
}

.time-grid-cell:first-child {
  position: sticky;
  left: 0;
  background: var(--bg-panel);
  backdrop-filter: blur(8px);
  z-index: 5;
  border-right: 1px solid var(--border-secondary);
}

.time-grid-cell:nth-child(odd) {
  background: var(--bg-tertiary);
}

.time-grid-task {
  position: relative;
  margin: 2px 3px;
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.3;
  color: var(--bg-secondary);
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  overflow: hidden;
}

.time-grid-task-title {
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.time-grid-task-meta {
  font-size: 10px;
  opacity: 0.85;
}

.list-row {
  display: grid;
  grid-template-columns: 2.6fr 0.9fr 0.9fr 1.1fr 1fr 1fr;
  padding: 7px 10px;
  font-size: 12px;
  align-items: center;
  cursor: pointer;
  transition: background 0.12s ease;
}

.list-row:nth-child(2n) {
  background: var(--bg-tertiary);
}

.list-row:hover {
  background: var(--bg-card);
}

.list-col-main-title {
  font-weight: 500;
}

.list-col-main-sub {
  font-size: 11px;
  color: var(--text-secondary);
}

.list-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 2px;
}

.hidden {
  display: none !important;
}

.burger-button {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 22px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 1001;
}

.burger-button span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.burger-button.active span:nth-child(1) {
  transform: translateY(9.5px) rotate(45deg);
}

.burger-button.active span:nth-child(2) {
  opacity: 0;
}

.burger-button.active span:nth-child(3) {
  transform: translateY(-9.5px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 85%;
  max-width: 320px;
  height: 100%;
  background: var(--bg-primary);
  border-right: 2px solid var(--border-primary);
  z-index: 1000;
  transition: left 0.3s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.mobile-menu.active {
  left: 0;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 2px solid var(--border-primary);
  background: var(--header-bg);
}

.mobile-menu-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.mobile-menu-close {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  font-size: 32px;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.mobile-menu-body {
  flex: 1;
  padding: 8px;
}

.mobile-menu-section {
  margin-bottom: 24px;
}

.mobile-menu-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  padding: 8px 12px;
  margin-bottom: 4px;
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 4px;
  margin-bottom: 4px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.mobile-menu-icon {
  font-size: 18px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.mobile-menu-item:hover,
.mobile-menu-item:active {
  background: var(--bg-tertiary);
  transform: translateX(4px);
}

.mobile-menu-item:hover .mobile-menu-icon {
  transform: scale(1.1);
}

.mobile-menu-button {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: 1px solid var(--border-primary);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.mobile-menu-button:hover,
.mobile-menu-button:active {
  background: var(--bg-tertiary);
  border-color: var(--accent);
}

.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-view-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-view-toggle label {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.mobile-view-toggle label:hover {
  background: var(--bg-tertiary);
}

.mobile-view-toggle input[type="checkbox"] {
  margin-right: 8px;
}

@media (max-width: 1024px) {
  .sidebar {
    width: 240px;
    min-width: 240px;
  }
  
  .app-header {
    padding: 10px 12px;
  }
  
  .brand-subtitle {
    font-size: 10px;
  }
  
  .header-center {
    gap: 8px;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 14px;
  }
  
  .app-root {
    border: none;
  }
  
  .burger-button {
    display: flex;
    margin-right: 12px;
  }
  
  .app-header {
    padding: 12px;
    border-bottom: 4px solid #000;
  }
  
  .header-main {
    flex-wrap: wrap;
  }
  
  .brand {
    order: 2;
    flex: 1;
  }
  
  .brand-mark {
    width: 24px;
    height: 24px;
  }
  
  .brand-title {
    font-size: 14px;
  }
  
  .brand-subtitle {
    font-size: 9px;
  }
  
  .header-center {
    display: none;
  }
  
  .week-nav {
    order: 3;
    width: 100%;
    margin-top: 8px;
    text-align: center;
  }
  
  .week-label {
    font-size: 12px;
  }
  
  .header-controls {
    display: none;
  }
  
  .sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    height: 100%;
    width: 85%;
    max-width: 320px;
    z-index: 1001;
    transition: left 0.3s ease;
    border-right: 2px solid var(--border-primary);
  }
  
  .sidebar.mobile-open {
    left: 0;
  }
  
  .app-layout {
    grid-template-columns: 1fr;
  }
  
  .main {
    width: 100%;
  }
  
  .board-view iframe,
  .grid-view iframe,
  .cinema-view iframe,
  .timeline-view iframe {
    min-height: calc(100vh - 120px);
  }
  
  .list-view {
    overflow-x: auto;
  }
  
  .list-header,
  .list-row {
    min-width: 600px;
  }
  
  .settings-panel {
    width: 100%;
    max-width: 100%;
    right: 0;
    border-radius: 0;
    border-right: none;
  }
  
  .modal-content {
    width: 95%;
    max-width: 95%;
    margin: 20px auto;
    max-height: calc(100vh - 40px);
  }
  
  .panel {
    position: fixed;
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px 12px 0 0;
    border-left: none;
    border-bottom: none;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 13px;
  }
  
  .brand-mark {
    width: 20px;
    height: 20px;
  }
  
  .brand-title {
    font-size: 13px;
  }
  
  .brand-subtitle {
    display: none;
  }
  
  .week-label {
    font-size: 11px;
  }
  
  .mobile-menu {
    width: 90%;
  }
  
  .sidebar {
    width: 90%;
  }
  
  .list-header,
  .list-row {
    min-width: 500px;
    font-size: 12px;
  }
  
  .list-col {
    padding: 8px 6px;
  }
  
  .modal-content {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0;
    border-radius: 0;
    border: none;
  }
  
  .settings-section h3 {
    font-size: 14px;
  }
  
  .field label {
    font-size: 11px;
  }
  
  .field input,
  .field select,
  .field textarea {
    font-size: 14px;
    padding: 8px;
  }
}

@media (max-width: 360px) {
  .app-header {
    padding: 8px;
  }
  
  .brand-title {
    font-size: 12px;
  }
  
  .week-nav {
    margin-top: 6px;
  }
  
  .week-label {
    font-size: 10px;
  }
  
  .mobile-menu,
  .sidebar {
    width: 95%;
  }
}

.settings-panel.hidden {
  display: flex !important;
  transform: translateX(100%);
}

.cd-schedule-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  visibility: hidden;
  transition: visibility 0s 0.4s;
}

.cd-schedule-modal.modal-is-open {
  visibility: visible;
  transition: visibility 0s 0s;
}

.cd-schedule-modal .modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 1;
}

.cd-schedule-modal.modal-is-open .modal-overlay {
  opacity: 1;
}

.cd-schedule-modal .modal-content {
  position: fixed;
  z-index: 2;
  background: var(--bg-primary);
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  transform-origin: center center;
  will-change: transform;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              top 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
}

.cd-schedule-modal.modal-is-open .modal-content {
  opacity: 1;
}

.cd-schedule-modal .modal-header {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 35%;
  background: #a68f50;
  padding: 32px 24px;
  overflow: hidden;
  z-index: 1;
}

.cd-schedule-modal .modal-header .modal-header-content {
  position: relative;
  z-index: 2;
}

.cd-schedule-modal .modal-header .event-date {
  display: block;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.cd-schedule-modal .modal-header .event-name {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.3;
}

.cd-schedule-modal .modal-header .header-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 100%);
  z-index: 1;
}

.cd-schedule-modal .modal-body {
  position: absolute;
  top: 0;
  left: 35%;
  height: 100%;
  width: 65%;
  background: var(--bg-primary);
  padding: 32px;
  overflow-y: auto;
  z-index: 1;
}

.cd-schedule-modal .modal-body-content {
  position: relative;
  z-index: 2;
}

.cd-schedule-modal .body-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.015);
  z-index: 0;
  pointer-events: none;
}

.cd-schedule-modal .modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  cursor: pointer;
  z-index: 3;
  transition: all 0.2s;
}

.cd-schedule-modal .modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.cd-schedule-modal .field,
.cd-schedule-modal .field-row {
  margin-bottom: 16px;
}

.cd-schedule-modal .field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.cd-schedule-modal .field input,
.cd-schedule-modal .field textarea,
.cd-schedule-modal .field select {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
}

.cd-schedule-modal .field input:focus,
.cd-schedule-modal .field textarea:focus,
.cd-schedule-modal .field select:focus {
  outline: none;
  border-color: #a68f50;
  background: var(--bg-tertiary);
}

.cd-schedule-modal .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cd-schedule-modal .modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-primary);
}

.cd-schedule-modal .modal-footer-right {
  display: flex;
  gap: 8px;
}

@media (max-width: 768px) {
  .cd-schedule-modal .modal-header {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 120px;
  }
  
  .cd-schedule-modal .modal-body {
    position: relative;
    left: 0;
    width: 100%;
    height: auto;
    max-height: calc(100vh - 200px);
  }
}

#cell-edit-overlay {
  background: transparent;
  pointer-events: none;
  z-index: 45;
}

#cell-edit-overlay:not(.hidden) {
  pointer-events: auto;
}

.cell-edit-popup {
  position: absolute;
  background: var(--bg-modal);
  border: 1px solid var(--border-accent);
  border-radius: 12px;
  padding: 8px;
  min-width: 200px;
  z-index: 50;
  box-shadow: 0 8px 24px var(--shadow-primary);
  pointer-events: auto;
}

.cell-edit-header {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 8px;
}

.cell-edit-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cell-edit-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-primary);
}

.cell-edit-controls .ghost-button {
  font-size: 11px;
  padding: 8px 12px;
  width: 100%;
  justify-content: center;
}

.overlay-dark {
  background: var(--bg-overlay);
}

#cinema-overlay {
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
}

#cinema-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: var(--bg-primary);
}

.cinema-close-button {
  position: fixed !important;
  top: 20px !important;
  right: 20px !important;
  z-index: 1000 !important;
  background: var(--bg-modal) !important;
  border: 1px solid var(--border-primary) !important;
}

.modal {
  width: 520px;
  max-width: calc(100% - 40px);
  border-radius: 0;
  background: #fff;
  border: 2px solid #000;
  box-shadow: none;
  box-shadow: 0 22px 60px var(--shadow-primary);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 8px solid #000;
}

.modal-title {
  font-size: 20px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: bold;
  color: #000;
}

.modal-body {
  padding: 10px 18px 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field label {
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: bold;
  color: #000;
  color: var(--text-secondary);
}

.cell-edit-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cell-edit-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.cell-edit-controls .ghost-button {
  font-size: 11px;
  padding: 8px 12px;
}

input,
textarea,
select {
  border-radius: 10px;
  border: 1px solid var(--border-secondary);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  padding: 7px 9px;
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-glow);
}

textarea {
  resize: vertical;
}

.modal-footer {
  padding-top: 16px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 2px solid var(--border-primary);
}

.modal-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-modal {
  position: fixed;
  z-index: 1000;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  visibility: hidden;
  transform: translateX(100%);
  transition: visibility 0.4s, transform 0.4s;
  transition-timing-function: cubic-bezier(0.5, 0, 0.1, 1);
  will-change: transform, width, height;
}

.task-modal.modal-is-open {
  transform: translateX(0);
  visibility: visible;
}

.task-modal-header {
  position: relative;
  height: 100px;
  display: table;
  width: 100%;
}

.task-modal-header-content {
  position: relative;
  z-index: 3;
  display: table-cell;
  vertical-align: middle;
  padding: 1em 5%;
}

.task-modal-time {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  opacity: 0.85;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.task-modal-title {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.task-modal-header-bg {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: 2;
  background: var(--accent);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  transform-origin: top center;
  will-change: transform;
  backface-visibility: hidden;
}

.task-modal-body {
  position: relative;
  width: 100%;
  height: calc(100% - 100px);
}

.task-modal-content {
  position: relative;
  z-index: 2;
  line-height: 1.6;
  height: 100%;
  overflow: hidden;
}

.task-modal-scroll {
  overflow: auto;
  height: 100%;
  padding: 24px 5%;
  -webkit-overflow-scrolling: touch;
}

.task-modal-body-bg {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: 1;
  background: #fff;
  transform-origin: top left;
  will-change: transform;
  backface-visibility: hidden;
}

.task-modal-close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  background: rgba(0, 0, 0, 0.15);
  color: transparent;
  white-space: nowrap;
  text-indent: 100%;
  height: 100px;
  width: 100px;
  transition: background 0.2s;
}

.task-modal-close:hover {
  background: rgba(0, 0, 0, 0.25);
}

.task-modal-close::before,
.task-modal-close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 28px;
  background: #fff;
  backface-visibility: hidden;
}

.task-modal-close::before {
  transform: translateX(-50%) translateY(-50%) rotate(45deg);
}

.task-modal-close::after {
  transform: translateX(-50%) translateY(-50%) rotate(-45deg);
}

.task-modal-overlay {
  position: fixed;
  z-index: 999;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: rgba(0, 0, 0, 0.8);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}

.task-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.task-modal.no-transition {
  transition: none;
}

.task-modal.no-transition .task-modal-header-bg,
.task-modal.no-transition .task-modal-body-bg {
  transition: none;
}

@media only screen and (min-width: 800px) {
  .task-modal {
    right: auto;
    width: auto;
    height: auto;
    transform: translateX(0);
    transition: height 0.4s, width 0.4s, visibility 0.4s, transform 0.4s;
    transition-timing-function: cubic-bezier(0.5, 0, 0.1, 1);
  }
  
  .task-modal-header {
    position: absolute;
    display: block;
    top: 0;
    left: 0;
    height: 100%;
  }
  
  .task-modal-header-content {
    display: block;
    padding: 1.2em 1.6em;
  }
  
  .task-modal-scroll {
    padding: 2em 3em 2em 2em;
  }
  
  .task-modal-body {
    height: 100%;
    width: auto;
  }
  
  .task-modal-header-bg {
    transform: translateZ(0);
    transition: transform 0.4s;
    transition-timing-function: cubic-bezier(0.5, 0, 0.1, 1);
  }
  
  .task-modal-body-bg {
    opacity: 0;
    transform: none;
  }
  
  .task-modal.modal-is-open .task-modal-body-bg {
    opacity: 1;
    transition: transform 0.4s;
    transition-timing-function: cubic-bezier(0.5, 0, 0.1, 1);
  }
  
  .task-modal-close {
    width: 60px;
    height: 60px;
    background: transparent;
    opacity: 0;
  }
  
  .task-modal.animation-completed .task-modal-close {
    opacity: 1;
    transition: opacity 0.2s, background 0.2s;
  }
  
  .task-modal-close::after,
  .task-modal-close::before {
    background: #000;
    height: 20px;
    width: 2px;
  }
  
  .task-modal-content {
    opacity: 0;
  }
  
  .task-modal.animation-completed .task-modal-content {
    opacity: 1;
    transition: opacity 0.2s;
  }
}

@media (max-width: 768px) {
  .task-modal {
    transform: translateX(100%);
  }
  
  .task-modal.modal-is-open {
    transform: translateX(0);
  }
  
  .task-modal-header {
    height: 80px;
  }
  
  .task-modal-header-content {
    padding: 1em 4%;
  }
  
  .task-modal-title {
    font-size: 22px;
  }
  
  .task-modal-time {
    font-size: 13px;
  }
  
  .task-modal-close {
    width: 80px;
    height: 80px;
  }
  
  .task-modal-scroll {
    padding: 20px 4%;
  }
  
  .task-modal-body {
    height: calc(100% - 80px);
  }
  
  .field-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .task-modal-header {
    height: 70px;
  }
  
  .task-modal-title {
    font-size: 18px;
  }
  
  .task-modal-time {
    font-size: 12px;
  }
  
  .task-modal-close {
    width: 70px;
    height: 70px;
  }
  
  .task-modal-body {
    height: calc(100% - 70px);
  }
}

.cinema-close-button {
  position: fixed !important;
  top: 20px !important;
  right: 20px !important;
  z-index: 1000 !important;
  background: var(--bg-modal) !important;
  border: 1px solid var(--border-primary) !important;
}

#cinema-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: var(--bg-primary);
}

.cinema-shell {
  width: 960px;
  max-width: calc(100% - 40px);
  max-height: calc(100% - 40px);
  border-radius: 22px;
  background: var(--bg-modal);
  border: 1px solid var(--border-accent);
  box-shadow: 0 40px 120px var(--shadow-primary);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cinema-header {
  padding: 16px 20px 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.cinema-title {
  font-size: 18px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.cinema-subtitle {
  margin-top: 2px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-secondary);
}

.cinema-body {
  padding: 12px 18px 16px;
  flex: 1;
  overflow: hidden;
  display: flex;
}

.cinema-timeline {
  flex: 1;
  overflow-y: auto;
  padding-right: 12px;
}

.cinema-empty {
  padding: 20px 18px;
  text-align: center;
  color: var(--text-secondary);
}

.timeline {
  font-size: 14px;
  position: relative;
  counter-reset: section;
  margin: 4px 12px 16px 40px;
}

.timeline:before {
  content: "";
  width: 3px;
  height: 100%;
  background: #ffffff;
  position: absolute;
  top: 0;
  left: -3.313em;
  border-radius: 40px;
}

.timeline--entry {
  position: relative;
  color: #ffffff;
  background-color: transparent;
  border: 1px solid rgba(200, 200, 200, 0.4);
  border-radius: 1ch;
  margin-bottom: 16px;
}

.timeline--entry__title {
  background-color: transparent;
  font-weight: 600;
  font-size: 1.2rem;
  padding: 1em;
}

.timeline--entry__title:before {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  position: absolute;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  left: -1em;
  border-right: 10px solid rgba(200, 200, 200, 0.4);
}

.timeline--entry__detail {
  padding: 0.9em 1em 1.1em;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(245, 245, 245, 0.9);
}

.timeline--entry:before {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3em;
  height: 3em;
  background-color: #050507;
  border: 0.2em solid #ffffff;
  border-radius: 50%;
  position: absolute;
  counter-increment: section;
  content: counter(section);
  color: #ffffff;
  text-shadow: 0 1px 0 #424242;
  left: -4.5em;
}

@supports (display: grid) {
  @media (min-width: 768px) {
    .timeline {
      display: grid;
      grid-gap: 4.75em;
      grid-template-areas:
        ".  entry1"
        "entry2  ."
        ". entry3"
        "entry4 ."
        ". entry5";
    }

    .timeline:before {
      left: 0;
      right: 0;
      margin-inline: auto;
    }

    .timeline--entry:nth-child(1) {
      grid-area: entry1;
    }

    .timeline--entry:nth-child(2) {
      grid-area: entry2;
    }

    .timeline--entry:nth-child(3) {
      grid-area: entry3;
    }

    .timeline--entry:nth-child(4) {
      grid-area: entry4;
    }

    .timeline--entry:nth-child(5) {
      grid-area: entry5;
    }

    .timeline--entry:nth-of-type(odd):before {
      left: -4em;
    }

    .timeline--entry:nth-of-type(even):not(:nth-of-type(odd)) .timeline--entry__title:before {
      left: 100%;
      border-left: 10px solid rgba(200, 200, 200, 0.4);
      border-right: 0;
    }

    .timeline--entry:nth-of-type(even):before {
      left: 103.5%;
    }
  }
}

.scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 10px;
  gap: 6px;
  position: fixed;
  bottom: 26px;
  right: 96px;
  cursor: pointer;
  transition: all ease 0.3s;
  text-decoration: none;
  z-index: 50;
  overflow: hidden;
  max-width: 120px;
}

.scroll-text {
  text-shadow: 0 0 20px var(--accent-glow-strong);
  color: var(--accent-light);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.scroll-container {
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 4px;
  overflow: hidden;
}

.scroll-rectangle {
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(20px);
  box-shadow: 0 0 40px 2px var(--accent-glow-strong), 0 0 10px 1px var(--accent-glow);
}

.scroll-rectangle:first-child {
  opacity: 1;
  transform: translateY(0);
  background-color: var(--accent);
}

.scroll:hover .scroll-rectangle:not(:first-child) {
  opacity: 1;
  transform: translateY(0);
}

.scroll-rectangle:nth-child(1) {
  width: 60px;
  height: 10px;
}

.scroll-rectangle:nth-child(2) {
  width: 45px;
  height: 8px;
  transition-delay: 0.05s;
  background-color: var(--accent-glow-strong);
}

.scroll-rectangle:nth-child(3) {
  width: 35px;
  height: 6px;
  transition-delay: 0.1s;
  background-color: var(--accent-glow);
}

.scroll-rectangle:nth-child(4) {
  width: 28px;
  height: 5px;
  transition-delay: 0.15s;
  background-color: var(--accent-glow);
}

.scroll-rectangle:nth-child(5) {
  width: 22px;
  height: 4px;
  transition-delay: 0.2s;
  background-color: var(--accent-glow);
}

.scroll-rectangle:nth-child(6) {
  width: 18px;
  height: 3px;
  transition-delay: 0.25s;
  background-color: var(--accent-glow);
}

.scroll-rectangle:nth-child(7) {
  width: 15px;
  height: 3px;
  transition-delay: 0.3s;
  background-color: var(--accent-glow);
}

.scroll-rectangle:nth-child(8) {
  width: 12px;
  height: 2px;
  transition-delay: 0.35s;
  background-color: var(--accent-glow);
}

.scroll:not(:hover) .scroll-rectangle:nth-child(2) {
  transition-delay: 0.35s;
}

.scroll:not(:hover) .scroll-rectangle:nth-child(3) {
  transition-delay: 0.3s;
}

.scroll:not(:hover) .scroll-rectangle:nth-child(4) {
  transition-delay: 0.25s;
}

.scroll:not(:hover) .scroll-rectangle:nth-child(5) {
  transition-delay: 0.2s;
}

.scroll:not(:hover) .scroll-rectangle:nth-child(6) {
  transition-delay: 0.15s;
}

.scroll:not(:hover) .scroll-rectangle:nth-child(7) {
  transition-delay: 0.05s;
}

.scroll:not(:hover) .scroll-rectangle:nth-child(8) {
  transition-delay: 0s;
}

@media (max-width: 1100px) {
  .app-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .app-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    display: none;
  }
}

.settings-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  height: 100vh;
  background: #fff;
  border-left: 2px solid #000;
  box-shadow: none;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.settings-panel.hidden {
  display: flex !important;
  transform: translateX(100%);
}

.settings-panel:not(.hidden) {
  transform: translateX(0);
}

.settings-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.settings-overlay:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

.settings-panel-header {
  padding: 12px 16px;
  border-bottom: 8px solid #000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
}

.settings-panel-title {
  font-size: 20px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: bold;
  color: #000;
}

.settings-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.view-toggle-settings {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.view-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  user-select: none;
}

.view-option:hover {
  background: var(--bg-tertiary);
}

.view-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.view-option span {
  font-size: 13px;
  color: var(--text-primary);
  flex: 1;
}

.settings-button {
  width: 100%;
  justify-content: space-between;
  padding: 10px 14px;
}

.settings-toggle {
  width: 40px;
  height: 20px;
  border-radius: 10px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  position: relative;
  transition: background 0.2s ease;
}

.settings-toggle::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-secondary);
  top: 1px;
  left: 1px;
  transition: transform 0.2s ease, background 0.2s ease;
}

body.focus-mode .settings-toggle {
  background: var(--accent);
}

body.focus-mode .settings-toggle::after {
  transform: translateX(20px);
  background: var(--bg-secondary);
}

.theme-selector {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 2px solid var(--border-primary);
  border-radius: 12px;
  background: var(--bg-panel);
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.theme-option:hover {
  border-color: var(--border-accent);
  background: var(--bg-card);
}

.theme-option.active {
  border-color: var(--accent);
  background: var(--bg-card);
  box-shadow: 0 0 12px var(--accent-glow);
}

.theme-preview {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 2px solid var(--border-primary);
  flex-shrink: 0;
}

.theme-preview-white {
  background: linear-gradient(135deg, #ffffff, #f8f8f8);
}

.theme-preview-gray {
  background: radial-gradient(circle at top left, #333333, #1f1f1f);
}

.theme-option span {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.theme-option.active span {
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 720px) {
  .app-root {
    margin: 0;
    border-radius: 0;
  }
  .header-controls {
    flex-direction: column;
    align-items: flex-start;
  }
  .header-right {
    width: 100%;
    justify-content: space-between;
  }
  .list-header,
  .list-row {
    grid-template-columns: 2.6fr 1fr 1fr;
  }
}


