:root {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --border: #e3e7ed;
  --border-strong: #d5dbe3;
  --text: #262b33;
  --text-dim: #6b7280;
  --accent: #5b9bd5;
  --accent-dim: #4a87b8;
  --accent-soft: #eaf2fa;
  --danger: #c4574a;
  --success: #2f9161;
  --radius: 6px;
  --mono: "SF Mono", "Cascadia Mono", Consolas, monospace;
  --sans: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  display: flex;
  flex-direction: column;
  align-items: center;
}

header.topbar {
  width: 100%;
  padding: 28px 32px;
  display: flex;
  align-items: center;
}

header.topbar img {
  height: 64px;
  width: auto;
  display: block;
}

.wrap {
  width: 100%;
  max-width: 560px;
  padding: 12px 24px 40px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.page-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 20px;
  color: var(--text);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 1px 2px rgba(30, 41, 59, 0.04);
}

label {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

textarea, input[type="text"] {
  width: 100%;
  background: #fbfcfd;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  padding: 12px 14px;
  resize: vertical;
}

textarea:focus, input:focus, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

button {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
}

button:hover { background: #f2f4f7; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 600;
}

button.primary:hover { background: var(--accent-dim); }

.field {
  margin-bottom: 20px;
}

.hint {
  font-size: 12.5px;
  color: var(--text-dim);
  margin-top: 8px;
  line-height: 1.5;
}

.result {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.link-box {
  display: flex;
  gap: 8px;
  align-items: center;
}

.link-box input {
  flex: 1;
}

.badge {
  display: inline-block;
  font-size: 12px;
  color: var(--accent-dim);
  background: var(--accent-soft);
  border: 1px solid #cfe2f3;
  border-radius: 3px;
  padding: 3px 9px;
  margin-bottom: 10px;
}

.secret-display {
  background: #fbfcfd;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 16px;
  font-family: var(--mono);
  font-size: 15px;
  word-break: break-all;
  white-space: pre-wrap;
  color: #1f5c3d;
}

.state-message {
  text-align: center;
  padding: 20px 0;
  color: var(--text-dim);
}

.state-message.error { color: var(--danger); }

footer {
  margin-top: 32px;
  font-size: 11.5px;
  line-height: 1.6;
  color: #9aa1ab;
}

footer p {
  margin: 0 0 10px;
}

footer p:last-child {
  margin-bottom: 0;
}
