:root {
  color-scheme: light;
  --bg: #f4f0e8;
  --panel: #fffaf1;
  --ink: #1f2428;
  --muted: #687179;
  --line: #d8d0c2;
  --accent: #0f7b76;
  --accent-strong: #075f5b;
  --price: #b23b2e;
  --display-bg: #172121;
  --display-panel: #fbf3e6;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

.settings-body {
  background: var(--bg);
}

.settings-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.settings-panel {
  width: min(920px, 100%);
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(35, 31, 24, .12);
}

.settings-header,
.section-title-row,
.settings-footer,
.room-row {
  display: flex;
  align-items: center;
}

.settings-header {
  justify-content: stretch;
  gap: 14px;
  margin-bottom: 28px;
}

.eyebrow,
.board-kicker {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--accent-strong);
}

h1,
h2,
p {
  margin-top: 0;
}

.settings-header h1 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1.2;
}

.settings-title-block {
  width: 100%;
}

.settings-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.icon-button,
.text-button,
.header-button,
.remove-button,
.fullscreen-button {
  border: 0;
  cursor: pointer;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e7dfd0;
  color: var(--ink);
  font-size: 20px;
}

.icon-button:hover,
.text-button:hover,
.header-button:hover,
.remove-button:hover {
  background: #dcd1bd;
}

.header-button {
  height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
}

.header-button:hover {
  background: var(--accent-strong);
}

.header-button:disabled,
.text-button:disabled {
  cursor: default;
  opacity: .55;
}

.settings-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 22px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f1eadc;
}

.tab-button {
  height: 42px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #5c625f;
  cursor: pointer;
  font-weight: 900;
}

.tab-button.is-active {
  background: var(--accent);
  color: #fff;
}

.settings-tab-panel[hidden] {
  display: none;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
  outline: none;
}

textarea {
  width: 100%;
  min-height: 230px;
  padding: 14px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
  line-height: 1.55;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 123, 118, .16);
}

.yanolja-sync-panel {
  display: grid;
  gap: 14px;
  margin: -8px 0 26px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

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

.sync-header h2 {
  margin-bottom: 4px;
  font-size: 18px;
}

.sync-header p,
.sync-state {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.sync-grid {
  display: grid;
  grid-template-columns: minmax(0, 180px) minmax(0, 150px) 1fr;
  gap: 10px;
  align-items: end;
}

.custom-interval-field[hidden] {
  display: none;
}

.sync-state {
  min-height: 46px;
  display: flex;
  align-items: center;
}

.notice-form {
  display: grid;
  gap: 14px;
}

.notice-slot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.notice-slot-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
}

.notice-slot-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: end;
}

.notice-slot-header h2 {
  margin: 0;
  font-size: 20px;
}

.notice-slot-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.notice-image-uploader {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.music-panel {
  display: grid;
  gap: 14px;
}

.music-control-grid,
.music-uploader {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.music-uploader .upload-button {
  justify-self: end;
}

.music-track-list {
  display: grid;
  gap: 10px;
}

.music-track-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 34px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.notice-image-uploader input[type="file"] {
  padding: 10px;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  padding: 0;
}

.upload-checkbox {
  justify-content: center;
}

.upload-button {
  grid-column: auto;
  justify-self: end;
  white-space: nowrap;
}

.notice-image-list {
  display: grid;
  gap: 10px;
}

.empty-list-text {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.notice-image-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.notice-image-row img {
  width: 84px;
  height: 64px;
  border-radius: 7px;
  object-fit: cover;
  background: #e9e0d0;
}

.notice-image-info {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.notice-image-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}

.section-title-row {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.section-title-row h2 {
  margin-bottom: 0;
  font-size: 18px;
}

.text-button {
  height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.room-list {
  display: grid;
  gap: 10px;
}

.room-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .85fr) minmax(0, 1fr) 34px;
  align-items: end;
  gap: 10px;
  padding: 12px;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.room-row label {
  min-width: 0;
}

.remove-button {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  align-self: end;
  border-radius: 8px;
  background: #eee5d6;
  color: #8c342c;
  font-size: 22px;
  line-height: 1;
}

.settings-footer {
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
}

.settings-footer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-footer p {
  margin: 0;
}

.display-link {
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
}

.display-body {
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .78), rgba(30, 28, 24, .72)),
    repeating-linear-gradient(0deg, #2f2921 0, #2f2921 2px, #211d18 2px, #211d18 5px);
}

.display-stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 0;
}

.price-board {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  row-gap: clamp(12px, 2.6vh, 30px);
  align-items: stretch;
  padding: 5.3vh 9.2vw 4.8vh;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(240, 240, 230, .18), transparent 11%, transparent 89%, rgba(240, 240, 230, .18)),
    linear-gradient(rgba(237, 229, 207, .9), rgba(237, 229, 207, .9)),
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, .55), transparent 18%),
    repeating-linear-gradient(90deg, rgba(66, 55, 36, .08) 0, rgba(66, 55, 36, .08) 1px, transparent 1px, transparent 7px),
    repeating-linear-gradient(0deg, rgba(66, 55, 36, .07) 0, rgba(66, 55, 36, .07) 1px, transparent 1px, transparent 9px),
    #e7dcc3;
  border: 0;
  border-radius: 2px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .52);
}

.price-board::before,
.price-board::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 28%;
  bottom: 29%;
  width: 4.4%;
  opacity: .28;
  background:
    linear-gradient(90deg, transparent 42%, rgba(255, 255, 255, .75) 42% 50%, transparent 50%),
    radial-gradient(circle at 44% 18%, transparent 0 10px, rgba(255, 255, 255, .6) 11px 14px, transparent 15px),
    radial-gradient(circle at 44% 34%, transparent 0 10px, rgba(255, 255, 255, .6) 11px 14px, transparent 15px),
    radial-gradient(circle at 44% 50%, transparent 0 10px, rgba(255, 255, 255, .6) 11px 14px, transparent 15px);
}

.price-board::before {
  left: 8.3%;
}

.price-board::after {
  right: 8.3%;
  transform: scaleX(-1);
}

.board-header {
  text-align: center;
  position: relative;
  z-index: 1;
}

.board-header h2 {
  margin: 0 0 .35vh;
  color: #2b2420;
  font-size: 46px;
  line-height: 1.24;
  font-weight: 900;
}

.board-header p:last-child {
  margin-bottom: 0;
  color: #444946;
  font-size: 34px;
  font-weight: 800;
}

.board-header-spacer {
  visibility: hidden;
}

.charge-table {
  position: relative;
  z-index: 1;
  width: 94%;
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: clamp(4px, .38vw, 7px) solid rgba(62, 67, 60, .82);
  border-radius: clamp(9px, .7vw, 14px);
  overflow: hidden;
  background: rgba(248, 252, 251, .72);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .38);
}

.charge-head,
.rate-line {
  display: grid;
  grid-template-columns: 1.12fr 1.22fr 1.06fr;
  align-items: center;
}

.charge-head {
  color: #fff;
  text-align: center;
  font-size: 42px;
  font-weight: 900;
}

.charge-head > div {
  min-height: clamp(72px, 9vh, 100px);
  display: grid;
  place-items: center;
  padding: 8px;
  border-right: 2px solid rgba(255, 255, 255, .42);
  background: #353d2c;
}

.charge-head > div:nth-child(2) {
  background: #174452;
}

.charge-head > div:nth-child(3) {
  background: #343a37;
  border-right: 0;
}

.charge-head small {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  line-height: 1.16;
  font-weight: 700;
  opacity: .86;
}

.charge-body {
  min-height: 0;
  display: grid;
  grid-auto-rows: minmax(0, 1fr);
}

.rate-line {
  min-height: 0;
  background: rgba(248, 252, 251, .66);
  border-top: 2px solid rgba(67, 73, 68, .55);
}

.rate-line > div {
  height: 100%;
  min-width: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: clamp(5px, 1.1vh, 15px) clamp(8px, .9vw, 17px);
  border-right: 2px solid rgba(67, 73, 68, .45);
}

.rate-line > div:last-child {
  border-right: 0;
}

.room-name {
  color: #151515;
  text-align: center;
  font-size: 42px;
  line-height: 1.05;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.room-name small {
  display: block;
  margin-top: 7px;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 800;
}

.room-price {
  white-space: nowrap;
  color: #060606;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 42px;
  line-height: 1;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-shadow:
    1px 0 rgba(0, 0, 0, .28),
    -1px 0 rgba(255, 255, 255, .7),
    0 2px rgba(0, 0, 0, .12);
}

.room-price.is-sold-out {
  color: #d71920;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  text-shadow: none;
}

.notice-board {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.announcement-board {
  position: relative;
  z-index: 1;
  width: 94%;
  height: 100%;
  min-height: 0;
  display: grid;
  align-content: stretch;
  justify-items: stretch;
  margin: 0 auto;
  text-align: center;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.announcement-slider {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(26px, 2.35vw, 46px);
  align-items: stretch;
  justify-items: stretch;
  overflow: visible;
  background: transparent;
}

.announcement-panel {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  overflow: hidden;
  border: clamp(4px, .38vw, 7px) solid rgba(62, 67, 60, .82);
  border-radius: clamp(9px, .7vw, 14px);
  background: rgba(255, 253, 248, .86);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .38);
}

.announcement-panel.is-empty {
  background: rgba(255, 253, 248, .72);
}

.announcement-slide-image {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: contain;
  border-radius: 0;
  background-color: rgba(255, 253, 248, .72);
}

.empty-announcement .announcement-board {
  visibility: hidden;
}

.room-note {
  color: #2e3431;
  text-align: center;
  font-size: clamp(30px, 1.85vw, 36px);
  line-height: 1.18;
  font-weight: 900;
  overflow-wrap: anywhere;
  word-break: keep-all;
  white-space: nowrap;
}

.board-footer {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: .25em;
  width: 80%;
  margin: 0 auto;
  color: #4e6a64;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
}

.board-footer strong {
  font-size: 28px;
}

.board-footer em {
  position: absolute;
  right: 6.5%;
  bottom: 0;
  color: #23312f;
  font-size: 15px;
  font-style: normal;
  font-weight: 900;
}

.notice-footer-placeholder {
  visibility: hidden;
  pointer-events: none;
}

.paper-corner {
  position: absolute;
  z-index: 2;
  width: clamp(38px, 3vw, 58px);
  height: clamp(38px, 3vw, 58px);
  border-color: #817f70;
  opacity: .9;
}

.paper-screw {
  position: absolute;
  z-index: 3;
  width: clamp(24px, 1.65vw, 32px);
  height: clamp(24px, 1.65vw, 32px);
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .7), transparent 42%),
    radial-gradient(circle at 35% 35%, #20201c 0 16%, #777165 17% 38%, #151512 39% 62%, #a8a293 63% 100%);
  box-shadow: 0 3px 5px rgba(0, 0, 0, .45);
}

.paper-screw::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  top: 46%;
  height: 3px;
  background: rgba(20, 20, 18, .72);
  transform: rotate(-28deg);
}

.screw-top-left { left: 1.15%; top: 1.15%; }
.screw-top-right { right: 1.15%; top: 1.15%; }
.screw-bottom-left { left: 1.15%; bottom: 1.15%; }
.screw-bottom-right { right: 1.15%; bottom: 1.15%; }

.top-left {
  left: 1.8%;
  top: 1.8%;
  border-top: 6px solid;
  border-left: 6px solid;
}

.top-right {
  right: 1.8%;
  top: 1.8%;
  border-top: 6px solid;
  border-right: 6px solid;
}

.bottom-left {
  left: 1.8%;
  bottom: 1.8%;
  border-bottom: 6px solid;
  border-left: 6px solid;
}

.bottom-right {
  right: 1.8%;
  bottom: 1.8%;
  border-bottom: 6px solid;
  border-right: 6px solid;
}

.color-strip {
  position: absolute;
  z-index: 1;
  top: 32.4%;
  display: grid;
  gap: 0;
  width: clamp(16px, 1.08vw, 21px);
  height: 20.2%;
}

.left-strip {
  left: 5.5%;
}

.right-strip {
  right: 5.5%;
}

.color-strip span:nth-child(1) { background: #2d6eb2; }
.color-strip span:nth-child(2) { background: #62aeb2; }
.color-strip span:nth-child(3) { background: #e0c763; }
.color-strip span:nth-child(4) { background: #cc3d36; }

.fullscreen-button {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: rgba(255, 250, 241, .82);
  color: var(--ink);
  font-size: 24px;
  display: none;
}

@media (max-width: 720px) {
  .settings-shell {
    padding: 12px;
  }

  .settings-panel {
    padding: 18px;
  }

  .settings-header,
  .settings-footer,
  .settings-footer-actions,
  .board-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-title-row {
    flex-direction: row;
    align-items: center;
  }

  .settings-header h1 {
    font-size: 28px;
  }

  .header-actions {
    gap: 6px;
  }

  .header-button {
    height: 38px;
    padding: 0 11px;
    font-size: 14px;
  }

  .settings-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 3px;
    margin-bottom: 18px;
  }

  .tab-button {
    height: 40px;
    min-width: 0;
    padding: 0 2px;
    font-size: 14px;
    white-space: nowrap;
  }

  .control-grid {
    grid-template-columns: 1fr;
  }

  textarea {
    min-height: 190px;
  }

  .sync-header,
  .sync-grid {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .sync-header {
    display: grid;
  }

  .sync-state {
    min-height: 0;
  }

  .notice-slot-grid,
  .notice-image-uploader,
  .music-control-grid,
  .music-uploader,
  .music-track-row,
  .notice-image-row {
    grid-template-columns: 1fr;
  }

  .notice-image-options {
    grid-template-columns: 1fr;
  }

  .notice-image-row img {
    width: 100%;
    height: 170px;
  }

  .upload-checkbox {
    justify-content: flex-start;
  }

  .room-row {
    grid-template-columns: minmax(0, 1fr) minmax(82px, .85fr) minmax(0, 1fr) 28px;
    gap: 6px;
    padding: 10px;
  }

  .room-row label {
    gap: 5px;
    font-size: 12px;
  }

  .room-row input {
    height: 42px;
    padding: 0 10px;
  }

  .remove-button {
    width: 28px;
    height: 28px;
    font-size: 20px;
  }

  .price-board {
    width: 96vw;
    min-height: 92vh;
    padding: 34px 18px 26px;
  }

  .notice-board {
    width: 100vw;
    height: 100dvh;
    min-height: 100vh;
    padding: 10vh 7vw;
  }

  .announcement-board {
    width: 86vw;
  }

  .color-strip,
  .paper-corner,
  .paper-screw {
    display: none;
  }

  .charge-head,
  .rate-line {
    grid-template-columns: 1fr;
  }

  .charge-head > div,
  .rate-line > div {
    border-right: 0;
    border-bottom: 1px solid rgba(67, 73, 68, .38);
  }

  .charge-head > div:last-child,
  .rate-line > div:last-child {
    border-bottom: 0;
  }
}

@media (min-width: 721px) and (max-height: 850px) {
  .board-header h2 {
    font-size: 32px;
  }

  .board-header p:last-child {
    font-size: 23px;
  }

  .charge-head,
  .room-name,
  .room-price {
    font-size: 28px;
  }

  .charge-head > div {
    min-height: 64px;
    padding: 4px;
  }

  .charge-head small,
  .room-name small {
    font-size: 11px;
    line-height: 1.15;
  }

  .room-name small {
    margin-top: 3px;
  }

  .rate-line > div {
    padding: 3px 6px;
  }

  .room-note {
    font-size: 20px;
  }

  .board-footer {
    font-size: 15px;
  }

  .board-footer strong {
    font-size: 18px;
  }

  .board-footer em {
    right: -8%;
    font-size: 10px;
  }
}
