
@font-face {
    font-family: 'Pretendard';
    src: url('https://fastly.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://fastly.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
}

* {
    box-sizing: border-box;
}

:root {
    --surface-1: #ffffff;
    --surface-2: #f7fbff;
    --line-soft: #d8e8f3;
    --line-strong: #bfd8e8;
    --text-main: #2e3d49;
    --text-muted: #6f8391;
    --accent: #64c0ee;
    --accent-strong: #40addf;
    --focus-ring: rgba(100, 192, 238, 0.45);
    --shadow-soft: 0 8px 18px rgba(30, 79, 109, 0.08);
    --radius-md: 12px;
    --radius-lg: 16px;
}

body {
    font-family: 'Pretendard';
    font-size: 16px;
    line-height: 1.8;
    background-color: #eee;
    color: #444;
    margin: 0;
    padding: 0;
}

#navbar {
    background-color: #86D7FF;
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    height: 3rem;
    width: 100vw;
    z-index: 1000;
}

#logo h2 {
    margin-top: 0.3rem;
    text-align: center;
}

#wrapper {
    margin: 5rem auto;
    width: 100%;
    max-width: 1000px;
}

#wrapper > div {
    padding: 10px;
    background-color: white;
    border-radius: 10px;
    margin-bottom: 1rem;
}

#gotolive {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form:not(.activated) {
    display: none;
}

input {
    padding: 4px;
    border-radius: 10px;
    border: 1px solid #eee;
    width: 100%;
}

.layer-select {
    padding: 4px;
    border-radius: 10px;
    border: 1px solid #eee;
    width: 100%;
}

.input-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.input-row input[type="text"] {
    flex: 1;
    width: auto;
}

.input-row .layer-select {
    flex: 1;
    width: auto;
}


.input-row--range {
    gap: 8px;
}

.input-row--range input[type="range"] {
    flex: 1;
}

.range-value {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--line-soft);
    background: #fff;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06);
}

.range-value::after {
    content: attr(data-unit);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 4px;
}

.range-value input {
    flex: 0 0 auto;
    width: 44px;
    padding: 2px 0;
    border: 0;
    background: transparent;
    text-align: right;
    font-size: 0.82rem;
    line-height: 1.2;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}

.range-value input:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.layer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.layer-note {
    font-size: 0.85em;
    color: #999;
}

.layer-add {
    padding: 6px 12px;
    border-radius: 10px;
    border: 1px solid #86D7FF;
    background-color: #86D7FF;
    color: white;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.layer-add:focus {
    outline: 2px solid #86D7FF;
    outline-offset: 2px;
}

.layer-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.layer-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #eee;
    background: #fafafa;
}

.layer-preview {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    border: 1px solid #eee;
    object-fit: contain;
    background: #fff;
}

.layer-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.layer-row {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 8px;
    align-items: center;
}

.layer-row label {
    font-size: 0.8em;
    color: #777;
    margin: 0;
}

.layer-row .input-row {
    width: 100%;
}

.layer-row.is-hidden {
    display: none;
}

.layer-row--advanced {
    display: none;
}

.layer-item.is-advanced .layer-row--advanced {
    display: grid;
}

.layer-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.layer-btn {
    padding: 4px 8px;
    border-radius: 10px;
    border: 1px solid #ccc;
    background: white;
    color: #444;
    cursor: pointer;
    font-weight: 600;
}

.layer-btn--danger {
    border-color: #f1b5b5;
    color: #d43d3d;
}

.preset-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-1) 0%, var(--surface-2) 100%);
    box-shadow: var(--shadow-soft);
}

.preset-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}

.preset-actions .layer-btn {
    height: 38px;
    padding: 0 14px;
    border-radius: 11px;
    border-color: var(--line-strong);
    color: var(--text-main);
    background: #fff;
    white-space: nowrap;
    font-size: 0.83rem;
    font-weight: 700;
    transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.preset-actions .layer-btn:hover {
    border-color: var(--accent);
    color: #256f92;
    background: #f3faff;
    transform: translateY(-1px);
}

.preset-actions .layer-btn:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.update-log {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.update-log__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.update-log__title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.update-log__title {
    margin: 0;
    font-size: 1.05em;
    color: #444;
}

.update-log__dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #ff3b30;
    box-shadow: 0 0 0 2px #ffe7e5;
}

.update-log__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.update-log__body[hidden] {
    display: none;
}

.update-log__description {
    font-size: 0.85em;
    color: #888;
}

.update-log__toggle {
    padding: 5px 12px;
    border-radius: 10px;
    border: 1px solid #86D7FF;
    background: #86D7FF;
    color: #fff;
    font-size: 0.8em;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.update-log__toggle:focus {
    outline: 2px solid #86D7FF;
    outline-offset: 2px;
}

.update-log__more-toggle {
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: #fff;
    color: #666;
    font-size: 0.8em;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.update-log__more-toggle:focus {
    outline: 2px solid #86D7FF;
    outline-offset: 2px;
}

.update-log__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.update-log__empty {
    padding: 12px;
    border: 1px dashed #ddd;
    border-radius: 10px;
    background: #fcfcfc;
    color: #888;
    font-size: 0.85em;
}

.update-log-item {
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #eee;
    background: #fafafa;
}

.update-log-item__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.update-log-item__version {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #c7ebff;
    background: #eaf7ff;
    color: #3ba5d6;
    padding: 2px 8px;
    font-size: 0.78em;
    font-weight: 700;
}

.update-log-item__date {
    font-size: 0.78em;
    color: #999;
}

.update-log-item__summary {
    font-size: 0.92em;
    color: #555;
    line-height: 1.55;
}

.update-log-item__details {
    margin: 8px 0 0;
    padding-left: 18px;
    color: #777;
    font-size: 0.82em;
    line-height: 1.6;
}

.update-log-item__details li + li {
    margin-top: 2px;
}

@media (max-width: 640px) {
    .layer-item {
        grid-template-columns: 1fr;
    }

    .layer-preview {
        width: 100%;
        height: auto;
    }
    .preset-toolbar {
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        gap: 8px;
    }

    .preset-actions {
        justify-content: stretch;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .preset-actions .layer-btn {
        width: 100%;
    }

    #tablist {
        gap: 6px;
    }

    #tablist > div {
        min-height: 34px;
        border-radius: 10px;
    }

    .update-log__header {
        flex-wrap: wrap;
    }

    .update-log__toggle {
        width: 100%;
    }

    .update-log__more-toggle {
        width: 100%;
        align-self: stretch;
    }

    .update-log-item__meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

.file-button {
    padding: 4px 8px;
    border-radius: 10px;
    border: 1px solid #86D7FF;
    background-color: #86D7FF;
    color: white;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.file-button:focus {
    outline: 2px solid #86D7FF;
    outline-offset: 2px;
}

.file-input {
    display: none;
}

.part-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 6px;
}

.part-meta__field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.part-meta__label {
    font-size: 0.7em;
    color: #888;
}

.part-meta__input {
    padding: 4px;
    border-radius: 10px;
    border: 1px solid #eee;
    width: 100%;
}

.button {
    width: 100px;
    min-width: 100px;
    text-align: center;
    padding: 7px;
    background-color: #86D7FF;
    color: white;
    border-radius: 10px;
    text-decoration-line: none;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: #86D7FF;
}

ul, .small {
    font-size: 0.8em;
    color: #ccc;
}

#tablist {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
    gap: 8px;
}

.preset-toolbar #tablist {
    flex: 1;
    min-width: 0;
}

#tablist > div.selected {
    background-color: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 6px 12px rgba(64, 173, 223, 0.24);
}

#tablist > div {
    min-height: 38px;
    border-radius: 11px;
    background-color: white;
    color: #4d8eae;
    text-align: center;
    border: 1px solid var(--line-soft);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    line-height: 1;
    transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

#tablist > div:hover {
    border-color: var(--accent);
    color: #2e799f;
    background-color: #f3faff;
    transform: translateY(-1px);
}
