:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-border: #262b36;
  --text: #e8eaed;
  --muted: #9aa3b2;
  --accent: #5b8cff;
  --accent-hover: #4677ee;
  --danger: #ff6b6b;
  --warn-bg: #2a2410;
  --warn-border: #6b5a12;
  --warn-text: #f0c65c;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 18px 60px;
  min-height: 100vh;
}

header.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 22px;
}

.logout-link {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
}
.logout-link:hover { color: var(--text); }

#login-form input[type="password"] { margin-bottom: 4px; }
#login-form .primary { margin-top: 12px; }

header.site-header .logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #8a5bff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

header.site-header h1 {
  font-size: 18px;
  margin: 0;
  font-weight: 600;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 22px;
}

.subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 20px;
  line-height: 1.5;
}

textarea#message-text {
  width: 100%;
  min-height: 160px;
  resize: vertical;
  background: #10131a;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  color: var(--text);
  padding: 12px;
  font-size: 15px;
  font-family: inherit;
  line-height: 1.5;
}

textarea#message-text:focus, input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.char-count {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 18px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.option-row .option-label { display: flex; flex-direction: column; gap: 2px; }
.option-row .option-desc { color: var(--muted); font-size: 12px; }

label.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}
label.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #2c303a; border-radius: 24px; transition: 0.15s;
}
.slider::before {
  content: ""; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px;
  background: #d7dae0; border-radius: 50%; transition: 0.15s;
}
input:checked + .slider { background: var(--accent); }
input:checked + .slider::before { transform: translateX(18px); background: #fff; }

select, input[type="password"], input[type="text"] {
  background: #10131a;
  border: 1px solid var(--panel-border);
  color: var(--text);
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
}

.hidden { display: none !important; }

button.primary {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
button.primary:hover { background: var(--accent-hover); }
button.primary:disabled { opacity: 0.6; cursor: default; }

.error {
  color: var(--danger);
  font-size: 13px;
  min-height: 18px;
  margin: 10px 0 0;
}

.muted { color: var(--muted); font-size: 14px; }
.muted.small { font-size: 12px; }

.warning {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-text);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  margin: 16px 0;
}

.result-panel { margin-top: 4px; }
.link-row { display: flex; gap: 8px; margin: 14px 0; }
.link-row input {
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}
.link-row button {
  white-space: nowrap;
  padding: 0 16px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}

.reveal-box, .gone-box, .message-box { text-align: center; }
.reveal-box h2, .gone-box h2 { font-size: 18px; margin: 0 0 8px; }
.reveal-box input { margin: 14px 0 6px; text-align: center; }

.message-box { text-align: left; }
.protected-content {
  background: #10131a;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 16px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 15px;
  line-height: 1.6;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  min-height: 60px;
  position: relative;
}
.protected-content.blurred {
  filter: blur(14px);
  user-select: none;
}

.shield-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 21, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  font-size: 15px;
  z-index: 50;
}

footer.foot {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin-top: 28px;
}

@media print {
  body { display: none !important; }
}

@media (max-width: 480px) {
  .link-row { flex-direction: column; }
  .wrap { padding: 18px 14px 40px; }
  .panel { padding: 16px; }
  button.primary, #reveal-btn { padding: 15px; font-size: 16px; }
  header.site-header h1 { font-size: 16px; }
}
