@font-face {
  font-family: "SeorapjangABC";
  src: url("src/ABCSocialVariable-Trial.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 100 900;
  unicode-range:
    U+0000-00FF,
    U+2000-206F,
    U+20A0-20CF,
    U+2100-214F,
    U+2190-21FF,
    U+2200-22FF;
}

@font-face {
  font-family: "SeorapjangHangul";
  src: url("src/UnDotumBold.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 700;
  unicode-range:
    U+1100-11FF,
    U+3130-318F,
    U+A960-A97F,
    U+AC00-D7AF,
    U+D7B0-D7FF;
}

:root {
  --blue: #0037ff;
  --blue-soft: rgba(0, 55, 255, 0.25);
  --white: #ffffff;
  --line: 2px;
  --page-padding: 10px;
  --grid-gutter: 10px;
  --grid-columns: 6;
  --header-image-gap: 48px;
  --drawer-image-width: 100%;
  --text-inset: 10px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--white);
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--white);
  color: var(--blue);
  font-family:
    "SeorapjangABC",
    "SeorapjangHangul",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-variation-settings: "wght" 460;
  font-weight: 460;
  font-size: 12px;
  line-height: 1.22;
}

button {
  color: inherit;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 430px;
  min-height: 100svh;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 18px) var(--page-padding)
    calc(env(safe-area-inset-bottom) + 24px);
  background: var(--white);
  overflow: visible;
}

.site-header {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
  align-items: flex-start;
  column-gap: var(--grid-gutter);
  flex: 0 0 auto;
  min-height: 244px;
  margin-bottom: var(--header-image-gap);
  padding: 0 var(--text-inset);
  pointer-events: none;
}

.app-shell.is-detail-route .site-header {
  min-height: 58px;
  margin-bottom: 0;
  padding-top: 0;
}

.site-title {
  grid-column: 1 / span 3;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
  font-weight: 460;
  letter-spacing: 0;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.app-shell.is-detail-route .site-title {
  grid-column: 1 / span 4;
}

.site-title p,
.site-description p {
  margin: 0 0 4px;
}

.site-title p:last-child,
.site-description p:last-child {
  margin-bottom: 0;
}

.site-title p:last-child {
  text-transform: none;
}

.site-description {
  grid-column: 4 / span 3;
  font-size: 12px;
  font-weight: 460;
  line-height: 1.55;
  letter-spacing: 0;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.app-shell.is-detail-route .site-description {
  display: none;
}

.site-description p {
  margin-bottom: 18px;
}

.arena-login-button {
  position: absolute;
  top: 198px;
  left: var(--text-inset);
  display: grid;
  justify-items: start;
  gap: 5px;
  min-width: 76px;
  margin-top: 1px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  text-align: left;
  cursor: pointer;
  pointer-events: auto;
}

.app-shell.is-detail-route .arena-login-button {
  top: 0;
  right: var(--text-inset);
  left: auto;
  width: 18px;
  min-width: 0;
  height: 18px;
  gap: 0;
}

.app-shell.is-detail-route .arena-login-button img,
.app-shell.is-detail-route .arena-login-button span {
  display: none;
}

.app-shell.is-detail-route .arena-login-button::before,
.app-shell.is-detail-route .arena-login-button::after {
  position: absolute;
  left: 0;
  display: block;
  width: 18px;
  height: var(--line);
  background: var(--blue);
  content: "";
}

.app-shell.is-detail-route .arena-login-button::before {
  top: 0;
}

.app-shell.is-detail-route .arena-login-button::after {
  bottom: 0;
}

.app-shell.is-detail-route .arena-login-button {
  background:
    linear-gradient(var(--blue), var(--blue)) left 8px / 18px var(--line) no-repeat;
}

.arena-login-button img {
  display: block;
  width: 24px;
  height: auto;
}

.arena-login-button span {
  display: block;
  font-size: 12px;
  line-height: 1.05;
  white-space: nowrap;
}

.main-view {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  outline: none;
}

.app-shell.is-detail-route {
  overflow-x: hidden;
}

.app-shell.is-detail-route .main-view {
  display: block;
  width: 100%;
  overflow: visible;
}

.archive-view {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
}

.archive-actions {
  flex: 0 0 auto;
  width: 100%;
}

.archive-actions:empty {
  display: none;
}

.add-drawer-button {
  display: block;
  width: calc(100% - (var(--text-inset) * 2));
  margin: 0 var(--text-inset) 12px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  text-align: left;
  cursor: pointer;
}

.collection-picker {
  display: grid;
  max-height: 244px;
  margin: 0 var(--text-inset) 14px;
  overflow: auto;
  border-top: var(--line) solid var(--blue);
}

.collection-picker-status,
.collection-picker-option {
  margin: 0;
  padding: 10px 0;
  border: 0;
  border-bottom: var(--line) solid var(--blue);
  background: transparent;
  color: var(--blue);
  text-align: left;
}

.collection-picker-option {
  display: grid;
  gap: 4px;
  cursor: pointer;
}

.collection-picker-option:disabled {
  color: var(--blue-soft);
  cursor: default;
}

.collection-picker-title {
  font-size: 12px;
}

.collection-picker-meta {
  font-size: 10px;
  color: var(--blue-soft);
}

.drawer-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1 1 auto;
  width: 100%;
  padding-top: 0;
  overflow: visible;
}

.drawer-indicator {
  position: fixed;
  top: 50%;
  right: max(var(--page-padding), calc((100vw - 430px) / 2 + var(--page-padding)));
  z-index: 12;
  display: grid;
  gap: 8px;
  pointer-events: none;
  transition: transform 120ms ease-out;
}

.drawer-indicator-item {
  display: block;
  width: 11px;
  height: 7px;
  background: var(--blue);
  opacity: 0.2;
  mask: url("/src/indicator.svg") center / contain no-repeat;
  -webkit-mask: url("/src/indicator.svg") center / contain no-repeat;
}

.drawer-indicator-item.is-active {
  opacity: 1;
}

.drawer-cell {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
  column-gap: var(--grid-gutter);
  align-items: center;
  width: 100%;
  aspect-ratio: 381 / 253;
  height: auto;
  margin: -48px 0 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.drawer-cell:active {
  background: transparent;
}

.drawer-cell:first-child {
  margin-top: 0;
}

.drawer-image {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  display: block;
  width: var(--drawer-image-width);
  height: 100%;
  object-fit: fill;
  object-position: left top;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  transform: none;
  transform-origin: left top;
  backface-visibility: hidden;
  will-change: opacity;
}

.drawer-image-open {
  top: 0;
  left: 0;
  z-index: 2;
  width: var(--drawer-image-width);
  height: 100%;
  opacity: 0;
}

.drawer-cell.is-opening .drawer-image-open {
  animation: drawer-open 520ms cubic-bezier(0.19, 1, 0.22, 1) both;
}

.drawer-cell.is-opening .drawer-image-closed {
  animation: drawer-closed-out 160ms ease-out both;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(5, minmax(84px, 1fr));
  flex: 1 1 auto;
  width: 100%;
  min-height: 650px;
  border-top: var(--line) solid var(--blue);
  border-left: var(--line) solid var(--blue);
}

.collection-cell {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 9px 8px;
  overflow: hidden;
  border: 0;
  border-right: var(--line) solid var(--blue);
  border-bottom: var(--line) solid var(--blue);
  background: var(--white);
  cursor: pointer;
  text-align: left;
  appearance: none;
}

.collection-cell::before,
.collection-cell::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.collection-cell::before {
  inset: 0;
  background:
    linear-gradient(135deg, transparent 0 49%, var(--blue) 50%, transparent 51%) left top / 18px 18px no-repeat,
    linear-gradient(225deg, transparent 0 49%, var(--blue) 50%, transparent 51%) right top / 18px 18px no-repeat;
  opacity: 0;
}

.collection-cell::after {
  left: 50%;
  bottom: 15px;
  width: 38px;
  height: 11px;
  border: var(--line) solid var(--blue);
  border-bottom: 0;
  transform: translateX(-50%);
  opacity: 0;
}

.cell-meta {
  display: grid;
  gap: 3px;
  width: 100%;
  opacity: 0;
  transform: translateY(5px);
}

.drawer-cell .cell-meta {
  position: absolute;
  left: calc(48% + var(--text-inset));
  top: 53%;
  z-index: 2;
  width: 62%;
  margin-top: 0;
  place-items: center;
  text-align: center;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.drawer-cell.is-opening .cell-meta {
  opacity: 1;
  animation: drawer-label-open 0ms cubic-bezier(0.19, 1, 0.24, 1) both;
}

.drawer-cell:hover .cell-meta,
.drawer-cell:active .cell-meta,
.drawer-cell:focus-visible .cell-meta,
.drawer-cell.is-revealed .cell-meta {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.collection-cell:hover .cell-meta,
.collection-cell:active .cell-meta,
.collection-cell:focus-visible .cell-meta,
.collection-cell.is-revealed .cell-meta {
  opacity: 1;
  transform: translateY(0);
}

.collection-cell:hover::before,
.collection-cell:hover::after,
.collection-cell:active::before,
.collection-cell:active::after,
.collection-cell:focus-visible::before,
.collection-cell:focus-visible::after,
.collection-cell.is-revealed::before,
.collection-cell.is-revealed::after {
  opacity: 1;
}

.collection-cell:focus-visible {
  outline: var(--line) solid var(--blue);
  outline-offset: calc(var(--line) * -1);
  z-index: 2;
}

.drawer-cell:focus-visible {
  outline: 0;
}

.drawer-cell:focus-visible .drawer-image-closed {
  filter: drop-shadow(0 0 0 var(--blue));
}

.cell-title {
  max-width: 100%;
  font-size: 11px;
  font-weight: 460;
  line-height: 1.15;
}

.cell-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 7px;
  font-size: 9px;
  font-weight: 460;
}

.cell-status {
  font-size: 9px;
  text-transform: uppercase;
}

.detail-view {
  display: grid;
  align-content: start;
  width: 100%;
  min-height: 0;
}

.detail-summary {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.detail-title {
  margin: 0;
  font-size: 12px;
  font-weight: 460;
  line-height: 1.15;
  letter-spacing: 0;
}

.back-button,
.menu-close {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.back-button {
  font-size: 12px;
}

.detail-actions {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  padding: 0 var(--text-inset) 8px;
}

.delete-drawer-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-size: 12px;
  line-height: 1.15;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.delete-drawer-icon {
  display: block;
  width: 11px;
  aspect-ratio: 1;
  background: var(--blue);
  mask: url("/src/trash.svg") center / contain no-repeat;
  -webkit-mask: url("/src/trash.svg") center / contain no-repeat;
}

.delete-drawer-button:focus-visible {
  outline: var(--line) solid var(--blue);
  outline-offset: 4px;
}

.detail-block-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(168px, 1fr);
  width: 100%;
  max-width: 100%;
  min-height: min(652px, calc(100svh - 148px));
  border: var(--line) solid var(--blue);
}

.detail-block-cell {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-bottom: var(--line) solid var(--blue);
  background: transparent;
  cursor: pointer;
}

.detail-block-cell:last-child,
.detail-block-cell:nth-last-child(2):nth-child(odd) {
  border-bottom: 0;
}

.detail-block-grid::after {
  position: absolute;
  top: var(--line);
  bottom: var(--line);
  left: 50%;
  z-index: 4;
  width: var(--line);
  transform: translateX(-50%);
  background: var(--blue);
  content: "";
  pointer-events: none;
}

.detail-block-status {
  display: grid;
  place-items: center;
  grid-column: 1 / -1;
  min-height: 118px;
  color: var(--blue-soft);
  cursor: default;
}

.arena-block-cell {
  position: relative;
  display: grid;
  align-content: end;
  gap: 6px;
  padding: 8px;
  overflow: hidden;
  color: var(--blue);
  text-decoration: none;
}

.arena-block-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.arena-block-image + .arena-block-label,
.arena-block-image ~ .arena-block-type {
  position: relative;
  z-index: 1;
  background: var(--white);
}

.arena-block-label {
  display: -webkit-box;
  max-height: 84px;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.25;
  word-break: break-all;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.arena-block-type {
  font-size: 9px;
  color: var(--blue);
  text-transform: uppercase;
}

.detail-block-cell:focus-visible {
  outline: var(--line) solid var(--blue);
  outline-offset: calc(var(--line) * -1);
}

@keyframes drawer-open {
  0% {
    opacity: 0.01;
    transform: none;
  }

  28% {
    opacity: 1;
  }

  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes drawer-closed-out {
  0% {
    opacity: 1;
  }

  35% {
    opacity: 0.2;
  }

  100% {
    opacity: 0;
  }
}

@keyframes drawer-label-open {
  0% {
    left: calc(51% + var(--text-inset));
    top: 54%;
    transform: translate(-50%, -50%);
  }

  100% {
    left: calc(60% + var(--text-inset));
    top: 68%;
    transform: translate(-50%, -50%);
  }
}

.menu-overlay {
  position: absolute;
  inset: 0;
  z-index: 9999;
  display: none;
  padding: calc(env(safe-area-inset-top) + 24px) var(--page-padding)
    calc(env(safe-area-inset-bottom) + 24px);
  background: var(--white);
}

.menu-overlay.is-open {
  display: block;
}

.menu-panel {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: var(--line) solid var(--blue);
}

.menu-close {
  align-self: flex-end;
  padding: 14px;
}

.oauth-panel,
.login-session {
  display: grid;
  gap: 12px;
  padding: 18px var(--text-inset);
  border-top: var(--line) solid var(--blue);
}

.oauth-panel p {
  margin: 0;
}

.oauth-login-link,
.login-logout {
  width: 100%;
  padding: 18px 0;
  border: 0;
  border-top: var(--line) solid var(--blue);
  border-bottom: var(--line) solid var(--blue);
  background: transparent;
  color: var(--blue);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.login-session p,
.login-status {
  margin: 0;
}

.login-status {
  padding: 0 var(--text-inset) 18px;
  min-height: 18px;
  color: var(--blue-soft);
  font-size: 11px;
}

@media (max-height: 760px) {
  .app-shell {
    padding-top: calc(env(safe-area-inset-top) + 18px);
    padding-bottom: calc(env(safe-area-inset-bottom) + 16px);
  }

  .site-header {
    min-height: 232px;
  }

  .collection-grid {
    min-height: 560px;
  }

  .drawer-cell {
    height: auto;
    margin-top: -60px;
  }
}

@media (min-width: 700px) {
  body {
    background: #f7f8ff;
  }

  .app-shell {
    min-height: 100vh;
    box-shadow: 0 0 0 var(--line) rgba(0, 55, 255, 0.08);
  }
}
