/*
Theme Name: AIWebMag
Theme URI: https://aiwebmag.com/
Author: AIWebMag
Description: AIWebMag専用の軽量なWordPressテーマです。
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: aiwebmag
*/

:root {
  --aiwebmag-bg: #f7f8fa;
  --aiwebmag-surface: #ffffff;
  --aiwebmag-text: #172033;
  --aiwebmag-muted: #657089;
  --aiwebmag-accent: #2563eb;
  --aiwebmag-border: #e5e7eb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--aiwebmag-bg);
  color: var(--aiwebmag-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
}

a { color: var(--aiwebmag-accent); }
a:hover { text-decoration-thickness: 2px; }

.site-header,
.site-main,
.site-footer {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
}

.site-header {
  padding-block: 2rem;
}

.site-title {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
}

.site-title a { color: inherit; text-decoration: none; }

.site-description { margin: .25rem 0 0; color: var(--aiwebmag-muted); }

.site-main { padding-bottom: 3rem; }

.post-card,
.page-content {
  padding: clamp(1.25rem, 4vw, 2.5rem);
  background: var(--aiwebmag-surface);
  border: 1px solid var(--aiwebmag-border);
  border-radius: .75rem;
}

.post-card + .post-card { margin-top: 1rem; }

.entry-title { margin-top: 0; line-height: 1.25; }
.entry-meta { color: var(--aiwebmag-muted); font-size: .875rem; }
.entry-content img { height: auto; max-width: 100%; }

.aiwebmag-message,
.aiwebmag-conversation {
  display: flex;
  gap: .875rem;
  align-items: flex-start;
  margin-block: 1.5rem;
}

.aiwebmag-conversation__avatar {
  display: grid;
  flex: 0 0 2.75rem;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: .8rem;
}

.aiwebmag-conversation--editor .aiwebmag-conversation__avatar { background: #1e293b; }
.aiwebmag-conversation--ai .aiwebmag-conversation__avatar { background: #2563eb; }

.aiwebmag-conversation__message {
  flex: 1;
  min-width: 0;
  padding: 1rem 1.125rem;
  border: 1px solid var(--aiwebmag-border);
  border-radius: .125rem .75rem .75rem .75rem;
  background: var(--aiwebmag-surface);
}

.aiwebmag-conversation--ai .aiwebmag-conversation__message {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.aiwebmag-conversation__name {
  margin: 0;
  color: var(--aiwebmag-muted);
  font-size: .8125rem;
  font-weight: 700;
}

.aiwebmag-timestamp,
.aiwebmag-conversation__timestamp {
	display: block;
	margin-bottom: .375rem;
  color: var(--aiwebmag-muted);
  font-size: .8125rem;
  white-space: nowrap;
}

.aiwebmag-conversation__body > :first-child { margin-top: 0; }
.aiwebmag-conversation__body > :last-child { margin-bottom: 0; }

.aiwebmag-message-content-row {
  display: flex;
  align-items: flex-start;
  gap: .625rem;
}

.aiwebmag-ai-icon {
  display: block;
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  object-fit: cover;
  border-radius: 50%;
}

.aiwebmag-conversation__message > .aiwebmag-ai-icon {
  float: left;
  margin: .2rem .625rem 0 0;
}

.aiwebmag-message-content > :first-child { margin-top: 0; }
.aiwebmag-message-content > :last-child { margin-bottom: 0; }

@media (max-width: 480px) {
  .aiwebmag-conversation { gap: .625rem; }
  .aiwebmag-conversation__avatar { flex-basis: 2.25rem; width: 2.25rem; height: 2.25rem; }
  .aiwebmag-conversation__message { padding: .875rem 1rem; }
}

.site-footer {
  padding-block: 1.5rem;
  color: var(--aiwebmag-muted);
  font-size: .875rem;
}
