/* Completed View (Revealed by Triple Tap) */
.completed-view {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: rgba(85, 60, 35, 0.22) transparent;
  padding: 0 0 calc(36px + env(safe-area-inset-bottom, 0px)) 0;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.completed-view.active {
  display: flex;
}

/* Custom discreet paper scrollbar for WebKit (Chrome, Safari, iOS, Android, Edge) */
.completed-view::-webkit-scrollbar {
  width: 5px;
}

.completed-view::-webkit-scrollbar-track {
  background: transparent;
}

.completed-view::-webkit-scrollbar-thumb {
  background: rgba(85, 60, 35, 0.18);
  border-radius: 4px;
}

.completed-view::-webkit-scrollbar-thumb:hover {
  background: rgba(85, 60, 35, 0.35);
}

.completed-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 16px 20px 14px 72px;
  background: var(--sheet-bg);
  border-bottom: 1px dashed var(--paper-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.completed-header::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 56px;
  width: 1.5px;
  background-color: var(--margin-line);
  pointer-events: none;
}

.completed-title {
  font-family: var(--heading-font);
  font-size: 18px;
  color: var(--ink-primary);
  font-style: italic;
  font-weight: 500;
}

.date-group {
  margin-top: 14px;
}

.date-group-header {
  padding: 9px 20px 7px 72px;
  font-family: var(--font-zen);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--paper-line);
}

.completed-item {
  padding: 13px 20px 13px 72px;
  border-bottom: 1px solid var(--paper-line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  transition: background-color 0.15s ease;
}

.completed-item:hover {
  background: rgba(85, 60, 35, 0.03);
}

.completed-item:active {
  background: rgba(85, 60, 35, 0.07);
}

.completed-item-text {
  color: var(--complete-ink);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: var(--ink-secondary);
  font-size: 16px;
  line-height: 1.5;
  flex: 1;
}

.completed-meta {
  font-size: 12px;
  color: var(--ink-secondary);
  white-space: nowrap;
  display: flex;
  gap: 8px;
  align-items: center;
}

.zen-tag {
  color: #92533C;
  font-style: italic;
  font-weight: 500;
}
