/* Lound 말랑 젤리 테마 — 공통 토큰/버튼/입력 */
:root {
  --bg: #262833;
  --panel: #323644;
  --field: #2c303d;
  --text: #f4f5f9;
  --muted: #8b92a5;

  --h0: 20;
  --h1: 48;
  --accent: hsl(var(--h0) 78% 60%);
  --accent2: hsl(var(--h1) 78% 60%);
  --accent-shadow: hsl(var(--h0) 60% 38%);
  --gloss: linear-gradient(rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0));

  --jelly-green: #5fdc8c;
  --jelly-teal: #35d0c6;
  --jelly-blue: #4aa8ff;
  --jelly-purple: #bb7cff;
  --jelly-pink: #ff6fb5;
  --danger: #ff7a8a;

  --font: "Fredoka", "Jua", "LineSans", -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow: hidden;
  overscroll-behavior: none;
}

.hidden { display: none !important; }

.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

button {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0;
}

svg { display: block; }

/* ---------- 입력칸 ---------- */
.field {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 4px 18px;
  border-radius: 20px;
  background: var(--field);
  border: 2px solid transparent;
  color: var(--muted);
  transition: border-color 0.25s, background 0.25s;
}
.field:focus-within { border-color: var(--accent2); color: #fff; }
.field svg { width: 26px; height: 26px; flex: none; }
.field input {
  flex: 1;
  min-width: 0;
  height: 48px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 18px;
  letter-spacing: 0.06em;
}
.field input::placeholder { color: #6c7385; letter-spacing: 0.08em; font-size: 15px; }

/* ---------- 큰 버튼 (주황→노랑 젤리) ---------- */
.big-btn {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  height: 76px;
  padding: 0 36px;
  border-radius: 26px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 7px 0 var(--accent-shadow), 0 18px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.12s, box-shadow 0.12s;
}
.big-btn::before {
  content: "";
  position: absolute;
  left: 7%; right: 7%; top: 5%;
  height: 40%;
  border-radius: 999px;
  background: var(--gloss);
  pointer-events: none;
}
.big-btn::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 40%;
  left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: shine 3.2s ease-in-out infinite;
}
@keyframes shine { 0%, 55% { left: -60%; } 100% { left: 130%; } }
.big-btn:active {
  transform: translateY(6px);
  box-shadow: 0 1px 0 var(--accent-shadow), 0 6px 12px rgba(0, 0, 0, 0.35);
}
.big-btn-main {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.22);
}
.big-btn.small { height: 58px; min-width: 66px; padding: 0 18px; border-radius: 20px; box-shadow: 0 5px 0 var(--accent-shadow); }
.big-btn.small svg { width: 30px; height: 30px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.25)); }
.big-btn.small:active { box-shadow: 0 1px 0 var(--accent-shadow); }

/* ---------- 알약/동그란 버튼 ---------- */
.pill-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 54px;
  padding: 0 22px;
  border-radius: 18px;
  background: #343949;
  color: #c9cedb;
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: 15px;
  box-shadow: 0 4px 0 #2b2f3c;
  transition: transform 0.12s, box-shadow 0.12s;
}
.pill-btn svg { width: 24px; height: 24px; }
.pill-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #2b2f3c; }
.pill-btn.round {
  width: 58px; height: 58px; padding: 0;
  border-radius: 20px;
  background: linear-gradient(#3b4054, #323648);
  box-shadow: 0 5px 0 #262a38, 0 10px 18px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.pill-btn.round:active { box-shadow: 0 1px 0 #262a38; }

.icon-btn {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  color: #fff;
  transition: transform 0.15s ease;
}
.icon-btn svg { width: 32px; height: 32px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3)); }
.icon-btn:active { transform: scale(0.82); }

.error {
  min-height: 1.3em;
  margin: 0;
  color: var(--danger);
  font-size: 15px;
  font-weight: 500;
  text-align: center;
}

/* flex 줄 안의 입력칸은 남는 폭만 차지 */
.code-row .field, .composer .field, .gif-extra .field { width: auto; flex: 1; min-width: 0; }
