:root {
  --ink: #1f2233;
  --ink-muted: #80808a;
  --card-bg: #ffffff;
  --page-bg: #eef0f7;
  --border: #dcdfeb;
  --accent-a: #6366f1;
  --accent-b: #4f46e5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--page-bg);
  color: var(--ink);
}

.panel {
  width: 100%;
  max-width: 22rem;
  margin: 2rem 1rem;
  padding: 2rem;
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(31, 34, 51, 0.1);
  text-align: center;
}

h1 {
  margin: 0 0 1.25rem;
  font-size: 1.35rem;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

#memoinput {
  width: 100%;
  padding: 0.55rem 0.75rem;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafbff;
  color: var(--ink);
}

#memoinput:focus {
  outline: 2px solid var(--accent-a);
  outline-offset: 1px;
}

.icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.icon-box {
  margin: 0;
}

.icon-box img {
  display: block;
}

.icon-box figcaption {
  margin-top: 0.35rem;
  font-size: 0.7rem;
  color: var(--ink-muted);
}

.rounded {
  border-radius: 12px;
}

#textinput {
  width: 100%;
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.3;
  font-family: "Lucida Console", "Courier New", monospace;
  font-weight: bold;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: 0;
  resize: none;
  overflow: hidden;
  padding: 0.6rem;
  background: #fafbff;
  color: var(--ink);
}

#textinput:focus {
  outline: 2px solid var(--accent-a);
  outline-offset: 1px;
}

.actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.actions button {
  flex: 1;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.actions button:hover {
  opacity: 0.9;
}

.actions button:active {
  transform: scale(0.98);
}

.status {
  min-height: 1.2em;
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
  color: var(--accent-b);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eaeaf5;
    --ink-muted: #86869c;
    --card-bg: #1c1c2b;
    --page-bg: #101018;
    --border: #33334a;
  }

  #memoinput,
  #textinput {
    background: #14141f;
  }
}
