:root {
  --background: #f7f6f2;
  --surface: #faf9f5;
  --muted: #f0eee6;
  --primary: #1c1917;
  --primary-dark: #0c0b0a;
  --text: #1c1917;
  --secondary: #78716c;
  --border: #e7e5e4;
  --white: #ffffff;
}

html.dark {
  --background: #0c0b0a;
  --surface: #141312;
  --muted: #1c1a18;
  --primary: #e7e5e4;
  --primary-dark: #ffffff;
  --text: #e7e5e4;
  --secondary: #a8a29e;
  --border: #292524;
  --white: #141312;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--background);
  transition: background 0.3s ease, color 0.3s ease;
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }

.studio-header {
  width: min(100%, 1000px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 24px 32px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.studio-sub {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 500;
}
.header-title {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
}
.studio-year {
  font-size: 12px;
  color: var(--secondary);
}
.studio-contact-link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--secondary);
  padding-bottom: 1px;
  transition: color 0.15s ease;
}
.studio-contact-link:hover {
  color: var(--secondary);
}
.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--text);
  transition: border-color 0.15s ease;
}
.theme-toggle-btn:hover {
  border-color: var(--secondary);
}

.app-card {
  width: min(100%, 1000px);
  padding: clamp(28px, 4vw, 40px);
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: .02em;
}
.logo {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--text);
  color: var(--background);
  font-size: 18px;
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.1;
  font-weight: 400;
  font-family: Newsreader, Georgia, serif;
  font-style: italic;
}
.subtitle {
  max-width: 700px;
  margin: 0 0 28px;
  color: var(--secondary);
  line-height: 1.5;
  font-size: 14px;
}

.workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.field { margin-bottom: 16px; }
label {
  display: block;
  margin: 0 0 6px;
  font-weight: 600;
  font-size: 13px;
}

input[type="text"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--background);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
}
input[type="text"]:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.primary-button {
  width: 100%;
  min-height: 46px;
  border-radius: 10px;
  padding: 0 16px;
  font-weight: 600;
  font-size: 13px;
  border: 0;
  background: var(--primary);
  color: var(--surface);
  transition: background .15s ease;
}
.primary-button:hover { background: var(--primary-dark); }
.primary-button:disabled { cursor: not-allowed; opacity: .4; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--secondary);
  font-size: 11px;
}

@media (max-width: 800px) {
  .studio-header { flex-direction: column; align-items: flex-start; gap: 14px; }
  .header-right { width: 100%; justify-content: space-between; }
}
@media (max-width: 560px) {
  body { padding: 12px; }
  .app-card, .studio-header { padding: 20px 16px; border-radius: 14px; }
  footer { flex-direction: column; align-items: flex-start; }
}