/* 모든 화면에 공통인 기본 요소(버튼, 입력, 패널, 숨김). */

/* 빨간 바탕 버튼의 글자는 테마와 상관없이 밝게 */
button:not([class]),
button[type="submit"],
.flee {
    color: var(--on-seal);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html,
body {
    height: 100%;
    margin: 0;
}

body {
    background: var(--ink);
    color: var(--paper);
    font-family: "Noto Serif KR", "Batang", "Malgun Gothic", serif;
    line-height: 1.6;
}

input,
button {
    font: inherit;
    color: inherit;
}

input {
    width: 100%;
    min-width: 0;
    padding: 0.6rem 0.75rem;
    background: var(--ink);
    border: 1px solid var(--line);
    border-radius: 4px;
}

input:focus-visible,
button:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 1px;
}

button {
    padding: 0.6rem 1rem;
    background: var(--seal);
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

button:hover {
    background: var(--seal-bright);
}

button.link {
    padding: 0.25rem 0;
    background: none;
    color: var(--paper-dim);
    text-decoration: underline;
}

.panel {
    padding: 0.75rem;
    background: var(--ink-soft);
    border: 1px solid var(--line);
    border-radius: 6px;
}

.panel h2 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
}

.placeholder {
    margin: 0;
    color: var(--paper-dim);
    font-size: 0.85rem;
}

/*
 * 휴대폰에서 단추를 빠르게 두 번 눌렀을 때 화면이 확대되지 않게 한다(손가락 두 개로 벌리는 확대는 그대로 된다).
 * iOS Safari는 html에만 두면 막히지 않을 때가 있어 누르는 요소에도 둔다.
 */
html,
button,
a,
input,
select,
textarea,
label,
[role="button"] {
    touch-action: manipulation;
}
