* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  background: #111018;
  color: #fff;
}

.app {
  max-width: 960px;
  margin: 0 auto;
  padding: 18px;
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.eyebrow {
  color: #ff5b7f;
  margin: 0 0 6px;
  font-size: 14px;
}

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

.today-box {
  min-width: 150px;
  background: #211f2d;
  border: 1px solid #38334b;
  border-radius: 18px;
  padding: 14px;
  text-align: right;
}

.today-box span {
  display: block;
  color: #aaa4bd;
  font-size: 13px;
}

.today-box strong {
  color: #fff;
  font-size: 15px;
}

.schedule-card,
.weekly-card,
.sync-card,
.settings-card,
.control-card,
.fact-card,
.quick-card,
.tool-card,
.result-card,
.storage-card {
  background: #181722;
  border: 1px solid #302d3e;
  border-radius: 22px;
  padding: 16px;
  margin-bottom: 16px;
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.day-card {
  background: #242130;
  border-radius: 16px;
  padding: 12px;
  border: 1px solid #393348;
}

.day-card.active {
  border-color: #ff5b7f;
  box-shadow: 0 0 0 2px rgba(255, 91, 127, 0.18);
}

.day-card b {
  display: block;
  margin-bottom: 5px;
}

.control-card label {
  display: block;
  margin-bottom: 8px;
  color: #d6d1e4;
}

.input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

input {
  flex: 1;
  border: 1px solid #393348;
  background: #100f17;
  color: #fff;
  padding: 14px;
  border-radius: 14px;
  font-size: 15px;
}

button {
  border: none;
  border-radius: 14px;
  padding: 12px 14px;
  background: #302d3e;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.main-btn {
  width: 100%;
  background: linear-gradient(135deg, #ff416c, #ff7b54);
  font-size: 16px;
}

.office {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.employee {
  position: relative;
  background: #1b1a25;
  border: 1px solid #302d3e;
  border-radius: 22px;
  padding: 14px;
  text-align: center;
  min-height: 170px;
}

.employee.working {
  border-color: #ff5b7f;
  animation: pulse 0.9s infinite alternate;
}

.bubble {
  min-height: 34px;
  background: #100f17;
  border: 1px solid #393348;
  color: #d6d1e4;
  border-radius: 14px;
  padding: 8px;
  font-size: 12px;
  margin-bottom: 10px;
}

.avatar {
  font-size: 38px;
  margin-bottom: 8px;
}

.employee h3 {
  font-size: 15px;
  margin-bottom: 5px;
}

.employee p {
  color: #aaa4bd;
  font-size: 13px;
}

.result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-row {
  display: flex;
  gap: 8px;
}

pre {
  white-space: pre-wrap;
  line-height: 1.55;
  background: #100f17;
  border-radius: 16px;
  padding: 14px;
  min-height: 220px;
  color: #f0eef7;
}

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

.saved-item {
  background: #100f17;
  border: 1px solid #302d3e;
  border-radius: 16px;
  padding: 12px;
}

.saved-item b {
  display: block;
  margin-bottom: 6px;
}

.saved-item p {
  color: #aaa4bd;
  font-size: 13px;
  margin-bottom: 10px;
}

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

.empty {
  color: #aaa4bd;
}

@keyframes pulse {
  from { transform: translateY(0); }
  to { transform: translateY(-5px); }
}

@media (max-width: 760px) {
  .top,
  .input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .today-box {
    text-align: left;
  }

  .schedule-grid,
  .office {
    grid-template-columns: 1fr;
  }
}


.mode-notice {
  margin: 10px 0 0;
  color: #ffb3c2;
  font-size: 13px;
  line-height: 1.4;
}


.sub-btn {
  width: 100%;
  margin-top: 8px;
  background: #242130;
}


.select {
  width: 100%;
  border: 1px solid #393348;
  background: #100f17;
  color: #fff;
  padding: 14px;
  border-radius: 14px;
  font-size: 15px;
  margin-bottom: 12px;
}

.provider-box {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.hidden {
  display: none;
}


textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  border: 1px solid #393348;
  background: #100f17;
  color: #fff;
  padding: 14px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.5;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.scene-copy-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.favorite-list {
  display: grid;
  gap: 8px;
}

.favorite-item {
  background: #100f17;
  border: 1px solid #302d3e;
  border-radius: 14px;
  padding: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.favorite-item span {
  color: #f0eef7;
  line-height: 1.4;
}

.favorite-item div {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  .tool-grid,
  .scene-copy-buttons {
    grid-template-columns: 1fr;
  }

  .favorite-item {
    align-items: stretch;
    flex-direction: column;
  }
}


/* v1.1 게임형 AI 직원실 */
.game-office-card {
  background: linear-gradient(180deg, #1b1728, #111018);
  border: 1px solid #3b3150;
  border-radius: 26px;
  padding: 16px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.game-office-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.office-status {
  background: #100f17;
  border: 1px solid #393348;
  border-radius: 18px;
  padding: 12px 14px;
  min-width: 150px;
}

.office-status span {
  display: block;
  color: #aaa4bd;
  font-size: 12px;
  margin-bottom: 4px;
}

.office-status strong {
  color: #ffb3c2;
  font-size: 15px;
}

.game-office {
  position: relative;
  min-height: 620px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid #312b46;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 91, 127, 0.22), transparent 26%),
    radial-gradient(circle at 85% 10%, rgba(98, 86, 255, 0.20), transparent 28%),
    linear-gradient(180deg, #262038 0%, #15131f 46%, #100f17 100%);
}

.office-wall {
  position: absolute;
  inset: 0 0 auto 0;
  height: 230px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 40px 40px;
  border-bottom: 8px solid #302844;
}

.neon-sign {
  position: absolute;
  left: 26px;
  top: 24px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 91, 127, 0.55);
  border-radius: 14px;
  color: #ffd6df;
  letter-spacing: 2px;
  font-size: 13px;
  text-shadow: 0 0 8px #ff416c, 0 0 18px #ff416c;
  box-shadow: 0 0 22px rgba(255, 65, 108, 0.22);
}

.wall-clock {
  position: absolute;
  right: 28px;
  top: 25px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: #100f17;
  border: 1px solid #4b425f;
  border-radius: 50%;
  font-size: 24px;
}

.case-board {
  position: absolute;
  right: 98px;
  top: 24px;
  width: 175px;
  min-height: 110px;
  padding: 12px;
  background: #2a2130;
  border: 2px solid #6b4b38;
  border-radius: 12px;
  transform: rotate(-1deg);
}

.case-board b {
  display: block;
  color: #fff;
  margin-bottom: 8px;
}

.case-board span {
  display: inline-block;
  background: #f0d99a;
  color: #1c1722;
  padding: 4px 7px;
  border-radius: 6px;
  font-size: 12px;
  margin: 3px;
}

.office-floor {
  position: absolute;
  inset: 190px 0 0 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.04) 25%, transparent 25%) 0 0 / 44px 44px,
    linear-gradient(225deg, rgba(255,255,255,0.035) 25%, transparent 25%) 0 0 / 44px 44px,
    linear-gradient(180deg, #171321, #0d0c13);
  transform-style: preserve-3d;
}

.game-worker {
  position: absolute;
  width: 150px;
  min-height: 188px;
  padding: 0;
  background: transparent;
  border: none;
  text-align: center;
  animation: idleFloat 2.8s ease-in-out infinite;
}

.game-worker .bubble {
  position: absolute;
  left: 50%;
  bottom: 168px;
  transform: translateX(-50%);
  min-width: 145px;
  max-width: 170px;
  min-height: 34px;
  background: #fff;
  color: #1a1622;
  border: 2px solid #1a1622;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.25);
  z-index: 5;
  font-weight: 800;
}

.game-worker .bubble::after {
  content: "";
  position: absolute;
  left: 45%;
  bottom: -10px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-right: 2px solid #1a1622;
  border-bottom: 2px solid #1a1622;
  transform: rotate(45deg);
}

.game-worker .desk {
  position: absolute;
  left: 50%;
  top: 80px;
  width: 132px;
  height: 72px;
  transform: translateX(-50%) skewX(-6deg);
  background: linear-gradient(180deg, #6b4a36, #3d2b25);
  border: 3px solid #211722;
  border-radius: 10px;
  box-shadow: 8px 12px 0 rgba(0,0,0,0.22);
}

.game-worker .desk::before,
.game-worker .desk::after {
  content: "";
  position: absolute;
  bottom: -32px;
  width: 14px;
  height: 34px;
  background: #2b1d19;
  border-radius: 4px;
}

.game-worker .desk::before {
  left: 18px;
}

.game-worker .desk::after {
  right: 18px;
}

.monitor {
  position: absolute;
  left: 50%;
  top: -46px;
  transform: translateX(-50%) skewX(6deg);
  width: 86px;
  height: 48px;
  background: #0b0b10;
  border: 4px solid #242130;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #58ffb3;
  font-size: 11px;
  font-weight: 900;
  text-shadow: 0 0 8px #58ffb3;
}

.monitor::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 20px;
  height: 12px;
  transform: translateX(-50%);
  background: #242130;
}

.keyboard {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%) skewX(6deg);
  width: 70px;
  height: 16px;
  background: #17131e;
  border-radius: 6px;
}

.game-worker .avatar {
  position: absolute;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  background: #f0d99a;
  border: 3px solid #211722;
  border-radius: 18px 18px 22px 22px;
  font-size: 34px;
  box-shadow: 0 6px 0 rgba(0,0,0,0.22);
  z-index: 3;
}

.game-worker h3 {
  position: absolute;
  left: 50%;
  top: 160px;
  width: 140px;
  transform: translateX(-50%);
  margin: 0;
  color: #fff;
  font-size: 14px;
}

.game-worker p {
  position: absolute;
  left: 50%;
  top: 181px;
  width: 140px;
  transform: translateX(-50%);
  color: #aaa4bd;
  font-size: 12px;
}

.game-worker.working .monitor {
  color: #ffdd65;
  text-shadow: 0 0 9px #ffdd65;
  animation: monitorBlink 0.45s infinite alternate;
}

.game-worker.working .avatar {
  animation: workerTyping 0.35s infinite alternate;
}

.game-worker.working .desk {
  box-shadow: 8px 12px 0 rgba(0,0,0,0.22), 0 0 26px rgba(255, 91, 127, 0.26);
}

.pm-worker {
  left: 5%;
  top: 38px;
}

.writer-worker {
  left: 27%;
  top: 108px;
  animation-delay: 0.2s;
}

.designer-worker {
  left: 50%;
  top: 45px;
  animation-delay: 0.4s;
}

.image-worker {
  left: 68%;
  top: 150px;
  animation-delay: 0.6s;
}

.marketer-worker {
  left: 12%;
  top: 300px;
  animation-delay: 0.8s;
}

.coffee-table {
  position: absolute;
  left: 52%;
  top: 325px;
  width: 120px;
  height: 86px;
  background: #2a2130;
  border: 3px solid #211722;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 8px 12px 0 rgba(0,0,0,0.2);
}

.coffee-table div {
  font-size: 34px;
}

.coffee-table span {
  position: absolute;
  bottom: 8px;
  color: #aaa4bd;
  font-size: 12px;
}

.server-rack {
  position: absolute;
  right: 34px;
  top: 300px;
  width: 96px;
  height: 150px;
  background: #17131e;
  border: 3px solid #393348;
  border-radius: 14px;
  padding: 16px 12px;
  box-shadow: 8px 12px 0 rgba(0,0,0,0.22);
}

.server-light {
  width: 100%;
  height: 18px;
  margin-bottom: 12px;
  background: linear-gradient(90deg, #58ffb3, #302d3e);
  border-radius: 8px;
  animation: serverPulse 1.1s infinite alternate;
}

.server-rack span {
  display: block;
  color: #aaa4bd;
  font-size: 12px;
  text-align: center;
  margin-top: 12px;
}

@keyframes idleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes workerTyping {
  from { transform: translateX(-50%) translateY(0) rotate(-2deg); }
  to { transform: translateX(-50%) translateY(-4px) rotate(2deg); }
}

@keyframes monitorBlink {
  from { filter: brightness(1); }
  to { filter: brightness(1.7); }
}

@keyframes serverPulse {
  from { opacity: 0.45; }
  to { opacity: 1; }
}

@media (max-width: 760px) {
  .game-office-head {
    flex-direction: column;
    align-items: stretch;
  }

  .game-office {
    min-height: 1080px;
  }

  .office-floor {
    inset: 185px 0 0 0;
  }

  .case-board {
    left: 24px;
    right: auto;
    top: 78px;
    width: 180px;
  }

  .wall-clock {
    right: 22px;
  }

  .pm-worker,
  .writer-worker,
  .designer-worker,
  .image-worker,
  .marketer-worker {
    left: 50%;
  }

  .pm-worker { top: 30px; }
  .writer-worker { top: 220px; }
  .designer-worker { top: 410px; }
  .image-worker { top: 600px; }
  .marketer-worker { top: 790px; }

  .coffee-table {
    left: 8%;
    top: 865px;
  }

  .server-rack {
    right: 8%;
    top: 830px;
  }
}


/* v1.2 모바일 게임 화면 겹침 수정 */
@media (max-width: 760px) {
  .game-office {
    min-height: 1420px;
    overflow: hidden;
  }

  .office-wall {
    height: 210px;
  }

  .office-floor {
    inset: 200px 0 0 0;
    min-height: 1220px;
  }

  .neon-sign {
    left: 16px;
    top: 16px;
    font-size: 11px;
    padding: 8px 12px;
  }

  .wall-clock {
    right: 16px;
    top: 15px;
    width: 42px;
    height: 42px;
    font-size: 20px;
  }

  .case-board {
    left: 16px;
    top: 70px;
    width: calc(100% - 32px);
    min-height: 92px;
    transform: rotate(0deg);
  }

  .game-worker {
    width: 170px;
    left: 50% !important;
    transform: translateX(-50%);
  }

  .game-worker .bubble {
    bottom: 166px;
    min-width: 150px;
    max-width: 190px;
    font-size: 12px;
  }

  .pm-worker {
    top: 35px;
  }

  .writer-worker {
    top: 245px;
  }

  .designer-worker {
    top: 455px;
  }

  .image-worker {
    top: 665px;
  }

  .marketer-worker {
    top: 875px;
  }

  .coffee-table {
    left: 9%;
    top: 1085px;
    width: 104px;
    height: 76px;
  }

  .server-rack {
    right: 9%;
    top: 1045px;
    width: 92px;
    height: 138px;
  }

  .game-worker h3 {
    top: 158px;
  }

  .game-worker p {
    top: 180px;
  }
}

@media (max-width: 420px) {
  .game-office {
    min-height: 1480px;
  }

  .office-floor {
    min-height: 1280px;
  }

  .coffee-table {
    left: 7%;
    top: 1125px;
  }

  .server-rack {
    right: 7%;
    top: 1090px;
  }
}


/* v1.3 모바일 레이아웃 완전 수정: 절대배치 → 세로 카드형 */
@media (max-width: 760px) {
  .game-office {
    min-height: auto;
    overflow: visible;
  }

  .office-wall {
    position: relative;
    height: auto;
    min-height: 190px;
    padding: 16px;
  }

  .office-floor {
    position: relative;
    inset: auto;
    min-height: auto;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 26px 16px 34px;
    transform-style: flat;
  }

  .neon-sign,
  .wall-clock,
  .case-board {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
  }

  .neon-sign {
    display: inline-block;
    margin-bottom: 12px;
  }

  .wall-clock {
    position: absolute;
    right: 16px;
    top: 16px;
  }

  .case-board {
    width: 100%;
    margin-top: 10px;
    transform: none;
  }

  .game-worker {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100%;
    min-height: 210px;
    transform: none !important;
    animation: none;
    background: rgba(27, 26, 37, 0.8);
    border: 1px solid #302d3e;
    border-radius: 22px;
    padding: 14px;
  }

  .game-worker .bubble {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    min-width: 0;
    max-width: none;
    width: 100%;
    margin-bottom: 12px;
  }

  .game-worker .bubble::after {
    left: 50%;
  }

  .game-worker .avatar {
    top: 66px;
  }

  .game-worker .desk {
    top: 122px;
  }

  .game-worker h3 {
    top: 24px;
    left: 16px;
    transform: none;
    width: auto;
    text-align: left;
    font-size: 15px;
  }

  .game-worker p {
    top: 47px;
    left: 16px;
    transform: none;
    width: auto;
    text-align: left;
    font-size: 12px;
  }

  .coffee-table,
  .server-rack {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    margin: 0 auto;
  }

  .coffee-table {
    width: 118px;
    height: 82px;
  }

  .server-rack {
    width: 110px;
    height: 150px;
  }
}

@media (max-width: 420px) {
  .game-office {
    min-height: auto;
  }

  .office-floor {
    min-height: auto;
  }

  .coffee-table,
  .server-rack {
    left: auto;
    right: auto;
    top: auto;
  }
}


/* v1.4 직원 움직임 강화 패치 */
/* PC: 직원들이 책상 앞에서 살짝 이동하는 게임 느낌 */
.game-worker {
  animation: workerWander 5.5s ease-in-out infinite !important;
}

.game-worker:nth-of-type(2) {
  animation-delay: 0.25s !important;
}

.game-worker:nth-of-type(3) {
  animation-delay: 0.5s !important;
}

.game-worker:nth-of-type(4) {
  animation-delay: 0.75s !important;
}

.game-worker:nth-of-type(5) {
  animation-delay: 1s !important;
}

.game-worker .avatar {
  animation: avatarBob 1.2s ease-in-out infinite;
}

.game-worker .monitor {
  overflow: hidden;
}

.game-worker .monitor::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(88, 255, 179, 0.35), transparent);
  transform: translateX(-120%);
  animation: monitorScan 2.2s linear infinite;
}

.game-worker .desk {
  animation: deskTinyMove 1.8s ease-in-out infinite;
}

.game-worker.working {
  animation: workerActiveWiggle 0.55s ease-in-out infinite !important;
}

.game-worker.working .bubble {
  animation: bubblePop 0.65s ease-in-out infinite alternate;
}

.game-worker.working .monitor {
  animation: monitorHot 0.45s infinite alternate;
}

.game-worker.working .avatar {
  animation: avatarTyping 0.28s ease-in-out infinite alternate;
}

.server-rack {
  animation: serverFloat 2.4s ease-in-out infinite;
}

.coffee-table {
  animation: coffeeFloat 2.8s ease-in-out infinite;
}

@keyframes workerWander {
  0%, 100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(7px, -5px);
  }
  50% {
    transform: translate(-4px, 3px);
  }
  75% {
    transform: translate(5px, 4px);
  }
}

@keyframes workerActiveWiggle {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(5px, -4px) rotate(-1deg);
  }
  50% {
    transform: translate(-4px, 4px) rotate(1deg);
  }
  75% {
    transform: translate(4px, 2px) rotate(-1deg);
  }
}

@keyframes avatarBob {
  0%, 100% {
    margin-top: 0;
  }
  50% {
    margin-top: -6px;
  }
}

@keyframes avatarTyping {
  from {
    margin-top: -2px;
    filter: brightness(1);
  }
  to {
    margin-top: -10px;
    filter: brightness(1.25);
  }
}

@keyframes monitorScan {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(120%);
  }
}

@keyframes deskTinyMove {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.08);
  }
}

@keyframes bubblePop {
  from {
    transform: translateX(-50%) translateY(0) scale(1);
  }
  to {
    transform: translateX(-50%) translateY(-5px) scale(1.03);
  }
}

@keyframes monitorHot {
  from {
    filter: brightness(1);
  }
  to {
    filter: brightness(1.7);
  }
}

@keyframes serverFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

@keyframes coffeeFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-5px) rotate(-2deg);
  }
}

/* 모바일: v1.3에서 animation:none 처리했던 걸 다시 움직이게 복구 */
@media (max-width: 760px) {
  .game-worker {
    animation: mobileCardFloat 2.2s ease-in-out infinite !important;
  }

  .game-worker.working {
    animation: mobileWorkingShake 0.55s ease-in-out infinite !important;
  }

  .game-worker .avatar {
    animation: mobileAvatarWork 1.1s ease-in-out infinite !important;
  }

  .game-worker .desk {
    animation: mobileDeskGlow 1.5s ease-in-out infinite !important;
  }

  .game-worker .bubble {
    animation: mobileBubbleFloat 1.6s ease-in-out infinite !important;
  }

  .game-worker.working .bubble {
    animation: mobileBubbleActive 0.55s ease-in-out infinite alternate !important;
  }

  .game-worker.working .avatar {
    animation: mobileAvatarTyping 0.25s ease-in-out infinite alternate !important;
  }

  .server-rack {
    animation: serverFloat 2.2s ease-in-out infinite !important;
  }

  .coffee-table {
    animation: coffeeFloat 2.6s ease-in-out infinite !important;
  }

  @keyframes mobileCardFloat {
    0%, 100% {
      transform: translateY(0) !important;
    }
    50% {
      transform: translateY(-7px) !important;
    }
  }

  @keyframes mobileWorkingShake {
    0%, 100% {
      transform: translateX(0) translateY(0) !important;
    }
    25% {
      transform: translateX(4px) translateY(-5px) !important;
    }
    50% {
      transform: translateX(-4px) translateY(4px) !important;
    }
    75% {
      transform: translateX(3px) translateY(2px) !important;
    }
  }

  @keyframes mobileAvatarWork {
    0%, 100% {
      margin-top: 0;
    }
    50% {
      margin-top: -7px;
    }
  }

  @keyframes mobileAvatarTyping {
    from {
      margin-top: -2px;
      filter: brightness(1);
    }
    to {
      margin-top: -12px;
      filter: brightness(1.3);
    }
  }

  @keyframes mobileDeskGlow {
    0%, 100% {
      filter: brightness(1);
    }
    50% {
      filter: brightness(1.1);
    }
  }

  @keyframes mobileBubbleFloat {
    0%, 100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-5px);
    }
  }

  @keyframes mobileBubbleActive {
    from {
      transform: translateY(0) scale(1);
    }
    to {
      transform: translateY(-6px) scale(1.03);
    }
  }
}


/* v1.5 자유 이동형 NPC 직원실 */
.npc-office {
  min-height: 760px;
}

.npc-floor {
  position: absolute;
  inset: 190px 0 0 0;
  min-height: 540px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.04) 25%, transparent 25%) 0 0 / 44px 44px,
    linear-gradient(225deg, rgba(255,255,255,0.03) 25%, transparent 25%) 0 0 / 44px 44px,
    linear-gradient(180deg, #171321, #0d0c13);
}

.desk-prop {
  position: absolute;
  width: 120px;
  height: 72px;
  background: linear-gradient(180deg, #6b4a36, #3d2b25);
  border: 3px solid #211722;
  border-radius: 12px;
  box-shadow: 8px 12px 0 rgba(0,0,0,0.22);
}

.desk-prop::before,
.desk-prop::after {
  content: "";
  position: absolute;
  bottom: -30px;
  width: 12px;
  height: 30px;
  background: #2b1d19;
  border-radius: 4px;
}

.desk-prop::before { left: 16px; }
.desk-prop::after { right: 16px; }

.desk-prop span {
  position: absolute;
  left: 50%;
  top: -42px;
  transform: translateX(-50%);
  width: 82px;
  height: 42px;
  display: grid;
  place-items: center;
  background: #0b0b10;
  border: 4px solid #242130;
  border-radius: 8px;
  color: #58ffb3;
  font-size: 11px;
  font-weight: 900;
  text-shadow: 0 0 8px #58ffb3;
  overflow: hidden;
}

.desk-prop span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(88,255,179,0.25), transparent);
  transform: translateX(-120%);
  animation: monitorScan 2.5s linear infinite;
}

.desk-pm { left: 8%; top: 52px; }
.desk-writer { left: 34%; top: 170px; }
.desk-designer { left: 60%; top: 56px; }
.desk-image { left: 74%; top: 300px; }
.desk-marketer { left: 15%; top: 330px; }

.break-zone {
  position: absolute;
  left: 43%;
  top: 346px;
  width: 150px;
  height: 112px;
  background: rgba(28, 22, 39, 0.88);
  border: 2px solid #393348;
  border-radius: 18px;
  box-shadow: 8px 12px 0 rgba(0,0,0,0.18);
}

.break-zone span {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  color: #d8d3e6;
  font-size: 12px;
}

.sofa {
  position: absolute;
  left: 18px;
  top: 20px;
  width: 78px;
  height: 34px;
  background: linear-gradient(180deg, #7f5aff, #4d3ac0);
  border-radius: 12px;
  box-shadow: 0 8px 0 rgba(0,0,0,0.16);
}

.sofa::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 8px;
  width: 12px;
  height: 22px;
  background: #4d3ac0;
  border-radius: 10px;
}

.sofa::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 8px;
  width: 12px;
  height: 22px;
  background: #4d3ac0;
  border-radius: 10px;
}

.small-table {
  position: absolute;
  right: 16px;
  top: 26px;
  width: 28px;
  height: 28px;
  background: #6b4a36;
  border-radius: 50%;
  border: 3px solid #2b1d19;
}

.npc-worker {
  position: absolute;
  width: 96px;
  height: 118px;
  z-index: 20;
  transition: left 2.4s linear, top 2.4s linear;
}

.npc-worker .bubble {
  position: absolute;
  left: 50%;
  bottom: 86px;
  transform: translateX(-50%);
  min-width: 90px;
  max-width: 130px;
  padding: 8px 10px;
  background: #fff;
  color: #1a1622;
  border: 2px solid #1a1622;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.25);
  z-index: 5;
}

.npc-worker .bubble::after {
  content: "";
  position: absolute;
  left: 45%;
  bottom: -8px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-right: 2px solid #1a1622;
  border-bottom: 2px solid #1a1622;
  transform: rotate(45deg);
}

.npc-character {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 48px;
  height: 70px;
  transform: translateX(-50%);
}

.npc-head {
  position: absolute;
  left: 50%;
  top: 0;
  width: 28px;
  height: 28px;
  transform: translateX(-50%);
  background: #f0d99a;
  border: 3px solid #211722;
  border-radius: 12px 12px 11px 11px;
}

.npc-head::before {
  content: "";
  position: absolute;
  inset: -3px -3px auto -3px;
  height: 10px;
  background: #2a1b19;
  border-radius: 10px 10px 0 0;
}

.npc-body {
  position: absolute;
  left: 50%;
  top: 24px;
  width: 30px;
  height: 24px;
  transform: translateX(-50%);
  border: 3px solid #211722;
  border-radius: 10px 10px 8px 8px;
}

.pm-worker .npc-body { background: #57a9ff; }
.writer-worker .npc-body { background: #6ae1cd; }
.designer-worker .npc-body { background: #bb87ff; }
.image-worker .npc-body { background: #7de07d; }
.marketer-worker .npc-body { background: #ff879c; }

.npc-body::before,
.npc-body::after {
  content: "";
  position: absolute;
  top: 5px;
  width: 12px;
  height: 3px;
  background: #211722;
}

.npc-body::before { left: -10px; transform: rotate(20deg); transform-origin: right center; }
.npc-body::after { right: -10px; transform: rotate(-20deg); transform-origin: left center; }

.npc-legs {
  position: absolute;
  left: 50%;
  top: 47px;
  width: 26px;
  height: 18px;
  transform: translateX(-50%);
}

.npc-legs::before,
.npc-legs::after {
  content: "";
  position: absolute;
  top: 0;
  width: 6px;
  height: 16px;
  background: #211722;
  border-radius: 4px;
}

.npc-legs::before { left: 4px; }
.npc-legs::after { right: 4px; }

.npc-name {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  min-width: 58px;
  padding: 4px 8px;
  background: rgba(16, 15, 23, 0.92);
  border: 1px solid #393348;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
}

.npc-worker.moving .npc-head { animation: npcHeadBob 0.34s ease-in-out infinite alternate; }
.npc-worker.moving .npc-body::before { animation: armSwingLeft 0.34s ease-in-out infinite alternate; }
.npc-worker.moving .npc-body::after { animation: armSwingRight 0.34s ease-in-out infinite alternate; }
.npc-worker.moving .npc-legs::before { animation: legWalkLeft 0.34s ease-in-out infinite alternate; transform-origin: top center; }
.npc-worker.moving .npc-legs::after { animation: legWalkRight 0.34s ease-in-out infinite alternate; transform-origin: top center; }

.npc-worker.working .bubble {
  animation: workBubble 0.55s ease-in-out infinite alternate;
}

.npc-worker.working .desk-target-glow {
  box-shadow: 0 0 16px rgba(255,255,255,0.2);
}

@keyframes npcHeadBob {
  from { margin-top: 0; }
  to { margin-top: -3px; }
}

@keyframes armSwingLeft {
  from { transform: rotate(30deg); }
  to { transform: rotate(-15deg); }
}

@keyframes armSwingRight {
  from { transform: rotate(-30deg); }
  to { transform: rotate(15deg); }
}

@keyframes legWalkLeft {
  from { transform: rotate(22deg); }
  to { transform: rotate(-10deg); }
}

@keyframes legWalkRight {
  from { transform: rotate(-22deg); }
  to { transform: rotate(10deg); }
}

@keyframes workBubble {
  from { transform: translateX(-50%) translateY(0) scale(1); }
  to { transform: translateX(-50%) translateY(-5px) scale(1.02); }
}

@media (max-width: 760px) {
  .npc-office {
    min-height: 960px;
  }

  .npc-floor {
    inset: 180px 0 0 0;
    min-height: 760px;
  }

  .desk-pm { left: 8%; top: 46px; }
  .desk-writer { left: 48%; top: 150px; }
  .desk-designer { left: 8%; top: 268px; }
  .desk-image { left: 48%; top: 374px; }
  .desk-marketer { left: 8%; top: 496px; }

  .break-zone {
    left: 48%;
    top: 588px;
    width: 132px;
    height: 104px;
  }

  .coffee-table {
    left: 10%;
    top: 640px;
  }

  .server-rack {
    right: 8%;
    top: 720px;
  }

  .npc-worker {
    width: 90px;
    height: 114px;
  }

  .npc-worker .bubble {
    bottom: 84px;
    min-width: 84px;
    max-width: 112px;
    font-size: 10px;
    padding: 7px 8px;
  }

  .npc-name {
    font-size: 10px;
    min-width: 54px;
  }
}


/* v1.6 모바일 NPC 세로 검은 카드 제거 + 실제 캐릭터만 보이게 수정 */
@media (max-width: 760px) {
  .npc-office {
    min-height: 900px;
    overflow: hidden;
  }

  .npc-floor {
    position: absolute;
    inset: 180px 0 0 0;
    min-height: 700px;
    display: block !important;
    padding: 0 !important;
    overflow: hidden;
  }

  /* v1.3의 모바일 카드형 직원 스타일을 완전히 무효화 */
  .npc-worker,
  .game-worker.npc-worker {
    position: absolute !important;
    width: 76px !important;
    height: 106px !important;
    min-height: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    animation: none !important;
    z-index: 30;
  }

  .npc-worker .bubble,
  .game-worker.npc-worker .bubble {
    position: absolute !important;
    left: 50% !important;
    bottom: 80px !important;
    top: auto !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    min-width: 76px !important;
    max-width: 108px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 6px 8px !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
    background: #fff !important;
    color: #1a1622 !important;
    border: 2px solid #1a1622 !important;
    border-radius: 14px !important;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.24) !important;
    z-index: 6;
  }

  .npc-worker .bubble::after,
  .game-worker.npc-worker .bubble::after {
    content: "";
    position: absolute;
    left: 45%;
    bottom: -7px;
    width: 10px;
    height: 10px;
    background: #fff;
    border-right: 2px solid #1a1622;
    border-bottom: 2px solid #1a1622;
    transform: rotate(45deg);
  }

  .npc-worker .npc-character,
  .game-worker.npc-worker .npc-character {
    position: absolute !important;
    left: 50% !important;
    bottom: 16px !important;
    top: auto !important;
    width: 42px !important;
    height: 64px !important;
    transform: translateX(-50%) !important;
  }

  .npc-worker .npc-name,
  .game-worker.npc-worker .npc-name {
    position: absolute !important;
    left: 50% !important;
    bottom: 0 !important;
    transform: translateX(-50%) !important;
    min-width: 48px !important;
    max-width: 82px !important;
    padding: 3px 6px !important;
    font-size: 9px !important;
    background: rgba(16, 15, 23, 0.92) !important;
    border: 1px solid #393348 !important;
    border-radius: 999px !important;
    color: #fff !important;
    white-space: nowrap;
  }

  .npc-head {
    width: 25px;
    height: 25px;
  }

  .npc-body {
    top: 22px;
    width: 27px;
    height: 22px;
  }

  .npc-legs {
    top: 43px;
  }

  .desk-prop {
    width: 96px;
    height: 60px;
  }

  .desk-prop span {
    width: 70px;
    height: 36px;
    top: -36px;
    font-size: 9px;
  }

  .desk-pm { left: 5%; top: 42px; }
  .desk-writer { left: 55%; top: 118px; }
  .desk-designer { left: 7%; top: 240px; }
  .desk-image { left: 55%; top: 332px; }
  .desk-marketer { left: 7%; top: 460px; }

  .break-zone {
    left: 52%;
    top: 520px;
    width: 118px;
    height: 90px;
  }

  .break-zone span {
    font-size: 11px;
  }

  .coffee-table {
    position: absolute !important;
    left: 8% !important;
    top: 620px !important;
    width: 92px !important;
    height: 66px !important;
    margin: 0 !important;
  }

  .coffee-table div {
    font-size: 26px;
  }

  .server-rack {
    position: absolute !important;
    right: 7% !important;
    top: 620px !important;
    width: 78px !important;
    height: 120px !important;
    margin: 0 !important;
  }

  .server-light {
    height: 14px;
    margin-bottom: 10px;
  }

  .npc-worker.moving .npc-head {
    animation: npcHeadBob 0.34s ease-in-out infinite alternate !important;
  }

  .npc-worker.moving .npc-body::before {
    animation: armSwingLeft 0.34s ease-in-out infinite alternate !important;
  }

  .npc-worker.moving .npc-body::after {
    animation: armSwingRight 0.34s ease-in-out infinite alternate !important;
  }

  .npc-worker.moving .npc-legs::before {
    animation: legWalkLeft 0.34s ease-in-out infinite alternate !important;
    transform-origin: top center;
  }

  .npc-worker.moving .npc-legs::after {
    animation: legWalkRight 0.34s ease-in-out infinite alternate !important;
    transform-origin: top center;
  }

  .npc-worker.working .bubble {
    animation: workBubble 0.55s ease-in-out infinite alternate !important;
  }
}

@media (max-width: 420px) {
  .npc-office {
    min-height: 880px;
  }

  .npc-floor {
    min-height: 690px;
  }

  .desk-prop {
    width: 90px;
    height: 56px;
  }

  .desk-pm { left: 4%; top: 42px; }
  .desk-writer { left: 54%; top: 118px; }
  .desk-designer { left: 5%; top: 238px; }
  .desk-image { left: 54%; top: 330px; }
  .desk-marketer { left: 5%; top: 456px; }

  .break-zone {
    left: 50%;
    top: 514px;
    width: 112px;
  }

  .coffee-table {
    left: 7% !important;
    top: 618px !important;
  }

  .server-rack {
    right: 6% !important;
    top: 618px !important;
  }
}


/* v1.7 모바일 하단 잘림 수정 */
/* 게임 사무실을 더 크게 만들고, 서버/카페존/직원 이동 범위를 내부로 맞춤 */
@media (max-width: 760px) {
  .game-office,
  .npc-office {
    min-height: 1120px !important;
    height: auto !important;
    overflow: hidden !important;
  }

  .npc-floor {
    inset: 180px 0 0 0 !important;
    min-height: 900px !important;
    height: 900px !important;
    overflow: hidden !important;
  }

  .desk-pm { left: 5% !important; top: 42px !important; }
  .desk-writer { left: 54% !important; top: 120px !important; }
  .desk-designer { left: 5% !important; top: 252px !important; }
  .desk-image { left: 54% !important; top: 372px !important; }
  .desk-marketer { left: 5% !important; top: 504px !important; }

  .break-zone {
    left: 50% !important;
    top: 590px !important;
    width: 124px !important;
    height: 96px !important;
  }

  .coffee-table {
    left: 7% !important;
    top: 700px !important;
    width: 96px !important;
    height: 70px !important;
  }

  .server-rack {
    right: 7% !important;
    top: 705px !important;
    width: 82px !important;
    height: 126px !important;
  }

  .npc-worker,
  .game-worker.npc-worker {
    width: 76px !important;
    height: 106px !important;
    z-index: 40 !important;
  }
}

@media (max-width: 420px) {
  .game-office,
  .npc-office {
    min-height: 1160px !important;
  }

  .npc-floor {
    min-height: 940px !important;
    height: 940px !important;
  }

  .desk-pm { left: 4% !important; top: 40px !important; }
  .desk-writer { left: 53% !important; top: 122px !important; }
  .desk-designer { left: 4% !important; top: 256px !important; }
  .desk-image { left: 53% !important; top: 382px !important; }
  .desk-marketer { left: 4% !important; top: 520px !important; }

  .break-zone {
    left: 49% !important;
    top: 625px !important;
    width: 116px !important;
  }

  .coffee-table {
    left: 6% !important;
    top: 745px !important;
  }

  .server-rack {
    right: 6% !important;
    top: 745px !important;
  }
}

/* 미리보기 화면이 iframe/카드 안에서 잘릴 때도 내부 스크롤 대신 전체 높이를 확보 */
.game-office-card {
  overflow: visible !important;
}

.game-office {
  margin-bottom: 18px;
}


.weekly-input-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 0.8fr auto;
  gap: 8px;
  margin: 10px 0;
}

.weekly-actions {
  margin-bottom: 12px;
}

.weekly-result {
  background: #100f17;
  border: 1px solid #302d3e;
  border-radius: 16px;
  padding: 12px;
  color: #f0eef7;
  line-height: 1.5;
  margin-bottom: 10px;
}

.weekly-video-list {
  display: grid;
  gap: 8px;
}

.weekly-video-item {
  background: #100f17;
  border: 1px solid #302d3e;
  border-radius: 14px;
  padding: 10px;
  display: grid;
  gap: 6px;
}

.weekly-video-item b {
  color: #fff;
}

.weekly-video-item span {
  color: #aaa4bd;
  font-size: 13px;
}

.weekly-video-item button {
  justify-self: start;
}

@media (max-width: 760px) {
  .weekly-input-grid {
    grid-template-columns: 1fr;
  }
}


.youtube-api-box {
  background: #100f17;
  border: 1px solid #302d3e;
  border-radius: 18px;
  padding: 14px;
  margin: 12px 0 16px;
}

.youtube-api-box h3 {
  margin-bottom: 12px;
}

.youtube-api-box label {
  display: block;
  color: #d6d1e4;
  font-size: 13px;
  margin: 10px 0 6px;
}


.sync-actions {
  margin-top: 12px;
}

.import-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  background: #242130;
  border: 1px solid #3b354c;
  color: #f4f0ff;
  font-weight: 800;
  cursor: pointer;
}

.import-label:hover {
  filter: brightness(1.08);
}


.setting-block {
  margin: 12px 0;
}

.setting-block label {
  display: block;
  color: #d6d1e4;
  font-size: 13px;
  margin: 8px 0 6px;
}


.day-card {
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.day-card:hover {
  transform: translateY(-3px);
  border-color: #7f5aff;
}

.day-card.selected {
  border-color: #58ffb3 !important;
  background: linear-gradient(180deg, rgba(88, 255, 179, 0.16), rgba(127, 90, 255, 0.08)) !important;
  box-shadow: 0 0 0 2px rgba(88, 255, 179, 0.08), 0 12px 28px rgba(0,0,0,0.22);
}

.day-card .mini-label {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  color: #58ffb3;
}


.made-card {
  background: #171520;
  border: 1px solid #2d2938;
  border-radius: 22px;
  padding: 18px;
  margin-bottom: 16px;
}

.made-input-grid {
  display: grid;
  grid-template-columns: 1.4fr auto auto;
  gap: 8px;
  margin: 12px 0;
}

.made-case-list {
  display: grid;
  gap: 8px;
}

.made-case-item {
  background: #100f17;
  border: 1px solid #302d3e;
  border-radius: 14px;
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.made-case-item b {
  color: #f4f0ff;
}

.made-case-item small {
  color: #aaa4bd;
}

@media (max-width: 760px) {
  .made-input-grid,
  .made-case-item {
    grid-template-columns: 1fr;
  }
}


.day-select-row {
  display: grid;
  gap: 8px;
  margin: 12px 0 14px;
  position: relative;
  z-index: 20;
}

.day-select-row label {
  color: #d7d1e8;
  font-size: 13px;
}

.schedule-grid {
  position: relative;
  z-index: 20;
}

.day-card {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #2d2938;
  color: inherit;
  font: inherit;
  text-align: left;
  width: 100%;
  pointer-events: auto !important;
  position: relative;
  z-index: 21;
}

.day-card:active {
  transform: scale(0.98);
}


.day-select-row button {
  width: 100%;
}


.control-card .input-row {
  grid-template-columns: 1fr auto auto;
}

@media (max-width: 760px) {
  .control-card .input-row {
    grid-template-columns: 1fr;
  }
}


.quality-result {
  margin-top: 12px;
  white-space: pre-wrap;
  background: #100f17;
  border: 1px solid #302d3e;
  border-radius: 14px;
  padding: 12px;
  color: #e9e4f5;
  min-height: 42px;
}


.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d7d1e8;
  font-size: 13px;
  margin-top: 4px;
}

.check-row input {
  width: auto;
}
