/* ===================================
   PetnotePlus Support Site - Common CSS
   Mobile First: 375px → 768px → 1024px+
   =================================== */

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.7;
  color: #333;
  background-color: #f8f9fa;
}

a {
  color: #FF6B50;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 960px;
  margin: 0 auto;
}

.site-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #333;
}

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

details.lang-nav {
  position: relative;
  font-size: 0.85rem;
  display: block !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  background: none !important;
}

details.lang-nav > summary {
  display: flex !important;
  align-items: center;
  gap: 4px;
  padding: 6px 12px !important;
  background: #FF6B50 !important;
  color: #fff !important;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
  border: none !important;
  margin: 0 !important;
}

details.lang-nav > summary::-webkit-details-marker {
  display: none;
}

details.lang-nav > summary::after {
  content: '' !important;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #fff;
  margin-left: 4px;
}

details.lang-nav[open] > summary::after {
  border-top: none;
  border-bottom: 5px solid #fff;
}

details.lang-nav .lang-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: #fff !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  padding: 4px 0 !important;
  min-width: 160px;
  z-index: 200;
}

details.lang-nav .lang-dropdown a {
  display: block !important;
  padding: 8px 16px !important;
  color: #333 !important;
  text-decoration: none !important;
  white-space: nowrap;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  float: none !important;
}

details.lang-nav .lang-dropdown a:hover {
  background: #f5f5f5 !important;
  text-decoration: none !important;
}

/* Main Content */
.main-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: #222;
  line-height: 1.4;
}

/* Sections */
.content-section {
  background: #fff;
  border-radius: 12px;
  padding: 20px 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.content-section h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #222;
  padding-bottom: 8px;
  border-bottom: 2px solid #FF6B50;
}

.content-section h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 16px 0 8px;
  color: #333;
}

.content-section p {
  margin-bottom: 12px;
}

.content-section ul,
.content-section ol {
  margin-bottom: 12px;
  padding-left: 1.5em;
}

.content-section li {
  margin-bottom: 4px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  transition: opacity 0.2s;
}

.btn:hover {
  opacity: 0.85;
  text-decoration: none;
}

.btn-primary {
  background: #FF6B50;
  color: #fff;
}

.btn-outline {
  background: #fff;
  color: #FF6B50;
  border: 2px solid #FF6B50;
}

.btn-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.btn-list .btn {
  width: 100%;
}

/* Link List */
.link-list {
  list-style: none;
  padding: 0;
  margin-bottom: 16px;
}

.link-list li {
  border-bottom: 1px solid #eee;
}

.link-list li:last-child {
  border-bottom: none;
}

.link-list a {
  display: block;
  padding: 12px 8px;
  color: #FF6B50;
  font-weight: 500;
  position: relative;
  padding-right: 24px;
}

.link-list a::after {
  content: '›';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2em;
  color: #aaa;
}

/* Accordion (FAQ) */
.accordion-section {
  margin-bottom: 16px;
}

details.faq-item {
  background: #fff;
  border-radius: 8px;
  margin-bottom: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

details.faq-item summary {
  padding: 14px 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 40px;
  color: #333;
}

details.faq-item summary::-webkit-details-marker {
  display: none;
}

details.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: #999;
  transition: transform 0.2s;
}

details.faq-item[open] summary::after {
  content: '−';
}

details.faq-item .faq-answer {
  padding: 0 16px 16px;
  color: #555;
  line-height: 1.8;
}

details.faq-item .faq-answer p {
  margin-bottom: 8px;
}

/* Step Guide */
.step-guide {
  counter-reset: step-counter;
}

.step-item {
  position: relative;
  padding-left: 48px;
  margin-bottom: 24px;
  min-height: 40px;
}

.step-item::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  background: #FF6B50;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}

.step-item h3 {
  margin-top: 0;
  font-size: 1.05rem;
}

.step-item .step-image {
  margin: 12px 0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Accordion (Pet page, etc.) */
details.content-accordion {
  background: #fff;
  border-radius: 8px;
  margin-bottom: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

details.content-accordion summary {
  padding: 14px 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 40px;
  color: #333;
}

details.content-accordion summary::-webkit-details-marker {
  display: none;
}

details.content-accordion summary::after {
  content: '+';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: #999;
}

details.content-accordion[open] summary::after {
  content: '−';
}

details.content-accordion .accordion-content {
  padding: 0 16px 16px;
  color: #555;
}

details.content-accordion .accordion-content p {
  margin-bottom: 8px;
}

details.content-accordion .accordion-content img {
  margin: 8px 0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Top Page */
.top-hero {
  text-align: center;
  padding: 32px 0;
}

.top-hero .app-icon {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  margin: 0 auto 16px;
}

.top-hero h1 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.top-hero .tagline {
  color: #666;
  font-size: 0.95rem;
}

.top-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.top-nav .btn {
  width: 100%;
}

/* Description List (record-category input types) */
.input-type-list dt {
  font-weight: 600;
  margin-top: 12px;
  color: #333;
}

.input-type-list dd {
  margin-left: 0;
  margin-bottom: 8px;
  color: #555;
}

/* Images */
.screenshot {
  margin: 12px 0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  max-width: 300px;
}

.screenshot-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.screenshot-row .screenshot {
  flex: 1;
  min-width: 140px;
  max-width: 200px;
}

/* Footer */
.site-footer {
  background: #fff;
  border-top: 1px solid #e0e0e0;
  padding: 24px 16px;
  margin-top: 32px;
}

.footer-inner {
  max-width: 720px;
  margin: 0 auto;
}

.footer-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 12px;
  font-size: 0.85rem;
}

.footer-nav a {
  color: #666;
}

.footer-copyright {
  font-size: 0.8rem;
  color: #999;
}

/* Legal Pages (Privacy Policy, Terms) */
.legal-content {
  background: #fff;
  border-radius: 12px;
  padding: 20px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.legal-content h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 20px 0 8px;
  color: #222;
}

.legal-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 16px 0 8px;
  color: #333;
}

.legal-content p {
  margin-bottom: 12px;
  font-size: 0.93rem;
  line-height: 1.8;
}

.legal-content ul {
  margin-bottom: 12px;
  padding-left: 1.5em;
  font-size: 0.93rem;
}

.legal-content strong {
  font-weight: 600;
}

/* Widget page platform tabs */
.platform-section {
  margin-bottom: 24px;
}

.platform-section h3 {
  background: #f0f4f8;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 1rem;
}

/* ===================================
   Tablet (768px+)
   =================================== */
@media (min-width: 768px) {
  .site-header {
    padding: 14px 24px;
  }

  .main-content {
    padding: 32px 24px 64px;
  }

  .page-title {
    font-size: 1.75rem;
  }

  .content-section {
    padding: 24px;
  }

  .content-section h2 {
    font-size: 1.3rem;
  }

  .btn-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .btn-list .btn {
    width: auto;
    min-width: 200px;
  }

  .top-nav {
    align-items: center;
  }

  .top-nav .btn {
    width: auto;
    min-width: 280px;
  }

  .top-hero .app-icon {
    width: 100px;
    height: 100px;
  }

  .top-hero h1 {
    font-size: 1.8rem;
  }

  .screenshot {
    max-width: 350px;
  }

  .screenshot-row .screenshot {
    max-width: 250px;
  }

  .legal-content {
    padding: 32px;
  }
}

/* ===================================
   Desktop (1024px+)
   =================================== */
@media (min-width: 1024px) {
  .main-content {
    padding: 40px 24px 80px;
  }

  .page-title {
    font-size: 2rem;
  }

  .content-section {
    padding: 32px;
  }

  .content-section h2 {
    font-size: 1.4rem;
  }

}
