:root {
  color-scheme: light;
  --ink: #19232c;
  --line: #cad7df;
  --panel: #ffffff;
  --paper: #edf3f1;
  --green: #257a5a;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(circle at top, #f8fbfa 0, var(--paper) 56%);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

.remote-app {
  width: min(620px, calc(100vw - 24px));
  margin: 20px auto;
  display: grid;
  gap: 12px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: clamp(14px, 2.1vw, 22px);
}

h1 {
  margin: 0;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
}

.subtitle {
  margin: 8px 0 0;
  color: #506574;
  font-size: 0.96rem;
}

.code-label {
  display: block;
  margin-top: 12px;
  font-size: 0.86rem;
  font-weight: 800;
}

#codeInput {
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: 800 1.12rem "Courier New", Courier, monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

button {
  width: 100%;
  min-height: 46px;
  margin-top: 10px;
  border: 1px solid var(--green);
  border-radius: 8px;
  background: var(--green);
  color: #ffffff;
  cursor: pointer;
  font: 800 1rem Arial, Helvetica, sans-serif;
}

.controls-panel h2 {
  margin: 14px 0 8px;
  font-size: 1.08rem;
}

.connected-code {
  margin: 0;
  color: #3f586a;
  font-size: 0.9rem;
  font-weight: 700;
}

.connected-code strong {
  font-family: "Courier New", Courier, monospace;
  letter-spacing: 0.08em;
}

.feed-btn {
  margin-top: 12px;
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.feed-grid .feed-btn {
  margin-top: 0;
  min-height: 52px;
  font-size: 0.92rem;
  line-height: 1.2;
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.store-grid button {
  margin-top: 0;
  min-height: 52px;
  font-size: 0.92rem;
  line-height: 1.2;
}

.status {
  min-height: 1.4em;
  margin: 12px 0 0;
  color: #546b7a;
  font-size: 0.9rem;
  font-weight: 700;
}

@media (max-width: 620px) {
  .feed-grid {
    grid-template-columns: 1fr;
  }

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