:root {
  color-scheme: light;
  --paper: #f6f5ef;
  --surface: #fffefa;
  --ink: #20343e;
  --muted: #59665f;
  --sage: #466553;
  --line: #d9dfd5;
  --error: #873d2e;
  font-family: "Malgun Gothic", "Noto Sans CJK KR", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.65;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--sage);
  text-underline-offset: 4px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.download {
  cursor: pointer;
  touch-action: manipulation;
  border: 1px solid var(--sage);
  background: var(--sage);
  color: white;
  border-radius: 6px;
  padding: 10px 16px;
  white-space: nowrap;
  font-weight: 600;
}
button:hover {
  filter: brightness(0.94);
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
:focus-visible {
  outline: 3px solid #8b5c20;
  outline-offset: 3px;
}
header {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 22px 4vw;
  border-bottom: 1px solid var(--line);
}
header > span {
  margin-left: auto;
  color: var(--muted);
}
.brand {
  font-family: Georgia, serif;
  font-size: 28px;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.7px;
}
.brand span {
  display: block;
  font:
    12px "Malgun Gothic",
    sans-serif;
  letter-spacing: 1px;
  color: var(--muted);
}
.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  max-width: 1600px;
  margin: auto;
  min-height: 80vh;
}
aside {
  padding: 30px 24px;
  border-right: 1px solid var(--line);
}
main {
  padding: 36px 4vw;
  min-width: 0;
}
h1 {
  font-size: 30px;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: -1px;
  text-wrap: balance;
  margin: 4px 0 12px;
}
h2 {
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 18px;
}
h3 {
  font-size: 16px;
}
p {
  margin: 8px 0 18px;
}
.muted,
small {
  color: var(--muted);
  font-size: 13px;
}
.project {
  display: block;
  text-align: left;
  white-space: normal;
  width: 100%;
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
  color: var(--ink);
  padding: 12px;
  margin: 4px 0;
}
.project[aria-current="true"] {
  border-left-color: var(--sage);
  background: #e7ece3;
}
.project small {
  display: block;
}
details {
  border-top: 1px solid var(--line);
  padding: 20px 0;
  margin-top: 12px;
}
summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 14px;
}
form {
  display: grid;
  gap: 12px;
}
label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
}
input,
select,
textarea {
  border: 1px solid #aab6aa;
  border-radius: 5px;
  padding: 10px;
  background: var(--surface);
  color: var(--ink);
  width: 100%;
  min-width: 0;
}
textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.7;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.check input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.badge {
  display: inline-block;
  border: 1px solid #a5b4a3;
  color: #354e3f;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  background: #edf1e8;
}
.warning {
  background: #f7ead6;
  border-color: #c8ab78;
  color: #704922;
}
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(270px, 1fr);
  gap: 28px;
  margin: 26px 0;
}
.panel {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
}
.preview {
  background: #ced7cc;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #324e43;
  overflow: hidden;
  border-radius: 6px;
}
.preview video,
.preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.preview.short {
  aspect-ratio: 9/16;
  max-height: 600px;
  max-width: 338px;
  margin: auto;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.download {
  text-decoration: none;
  display: inline-block;
}
.preview ~ audio {
  width: 100%;
  margin-top: 12px;
}
progress {
  accent-color: var(--sage);
  width: 100%;
  height: 12px;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;

  background: #edf0e9;
  padding: 14px;
  border-radius: 5px;
}
.error {
  color: var(--error);
  overflow-wrap: anywhere;
}
#notice {
  position: relative;
  z-index: 5;
  background: #20343e;
  color: white;
  padding: 0 4vw;
}
#notice:not(:empty) {
  padding: 12px 4vw;
}
.shots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.shots img {
  width: 100%;
  height: auto;
}
.thumbnail {
  width: 100%;
  height: auto;
  max-width: 420px;
}
.tablewrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 13px;
}
th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 30px;
  color: var(--ink);
  max-width: 90vw;
}
dialog::backdrop {
  background: #20343e88;
}
footer {
  border-top: 1px solid var(--line);
  padding: 24px 4vw;
  color: var(--muted);
  font-size: 12px;
}
.skip {
  position: absolute;
  left: 20px;
  top: -80px;
  background: white;
  padding: 12px;
  z-index: 9;
}
.skip:focus {
  top: 10px;
}
#workspace {
  overflow-wrap: anywhere;
}
@media (max-width: 1000px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }
  main {
    padding: 28px 24px;
  }
}
@media (max-width: 700px) {
  header {
    padding: 18px;
    gap: 12px;
  }
  header > span {
    display: none;
  }
  .brand {
    font-size: 25px;
  }
  #logoutButton {
    margin-left: auto;
    font-size: 12px;
  }
  .layout {
    display: block;
  }
  aside {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 20px;
  }
  #projects {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .project {
    min-width: 0;
  }
  aside > details {
    margin-top: 0;
  }
  main {
    padding: 24px 16px;
  }
  h1 {
    font-size: 25px;
  }
  .panel {
    padding: 18px;
  }
  .shots {
    grid-template-columns: repeat(2, 1fr);
  }
}

[hidden] {
  display: none !important;
}
.grid > *,
.bar > * {
  min-width: 0;
}
.project {
  overflow-wrap: anywhere;
}
dialog {
  overscroll-behavior: contain;
}
@media (max-width: 700px) {
  input,
  select,
  textarea {
    font-size: 16px;
  }
  th,
  td {
    padding: 7px;
  }
}

.auth-screen {
  max-width: 460px;
  margin: 10vh auto;
  padding: 32px 24px;
  min-height: 45vh;
}
.auth-screen h1 {
  font-size: 26px;
}
.auth-screen .download {
  display: inline-block;
  text-decoration: none;
  text-align: center;
  width: 100%;
}
.auth-screen .download:hover {
  filter: brightness(0.94);
}
#userEmail {
  overflow-wrap: anywhere;
  margin-left: 0;
}
#loginError {
  color: var(--error);
}
@media (max-width: 700px) {
  header {
    flex-wrap: wrap;
    gap: 12px;
  }
  #userEmail {
    display: block;
    flex-basis: 65%;
  }
}
