:root {
  color-scheme: light;
  --bg: oklch(0.97 0.009 168);
  --panel: oklch(0.995 0.004 168);
  --panel-2: oklch(0.94 0.012 168);
  --text: oklch(0.21 0.018 166);
  --muted: oklch(0.46 0.018 166);
  --line: oklch(0.86 0.016 166);
  --accent: oklch(0.45 0.12 158);
  --accent-strong: oklch(0.36 0.13 158);
  --warn: oklch(0.52 0.13 25);
  --shadow: 0 18px 50px oklch(0.22 0.02 166 / 0.1);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(180deg, oklch(0.93 0.018 168), transparent 310px),
    var(--bg);
  color: var(--text);
}

button,
input,
textarea {
  font: inherit;
}

button,
.file-button,
.docs-link {
  min-height: 40px;
  border: 1px solid oklch(0.36 0.12 158);
  border-radius: 7px;
  background: var(--accent);
  color: oklch(0.985 0.006 168);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 150ms ease-out,
    background-color 150ms ease-out,
    border-color 150ms ease-out;
}

button:hover,
.file-button:hover,
.docs-link:hover {
  background: var(--accent-strong);
}

button:active,
.file-button:active,
.docs-link:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.ghost:hover {
  background: var(--panel-2);
  border-color: oklch(0.76 0.02 166);
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: none;
  font-size: 2.65rem;
  line-height: 1.02;
  font-weight: 850;
}

h2 {
  font-size: 1.05rem;
  line-height: 1.2;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.auth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding: 16px;
  margin-bottom: 16px;
}

.auth-actions,
.actions,
.section-head {
  display: flex;
  gap: 10px;
  align-items: center;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 16px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.42fr);
  gap: 16px;
}

.upload-panel,
.side-stack .panel {
  padding: 18px;
}

.side-stack {
  display: grid;
  gap: 16px;
  align-content: start;
}

label {
  display: grid;
  gap: 7px;
}

label > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: oklch(0.985 0.004 168);
  color: var(--text);
  outline: none;
}

input {
  height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 300px;
  padding: 14px;
  resize: vertical;
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, ui-monospace, monospace;
  font-size: 0.9rem;
  line-height: 1.55;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px oklch(0.65 0.11 158 / 0.16);
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.html-field {
  margin-bottom: 14px;
}

.actions {
  justify-content: flex-start;
}

.tight {
  margin: 12px 0 0;
}

.file-input {
  position: absolute;
  left: -10000px;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.result,
.secret-output {
  margin-top: 14px;
  border: 1px solid oklch(0.78 0.05 158);
  border-radius: 8px;
  background: oklch(0.94 0.04 158);
  padding: 12px;
}

.result a,
.item a {
  color: var(--accent-strong);
  font-weight: 760;
  word-break: break-word;
}

.secret-output code {
  display: block;
  overflow-wrap: anywhere;
  margin: 8px 0 10px;
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, ui-monospace, monospace;
  font-size: 0.82rem;
}

.list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.item {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: oklch(0.985 0.005 168);
  padding: 12px;
}

.item-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.item-title {
  margin: 0;
  font-weight: 790;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.meta {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-actions button,
.inline-actions a {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.82rem;
}

.danger {
  border-color: oklch(0.58 0.13 25);
  color: var(--warn);
}

.danger:hover {
  background: oklch(0.95 0.035 25);
  border-color: oklch(0.5 0.13 25);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: min(390px, calc(100% - 40px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: oklch(0.21 0.018 166);
  color: oklch(0.97 0.009 168);
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

@media (max-width: 860px) {
  .shell {
    width: min(100% - 24px, 720px);
    padding-top: 22px;
  }

  .topbar {
    align-items: start;
  }

  h1 {
    font-size: 2.3rem;
  }

  .auth-grid,
  .workspace,
  .field-row {
    grid-template-columns: 1fr;
  }

  .auth-actions {
    justify-content: stretch;
  }

  .auth-actions button,
  .actions button {
    flex: 1;
  }

  textarea {
    min-height: 260px;
  }
}

@media (max-width: 540px) {
  .topbar,
  .section-head,
  .item-head {
    flex-direction: column;
    align-items: stretch;
  }

  h1 {
    max-width: none;
    font-size: 2rem;
  }

  .docs-link,
  .file-button {
    width: 100%;
  }

  .upload-panel,
  .side-stack .panel,
  .auth-grid {
    padding: 14px;
  }
}
