* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  background: #fff;
  color: #111;
}

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  width: 100%;
  height: 64px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 20px;
  pointer-events: none;
}

.login-btn {
  pointer-events: auto;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
}

.login-btn:hover {
  transform: translateY(-1px);
}

.page {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 92px;
}

.hero {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 54px);
  letter-spacing: -0.04em;
}

.reaction-btn {
  border: 2px solid #111;
  background: #fff;
  color: #111;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
}

.reaction-btn:hover {
  background: #111;
  color: #fff;
}

.memo-wrap {
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid #2f2f2f;
  background: #111;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.memo-top {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  background: #222;
  border-bottom: 1px solid #333;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.red { background: #ff5f57; }
.yellow { background: #ffbd2e; }
.green { background: #28c840; }

.memo-title {
  margin-left: 8px;
  color: #cfcfcf;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.admin-badge {
  margin-left: auto;
  border: 1px solid #28c840;
  color: #28c840;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 800;
}

.memo-viewer,
.memo-editor {
  width: 100%;
  min-height: 320px;
  margin: 0;
  padding: 18px;
  border: 0;
  outline: 0;
  resize: vertical;
  background: #111;
  color: #f2f2f2;
  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 18px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.memo-editor {
  display: block;
}

.hidden {
  display: none !important;
}

.shock-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: #000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.shock-overlay.show {
  visibility: visible;
  opacity: 1;
}

.shock-overlay.fade-out {
  opacity: 0;
  transition: opacity 1.8s ease;
}

.shock-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.42);
  padding: 20px;
}

.modal-card {
  position: relative;
  width: min(380px, 100%);
  border-radius: 18px;
  background: #fff;
  padding: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.modal-card h2 {
  margin: 0 0 18px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

#loginForm {
  display: grid;
  gap: 14px;
}

#loginForm label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
}

#loginForm input {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 11px 12px;
}

.submit-btn {
  border: 0;
  border-radius: 12px;
  background: #111;
  color: #fff;
  padding: 12px;
  font-weight: 800;
  cursor: pointer;
}

.login-error {
  min-height: 18px;
  margin: 0;
  color: #d90000;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 520px) {
  .site-header {
    height: 56px;
    padding: 0 12px;
  }

  .page {
    width: calc(100% - 24px);
    padding-top: 78px;
  }

  .memo-viewer,
  .memo-editor {
    min-height: 260px;
    font-size: 16px;
  }
}

.shock-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  opacity: 1;
  transition: opacity 1.7s ease;
}

.shock-overlay.hidden {
  display: none !important;
}

.shock-overlay.fade-out {
  opacity: 0;
}

.shock-overlay img {
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  display: block;
}

#shockOverlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  background: #000 !important;
  opacity: 1;
  transition: opacity 1.7s ease !important;
  pointer-events: none;
}

#shockOverlay img {
  width: 100vw !important;
  height: 100vh !important;
  object-fit: cover !important;
  display: block !important;
}
