.note-main {
  min-height: calc(100vh - 155px);
  padding: 132px var(--page-pad) 54px;
}

.note-shell {
  position: relative;
  display: grid;
  width: min(100%, 1440px);
  min-height: 680px;
  grid-template-columns: minmax(0, 0.82fr) minmax(470px, 0.72fr);
  gap: clamp(54px, 8vw, 130px);
  align-items: center;
  margin: 0 auto;
  overflow: hidden;
  padding: clamp(42px, 6vw, 86px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(90deg, rgba(7, 8, 7, 0.97), rgba(10, 10, 9, 0.82)),
    var(--panel-solid);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.34);
  isolation: isolate;
}

.note-shell::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 92px 92px;
  mask-image: linear-gradient(90deg, #000, transparent 72%);
}

.note-shell::after {
  position: absolute;
  z-index: -1;
  width: 660px;
  height: 660px;
  top: -300px;
  right: -250px;
  border: 1px solid rgba(229, 170, 67, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 80px rgba(229, 170, 67, 0.018),
    0 0 0 160px rgba(229, 170, 67, 0.012);
  content: "";
}

.note-intro {
  position: relative;
  z-index: 2;
}

.note-intro h1 {
  margin: 0;
  font-family: "Space Grotesk", Manrope, sans-serif;
  font-size: clamp(56px, 5vw, 84px);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.94;
}

.note-intro h1 span {
  color: var(--gold-light);
}

.note-intro > p {
  max-width: 580px;
  margin: 34px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.note-features {
  display: flex;
  flex-wrap: wrap;
  gap: 11px 22px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--white-line);
  color: #8f8b83;
  font-size: 11px;
}

.note-features span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.note-features i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 9px rgba(229, 170, 67, 0.65);
}

.note-panel {
  position: relative;
  z-index: 3;
  padding: clamp(28px, 3.6vw, 48px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: rgba(15, 16, 14, 0.92);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.note-connection {
  color: #827f78;
}

.note-connection i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: #5e5b55;
}

.note-connection.is-live {
  color: #c4b98f;
}

.note-connection.is-live i {
  background: var(--gold);
  box-shadow: 0 0 12px rgba(229, 170, 67, 0.8);
}

.note-connection.is-blocked {
  color: #d39b84;
}

.note-connection.is-blocked i {
  background: #d37b5e;
  box-shadow: 0 0 10px rgba(211, 123, 94, 0.6);
}

.code-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.code-field:focus-within {
  border-color: rgba(229, 170, 67, 0.65);
  box-shadow: 0 0 0 3px rgba(229, 170, 67, 0.08);
}

.code-field input {
  width: 100%;
  min-width: 0;
  height: 60px;
  padding: 0 17px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-family: "Space Grotesk", Manrope, sans-serif;
  font-size: 15px;
}

.code-field input::placeholder {
  color: #5f5d58;
}

.code-field button {
  min-width: 130px;
  padding: 0 17px;
  border: 0;
  border-left: 1px solid rgba(229, 170, 67, 0.22);
  color: #171005;
  background: linear-gradient(135deg, #f1cc7c, #d09134);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.code-field button span {
  margin-left: 8px;
  font-size: 16px;
}

.code-field button:disabled {
  color: #66635e;
  background: rgba(255, 255, 255, 0.035);
  cursor: not-allowed;
}

.text-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 27px;
}

.text-heading .field-label {
  margin-top: 0;
}

#character-count {
  color: #77746e;
  font-family: "Space Grotesk", Manrope, sans-serif;
  font-size: 10px;
  letter-spacing: 0.08em;
}

#note-text {
  display: block;
  width: 100%;
  min-height: 285px;
  resize: vertical;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 13px;
  outline: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    rgba(255, 255, 255, 0.018);
  background-size: 100% 32px;
  font: 400 15px/2 Manrope, Arial, sans-serif;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

#note-text:focus {
  border-color: rgba(229, 170, 67, 0.62);
  box-shadow: 0 0 0 3px rgba(229, 170, 67, 0.07);
}

#note-text:disabled {
  color: #6b6862;
  cursor: not-allowed;
}

#note-text::placeholder {
  color: #5f5c57;
}

.note-panel-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  min-height: 38px;
  margin-top: 12px;
}

#note-status {
  margin: 0;
  color: #8d8982;
  font-size: 11px;
  line-height: 1.55;
}

#note-status.is-error {
  color: #d9a18b;
}

#note-status.is-success {
  color: #bdb58c;
}

#save-state {
  flex: 0 0 auto;
  color: #77746e;
  font-family: "Space Grotesk", Manrope, sans-serif;
  font-size: 9px;
  letter-spacing: 0.13em;
}

#save-state.is-active {
  color: var(--gold-light);
}

.note-warning {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--white-line);
  color: #6f6c66;
  font-size: 10px;
  line-height: 1.55;
}

@media (max-width: 1050px) {
  .note-shell {
    grid-template-columns: 1fr;
  }

  .note-intro {
    max-width: 760px;
  }
}

@media (max-width: 720px) {
  .note-main {
    min-height: calc(100vh - 145px);
    padding: 100px 18px 24px;
  }

  .note-shell {
    gap: 40px;
    padding: 30px 20px 20px;
    border-radius: 21px;
  }

  .note-intro h1 {
    font-size: clamp(45px, 12.3vw, 54px);
  }

  .note-intro > p {
    margin-top: 25px;
    font-size: 15px;
  }

  .note-features {
    margin-top: 27px;
  }

  .note-panel {
    padding: 25px 18px;
    border-radius: 17px;
  }

  .code-field {
    grid-template-columns: 1fr;
  }

  .code-field button {
    min-height: 48px;
    border-top: 1px solid rgba(229, 170, 67, 0.22);
    border-left: 0;
  }

  #note-text {
    min-height: 310px;
  }
}
