:root {
  color-scheme: light;
  font-family: "Yu Gothic", "Hiragino Sans", "Noto Sans CJK JP", system-ui, sans-serif;
  background: #f4f1ea;
  color: #26312d;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 14% 10%, rgba(255, 255, 255, 0.78), transparent 34rem),
    #f4f1ea;
}

button,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  padding: clamp(1rem, 4vw, 4rem);
  place-items: center;
}

.note-card {
  width: min(100%, 900px);
  padding: clamp(1.25rem, 4vw, 2.75rem);
  border: 1px solid rgba(42, 59, 52, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 22px 60px rgba(60, 63, 53, 0.1);
  backdrop-filter: blur(12px);
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: #718177;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

h1 {
  margin: 0;
  color: #20342d;
  font-size: clamp(1.8rem, 5vw, 2.7rem);
  letter-spacing: -0.04em;
}

.tagline {
  max-width: 15rem;
  margin: 0 0 0.1rem;
  color: #718177;
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: right;
}

textarea {
  display: block;
  width: 100%;
  min-height: clamp(22rem, 58vh, 37rem);
  padding: 1.1rem 1.15rem;
  border: 1px solid #cbd6d0;
  border-radius: 15px;
  outline: none;
  background: #fbfcfa;
  color: #26312d;
  font-size: 1rem;
  line-height: 1.7;
  resize: vertical;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

textarea:focus {
  border-color: #3c7662;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(60, 118, 98, 0.12);
}

textarea:disabled {
  cursor: wait;
  opacity: 0.75;
}

.actions {
  display: flex;
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.button {
  min-width: 6rem;
  min-height: 2.8rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:focus-visible {
  outline: 3px solid rgba(60, 118, 98, 0.28);
  outline-offset: 2px;
}

.button:disabled {
  cursor: wait;
  opacity: 0.45;
}

.button-primary {
  background: #2f6c58;
  color: #fff;
}

.button-primary:hover:not(:disabled) {
  background: #245844;
}

.button-secondary {
  border-color: #cbd6d0;
  background: transparent;
  color: #2f6c58;
}

.button-secondary:hover:not(:disabled) {
  border-color: #8cad9d;
  background: #eff6f1;
}

.button-danger {
  border-color: #d9aaa4;
  background: transparent;
  color: #a4483d;
}

.button-danger:hover:not(:disabled) {
  border-color: #c78178;
  background: #fff4f2;
}

.note-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  color: #718177;
  font-size: 0.82rem;
  line-height: 1.5;
}

.note-meta p {
  margin: 0;
}

.status {
  font-weight: 700;
}

.status-success {
  color: #2f6c58;
}

.status-error {
  color: #a4483d;
}

.status-neutral {
  color: #718177;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 560px) {
  .app-shell {
    padding: 0.75rem;
  }

  .note-card {
    padding: 1.1rem;
    border-radius: 18px;
  }

  .page-header {
    display: block;
  }

  .tagline {
    max-width: none;
    margin-top: 0.35rem;
    text-align: left;
  }

  textarea {
    min-height: 60vh;
  }

  .actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .button {
    width: 100%;
    min-width: 0;
    padding-right: 0.45rem;
    padding-left: 0.45rem;
  }

  .note-meta {
    display: block;
  }

  .note-meta p + p {
    margin-top: 0.3rem;
  }
}
