:root {
  --red: #92180f;
  --red-dark: #7e1109;
  --paper: #fffbd0;
  --line: #bfbfbf;
  --text: #111;
  --muted: #5d5d5d;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  min-height: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Verdana, Arial, sans-serif;
  font-size: 18px;
  font-weight: 300;
  text-align: center;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: #000;
}

.topbar {
  min-height: 88px;
  background: #960000;
  border-bottom: 14px solid #f1f1f1;
  display: flex;
  align-items: center;
  padding: 0;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  width: 740px;
  height: 74px;
  margin: 0 auto;
  padding: 8px 0;
  color: #fff;
  font-size: clamp(34px, 5vw, 44px);
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  letter-spacing: -1px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}

.brand-lock {
  position: relative;
  width: 24px;
  height: 24px;
  margin: 0 1px;
  border-radius: 3px;
  background: #f3efd0;
  transform: translateY(3px);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.brand-lock::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red-dark);
}

.brand-lock::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 12px;
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: var(--red-dark);
}

.top-air {
  height: min(44vh, 338px);
  background: #fff;
}

.content-shell {
  width: 760px;
  margin: 0 auto;
  padding: 0 10px;
  text-align: left;
}

.note-box h1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 8px;
  font-size: 27px;
  line-height: 1.12;
  font-weight: 800;
}

.help-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.help-button {
  min-width: 40px;
  min-height: 34px;
  border: 1px solid #aaa;
  border-radius: 4px;
  background: #eee;
  color: #333;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 1px 0 #fff;
  cursor: pointer;
}

.help-popover {
  position: absolute;
  z-index: 5;
  top: 42px;
  right: 0;
  width: min(290px, calc(100vw - 28px));
  padding: 10px 12px;
  background: #ffffe6;
  border: 1px solid #b8b06a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  color: #222;
  font-size: 14px;
  font-weight: 400;
}

.note-textarea {
  display: block;
  width: 100%;
  height: 250px;
  min-height: 150px;
  resize: vertical;
  border: 0;
  background: var(--paper);
  color: #333;
  padding: 12px;
  font-family: "Courier New", Courier, monospace;
  font-size: 18px;
  line-height: 1.45;
  outline: none;
}

.note-textarea:focus {
  box-shadow: 0 0 0 2px rgba(216, 197, 77, 0.2);
}

.read-only {
  min-height: 220px;
}

.primary-button,
.secondary-button,
.inline-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 54px;
  border-radius: 4px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  margin-top: 16px;
  border: 1px solid var(--red-dark);
  background: #960000;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.secondary-button {
  margin-top: 16px;
  border: 1px solid #b9b9b9;
  background: linear-gradient(#fbfbfb, #e7e7e7);
  color: #222;
  font-weight: 400;
  box-shadow: inset 0 1px 0 #fff;
}

.secondary-button.danger {
  color: #821b12;
}

.options-panel {
  margin-top: 12px;
  border: 1px solid var(--line);
  background: #f5f5f5;
  padding: 14px;
}

.field-row,
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.field-row {
  justify-content: space-between;
  flex-wrap: wrap;
}

.field-row span,
.check-row span,
.password-field span {
  font-weight: 700;
}

.field-row select,
.nested-fields input,
.password-control input,
.link-copy input {
  min-height: 40px;
  border: 1px solid #b7b7b7;
  border-radius: 3px;
  background: #fff;
  padding: 8px 10px;
}

.field-row select {
  min-width: 220px;
}

.check-row input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.nested-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: -2px 0 14px 28px;
}

.nested-fields input {
  width: 100%;
}

.result-panel p,
.notice,
.destroyed-note {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 17px;
}

.link-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 8px;
  margin: 10px 0 14px;
}

.link-copy input {
  width: 100%;
}

.link-copy button,
.password-control button {
  border: 1px solid #b9b9b9;
  border-radius: 3px;
  background: linear-gradient(#fbfbfb, #e7e7e7);
  color: #222;
  cursor: pointer;
}

.error-message {
  color: #8a1008;
  font-weight: 700;
}

.warning-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d2c46c;
  background: #fffbe0;
  color: #2c2c2c;
  font-weight: 700;
}

.password-field {
  display: grid;
  gap: 7px;
  margin: 14px 0 0;
}

.password-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 8px;
}

.inline-action {
  width: auto;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid #b9b9b9;
  background: linear-gradient(#fbfbfb, #e7e7e7);
  color: #222;
  font-weight: 700;
}

.footer {
  width: 760px;
  margin: 28px auto 0;
  padding: 0 10px 20px;
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
  color: #777;
  font-size: 14px;
  text-align: left;
}

.footer a {
  color: #888;
}

.footer select {
  min-height: 30px;
}

.version {
  color: #777;
}

.hidden {
  display: none !important;
}

@media (max-width: 760px) {
  .topbar {
    min-height: 54px;
    border-bottom: 0;
    padding: 0 10px;
  }

  .brand {
    width: auto;
    height: auto;
    margin: 0;
    padding: 5px 0;
    font-size: 34px;
  }

  .top-air {
    height: min(46vh, 338px);
  }

  .content-shell,
  .footer {
    width: 100%;
    padding-inline: 10px;
  }

  .note-box h1 {
    font-size: 25px;
  }

  .note-textarea {
    height: 150px;
    min-height: 150px;
    font-size: 16px;
  }

  .primary-button {
    font-size: 18px;
  }

  .nested-fields {
    grid-template-columns: 1fr;
    margin-left: 0;
  }

  .field-row {
    align-items: stretch;
  }

  .field-row select {
    width: 100%;
  }

  .check-row {
    align-items: flex-start;
  }
}
