.note-surface-bar {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.note-surface-bar__spacer {
  flex: 1;
}

.note-surface-bar__back,
.note-surface-bar__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

.note-surface-bar__action--primary {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--text);
  font-weight: 650;
}

.note-show {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px 18px 16px;
}

.note-show__title {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.note-show__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.note-show__body {
  font-size: 15px;
  line-height: 1.5;
}

.note-show__edit {
  margin-top: 6px;
}

.note-show__edit-fields {
  display: grid;
  gap: 10px;
}

.note-show__edit-title,
.note-show__edit-body {
  width: 100%;
  border-radius: 0;
  border: 0;
  background: transparent;
  padding: 12px 12px;
  outline: none;
  font: inherit;
}

.note-show__edit-title:focus-visible,
.note-show__edit-body:focus-visible {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.note-show__edit-title {
  font-size: 18px;
}

.note-show__edit-title::placeholder,
.note-show__edit-body::placeholder {
  color: var(--muted);
  opacity: 1;
}

.note-show__edit-body {
  resize: none;
  overflow: hidden;
  min-height: 180px;
  font-size: 15px;
  line-height: 1.5;
}

.note-show__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.note-show__tags {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.note-show__tags-header {
  margin-bottom: 8px;
  color: var(--muted);
}

.note-show__tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.note-show__tag-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.note-show__tag-input {
  flex: 1;
  min-width: 220px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  outline: none;
}

.note-show__tag-input:focus {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.pill-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pill-group form {
  display: inline;
  margin: 0;
}

@media (max-width: 640px) {
  body.note-surface .app-header {
    display: none;
  }

  body.note-surface .app-main {
    max-width: none;
    padding: 0 0 28px;
  }

  body.note-surface .page {
    margin: 0;
  }

  body.note-surface .note-surface-bar {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 20;
    padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
    margin: 0;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: blur(10px);
  }

  body.note-surface .note-show {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 14px 14px calc(18px + env(safe-area-inset-bottom));
    min-height: calc(100dvh - 56px);
  }

  body.note-surface .note-show__edit-body {
    min-height: 52dvh;
  }
}


