.view-container {
  width: min(100%, 1120px);
  padding-top: 24px;
}

.api-panel {
  max-width: 980px;
  margin: 0 auto 16px;
  padding: 14px 18px;
  gap: 8px;
  border-color: #262626;
  background: linear-gradient(180deg, rgba(28, 28, 28, .92), rgba(11, 11, 11, .96));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .24);
}

.api-row {
  grid-template-columns: 136px minmax(0, 1fr) 126px 126px;
  gap: 8px;
  align-items: center;
}

.api-row label {
  font-size: 12px;
}

.api-row input {
  min-height: 38px;
}

.api-row .button {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.api-row [data-save-key='novel'] {
  position: relative;
  color: transparent !important;
}

.api-row [data-save-key='novel']::after {
  content: "API 키 저장";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  pointer-events: none;
}

.api-panel .muted {
  margin: -2px 0 8px 144px;
  font-size: 12px;
  line-height: 1.3;
}

.api-panel > .row {
  margin-top: 2px !important;
}

.api-panel [data-clear-keys] {
  width: auto;
  min-height: 34px;
}

.live-panel {
  margin-top: auto;
  border-bottom: 0;
}

.side-balance {
  margin-top: 0;
}

.library-head > .button[data-open-auth='login'] {
  display: none;
}

.hero {
  max-width: 980px;
  min-height: 118px;
  margin: 22px auto 26px;
  padding: 22px 24px;
  border: 1px solid #2d2d2d;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 57, 51, .22), rgba(255, 57, 51, 0) 42%),
    linear-gradient(135deg, #27211f, #101010 64%, #181818);
  box-shadow: 0 20px 70px rgba(0, 0, 0, .35);
}

.hero h1 {
  font-size: 25px;
  letter-spacing: 0;
}

.hero p {
  margin: 0;
  color: #b9b9b9;
}

.hero .button {
  margin-right: clamp(16px, 4vw, 72px);
  min-width: 128px;
  box-shadow: 0 12px 28px rgba(255, 57, 51, .22);
}

.library-head {
  max-width: 980px;
  margin: 18px auto 10px;
  align-items: flex-end;
}

.library-head h2 {
  font-size: 24px;
  letter-spacing: 0;
}

.chip-row {
  gap: 9px;
  padding: 12px 0 4px;
}

.chip {
  min-height: 36px;
  padding: 0 15px;
  border-color: #353535;
  background: #101010;
  color: #e7e7e7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.chip.active {
  background: #ff3933;
  border-color: #ff3933;
  color: #fff;
}

.notice {
  max-width: 980px;
  margin: 16px auto 24px;
}

.library-section {
  max-width: 980px;
  margin: 30px auto 0;
}

.section-title {
  margin: 0 0 14px;
}

.section-title h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
}

.section-title h2::before {
  content: "";
  width: 7px;
  height: 18px;
  border-radius: 999px;
  background: #ff3933;
  box-shadow: 0 0 20px rgba(255, 57, 51, .5);
}

.section-title span {
  padding: 5px 10px;
  border: 1px solid #2d2d2d;
  border-radius: 999px;
  background: #111;
}

.library-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 22px 16px;
}

.story-card {
  overflow: hidden;
  border-radius: 8px;
}

.story-cover {
  margin-bottom: 9px;
  overflow: hidden;
  border-color: #272727;
  background: #171717;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.story-card:hover .story-cover {
  transform: translateY(-3px);
  border-color: #575757;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .38);
}

.story-body .row {
  gap: 5px !important;
}

.story-body h3 {
  margin: 7px 0 5px;
  font-size: 15px;
  line-height: 1.35;
}

.story-body p {
  font-size: 12px;
  color: #9f9f9f;
}

.story-meta {
  margin-top: 7px;
  font-size: 12px;
  color: #8d8d8d;
}

.tag {
  min-height: 20px;
  padding: 0 6px;
  background: #24272c;
  color: #dbe4f5;
}

@media (max-width: 900px) {
  .api-row {
    grid-template-columns: 1fr;
  }

  .api-panel .muted {
    margin-left: 0;
  }

  .hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero .button {
    margin-right: 0;
  }
}

@media (max-width: 560px) {
  .view-container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
