* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f4f6;
  color: #111827;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background: #111827;
  color: #f9fafb;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header h1 {
  font-size: 1.1rem;
  font-weight: 600;
}

header .brand {
  display: flex;
  align-items: center;
  gap: .5rem;
}

header .logo {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #60a5fa, #1f2937);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
}

header nav a {
  background: transparent;
  border: none;
  color: #e5e7eb;
  font-size: .85rem;
  cursor: pointer;
  padding: 0.25rem .75rem;
  border-radius: 999px;
  text-decoration: none;
}

header nav a:hover {
  background: rgba(156,163,175,0.3);
}

main {
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: 1.5rem auto 2rem;
  padding: 0 1rem;
}

.page-header {
  margin-bottom: 1.5rem;
}
.page-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: .25rem;
}
.page-subtitle {
  color: #6b7280;
  font-size: .9rem;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.menu-card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  border: 1px solid #e5e7eb;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .12s ease-out, box-shadow .12s ease-out, border-color .12s ease-out;
  text-decoration: none;
  color: inherit;
}

.menu-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 35px rgba(15, 23, 42, 0.12);
  border-color: #60a5fa;
}

.menu-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: .25rem;
}
.menu-card-desc {
  font-size: .85rem;
  color: #6b7280;
  margin-bottom: .75rem;
}
.menu-card-tag {
  align-self: flex-start;
  font-size: .75rem;
  padding: .15rem .55rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
}

/* 共通フォーム系 */
label {
  font-size: .85rem;
  font-weight: 500;
  display: block;
  margin-bottom: .25rem;
}
input[type="text"],
input[type="number"],
textarea {
  width: 100%;
  border-radius: .75rem;
  border: 1px solid #d1d5db;
  padding: .5rem .75rem;
  font-size: .9rem;
  outline: none;
  background: #f9fafb;
  transition: border-color .12s ease-out, box-shadow .12s ease-out, background .12s ease-out;
}
input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus {
  border-color: #3b82f6;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(59,130,246,0.3);
}
.field {
  margin-bottom: 1rem;
}
.inline-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.inline-fields .field {
  flex: 1;
  min-width: 120px;
  margin-bottom: 0;
}

button.primary {
  border: none;
  border-radius: 999px;
  padding: .45rem 1.1rem;
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #f9fafb;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.35);
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  transition: transform .08s ease-out, box-shadow .08s ease-out, filter .08s ease-out;
}
button.primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(37, 99, 235, 0.4);
}
button.primary:active {
  transform: translateY(0);
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  border-radius: 999px;
  padding: .25rem .7rem;
  border: 1px solid #d1d5db;
  background: #ffffff;
  font-size: .8rem;
  cursor: pointer;
  user-select: none;
}
.chip input {
  margin: 0;
}

.result-box {
  background: #111827;
  color: #f9fafb;
  border-radius: .75rem;
  padding: .75rem .85rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .9rem;
  word-break: break-all;
}
.result-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: .4rem;
  gap: .5rem;
}
.muted {
  font-size: .8rem;
  color: #6b7280;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .85rem;
  color: #3b82f6;
  cursor: pointer;
  margin-bottom: 1rem;
  text-decoration: none;
}
.back-link:hover {
  text-decoration: underline;
}

/* QR */
.qr-preview {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: .75rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}
.qr-size-input {
  max-width: 140px;
}

footer {
  font-size: .75rem;
  color: #9ca3af;
  text-align: center;
  padding: .75rem 1rem 1.25rem;
}
