html,
body,
p,
ol,
ul,
li,
dl,
dt,
dd,
blockquote,
figure,
fieldset,
legend,
textarea,
pre,
iframe,
hr,
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: 100%;
  font-weight: normal;
}

ul {
  list-style: none;
}

button,
input,
select {
  margin: 0;
}

html {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

*,
*::before,
*::after {
  -webkit-box-sizing: inherit;
  box-sizing: inherit;
}

img,
video {
  display: block;
  height: auto;
  max-width: 100%;
}

iframe {
  border: 0;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

td,
th {
  padding: 0;
}

td:not([align]),
th:not([align]) {
  text-align: inherit;
}

html {
  font-size: 16px;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

article,
aside,
figure,
footer,
header,
hgroup,
section {
  display: block;
}

body,
button,
input,
select,
textarea {
  font-family: Pretendard, BlinkMacSystemFont, -apple-system, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

code,
pre {
  -moz-osx-font-smoothing: auto;
  -webkit-font-smoothing: auto;
  font-family: monospace;
}

body {
  position: relative;
  min-height: 100svh;
  font-size: 1rem;
  line-height: 1.5;
  word-break: keep-all;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

a {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

#app {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

@media screen and (max-width: 599px) {
  #app::after {
    content: "마이크로 타이포그래피 도우미는 랩톱 또는 데스크톱 환경에서 실행됩니다.";
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 1rem;
    background-color: white;
  }
}

.header {
  flex: 0 0 auto;
  background-color: white;
  padding: .75rem 1rem;
  text-align: center;
  border-bottom: 1px solid gainsboro;
}

.header-title {
  font-weight: 800;
}

.main {
  flex: 1 1 auto;
  display: flex;
  overflow: hidden;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 0 0 auto;
  padding: .5rem 1rem;
  background-color: white;
  font-size: .875rem;
  text-align: center;
  border-top: 1px solid gainsboro;
}

.footer a {
  opacity: .5;
}

.footer a:hover {
  opacity: 1;
}

.sidebar {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  width: 20rem;
  height: 100%;
  overflow: hidden;
  background-color: white;
  border-right: 1px solid gainsboro;
}

.sidebar-main {
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  padding: .5rem 1rem;
  background-color: white;
  border-top: 1px solid gainsboro;
}

.control-section,
.control-section * {
  box-sizing: border-box;
}

.control-section:not(:last-child) {
  border-bottom: 1px solid gainsboro;
}

.control-section-header {
  list-style: none;
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: .5rem 1rem;
  font-size: .875rem;
  font-weight: 700;
  cursor: pointer;
}

.control-section-header::-webkit-details-marker {
  display: none;
}

.control-section[open] .control-section-header {
  position: sticky;
  z-index: 999;
  top: 0;
  padding: .5rem 1rem;
  background-color: whitesmoke;
  border-bottom: 1px solid gainsboro;
}

.field {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: .5rem 1rem;
}

.label {
  display: block;
  font-weight: bold;
}

.property-description {
  display: block;
  font-size: .875rem;
  color: dimgray;
}

.value-display {
  font-size: .75rem;
  color: dimgray;
  text-align: right;
}

.panels {
  display: flex;
  flex: 1 1 auto;
  overflow: hidden;
}

@media screen and (max-width: 899px) {
  .panels {
    flex-direction: column;
  }
}

.panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 0; 
  overflow: hidden;
}

.panel:not(:last-child) {
  border-right: 1px solid gainsboro;
}

.panel-main {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  overflow: hidden;
}

.panel-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex: 0 0 auto;
  padding: .5rem 1rem;
  background-color: white;
  border-top: 1px solid gainsboro;
}

#preview-text {
  flex: 1 1 auto;
  font-size: 16px;
  line-height: 1.5;
  padding: 1rem;
  min-height: 100px;
  overflow-x: hidden;
  overflow-y: auto;
}

#css-output {
  flex: 1 1 auto;
  display: block;
  background-color: #2d2d2d;
  color: #f8f8f2;
  padding: 1rem;
  white-space: pre;
  word-wrap: break-word;
  font-family: monospace;
  overflow: auto;
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  margin: 0;
}

#css-output pre {
  margin: 0;
  padding: 0;
  white-space: pre;
}

#css-output code {
  display: block;
  margin: 0;
  padding: 0;
  white-space: pre;
}

.button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: .75em 1em;
  font-size: .875rem;
  font-weight: 700;
  color: white;
  background-color: dodgerblue;
  border: none;
  border-radius: 3em;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.button:hover {
  background-color: dodgerblue;
}

.button:active {
  background-color: dodgerblue;
}

.field {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.label {
  display: block;
  position: relative;
  font-weight: 700;
}

.input-text {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  -ms-appearance: none;
  display: block;
  width: 100%;
  padding: .5rem .75rem;
  font: inherit;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.input-number {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  -ms-appearance: none;
  display: block;
  width: 100%;
  padding: .5rem .75rem;
  font: inherit;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.input-color {
  display: block;
  width: 100%;
  height: 3rem;
  margin: 0;
  padding: .05rem .125rem;
  border: 1px solid gainsboro;
  border-radius: .25rem;
  cursor: pointer;
}

.select {
  position: relative;
}

.select::after {
  content: "↓";
  position: absolute;
  z-index: 888;
  top: 50%;
  right: .75rem;
  transform: translateY(-50%);
  font-size: .875rem;
  font-weight: 700;
  opacity: .5;
  pointer-events: none;
}

.select select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  -ms-appearance: none;
  display: block;
  width: 100%;
  padding: .5rem .75rem;
  font: inherit;
  border: 1px solid #ccc;
  border-radius: .25rem;
  cursor: pointer;
}

.control-section-header h4 {
  font-weight: 700;
}

@font-face {
  font-family: Logo;
  src: url('../fonts/logo.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

.logo {
  display: inline-flex;
  align-items: center;
  position: relative;
  font-family: Logo;
  font-size: 1rem;
}

.logo span:last-child {
  display: none;
}

@media screen and (max-width: 899px) {
  .logo span:first-child {
    display: none;
  }
  .logo span:last-child {
    display: inline-block;
  }
}

.input[type="number"] {
  width: 100%;
  padding: .5rem .75rem;
  font: inherit;
  border: 1px solid gainsboro;
  border-radius: .25rem;
}

.input[type="number"]::-webkit-inner-spin-button,
.input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
  height: 2em;
}

.input[type="color"] {
  width: 100%;
  height: 3rem;
  padding: 0 .125rem;
  font: inherit;
  border: 1px solid gainsboro;
  border-radius: .25rem;
  cursor: pointer;
}

.output {
  padding: 1rem;
  background-color: #f5f5f5;
  border-radius: .25rem;
  overflow: auto;
  font-family: monospace;
  font-size: .875rem;
  line-height: 1.5;
  white-space: pre;
  margin: 0;
}

.output pre {
  margin: 0;
  padding: 0;
}

.output code {
  display: block;
  margin: 0;
  padding: 0;
}