:root {
  --ui-warn: #e16b8c; /* KOHBAI */
  --ui-info: #58b2dc; /* SORA */
}

body {
  display: flex;
  justify-content: center;
  padding: 2em;
  box-sizing: border-box;
  background: #f5f5f5;
  margin: 0;
  font-family: system-ui, sans-serif;
  color: #24292f;
}

.container {
  max-width: 700px;
  width: 100%;
  min-height: 568px;
  padding: 2em;
  border-radius: 12px;
  box-sizing: border-box;
}

#new-note p {
  margin-top: 0.5em;
}

.warn-text {
  color: var(--ui-warn);
}

.note-input {
  display: flex;
  flex-direction: column;
  gap: 1.5em;
}

.note-button {
  display: flex;
  justify-content: flex-end;
}

.view-note-button {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}

textarea {
  box-sizing: border-box;
  width: 100%;
  line-height: 1.3rem;
  min-height: min(calc(100vh - 30rem), 24rem);
  background-color: #ffffff;
  color: #24292f;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  resize: vertical;
  outline: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

textarea[readonly] {
  resize: none;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  border: 1px solid #ccc;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
}

button {
  padding: 0.5rem 2rem;
  border: 1px solid #ccc;
  background: #fafafa;
  border-radius: 6px;
  cursor: pointer;
}

button:hover {
  background-color: #f0f0f0;
}

label small {
  display: block;
  margin-bottom: 0.5em;
  color: #666;
}

.link-group {
  position: relative;
  display: flex;
  gap: 0.5em;
  align-items: center;
}

.copy-btn {
  position: absolute;
  right: 0.5em;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.3em 0.6em;
  font-size: 0.8rem;
  border: none;
  background: none;
  border-radius: 5px;
  cursor: pointer;
}

input[type="text"] {
  width: 100%;
  padding: 0.75em 3.5em 0.75em 1em;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
}

.qrcode-container {
  display: flex;
  flex-direction: column;
  justify-items: flex-start;
  align-items: flex-start;
  margin-top: 2em;
  text-align: center;
}

.qrcode-container small {
  text-align: left;
  display: block;
  margin-bottom: 0.5em;
}

#qrcode-box {
  border: 1px solid #ccc;
  padding: 0.5rem;
  box-sizing: border-box;
}

#qrcode-box canvas {
  width: 200px;
  height: 200px;
  border: none;
  padding: 0;
  margin: 0;
  background: transparent;
  display: block;
}

p {
  margin-top: 2em;
  font-size: 0.9rem;
  color: #444;
}

.hidden {
  display: none;
}

.toast {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  min-width: 200px;
  max-width: 300px;
  padding: 0.75em 1.25em;
  font-size: 0.9rem;
  border-radius: 6px;
  color: #fff;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.toast.hidden {
  opacity: 0;
  transform: translateY(-10px);
}

.toast.info {
  background-color: var(--ui-info);
}

.toast.warn {
  background-color: var(--ui-warn);
}

@media (max-width: 767px) {
  body {
    padding: 0.5em;
  }

  .container {
    padding: 0.5em;
    margin-top: 2.5em;
  }
}
