:root {
  --bg: #f2f3f5;
  --card: #ffffff;
  --text: #0f1419;
  --muted: #536471;
  --line: #e1e8ed;
  --accent: #1d9bf0;
  --ok: #00ba7c;
  --ng: #f4212e;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Hiragino Sans', 'Yu Gothic UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  padding: 10px 12px 0;
}

.top h1 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.tabs {
  display: flex;
  overflow-x: auto;
}

.tabs button {
  flex: 1 0 auto;
  padding: 10px 12px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
}

.tabs button.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.count {
  font-weight: 400;
}

main {
  max-width: 600px;
  margin: 0 auto;
  padding: 10px 10px 80px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 10px 0;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 0 0 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

textarea,
input[type='text'],
input[type='datetime-local'] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  color: inherit;
  background: #fff;
}

textarea {
  min-height: 5.5em;
  resize: vertical;
}

.tags {
  margin-top: 6px;
  color: var(--accent);
}

.length {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: right;
}

.length.over {
  color: var(--ng);
  font-weight: 700;
}

.media {
  display: grid;
  gap: 4px;
  margin: 10px 0 4px;
  border-radius: 14px;
  overflow: hidden;
}

.media.two {
  grid-template-columns: 1fr 1fr;
}

.media figure {
  position: relative;
  margin: 0;
}

.media img,
.media video {
  display: block;
  width: 100%;
  background: #000;
}

.media .tools {
  position: absolute;
  right: 4px;
  top: 4px;
  display: flex;
  gap: 4px;
}

.media .tools button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 20, 25, 0.75);
  color: #fff;
  font-size: 0.95rem;
}

.trial {
  color: #b35c00;
  font-weight: 700;
}

.why {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.reason {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--ng);
}

.slot {
  margin: 8px 0 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.actions button,
.link-button {
  flex: 1 1 auto;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 700;
}

.actions .ok {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}

.actions .ng {
  color: var(--ng);
  border-color: var(--ng);
}

.ng-box {
  margin-top: 8px;
}

.ng-box[hidden] {
  display: none;
}

.empty {
  text-align: center;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  max-width: 90vw;
  padding: 10px 16px;
  border-radius: 999px;
  background: #0f1419;
  color: #fff;
  font-size: 0.9rem;
}
