:root {
  --bg: #636363;
  --bg-deep: #4d4d4d;
  --ink: #f3f3f3;
  --muted: #d8d8d8;
  --line: #8a8a8a;
  --btn: #2f2f2f;
  --btn-text: #ffffff;
  --accent: #e8e8e8;
  --phone: 430px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #2c2c2c;
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

#app {
  width: min(100vw, var(--phone));
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  padding: 16px 16px 28px;
  position: relative;
  overflow-x: hidden;
}

h1,
h2,
p {
  margin: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.brand {
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.page {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-panel {
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.muted {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.big-stat {
  text-align: center;
  padding: 8px 0 2px;
}

.big-stat .label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.big-stat .value {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.1;
}

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

.row > * {
  flex: 1;
}

label {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 6px;
  color: var(--muted);
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #6f6f6f;
  color: #fff;
  border-radius: 12px;
  padding: 12px;
  font-size: 1rem;
}

input::placeholder,
textarea::placeholder {
  color: #d0d0d0;
}

button,
.google-btn {
  appearance: none;
  border: 0;
  background: var(--btn);
  color: var(--btn-text);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

button.secondary {
  background: #7a7a7a;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.toast {
  position: sticky;
  top: 8px;
  z-index: 20;
  background: #1f1f1f;
  color: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.92rem;
}

.error {
  color: #ffd3d3;
  font-size: 0.88rem;
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan h3 {
  margin: 0;
  font-size: 1.05rem;
}

.draw-card {
  position: relative;
  width: min(100%, 360px);
  margin: 10px auto 0;
}

.draw-card .photo {
  position: absolute;
  left: 21.6%;
  top: 7.1%;
  width: 56.2%;
  height: 45%;
  object-fit: cover;
  clip-path: ellipse(50% 50% at 50% 50%);
  z-index: 1;
  background: #111;
}

.draw-card .frame {
  width: 100%;
  display: block;
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.draw-card .meta {
  position: absolute;
  left: 16%;
  top: 67.5%;
  width: 68%;
  height: 22.5%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #2b2218;
  overflow: hidden;
  padding: 0 4px;
}

.draw-card .shop-name {
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.15;
  max-height: 2.3em;
  overflow: hidden;
}

.draw-card .shop-line {
  font-size: 0.68rem;
  line-height: 1.2;
  margin-top: 3px;
  max-height: 2.5em;
  overflow: hidden;
}

.skin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.skin-item {
  background: #505050;
  border-radius: 12px;
  padding: 8px;
  border: 2px solid transparent;
}

.skin-item.selected {
  border-color: #fff;
}

.skin-item.locked {
  opacity: 0.38;
}

.skin-item img {
  width: 100%;
  display: block;
  border-radius: 8px;
}

.board {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.board-row {
  display: grid;
  grid-template-columns: 42px 1fr 72px;
  gap: 8px;
  align-items: center;
  background: #585858;
  border-radius: 10px;
  padding: 8px 10px;
}

.board-row.me {
  outline: 2px solid #fff;
}

.hidden {
  display: none !important;
}

#google-btn {
  min-height: 44px;
}

.file-btn input {
  display: none;
}
