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

body {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  background: #ffffff;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  color: #3b3b3b;
  overflow-x: hidden;
}

/* ヘッダー */
header {
  background: #ffffff;
  padding: 14px 16px;
  padding-top: max(14px, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  height: 28px;
  width: auto;
}

/* フィード */
.feed {
  padding: 12px;
}

/* カード */
.card {
  background: white;
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 0px 0px rgba(0,0,0,0.08);
}

.card-header {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  gap: 10px;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(60deg, #12a9dd, #abcd03);
  flex-shrink: 0;
}

.username {
  font-size: 13px;
  font-weight: 600;
  color: #3b3b3b;
}

.time {
  font-size: 11px;
  color: #a6a6a6;
  margin-left: auto;
  font-weight: 300;
}

/* 3Dビューアエリア */
.viewer-placeholder {
  width: 100%;
  height: 300px;
  background: #d3d3d3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a6a6a6;
  font-size: 13px;
  font-weight: 300;
}

/* アクションアイコン */
.card-actions {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  gap: 14px;
}

.action-icon {
  width: 26px;
  height: 26px;
  cursor: pointer;
  opacity: 0.7;
}

.action-right {
  margin-left: auto;
}

/* コメント */
.card-comment {
  padding: 0 12px 12px;
  font-size: 13px;
}

.comment-user {
  font-weight: 600;
  margin-right: 6px;
}

.comment-text {
  color: #3b3b3b;
  font-weight: 300;
}

/* スペーサー */
.spacer {
  height: 80px;
}

/* ボトムナビ */
nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  display: flex;
  justify-content: space-around;
  padding: 20px 10px 40px;
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #a6a6a6;
  font-size: 9px;
  font-weight: 300;
  gap: 2px;
}

.nav-icon {
  width: 38px;
  height: 38px;
}

.nav-item.active {
  color: #12a9dd;
}

.nav-item.active .nav-icon {
  opacity: 1;
}

/* ログイン画面 */
#login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(60deg, #12a9dd, #abcd03);
}

.login-box {
  background: white;
  border-radius: 20px;
  padding: 40px 32px;
  width: 90%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-logo {
  background: white;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.login-logo-img {
  height: 36px;
}

.login-box input {
  border: 1px solid #d3d3d3;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: 'Noto Sans JP', sans-serif;
  outline: none;
  color: #3b3b3b;
}

.login-box input:focus {
  border-color: #12a9dd;
}

.login-box button {
  background: linear-gradient(60deg, #12a9dd, #abcd03);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 13px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Noto Sans JP', sans-serif;
  cursor: pointer;
  margin-top: 4px;
}

.btn-secondary {
  background: white !important;
  color: #a6a6a6 !important;
  border: 1px solid #d3d3d3 !important;
  font-weight: 400 !important;
}

/* カードタグ */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 12px 12px;
}

.card-tag {
  font-size: 11px;
  font-weight: 300;
  color: #12a9dd;
  background: #e8f7fd;
  border-radius: 20px;
  padding: 3px 10px;
}

.card-tag.status {
  color: #7a9600;
  background: #f5fae0;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
#main-screen {
  animation: fadeIn 0.4s ease forwards;
}

input, textarea {
  font-size: 16px !important;
}