* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: #111111;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Yu Gothic",
    "Hiragino Sans", "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
}

.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 24px 48px;
}

.grid-section {
  width: min(100%, 640px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.logo,
.top-link {
  text-decoration: none;
  line-height: 1;
}

.logo {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #111111;
}

.top-link {
  font-size: 14px;
  color: #666666;
}

.top-link:hover,
.logo:hover {
  color: #111111;
}

.photo-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.photo-item,
.photo-slot {
  position: relative;
  aspect-ratio: 1 / 1;
  display: block;
  overflow: hidden;
  background: #f3f3f3;
  text-decoration: none;
}

.photo-item img,
.slot-preview {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.photo-item img {
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.photo-item:hover img {
  opacity: 0.94;
  transform: scale(1.01);
}

.editor-form {
  display: flex;
  flex-direction: column;
}

.photo-slot {
  background: #fbfbfb;
  border: 1px solid #e8e8e8;
  cursor: pointer;
  user-select: none;
}

.photo-slot.drag-over {
  border-color: #cfcfcf;
  background: #f6f6f6;
}

.file-input {
  display: none;
}

.slot-ui,
.slot-preview {
  position: absolute;
  inset: 0;
}

.slot-ui {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  color: #888888;
  transition: opacity 0.18s ease;
}

.slot-plus {
  font-size: 32px;
  line-height: 1;
  font-weight: 300;
  color: #9a9a9a;
}

.slot-text {
  font-size: 12px;
  letter-spacing: 0.01em;
}

.slot-preview {
  display: none;
}

.photo-slot.has-image {
  border-color: transparent;
  background: #f3f3f3;
}

.photo-slot.has-image .slot-ui {
  opacity: 0;
}

.photo-slot.has-image .slot-preview {
  display: block;
}

.photo-slot.has-image:hover .slot-preview {
  opacity: 0.95;
}

.profile-block {
  margin-top: 28px;
  text-align: center;
}

.profile-name {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.profile-copy {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: #666666;
}

.action-row {
  margin-top: 28px;
  display: flex;
  justify-content: center;
}

.publish-button,
.login-button {
  appearance: none;
  border: 1px solid #dddddd;
  background: #ffffff;
  color: #111111;
  font-size: 14px;
  padding: 11px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.publish-button:hover,
.login-button:hover {
  background: #fafafa;
  border-color: #cccccc;
}

.login-section {
  width: min(100%, 440px);
}

.login-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  padding-top: 12px;
}

.login-title {
  margin: 0;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.login-copy {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.7;
  color: #666666;
}

.login-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

.login-button {
  width: 100%;
}

@media (max-width: 768px) {
  .hero {
    padding: 28px 16px 32px;
  }

  .grid-section {
    width: min(100%, 100vw - 32px);
  }

  .login-section {
    width: min(100%, 100vw - 32px);
  }

  .top-row {
    margin-bottom: 14px;
  }

  .logo {
    font-size: 18px;
  }

  .top-link {
    font-size: 13px;
  }

  .photo-grid {
    gap: 4px;
  }

  .slot-plus {
    font-size: 28px;
  }

  .slot-text {
    font-size: 11px;
  }

  .profile-block {
    margin-top: 22px;
  }

  .profile-name {
    font-size: 16px;
  }

  .profile-copy {
    margin-top: 8px;
    font-size: 12px;
  }

  .action-row {
    margin-top: 22px;
  }

  .login-title {
    font-size: 24px;
  }

  .login-copy {
    font-size: 13px;
  }

  .login-actions {
    margin-top: 22px;
  }
}
