* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Paperlogy', "Noto Sans KR", Arial, "Apple SD Gothic Neo", sans-serif;
  background: var(--bg-color);
  color: #111111;
}

button {
  margin: 0;
  padding: 0;
  font: inherit;
  border: 0;
  background-color: transparent;
  cursor: pointer;
}

p {
  margin: 0;
}

ul, li {
  list-style: none;
}

/* theme color setting */
:root {
  --point-color: #b9def1;
  --point-color-dark: #b9def1;
  --hover-color: #dcedf7;
  --btn-hover-color: #dcedf7;
  --bg-color: #f7f8fc;
}

html[data-theme="color01"] {
  --point-color: #b9def1;
  --point-color-dark: #b9def1;
  --hover-color: #e8f7ff;
  --btn-hover-color: #c6e4f3;
  --bg-color: #f7f8fc;
}

html[data-theme="color02"] {
  --point-color: #9ed7f2;
  --point-color-dark: #f6c8d5;
  --hover-color: #eefaff;
  --btn-hover-color: #f5d4dd;
  --bg-color: #fffef9;
}

html[data-theme="color03"] {
  --point-color: #f3b4c9;
  --point-color-dark: #eeb0c5;
  --hover-color: #fcecf1;
  --btn-hover-color: #f9dbe5;
  --bg-color: #fefafb;
}

html[data-theme="color04"] {
  --point-color: #f5d7cd;
  --point-color-dark: #9ed2ea;
  --hover-color: #fdf2ee;
  --btn-hover-color: #cde9f7;
  --bg-color: #fdfcfa;
}

html[data-theme="color05"] {
  --point-color: #e3c7dd;
  --point-color-dark: #dfabd4;
  --hover-color: #f9f4f8;
  --btn-hover-color: #e3c7dd;
  --bg-color: #f9f4f8;
}

html[data-theme="color06"] {
  --point-color: #efb689;
  --point-color-dark: #efb689;
  --hover-color: #fbe9d1;
  --btn-hover-color: #f8d6bc;
  --bg-color: #fefbf6;
}

html[data-theme="color07"] {
  --point-color: #a2cc9e;
  --point-color-dark: #e3c39a;
  --hover-color: #d5e9cd;
  --btn-hover-color: #e9d6bc;
  --bg-color: #f8faf9;
}

html[data-theme="color08"] {
  --point-color: #f9eeac;
  --point-color-dark: #edac8e;
  --hover-color: #fdfae9;
  --btn-hover-color: #f8d6bc;
  --bg-color: #fefbf4;
}

.flex {
  display: flex;
}

.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 780px;
  margin: 0 auto;
  padding: 15px 0;
}

/* theme color */
.theme_header {
  width: 100%;
  justify-content: flex-end;
  padding: 0 40px;
}

.theme_color {
  position: relative;
  justify-content: flex-end;
}

.theme_color_picker {
  flex-direction: row;
  align-items: center;
  gap: 5px;
}

.theme_color_picker .btn_theme {
  width: 25px;
  height: 25px;
  border: 1px solid #d1d1d1;
  border-radius: 50%;
}

.theme_color_picker .btn_theme.selected {
  border: 2px solid #555;
}

.theme_color_picker .btn_theme[data-theme="color01"] {
  background-color: #b4def4;
}

.theme_color_picker .btn_theme[data-theme="color02"] {
  background-color: #fff9d9;
}

.theme_color_picker .btn_theme[data-theme="color03"] {
  background-color: #eeb0c5;
}

.theme_color_picker .btn_theme[data-theme="color04"] {
  background-color: #f5d7cd;
}

.theme_color_picker .btn_theme[data-theme="color05"] {
  background-color: #e3c7dd;
}

.theme_color_picker .btn_theme[data-theme="color06"] {
  background-color: #efb689;
}

.theme_color_picker .btn_theme[data-theme="color07"] {
  background-color: #a2cc9e;
}

.theme_color_picker .btn_theme[data-theme="color08"] {
  background-color: #f9eeac;
}

/* picker */
.content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  padding: 10px 40px;
}

.picker_header {
  flex-flow: column;
  width: 100%;
  margin-top: 30px;
  text-align: center;
}

.picker_header .title_area {
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.picker_header .title {
  margin: 0;
  color: #222;
  font-size: 40px;
  white-space: nowrap;
}

.picker_header .title > span {
  display: inline;
}

.picker_header .title span + span::before {
  content: " ";
}

.picker_header .subtitle {
  margin-top: 15px;
}

.picker_header .subtitle .label {
  display: block;
  width: 300px;
  height: 30px;
  padding: 0 20px;
  border-radius: 15px;
  background-color: var(--point-color);
}

.picker_header .subtitle .input {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  color: #111;
  font-family: 'Paperlogy';
  font-size: 14px;
  font-weight: 500;
  line-height: 30px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  outline: none;
}

.picker_header .subtitle .input:empty::before {
  content: attr(data-placeholder);
  color: #777;
  pointer-events: none;
}

.picker_section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 30px 0;
}

.picker_section .copyright {
  justify-content: flex-end;
  width: 100%;
  margin-bottom: 10px;
  color: #ccc;
  font-size: 10px;
  font-weight: 500;
  -webkit-user-select:none;
  -moz-user-select:none;
  -ms-user-select:none;
  user-select:none
}

.picker_area {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 35px 30px;
  border: 2px solid var(--point-color);
  border-radius: 20px;
  background-color: #fff;
}

.picker_grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 580px;
}

.grid_area {
  display: flex;
  flex-direction: column;
}

.grid_area.wide {
  grid-column: span 2;
}

.grid_area.wide .grid_slot {
  aspect-ratio: auto;
  height: 100%;
}

.grid_area .grid_title {
  height: 24px;
  margin-bottom: 5px;
  color: #333;
  font-weight: 600;
  line-height: 24px;
  text-align: center;
}

.grid_slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  border: 2px solid var(--point-color);
  border-radius: 14px;
  background-color: #fff;
  cursor: pointer;
  outline: none;
  overflow: hidden;
}

.grid_slot:hover {
  background-color: var(--hover-color);
}

.grid_slot.filled,
.grid_slot.filled:hover {
  background-color: transparent;
}

.grid_slot.filled .label {
  display: none;
}

.grid_slot .label {
  color: var(--point-color);
  font-size: 1.5rem;
  font-weight: bold;
}

.grid_slot .img_slot {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  z-index: 1;
}

.grid_slot .btn_delete {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: #333;
  z-index: 2;
}

/* button */
.btn_area {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 720px;
}

.btn_area .btn {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 15px;
  border-radius: 10px;
  background-color: var(--point-color-dark);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.btn_area .btn:hover {
  background-color: var(--btn-hover-color);
}

.btn_area .btn.reset {
  border: 1px solid #d1d1d1;
  background-color: #fff;
  color: #777;
}

.btn_area .btn.reset:hover {
  background-color: #fcfcfc;
}

/* footer */
.footer {
  margin-top: 50px;
  text-align: center;
}

.footer .link {
  display: block;
  color: #555;
  font-size: .75rem;
  font-weight: 600;
  text-decoration: none;
}

.footer .link:hover {
  color: #111;
}

/* capture mode */
.capture_root {
  width: 1440px;
  max-width: 1440px;
  min-width: 1440px;
}

.capture_mode {
  box-sizing: border-box;
  width: 1440px !important;
  min-width: 1440px !important;
  max-width: 1440px !important;
  margin: 0 !important;
  padding: 20px 80px !important;
  background: var(--bg-color) !important;
}

.capture_mode .picker_header {
  width: 100% !important;
  margin-top: 60px !important;
}

.capture_mode .picker_header .title {
  font-size: 80px !important;
}

.capture_mode .picker_header .title > span {
  display: inline !important;
}

.capture_mode .picker_header .subtitle {
  margin-top: 30px !important;
}

.capture_mode .picker_header .subtitle .label {
  display: block !important;
  width: 600px !important;
  height: 60px !important;
  padding: 0 40px !important;
  border-radius: 30px !important;
}

.capture_mode .picker_header .subtitle .input {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  font-size: 28px !important;
  line-height: 60px !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.capture_mode .picker_section {
  width: 100% !important;
  margin: 60px 0 !important;
}

.capture_mode .picker_section .copyright {
  margin-bottom: 20px !important;
  font-size: 20px !important;
}

.capture_mode .picker_area {
  width: 100% !important;
  padding: 70px 60px !important;
  border-width: 4px !important;
  border-radius: 40px !important;
}

.capture_mode .picker_grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 40px !important;
  width: 100% !important;
  max-width: 1160px !important;
  margin: 0 auto !important;
}

.capture_mode .picker_grid .grid_area.wide {
  grid-column: span 2 !important;
}

.capture_mode .picker_grid .grid_area.wide .grid_slot {
  aspect-ratio: auto !important;
  height: 100% !important;
}

.capture_mode .grid_area .grid_title {
  height: 48px !important;
  margin-bottom: 10px !important;
  font-size: 32px !important;
  line-height: 48px !important;
  font-weight: 600 !important;
}

.capture_mode .grid_slot {
  aspect-ratio: 1 !important;
  border-width: 4px !important;
  border-radius: 28px !important;
}

.capture_mode .grid_slot:not(.filled) .label {
  display: none !important;
}

.capture_mode .grid_slot .img_slot {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 24px !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-size: cover !important;
  z-index: 1 !important;
}

.capture_mode .btn_area,
.capture_mode .btn_delete {
  display: none !important;
}

/* mobile */
@media (max-width: 640px) {
  .theme_header {
    padding: 0 20px;
  }

  .content {
    padding: 10px 20px;
  }

  .picker_header .title > span {
    display: block;
  }

  .picker_grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    width: 100%;
  }

  .picker_grid .grid_area.wide {
    grid-column: span 2;
  }

  .picker_grid .grid_area.wide .grid_slot {
    aspect-ratio: 2 / 1;
    height: 100%;
  }
}
