/* ShortJo — style.css */
/* No CSS variables. No flexbox gap. No calc(). No animations. No border-radius. */
/* Hardcoded hex only. Webkit prefixes on all flexbox. */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-transition: none;
  transition: none;
  border-radius: 0;
}

body {
  background: #ffffff;
  color: #111111;
  font-family: Courier New, monospace;
  font-size: 18px;
  height: 100vh;
  overflow: hidden;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
}

#app {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Header */
#header {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding: 4px 12px;
  border-bottom: 2px solid #000000;
}

#app-title {
  font-family: Courier New, monospace;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#version {
  font-family: Courier New, monospace;
  font-size: 14px;
  font-weight: normal;
  color: #111111;
  margin-left: 10px;
}

#header-settings-btn {
  font-family: Courier New, monospace;
  font-size: 13px;
  font-weight: bold;
  background: none;
  border: none;
  padding: 4px 8px;
  cursor: pointer;
  color: #111111;
  line-height: 1;
  min-height: 44px;
}

#header-rule {
  border: none;
  border-top: 2px solid #000000;
  display: none;
}

/* Layout */
#layout {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Sidebar — hidden on mobile */
#sidebar {
  display: none;
  width: 220px;
  border-right: 2px solid #000000;
  padding: 0;
  font-family: Courier New, monospace;
  font-size: 15px;
  overflow-y: auto;
}

/* Scroll wrapper — takes all remaining horizontal space; scrollbar at far right */
#main-scroll {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}

/* Main content — centred within the scroll wrapper */
#main {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  padding: 16px;
  width: 100%;
}

/* Jump bar — access layer */
#jumpbar {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  border-top: 2px solid #000000;
  border-bottom: 1px solid #cccccc;
}

.jump-btn {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  background: #ffffff;
  color: #111111;
  border: none;
  border-right: 1px solid #cccccc;
  font-family: Courier New, monospace;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 12px 4px;
  min-height: 44px;
  cursor: pointer;
}

.jump-btn:last-child {
  border-right: none;
}

.jump-btn.active {
  background: #000000;
  color: #ffffff;
}

/* Input bar */
#input-bar {
  border-top: 2px solid #000000;
  padding: 8px;
  background: #ffffff;
}

/* Input layer row — quick entry buttons + ▶ toggle */
#quick-btns {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  margin-bottom: 8px;
}

.quick-btn {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  background: #ffffff;
  color: #111111;
  border: 1px solid #cccccc;
  border-right: none;
  font-family: Courier New, monospace;
  font-size: 13px;
  font-weight: bold;
  padding: 8px 2px;
  min-height: 44px;
  cursor: pointer;
  text-align: center;
}

.quick-btn:first-child {
  border-left: 2px solid #000000;
}

#layer-toggle {
  background: #000000;
  color: #ffffff;
  border: none;
  font-family: Courier New, monospace;
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
  padding: 8px 10px;
  min-height: 44px;
  min-width: 44px;
  cursor: pointer;
}

/* Organisation layer row — ◀ toggle + nav buttons */
#org-btns {
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  margin-bottom: 8px;
}

#layer-back {
  background: #111111;
  color: #ffffff;
  border: none;
  font-family: Courier New, monospace;
  font-size: 22px;
  line-height: 1;
  padding: 8px 10px;
  min-height: 44px;
  min-width: 40px;
  cursor: pointer;
}

.org-btn {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  background: #f5f5f5;
  color: #111111;
  border: none;
  border-left: 1px solid #cccccc;
  font-family: Courier New, monospace;
  font-size: 13px;
  font-weight: bold;
  padding: 8px 2px;
  min-height: 44px;
  cursor: pointer;
  text-align: center;
}

.org-btn.active {
  background: #000000;
  color: #ffffff;
}


#input-row {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
}

#entry-input {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  font-family: Courier New, monospace;
  font-size: 18px;
  border: 2px solid #000000;
  padding: 10px;
  background: #ffffff;
  color: #111111;
  resize: none;
  min-height: 44px;
  outline: none;
  margin-right: 8px;
}

#submit-btn {
  background: #000000;
  color: #ffffff;
  border: 2px solid #000000;
  font-family: Courier New, monospace;
  font-size: 20px;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  padding: 0 12px;
}

/* Sidebar always hidden — bottom bar handles all navigation */
#sidebar {
  display: none !important;
}

/* Error display */
#error-display {
  background: #ffffff;
  border: 2px solid #000000;
  padding: 16px;
  margin: 16px;
  font-family: Courier New, monospace;
  font-size: 16px;
  white-space: pre-wrap;
}

/* Command error (inline, transient) */
.command-error {
  background: #ffffff;
  border: 2px solid #000000;
  padding: 8px 12px;
  margin-bottom: 12px;
  font-family: Courier New, monospace;
  font-size: 16px;
}

/* Info / confirmation banner */
.info-message {
  background: #ffffff;
  border: 2px solid #000000;
  padding: 8px 12px;
  margin-bottom: 12px;
  font-family: Courier New, monospace;
  font-size: 16px;
}

/* Day blocks */
.day-block {
  margin-bottom: 28px;
}

.day-header {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding: 6px 0 4px 0;
}

.day-header-text {
  font-family: Courier New, monospace;
  font-size: 15px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
}

.day-today-badge {
  font-family: Courier New, monospace;
  font-size: 11px;
  font-weight: bold;
  background: #000000;
  color: #ffffff;
  padding: 2px 6px;
  letter-spacing: 0.08em;
}

.day-rule {
  border: none;
  border-top: 1px solid #cccccc;
  margin: 4px 0 6px 0;
}

.day-header-today .day-header-text {
  font-size: 16px;
}

.day-empty {
  font-family: Courier New, monospace;
  font-size: 16px;
  color: #cccccc;
  padding: 8px 0;
}

/* Entry rows */
.entry-wrap {
  border-bottom: 1px solid #f5f5f5;
}

.entry-row {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -webkit-box-align: start;
  -ms-flex-align: start;
  align-items: flex-start;
  padding: 6px 0;
}

.entry-ts {
  font-family: Courier New, monospace;
  font-size: 13px;
  color: #cccccc;
  min-width: 40px;
  -ms-flex-negative: 0;
  flex-shrink: 0;
  padding-top: 4px;
  padding-right: 6px;
}

.entry-symbol {
  font-family: Courier New, monospace;
  font-size: 18px;
  min-width: 44px;
  min-height: 44px;
  padding-right: 10px;
  padding-top: 2px;
  -ms-flex-negative: 0;
  flex-shrink: 0;
  line-height: 1.4;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: start;
  -ms-flex-align: start;
  align-items: flex-start;
}

.entry-symbol-clickable {
  cursor: pointer;
}

.entry-actions-row {
  padding: 2px 0 4px 44px;
}

.entry-org {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  -ms-flex-negative: 0;
  flex-shrink: 0;
  margin-left: 4px;
  padding-top: 4px;
}

.entry-text {
  font-family: Georgia, serif;
  font-size: 18px;
  line-height: 1.5;
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  word-break: break-word;
  padding-top: 2px;
}

/* Done / cancelled task — strikethrough text */
.entry-row[data-type="task"][data-status="done"] .entry-text,
.entry-row[data-type="task"][data-status="cancelled"] .entry-text {
  text-decoration: line-through;
}

/* Migrated task — muted */
.entry-row[data-type="task"][data-status="migrated"] .entry-text {
  color: #cccccc;
}

/* Clip domain */
.clip-domain {
  font-family: Courier New, monospace;
  font-size: 16px;
}

/* ============================================================
   DATE PICKER  (fixed overlay — does not affect page layout)
   ============================================================ */

#date-picker {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  width: 320px;
  margin-left: auto;
  margin-right: auto;
  max-width: 96%;
  z-index: 100;
  background: #ffffff;
  border: 2px solid #000000;
}

#dp-header {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  border-bottom: 1px solid #cccccc;
}

.dp-nav {
  background: #ffffff;
  color: #111111;
  border: none;
  font-family: Courier New, monospace;
  font-size: 18px;
  font-weight: bold;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  padding: 0 12px;
}

#dp-title {
  font-family: Courier New, monospace;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 0.1em;
  text-align: center;
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
}

#dp-grid {
  padding: 0;
}

.dp-week {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
}

.dp-dow {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  font-family: Courier New, monospace;
  font-size: 11px;
  font-weight: bold;
  text-align: center;
  padding: 4px 0;
  border-bottom: 1px solid #cccccc;
}

.dp-day,
.dp-empty {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  font-family: Courier New, monospace;
  font-size: 14px;
  text-align: center;
  min-height: 44px;
  line-height: 44px;
  cursor: pointer;
  border-bottom: 1px solid #f5f5f5;
}

.dp-empty {
  cursor: default;
}

.dp-day.dp-today {
  font-weight: bold;
  text-decoration: underline;
}

/* ============================================================
   HABIT PICKER
   ============================================================ */

#habit-picker {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  width: 320px;
  margin-left: auto;
  margin-right: auto;
  max-width: 96%;
  z-index: 100;
  background: #ffffff;
  border: 2px solid #000000;
}

.hp-list {
  padding: 4px 0;
}

.hp-item {
  display: block;
  font-family: Courier New, monospace;
  font-size: 14px;
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #cccccc;
}

.hp-item:last-child {
  border-bottom: none;
}

.hp-item:hover,
.hp-item:active {
  background: #000000;
  color: #ffffff;
}

/* ============================================================
   VIEWS (help, search, settings)
   ============================================================ */

.view-header {
  font-family: Courier New, monospace;
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 0.1em;
  padding: 8px 0 4px 0;
}

/* View navigation (prev/next/title bar) */
.view-nav {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding: 8px 0 4px 0;
}

.view-title {
  font-family: Courier New, monospace;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  text-align: center;
}

.nav-btn {
  background: none;
  color: #111111;
  border: none;
  font-family: Courier New, monospace;
  font-size: 13px;
  font-weight: bold;
  padding: 6px 10px;
  min-height: 44px;
  cursor: pointer;
}

.help-row {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -webkit-box-align: start;
  -ms-flex-align: start;
  align-items: flex-start;
  padding: 6px 0;
  border-bottom: 1px solid #f5f5f5;
  min-height: 44px;
}

.help-cmd {
  font-family: Courier New, monospace;
  font-size: 14px;
  min-width: 160px;
  -ms-flex-negative: 0;
  flex-shrink: 0;
  padding-top: 2px;
  word-break: break-all;
}

.help-alias {
  font-family: Courier New, monospace;
  font-size: 14px;
  color: #cccccc;
  min-width: 36px;
  -ms-flex-negative: 0;
  flex-shrink: 0;
  padding-top: 2px;
}

.help-desc {
  font-family: Georgia, serif;
  font-size: 16px;
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  padding-top: 2px;
}

.help-back {
  padding: 8px 0;
}

/* Shared text-style button (back, clear search) */
.text-btn {
  font-family: Courier New, monospace;
  font-size: 15px;
  cursor: pointer;
  display: inline-block;
  min-height: 44px;
  line-height: 44px;
}

/* ============================================================
   UPCOMING SECTION
   ============================================================ */

.upcoming-block {
  margin-bottom: 28px;
  border-bottom: 2px solid #000000;
  padding-bottom: 12px;
}

.upcoming-header {
  font-family: Courier New, monospace;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 0.12em;
  padding: 6px 0 4px 0;
}

.upcoming-row {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -webkit-box-align: start;
  -ms-flex-align: start;
  align-items: flex-start;
  padding: 4px 0;
  border-bottom: 1px solid #f5f5f5;
  min-height: 36px;
}

.upcoming-date {
  font-family: Courier New, monospace;
  font-size: 13px;
  min-width: 80px;
  -ms-flex-negative: 0;
  flex-shrink: 0;
  padding-top: 2px;
  color: #111111;
}

.upcoming-sym {
  font-family: Courier New, monospace;
  font-size: 14px;
  min-width: 28px;
  -ms-flex-negative: 0;
  flex-shrink: 0;
  padding-top: 2px;
}

.upcoming-text {
  font-family: Georgia, serif;
  font-size: 16px;
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  padding-top: 2px;
  word-break: break-word;
}

/* ============================================================
   SETTINGS VIEW
   ============================================================ */

.settings-view {
  padding-bottom: 24px;
}

.settings-row {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
  min-height: 56px;
}

.settings-label {
  font-family: Courier New, monospace;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 0.06em;
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
}

.settings-control {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
}

.settings-btn {
  font-family: Courier New, monospace;
  font-size: 13px;
  font-weight: bold;
  background: #ffffff;
  color: #111111;
  border: 2px solid #000000;
  padding: 6px 10px;
  min-height: 44px;
  cursor: pointer;
  margin-left: 6px;
}

.settings-btn-active {
  background: #000000;
  color: #ffffff;
}

.settings-back {
  padding: 12px 0;
}

.settings-section-header {
  font-family: Courier New, monospace;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #cccccc;
  padding: 12px 0 4px 0;
}

.settings-value {
  font-family: Courier New, monospace;
  font-size: 13px;
  font-weight: bold;
  color: #111111;
}

.settings-muted {
  font-family: Courier New, monospace;
  font-size: 13px;
  color: #cccccc;
}

.settings-btn-row {
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}

.settings-btn-danger {
  font-family: Courier New, monospace;
  font-size: 13px;
  font-weight: bold;
  background: #000000;
  color: #ffffff;
  border: 2px solid #000000;
  padding: 6px 10px;
  min-height: 44px;
  cursor: pointer;
  margin-left: 6px;
}

.settings-confirm-area {
  background: #f5f5f5;
  border: 1px solid #cccccc;
  padding: 10px 12px;
  margin: 4px 0 8px 0;
}

.settings-confirm-msg {
  font-family: Courier New, monospace;
  font-size: 13px;
  color: #111111;
  margin-bottom: 8px;
}

.settings-confirm-btns {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}

.settings-archive-year {
  margin-right: 6px;
  margin-bottom: 6px;
}

.settings-control-wrap {
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}

/* ============================================================
   SIDEBAR (Phase 3)
   ============================================================ */

.sb-section {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
}

.sb-rule {
  border: none;
  border-top: 1px solid #cccccc;
  margin: 4px 0;
}

.sb-label {
  font-family: Courier New, monospace;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.1em;
  color: #cccccc;
  padding: 8px 16px 4px 16px;
  text-transform: uppercase;
}

.sb-item {
  font-family: Courier New, monospace;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 0.04em;
  padding: 0 16px;
  min-height: 44px;
  line-height: 44px;
  cursor: pointer;
  display: block;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
}

.sb-item-active {
  background: #000000;
  color: #ffffff;
}

.sb-tag-item {
  font-weight: normal;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  min-height: 36px;
  line-height: 36px;
}

.sb-count {
  color: #cccccc;
  font-size: 12px;
}

.sb-item-active .sb-count {
  color: #cccccc;
}

/* ============================================================
   WEEKLY VIEW
   ============================================================ */

.wk-day {
  margin-bottom: 8px;
  border-bottom: 1px solid #cccccc;
}

.wk-day-header {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding: 8px 0;
  cursor: pointer;
  min-height: 44px;
}

.wk-today {
  background: #f5f5f5;
  padding-left: 4px;
  padding-right: 4px;
}

.wk-day-name {
  font-family: Courier New, monospace;
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
}

.wk-day-count {
  font-family: Courier New, monospace;
  font-size: 12px;
  color: #cccccc;
  margin-right: 8px;
}

.wk-toggle {
  font-family: Courier New, monospace;
  font-size: 13px;
  font-weight: bold;
  min-width: 28px;
  text-align: right;
}

.wk-day-entries {
  padding-bottom: 8px;
}

/* ============================================================
   QUARTERLY VIEW
   ============================================================ */

.q-month {
  margin-bottom: 20px;
}

.q-month-header {
  font-family: Courier New, monospace;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 0.08em;
  padding: 6px 0 4px 0;
  text-transform: uppercase;
}

.q-cal {
  border: 1px solid #cccccc;
}

.q-week {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
}

.q-dow {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  font-family: Courier New, monospace;
  font-size: 10px;
  font-weight: bold;
  text-align: center;
  padding: 3px 0;
  border-bottom: 1px solid #cccccc;
  color: #cccccc;
}

.q-day,
.q-empty {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  font-family: Courier New, monospace;
  font-size: 12px;
  text-align: center;
  min-height: 44px;
  line-height: 24px;
  padding-top: 10px;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
  position: relative;
}

.q-empty {
  cursor: default;
}

.q-today {
  font-weight: bold;
  text-decoration: underline;
}

.q-has {
  background: #f5f5f5;
}

.q-count {
  display: block;
  font-size: 9px;
  color: #cccccc;
  line-height: 1;
  padding-bottom: 4px;
}

/* ============================================================
   YEARLY VIEW
   ============================================================ */

.yr-grid {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}

.yr-month {
  width: 33%;
  border: 1px solid #cccccc;
  margin-bottom: -1px;
  margin-right: -1px;
  padding: 12px;
  cursor: pointer;
  min-height: 60px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}

.yr-has {
  background: #f5f5f5;
}

.yr-name {
  font-family: Courier New, monospace;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.yr-count {
  font-family: Courier New, monospace;
  font-size: 18px;
  font-weight: bold;
  color: #111111;
  margin-top: 4px;
}

.yr-has .yr-count {
  color: #000000;
}

/* ============================================================
   COLLECTIONS VIEW
   ============================================================ */

.coll-row {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
  min-height: 44px;
  cursor: pointer;
}

.coll-tag {
  font-family: Courier New, monospace;
  font-size: 16px;
  font-weight: bold;
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
}

.coll-count {
  font-family: Courier New, monospace;
  font-size: 14px;
  color: #cccccc;
}

/* ============================================================
   HABITS VIEW
   ============================================================ */

.habit-row {
  padding: 10px 0 6px 0;
  border-bottom: 1px solid #f5f5f5;
}

.habit-name {
  font-family: Courier New, monospace;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 6px;
}

.habit-stats-grid {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  margin-bottom: 4px;
}

.hsg-cell {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  margin-right: 16px;
  min-width: 36px;
}

.hsg-val {
  font-family: Courier New, monospace;
  font-size: 18px;
  font-weight: bold;
  line-height: 1.1;
}

.hsg-lbl {
  font-family: Courier New, monospace;
  font-size: 10px;
  color: #cccccc;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.habit-streak-row {
  font-family: Courier New, monospace;
  font-size: 12px;
  color: #888888;
  padding-bottom: 6px;
}

/* ============================================================
   JUMP TO TODAY BUTTON (fixed, appears on scroll)
   ============================================================ */

#jump-today-btn {
  display: none;
  position: fixed;
  bottom: 110px;
  right: 16px;
  background: #000000;
  color: #ffffff;
  border: 2px solid #000000;
  font-family: Courier New, monospace;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.06em;
  padding: 8px 10px;
  min-height: 44px;
  cursor: pointer;
  z-index: 50;
}

/* ============================================================
   SIDEBAR SEARCH (Phase 4)
   ============================================================ */

.sb-search {
  padding: 8px 12px;
}

#sb-search-input {
  width: 100%;
  font-family: Courier New, monospace;
  font-size: 13px;
  border: 2px solid #000000;
  padding: 6px 8px;
  background: #ffffff;
  color: #111111;
  outline: none;
  min-height: 36px;
}

/* ============================================================
   SEARCH RESULTS — highlight & filter chips (Phase 4)
   ============================================================ */

mark.hl {
  background: none;
  font-weight: bold;
  color: #000000;
}

.search-chips {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.search-chip {
  font-family: Courier New, monospace;
  font-size: 12px;
  font-weight: bold;
  border: 1px solid #000000;
  padding: 2px 8px;
  margin-right: 6px;
  margin-bottom: 4px;
}

/* ============================================================
   ENTRY ACTIONS — edit / delete buttons (inline, right-aligned)
   ============================================================ */

.entry-act-btn {
  font-family: Courier New, monospace;
  font-size: 11px;
  color: #cccccc;
  background: none;
  border: none;
  padding: 0 4px;
  cursor: pointer;
  min-width: 22px;
  text-align: center;
  line-height: 1.6;
}

.entry-pin-btn,
.entry-coll-btn {
  font-size: 15px;
  min-width: 36px;
  min-height: 36px;
  padding: 2px 6px;
}

.entry-act-btn-on {
  color: #000000;
  font-weight: bold;
}

.sched-opts {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.sched-opt {
  font-family: Courier New, monospace;
  font-size: 10px;
  font-weight: bold;
  background: #000000;
  color: #ffffff;
  border: none;
  padding: 3px 5px;
  margin-left: 3px;
  cursor: pointer;
  min-height: 28px;
  white-space: nowrap;
}

.sched-cancel {
  background: #ffffff;
  color: #cccccc;
  border: 1px solid #cccccc;
}

/* Inline entry action / collection menu */
.menu-acts {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.menu-act {
  font-family: Courier New, monospace;
  font-size: 11px;
  font-weight: bold;
  background: #000000;
  color: #ffffff;
  border: none;
  padding: 4px 6px;
  margin: 2px 3px 2px 0;
  cursor: pointer;
  min-height: 28px;
  white-space: nowrap;
}

.menu-auto {
  background: #ffffff;
  color: #cccccc;
  border: 1px solid #cccccc;
}

/* Collections list extras */
.coll-badge {
  font-family: Courier New, monospace;
  font-size: 12px;
  color: #cccccc;
  font-weight: normal;
}

.coll-new-row {
  padding: 8px 0;
}

.coll-tags-hdr {
  margin-top: 4px;
}

/* Pinned blocks in quarterly / yearly */
.q-pins,
.yr-pins {
  margin-top: 8px;
  border-top: 1px solid #cccccc;
}

.q-pins-hdr,
.yr-pins-hdr {
  font-family: Courier New, monospace;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 0 4px 0;
  color: #111111;
}

/* Monthly freeze-panes table */
.mv-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-family: Courier New, monospace;
}

.mv-table th,
.mv-table td {
  border: 1px solid #cccccc;
  font-size: 13px;
  text-align: center;
  padding: 6px 2px;
  word-break: break-word;
}

.mv-table th {
  font-weight: bold;
  background: #f5f5f5;
}

.mv-fz {
  background: #ffffff;
}

.mv-table thead .mv-fz {
  background: #f5f5f5;
}


.mv-row {
  cursor: pointer;
}

.mv-row-empty {
  cursor: default;
}

.mv-row td {
  min-height: 36px;
}

.mv-today td {
  font-weight: bold;
}

.mv-today .mv-day {
  text-decoration: underline;
}

.mv-row:not(.mv-row-empty) .mv-day {
  text-decoration: underline;
}

.mv-sum td {
  font-weight: bold;
  background: #f5f5f5;
}

/* Load-older control in daily log */
.log-older {
  text-align: right;
  padding: 8px 12px;
  border-top: 1px solid #000000;
  border-bottom: 1px solid #000000;
  margin: 6px 0 14px 0;
}

.log-older .text-btn {
  border: none;
  background: none;
  margin-left: 18px;
  padding: 0;
}

.upcoming-nav {
  cursor: pointer;
}

.sym-input {
  font-family: Courier New, monospace;
  font-size: 14px;
  border: 1px solid #cccccc;
  padding: 6px 8px;
  width: 80px;
  text-align: center;
  background: #ffffff;
  color: #111111;
}

.coll-rename-btn,
.coll-edittag-btn,
.coll-delete-btn,
.habit-rename-btn {
  font-size: 13px;
  min-height: 36px;
  line-height: 36px;
  margin-left: 10px;
  color: #555555;
  border: none;
  background: none;
}

/* Gap marker in daily log (expanded window with no entries) */
.log-gap {
  font-family: Courier New, monospace;
  font-size: 13px;
  color: #cccccc;
  padding: 6px 0;
  text-align: center;
}

/* Date label above pinned entries in quarterly / yearly views */
.pin-date-label {
  font-family: Courier New, monospace;
  font-size: 12px;
  font-weight: bold;
  color: #888888;
  padding: 6px 0 2px 0;
  letter-spacing: 0.04em;
}

/* Soft-deleted entries — paper notebook strikethrough */
.entry-soft-deleted .entry-symbol,
.entry-soft-deleted .upcoming-sym {
  color: #cccccc;
}

.entry-soft-deleted .entry-text,
.entry-soft-deleted .upcoming-text {
  text-decoration: line-through;
  color: #cccccc;
}

.entry-soft-deleted .upcoming-date {
  color: #cccccc;
}

/* Icon-only quick-fill buttons */
.quick-btn-icon {
  min-width: 44px;
  padding-left: 8px;
  padding-right: 8px;
  font-size: 15px;
  letter-spacing: 0;
}

/* ============================================================
   EDIT MODE — input bar indicator
   ============================================================ */

#input-bar.editing-mode {
  border-top: 3px solid #000000;
}

/* ============================================================
   UNDO BUTTON — inside delete message
   ============================================================ */

.undo-btn {
  font-family: Courier New, monospace;
  font-size: 13px;
  font-weight: bold;
  color: #000000;
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
  margin-left: 6px;
  cursor: pointer;
}
