/* 기본 레이아웃 (화이트 테마) */
body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    background: white;
    color: black;
}

body {
    font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI",
        "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans",
        "Droid Sans", "Helvetica Neue", sans-serif;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 40px);
    /* footer 공간 */
    overflow: hidden;
}

/* footer */
footer {
    position: fixed;
    bottom: 0px;
    left: 0;
    height: 60px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 0 20px;
    font-size: 14px;
    box-sizing: border-box;
    z-index: 999;
    /* 이미지 위에 */
}

footer a {
    color: black;
    text-decoration: none;
}

footer .footer-center a {
        padding: 0px 15px;
    margin: 0 5px;
}

footer a:hover {
    text-decoration: underline;
    font-style: italic;
}

.footer-controls button {
    all: unset;
    font: inherit;
    color: inherit;
    cursor: pointer;
    padding: 0 6px;
}

.footer-controls button:hover {
    text-decoration: underline;
}

/* 오른쪽 카운터 고정폭 + 등폭숫자 */
.footer-right {
  min-width: 12ch;                 /* "0000 / 0000"가 흔들리지 않는 폭 */
  text-align: right;
  font-variant-numeric: tabular-nums; /* 숫자 고정폭 */
  /* 폰트에 따라 더 확실히 하려면: */
  font-feature-settings: "tnum" 1, "lnum" 1;
}

/* 왼쪽 */
.footer-left {
    flex: 1;
    margin-right: auto; /* 왼쪽에 붙음 */
}

/* 가운데 */
.footer-center {
    flex: 2;
    margin: 0 auto; /* 정확히 가운데 정렬 */
    text-align: center;
}

/* 오른쪽(컨트롤) */
.footer-controls {
    flex: 0.45;
    margin-left: auto; /* 오른쪽 정렬 */
}

/* 맨 끝 (필요할 경우) */
.footer-right {
    flex: 1;
    margin-left: 10px; /* footer-controls와 간격 */
}

/* Fullscreen viewer (footer 위까지만) */
#fullscreen-container {
    display: none;
    /* JS에서 show 클래스 토글 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 40px);
    /* footer 위까지만 */
    bottom: 40px;
    background: white;
    justify-content: center;
    align-items: center;
    z-index: 998;
    /* footer(999)보다 낮게 -> footer 항상 보임 */
}

/* 확대 이미지: 진입 시 트랜지션 */
#fullscreen-img {
    max-height: 75vh;
    /* footer 제외 75% */
    max-width: 90vw;
    object-fit: contain;
    transform: scale(0.88);
    opacity: 0;
    transition: transform 380ms ease, opacity 380ms ease;
    z-index: 1000;
}

#fullscreen-container.show #fullscreen-img {
    transform: scale(1);
    opacity: 1;
}

/* footer 바로 위 텍스트 버튼 바 */
#fs-controls {
    position: absolute;
    bottom: 30px;
    /* footer 바로 위 느낌 */
    left: 0;
    width: 100%;
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: center;
    z-index: 1002;
}

.fs-link {
    all: unset;
    font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI",
        "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans",
        "Droid Sans", "Helvetica Neue", sans-serif;
    font-size: 14px;
    color: black;
    cursor: pointer;
}

.fs-link:hover {
    opacity: 0.7;
    text-decoration: underline;
}
