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

:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #666666;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --border: #e5e7eb;
  --success: #16a34a;
  --radius: 12px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 480px;
  margin: 0 auto;
}

header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header h1 {
  font-size: 18px;
  font-weight: 600;
}

.event-banner {
  margin: 12px 16px 0;
  padding: 14px 16px;
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
}

.event-banner:hover { background: #e0efff; }

.event-banner .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 4px;
}

.event-banner .name {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
}

.event-banner.inactive {
  background: #f9fafb;
  border-color: var(--border);
}

.event-banner.inactive .name {
  color: var(--muted);
  font-weight: 400;
}

main {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.photo-area {
  flex: 1;
  min-height: 200px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s;
  overflow: hidden;
  position: relative;
}

.photo-area:hover { border-color: var(--accent); }

.photo-area .placeholder {
  text-align: center;
  color: var(--muted);
}

.photo-area .placeholder .icon { font-size: 48px; margin-bottom: 8px; }
.photo-area .placeholder p { font-size: 14px; }

.photo-area img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.photo-area.has-photo img { display: block; }

.photo-area .remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  font-size: 18px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

.photo-area.has-photo { border-style: solid; border-color: var(--border); }
.photo-area.has-photo .placeholder { display: none; }
.photo-area.has-photo .remove-btn { display: flex; }

.type-selector {
  display: flex;
  gap: 8px;
}

.type-btn {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  color: var(--text);
}

.type-btn:hover { border-color: var(--accent); }
.type-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.note-input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
}

.note-input:focus { outline: none; border-color: var(--accent); }

footer {
  padding: 16px;
  padding-bottom: calc(16px + var(--safe-bottom));
  border-top: 1px solid var(--border);
}

.send-btn {
  width: 100%;
  padding: 16px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.send-btn:hover { background: var(--accent-hover); }
.send-btn:disabled { background: #93c5fd; cursor: not-allowed; }
.send-btn.success { background: var(--success); }

.status-bar {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  min-height: 20px;
}

input[type="file"] { display: none; }
