/* 文件说明：Mimi 站点样式，包含登录、列表与三种看图模式。 */
:root {
  --bg: #f8f6ef;
  --panel: #fffef9;
  --line: #d8cfb9;
  --text: #2f2a1f;
  --accent: #136f63;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top right, #ece6d7, #f8f6ef 45%);
}

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(27, 24, 17, 0.08);
}

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.login .card {
  width: min(420px, 100%);
  padding: 24px;
}

h1,
h2 {
  margin: 0 0 14px 0;
}

.field {
  margin-bottom: 12px;
}

label {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  background: #fff;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-danger {
  background: var(--danger);
}

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.posts {
  display: grid;
  gap: 10px;
}

.post-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px;
}

.post-title {
  font-size: 17px;
  font-weight: 700;
}

.post-meta {
  color: #666150;
  font-size: 13px;
}

.actions {
  display: flex;
  gap: 8px;
}

.viewer {
  width: 100%;
}

.viewer-head {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #fffef9d9;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  padding: 8px 10px;
}

.mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mode-switch button.active {
  background: #0e5149;
}

.images.vertical img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 10px;
}

.images.horizontal {
  height: calc(100vh - 120px);
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  padding: 8px;
}

.images.horizontal img {
  height: 100%;
  width: auto;
  margin-right: 8px;
}

.slide-shell {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 120px);
  background: #191715;
}

.slide-shell img {
  max-width: 100%;
  max-height: calc(100vh - 180px);
  object-fit: contain;
}

.slide-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 10px 0;
}

.error {
  color: var(--danger);
  font-size: 13px;
}

@media (max-width: 720px) {
  .post-item {
    grid-template-columns: 1fr;
  }
}

