:root {
  --ink: #1c1d1a;
  --paper: #f6f4ef;
  --line: #d8d4c8;
  --accent: #2f5d4e;
  --accent-soft: #e4ede9;
  --danger: #9a3b2e;
  --radius: 6px;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px;
}

.wrap {
  width: 100%;
  max-width: 560px;
}

.wrap.wide {
  max-width: 920px;
}

h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

.sub {
  color: #6b6a62;
  font-size: 0.95rem;
  margin: 0 0 28px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

label {
  display: block;
  font-size: 0.85rem;
  color: #55534a;
  margin-bottom: 6px;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: var(--paper);
  margin-bottom: 16px;
}

input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

button {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
}

button:hover { opacity: 0.92; }

button.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--line);
  width: auto;
  padding: 8px 14px;
  font-size: 0.9rem;
}

.error {
  color: var(--danger);
  font-size: 0.9rem;
  margin: -8px 0 16px;
  min-height: 1.2em;
}

.video-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.video-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
  cursor: pointer;
  background: #fff;
}

.video-item:hover { border-color: var(--accent); }

.video-title { font-size: 1.02rem; }

.progress-tag {
  font-size: 0.82rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 999px;
}

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

.player-box {
  position: relative;
  padding-top: 56.25%;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.player-box iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

th {
  background: var(--accent-soft);
  font-weight: 600;
  color: var(--ink);
}

tr:last-child td { border-bottom: none; }

.muted { color: #8a887e; }
