* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: #f5f6f8;
  color: #1a1a1a;
}

.view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px;
}

.hidden {
  display: none !important;
}

.login-card {
  margin-top: 20vh;
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.login-card input {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
}

.login-card button,
.memo-form button {
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: #2f6fed;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.error {
  color: #e0433e;
  min-height: 1.2em;
  font-size: 14px;
}

#app-view {
  width: 100%;
  max-width: 480px;
}

header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.ghost-btn {
  background: none;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
  color: #555;
}

.memo-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.memo-form textarea {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  min-height: 72px;
  resize: vertical;
  font-family: inherit;
}

.memo-list {
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.memo-item {
  background: #fff;
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.memo-text {
  white-space: pre-wrap;
  margin: 0 0 8px;
  word-break: break-word;
}

.memo-meta {
  font-size: 12px;
  color: #888;
  margin-bottom: 10px;
}

.memo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.memo-actions button,
.memo-actions a {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: #f0f2f5;
  color: #333;
  text-decoration: none;
  cursor: pointer;
}

.memo-actions button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.memo-actions .delete-btn {
  margin-left: auto;
  border-color: #f3c6c4;
  color: #c0392b;
  background: #fdf0ef;
}
