:root {
  color-scheme: dark;
  --bg: #090d12;
  --surface: #10171e;
  --field: #0b1117;
  --line: #33434c;
  --text: #edf3f6;
  --muted: #acbbc2;
  --accent: #58e6ed;
  font:
    16px/1.55 system-ui,
    -apple-system,
    sans-serif;
  color: var(--text);
  background: var(--bg);
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.container {
  width: min(100% - 2.5rem, 48rem);
  margin-inline: auto;
}
.header-row,
.attach-head,
.input-row,
.create-actions,
.output-head,
.attach-actions,
.page-heading,
.button-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.header-row,
.attach-head,
.create-actions,
.page-heading {
  justify-content: space-between;
}
.site-header {
  border-block-end: 1px solid var(--line);
}
.header-row {
  min-height: 4.5rem;
}
.brand {
  display: inline-flex;
  gap: 0.65rem;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}
.brand strong {
  font-size: 1.23rem;
  letter-spacing: -0.045em;
}
.brand span {
  font-weight: 420;
}
.security-link,
.muted,
.card-sub,
.quiet-copy,
.page-heading p,
.label-hint,
.options p,
.create-actions p {
  color: var(--muted);
}
.security-link {
  font-size: 0.88rem;
  text-underline-offset: 0.22em;
}
main.container {
  flex: 1;
  padding-block: clamp(2rem, 7vh, 5.25rem);
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: clamp(2.15rem, 6vw, 3.75rem);
  line-height: 1.06;
  font-weight: 610;
  letter-spacing: -0.065em;
  text-wrap: balance;
}
h2 {
  font-size: 1.14rem;
}
.page-heading {
  margin-bottom: 1.75rem;
}
.page-heading p,
h1 + p {
  margin-top: 0.65rem;
}
.single-surface,
.note-document {
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  padding: clamp(1rem, 4vw, 2rem);
  background: var(--surface);
}
.narrow-view {
  max-width: 36rem;
  margin: auto;
}
.gate-surface,
.explainer,
.result-grid,
.result-surface {
  display: grid;
  gap: 1.25rem;
}
.gate-surface h1,
.note-document h1 {
  font-size: clamp(1.85rem, 4vw, 2.8rem);
}
.editor {
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--field);
}
.editor:focus-within,
.editor.drag {
  border-color: var(--accent);
}
.md-bar {
  position: relative;
  border-bottom: 1px solid var(--line);
}
.md-toolbar,
.md-menu {
  display: flex;
  align-items: center;
  padding: 0.3rem;
}
.md-menu {
  position: absolute;
  z-index: 2;
  right: 0;
  max-width: 100%;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}
button,
input,
select {
  color: inherit;
  font: inherit;
}
button,
select,
summary {
  cursor: pointer;
}
.md-btn {
  flex: 0 0 2.15rem;
  height: 2.15rem;
  background: transparent;
  border: 0;
  border-radius: 0.3rem;
  color: var(--muted);
}
.md-btn:hover,
.md-btn[aria-pressed="true"] {
  background: #20303b;
  color: var(--accent);
}
.md-icon {
  width: 1rem;
  height: 1rem;
}
.md-sep {
  height: 1rem;
  border-left: 1px solid var(--line);
  margin-inline: 0.15rem;
}
.composer {
  min-height: 11rem;
  padding: 1rem;
  outline-offset: -3px;
  overflow-wrap: anywhere;
}
.composer.is-empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  float: left;
  pointer-events: none;
}
.attachment-section,
.options,
.create-actions,
.button-row,
.result-field h2 {
  margin-top: 1.25rem;
}
.attach-label,
.field label,
.result-field label,
summary {
  font-weight: 600;
}
.label-hint,
.chip-meta,
.att-meta {
  font-size: 0.8rem;
  font-weight: 400;
}
.options {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.option-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
  margin: 1rem 0 0.65rem;
}
label {
  display: block;
  margin-bottom: 0.4rem;
}
select,
input {
  width: 100%;
  min-width: 0;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  padding: 0.65rem;
}
.options p,
.create-actions p,
.quiet-copy,
.share-note,
.att-meta {
  font-size: 0.89rem;
}
.btn,
.att-remove {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 2.65rem;
  padding: 0.55rem 0.95rem;
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}
.btn:hover,
.att-remove:hover {
  border-color: var(--accent);
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  padding-inline: 1.6rem;
}
.btn-primary:hover {
  background: #a1f4f6;
}
.btn:disabled {
  opacity: 0.62;
  cursor: wait;
}
.btn-block {
  width: 100%;
}
a {
  color: var(--accent);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
[hidden],
.hidden,
.sep-hidden {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.mono,
code,
pre,
.success-text,
.chip-meta {
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.success-text {
  color: var(--accent);
}
.warning,
.banner,
.destroyed-status {
  background: #192932;
  padding: 0.85rem 1rem;
  border-left: 2px solid var(--accent);
  border-radius: 0.25rem;
}
.banner-danger {
  border-color: #ffaaa8;
  color: #ffc7c5;
}
.banner,
.destroyed-status {
  margin-block: 0.75rem;
}
.rendered-md {
  overflow-wrap: anywhere;
}
.rendered-md img,
.att-pop-img {
  max-width: 100%;
  max-height: 28rem;
  object-fit: contain;
}
.rendered-md pre,
.att-pop {
  overflow: auto;
}
.rendered-md blockquote {
  border-left: 2px solid var(--accent);
  margin-left: 0;
  padding-left: 1em;
}
.output-head {
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.output-head h1 {
  margin-right: auto;
}
.attach-list {
  list-style: none;
  padding: 0;
  margin: 0.65rem 0 0;
}
.attach-list:empty,
.card-sub:empty {
  display: none;
}
.att-card,
.chip {
  display: flex;
  position: relative;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem;
  border-bottom: 1px solid var(--line);
}
.att-info {
  display: grid;
  min-width: 0;
  overflow-wrap: anywhere;
  flex: 1;
}
.att-thumb img {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
}
.att-pop {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 2;
  max-height: 15rem;
  max-width: 100%;
  padding: 1rem;
  background: var(--field);
  border: 1px solid var(--line);
}
.att-card.is-open .att-pop {
  display: block;
}
.explainer {
  align-content: start;
}
.explainer section {
  border-top: 1px solid var(--line);
  padding-top: 1.3rem;
}
.explainer p {
  color: var(--muted);
  margin-top: 0.4rem;
}
.explainer .btn {
  justify-self: start;
}
body:has(#note-view:not(.hidden)) .q-left {
  transform: translateX(2px);
}
body:has(#note-view:not(.hidden)) .q-right {
  transform: translateX(-2px);
}
@media (prefers-reduced-motion: no-preference) {
  .q-left,
  .q-right {
    transition: transform 0.22s ease-out;
  }
}
@media (max-width: 36rem) {
  .container {
    width: calc(100% - 2rem);
  }
  .attach-head,
  .create-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .option-grid {
    grid-template-columns: 1fr;
  }
  .input-row {
    flex-wrap: wrap;
  }
  .input-row input {
    flex: 1 0 100%;
  }
  .attach-actions {
    flex-wrap: wrap;
  }
  .label-hint {
    display: block;
  }
}
.transfer-panel {
  margin-block: 0 2rem;
  padding: 1rem 1.15rem;
  border-block: 1px solid var(--line);
  font-size: 0.87rem;
}
.transfer-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.transfer-head h2 {
  font-size: 0.94rem;
}
#transfer-state {
  color: var(--accent);
}
.transfer-panel p {
  margin-block: 0.35rem;
  color: var(--muted);
}
.transfer-panel summary {
  width: fit-content;
  text-underline-offset: 0.2em;
}
#transfer-metrics {
  font-size: 0.79rem;
}

.editor-setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.4rem;
}
.editor-setting label:last-child {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.editor-setting input {
  width: auto;
  accent-color: var(--accent);
}
.plain-editor {
  display: block;
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
}
.literal-note {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
[hidden] {
  display: none !important;
}
