* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: #e8d0dc;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  justify-content: center;
  align-items: center;
}
.container {
  max-width: 1200px;
  width: 100%;
  background: #fcf5f8;
  border-radius: 24px;
  box-shadow: 0 4px 24px rgba(120, 60, 80, 0.15);
  padding: 2.5rem 2.5rem 2rem;
  border: 1px solid #d8b8c8;
  position: relative;
  opacity: 0;
  animation: containerFade 0.6s ease forwards;
  animation-delay: 3s;
}
@keyframes containerFade {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
.header-section {
  margin-bottom: 1.8rem;
  border-bottom: 2px solid #d8b8c8;
  padding-bottom: 1.2rem;
}
.header-main h1 {
  font-weight: 300;
  font-size: 2rem;
  letter-spacing: 0.5px;
  color: #3a1a2a;
  margin: 0;
}
.header-main h1 span {
  color: #a84a64;
  font-weight: 400;
}
.title-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: #fdf5f8;
  padding: 0.4rem 1rem 0.4rem 1.2rem;
  border-radius: 30px;
  border: 1px solid #d8b8c8;
  max-width: 400px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.title-input-wrapper label {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #8a6a7a;
  white-space: nowrap;
}
.title-input-wrapper input {
  padding: 0.4rem 0.6rem;
  border: none;
  border-radius: 20px;
  font-size: 0.95rem;
  background: transparent;
  color: #3a1a2a;
  min-width: 180px;
  outline: none;
  flex: 1;
}
.title-input-wrapper input:focus {
  background: white;
  box-shadow: 0 0 0 2px #d8b0c0;
}
.title-input-wrapper input::placeholder {
  color: #c0a0b0;
  font-weight: 300;
}
.subhead {
  color: #6a4a5a;
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 0.3px;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  align-items: center;
  background: #f5e8ee;
  padding: 0.5rem 1.2rem;
  border-radius: 40px;
  margin-bottom: 1.2rem;
  border: 1px solid #d8b8c8;
}
.toolbar .btn {
  background: #fdf5f8;
  border: none;
  padding: 0.4rem 1rem;
  border-radius: 24px;
  font-weight: 500;
  font-size: 0.85rem;
  color: #4a2a3a;
  cursor: pointer;
  transition: 0.15s;
  border: 1px solid transparent;
}
.toolbar .btn:hover {
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(180,80,120,0.08);
  border-color: #c8a8b8;
}
.toolbar .btn-primary {
  background: #a84a64;
  color: white;
  box-shadow: 0 2px 10px rgba(168,74,100,0.2);
}
.toolbar .btn-primary:hover {
  background: #8a3a54;
  border-color: #8a3a54;
  box-shadow: 0 4px 16px rgba(168,74,100,0.3);
}
.toolbar .btn-danger {
  color: #8a4a5a;
}
.toolbar .btn-danger:hover {
  background: #fce8ec;
  border-color: #f5d0d8;
}
.file-input-label {
  background: #fdf5f8;
  padding: 0.4rem 1rem;
  border-radius: 24px;
  font-weight: 500;
  font-size: 0.85rem;
  color: #4a2a3a;
  cursor: pointer;
  border: 1px solid #d8b8c8;
  transition: 0.15s;
}
.file-input-label:hover {
  background: #faf5f8;
  border-color: #d8b8c8;
}
#importInput { display: none; }
.spacer { flex: 1; }
.toolbar-hint {
  font-size: 0.8rem;
  color: #b08a9a;
  font-weight: 300;
}
.entry-panel {
  background: #f5e8ee;
  padding: 1.2rem 1.5rem;
  border-radius: 18px;
  margin-bottom: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.8rem 1.2rem;
  border: 1px solid #d8b8c8;
}
.entry-panel .field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 0 100px;
}
.entry-panel .field label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #8a6a7a;
}
.entry-panel .field input {
  padding: 0.5rem 0.7rem;
  border: 1px solid #d8b8c8;
  border-radius: 10px;
  font-size: 0.95rem;
  background: #fdf5f8;
  transition: 0.15s;
  color: #3a1a2a;
  width: 100%;
}
.entry-panel .field input:focus {
  outline: 2px solid #c8a0b0;
  border-color: transparent;
  box-shadow: 0 0 0 4px rgba(200, 160, 176, 0.2);
}
.entry-panel .field input[type="time"] {
  padding: 0.4rem 0.5rem;
  font-size: 0.9rem;
}
.field-days {
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.4rem;
  flex: 1 0 180px !important;
}
.field-days label {
  width: 100%;
  flex-basis: 100%;
  margin-bottom: 2px;
}
.day-check {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #5a3a4a;
  cursor: pointer;
  transition: 0.15s;
  padding: 2px 8px;
  border-radius: 16px;
  background: #fdf5f8;
  border: 1px solid transparent;
}
.day-check:hover {
  background: #f0dce8;
  color: #a84a64;
}
.day-check input {
  width: 15px;
  height: 15px;
  accent-color: #a84a64;
  cursor: pointer;
}
.btn-add {
  background: #a84a64;
  color: white;
  border: none;
  padding: 0.6rem 2.2rem;
  border-radius: 28px;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: 0.15s;
  box-shadow: 0 3px 14px rgba(168,74,100,0.25);
  margin-left: auto;
  align-self: center;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.btn-add:hover {
  background: #8a3a54;
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(168,74,100,0.35);
}
.btn-add:active { transform: scale(0.97); }
.schedule-wrapper {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid #d8b8c8;
  background: white;
  position: relative;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}
.schedule-grid {
  display: grid;
  grid-template-columns: 65px repeat(7, 1fr);
  width: 100%;
  min-width: 700px;
  max-width: 100%;
  font-size: 0.85rem;
}
.schedule-title-bar {
  grid-column: 1/-1;
  background: #f5e8ee;
  padding: 0.7rem 1.5rem;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 400;
  color: #3a1a2a;
  border-bottom: 2px solid #d8b8c8;
  letter-spacing: 0.5px;
  border-radius: 16px 16px 0 0;
}
.schedule-title-bar .title-text {
  color: #a84a64;
  font-weight: 500;
  background: rgba(255,255,255,0.6);
  padding: 0.1rem 1.2rem;
  border-radius: 30px;
  display: inline-block;
  backdrop-filter: blur(2px);
}
.user-deco-img {
  position: absolute;
  pointer-events: none;
  z-index: 5;
  opacity: 0.25;
  max-width: 150px;
  max-height: 150px;
  object-fit: contain;
  border-radius: 12px;
}
.grid-header {
  background: #f5e8ee;
  font-weight: 500;
  color: #5a3a4a;
  padding: 0.6rem 0.2rem;
  text-align: center;
  border-bottom: 2px solid #d8b8c8;
  border-right: 1px solid #d8b8c8;
  letter-spacing: 0.5px;
  font-size: 0.8rem;
}
.grid-header:first-child {
  background: #f0dce8;
  color: #7a5a6a;
  font-weight: 400;
}
.grid-cell {
  border-right: 1px solid #d8b8c8;
  border-bottom: 1px solid #d8b8c8;
  min-height: 60px;
  padding: 3px 3px;
  background: #fcf5f8;
}
.grid-cell.time-label {
  background: #f0dce8;
  font-weight: 400;
  color: #7a5a6a;
  text-align: center;
  font-size: 0.7rem;
  padding-top: 5px;
  border-right: 1px solid #d8b8c8;
  background: #f0dce8;
  letter-spacing: 0.3px;
}
.course-block {
  background: #fce8f0;
  border-left: 3px solid #a84a64;
  border-radius: 5px;
  padding: 3px 6px;
  font-size: 0.7rem;
  font-weight: 500;
  color: #3a1a2a;
  margin-bottom: 2px;
  box-shadow: 0 1px 3px rgba(168,74,100,0.05);
  word-break: break-word;
  line-height: 1.3;
  cursor: default;
  transition: 0.1s;
}
.course-block:hover {
  filter: brightness(0.97);
  box-shadow: 0 2px 8px rgba(168,74,100,0.1);
}
.course-block .del {
  float: right;
  background: rgba(168,74,100,0.1);
  border-radius: 30px;
  width: 17px;
  height: 17px;
  text-align: center;
  line-height: 17px;
  font-weight: 700;
  color: #8a4a5a;
  cursor: pointer;
  margin-left: 4px;
  font-size: 0.6rem;
  transition: 0.1s;
}
.course-block .del:hover {
  background: #a84a64;
  color: white;
}
.course-block .del:active { transform: scale(0.9); }
.course-block .time-range {
  display: block;
  font-weight: 300;
  font-size: 0.55rem;
  color: #8a6070;
  margin-top: 1px;
  border-top: 1px dashed rgba(168,74,100,0.2);
  padding-top: 2px;
}
.course-block .section-name {
  display: block;
  font-weight: 300;
  font-size: 0.6rem;
  color: #8a6070;
  margin-top: 1px;
  border-top: 1px dashed rgba(168,74,100,0.2);
  padding-top: 2px;
}
.course-block .room-name {
  display: block;
  font-weight: 300;
  font-size: 0.55rem;
  color: #a07888;
  margin-top: 0px;
  padding-top: 0px;
}
.course-block .building-name {
  display: block;
  font-weight: 300;
  font-size: 0.5rem;
  color: #b08898;
  margin-top: 0px;
  padding-top: 0px;
}
.empty-hint {
  color: #c0a0b0;
  font-size: 0.6rem;
  text-align: center;
  padding-top: 8px;
  font-style: italic;
  font-weight: 300;
}
.image-options {
  background: #f5e8ee;
  border-radius: 14px;
  padding: 0.8rem 1.2rem;
  margin-top: 1rem;
  border: 1px solid #d8b8c8;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.5rem;
}
.image-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  width: 100%;
  padding: 0.3rem 0;
  border-bottom: 1px dashed #d8b8c8;
}
.image-selector:last-child {
  border-bottom: none;
}
.image-selector label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #8a6a7a;
  min-width: 130px;
}
.bg-image-select {
  padding: 0.3rem 0.6rem;
  border: 1px solid #d8b8c8;
  border-radius: 8px;
  font-size: 0.85rem;
  background: #fdf5f8;
  color: #3a1a2a;
  min-width: 200px;
  flex: 1;
}
.bg-image-select:focus {
  outline: 2px solid #c8a0b0;
  border-color: transparent;
}
.img-upload-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 100%;
}
.footer-actions {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
  border-top: 1px solid #d8b8c8;
  padding-top: 1.2rem;
}
.footer-actions .btn {
  padding: 0.4rem 1.6rem;
  border-radius: 28px;
  border: 1px solid #d8b8c8;
  background: #fdf5f8;
  font-weight: 500;
  cursor: pointer;
  transition: 0.15s;
  color: #4a2a3a;
  font-size: 0.9rem;
}
.footer-actions .btn:hover {
  background: #f5e8ee;
  border-color: #c8a8b8;
}
.footer-actions .btn:active { transform: scale(0.97); }
.footer-actions .btn-image {
  background: #a84a64;
  color: white;
  border: none;
  box-shadow: 0 3px 12px rgba(168,74,100,0.2);
}
.footer-actions .btn-image:hover {
  background: #8a3a54;
  box-shadow: 0 6px 20px rgba(168,74,100,0.3);
}
.site-footer {
  margin-top: 1.5rem;
  padding: 1rem 0 0.3rem 0;
  text-align: center;
  border-top: 1px solid #d8b8c8;
  color: #b08898;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  width: 100%;
  max-width: 1200px;
  font-weight: 300;
}
.site-footer span {
  font-weight: 400;
  color: #a84a64;
}
.beginner-tip {
  background: #f5e8ee;
  border-radius: 12px;
  padding: 0.6rem 1.2rem;
  margin-bottom: 1rem;
  border: 1px solid #d8b8c8;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: #5a3a4a;
}
.beginner-tip .tip-icon { font-size: 1.2rem; }
.beginner-tip .tip-text { flex: 1; }
.beginner-tip .tip-text strong { color: #a84a64; font-weight: 600; }

.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #fce4ec 0%, #f8e0e8 40%, #f5d8e4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: splashFade 2.5s ease forwards;
  animation-delay: 0.5s;
}
@keyframes splashFade {
  0% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; pointer-events: none; }
}
.splash-content {
  text-align: center;
  animation: bounceIn 0.8s ease;
}
@keyframes bounceIn {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.hello-kitty {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
  animation: wave 1s ease-in-out infinite;
}
@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-3deg); }
  75% { transform: rotate(3deg); }
}
.kitty-img {
  width: 280px;
  max-width: 85vw;
  height: auto;
  filter: drop-shadow(0 12px 40px rgba(200, 80, 120, 0.25));
}
.splash-title {
  font-size: 2.8rem;
  font-weight: 300;
  color: #4a2a3a;
  margin-bottom: 0.5rem;
}
.splash-sub {
  font-size: 1.2rem;
  color: #7a5a6a;
  font-weight: 300;
  letter-spacing: 1px;
}

.custom-notif-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}
.custom-notif-box {
  background: #fff5f8;
  border-radius: 28px;
  padding: 2rem 2.5rem;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(180,80,120,0.25);
  border: 2px solid #f0d8e4;
  position: relative;
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes popIn {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.custom-notif-box .notif-emoji {
  font-size: 3.2rem;
  margin-bottom: 0.4rem;
}
.custom-notif-box .notif-msg {
  font-size: 1.1rem;
  color: #4a2a3a;
  font-weight: 400;
  line-height: 1.6;
  margin: 0.5rem 0 1.2rem 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
.custom-notif-box .notif-close {
  background: #c0607a;
  color: white;
  border: none;
  padding: 0.5rem 2.2rem;
  border-radius: 40px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: 0.15s;
  box-shadow: 0 4px 14px rgba(192,96,122,0.25);
}
.custom-notif-box .notif-close:hover {
  background: #a84a64;
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(192,96,122,0.35);
}
.custom-notif-box .notif-close:active { transform: scale(0.95); }

.gif-popup-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.2);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  animation: fadeIn 0.3s ease;
}
.gif-popup-box {
  background: transparent;
  border-radius: 30px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
  overflow: hidden;
}
.gif-popup-box img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 30px;
}

@media (max-width: 768px) {
  body { padding: 0.8rem; }
  .container { padding: 1.2rem; border-radius: 18px; }
  .header-main h1 { font-size: 1.6rem; }
  .title-input-wrapper { max-width: 100%; }
  .entry-panel { flex-direction: column; align-items: stretch; padding: 0.8rem; gap: 0.6rem; }
  .entry-panel .field { flex: 1 1 auto; }
  .field-days { flex: 1 1 auto !important; }
  .btn-add { margin-left: 0; width: 100%; padding: 0.6rem; font-size: 0.9rem; }
  .toolbar { padding: 0.5rem 0.8rem; gap: 0.3rem 0.5rem; border-radius: 24px; }
  .toolbar .btn, .file-input-label { font-size: 0.75rem; padding: 0.3rem 0.7rem; }
  .toolbar-hint { display: none; }
  .schedule-grid { min-width: 580px; grid-template-columns: 50px repeat(7, 1fr); font-size: 0.7rem; }
  .grid-header { font-size: 0.65rem; padding: 0.4rem 0.1rem; }
  .grid-cell { min-height: 48px; }
  .grid-cell.time-label { font-size: 0.6rem; padding-top: 4px; }
  .course-block { font-size: 0.6rem; padding: 2px 5px; border-left-width: 3px; }
  .course-block .del { width: 15px; height: 15px; line-height: 15px; font-size: 0.55rem; }
  .empty-hint { font-size: 0.5rem; padding-top: 6px; }
  .schedule-title-bar { font-size: 1rem; padding: 0.5rem 0.8rem; }
  .image-options { flex-direction: column; align-items: stretch; gap: 0.5rem; padding: 0.6rem 0.8rem; }
  .image-selector { flex-direction: column; align-items: stretch; gap: 0.3rem; }
  .image-selector label { min-width: auto; }
  .bg-image-select { min-width: auto; }
  .img-upload-group { flex-direction: column; align-items: stretch; gap: 0.4rem; }
  .img-upload-group label { margin-left: 0 !important; }
  .footer-actions { gap: 0.4rem; padding-top: 0.8rem; }
  .footer-actions .btn { font-size: 0.8rem; padding: 0.3rem 1rem; }
  .beginner-tip { font-size: 0.8rem; padding: 0.4rem 0.7rem; }
  .beginner-tip .tip-icon { font-size: 1rem; }
  .site-footer { font-size: 0.75rem; }
  .custom-notif-box { padding: 1.5rem 1.5rem; }
  .custom-notif-box .notif-msg { font-size: 1rem; }
  .gif-popup-box { max-width: 300px; }
}
@media (max-width: 480px) {
  body { padding: 0.4rem; }
  .container { padding: 0.8rem; border-radius: 14px; }
  .header-main h1 { font-size: 1.3rem; }
  .title-input-wrapper { padding: 0.3rem 0.6rem; }
  .title-input-wrapper input { font-size: 0.8rem; min-width: 120px; }
  .schedule-grid { min-width: 440px; grid-template-columns: 42px repeat(7, 1fr); font-size: 0.6rem; }
  .grid-header { font-size: 0.55rem; padding: 0.3rem 0.1rem; }
  .grid-cell { min-height: 38px; padding: 2px; }
  .grid-cell.time-label { font-size: 0.5rem; padding-top: 3px; }
  .course-block { font-size: 0.5rem; padding: 2px 4px; border-left-width: 2px; }
  .course-block .del { width: 13px; height: 13px; line-height: 13px; font-size: 0.45rem; }
  .empty-hint { font-size: 0.4rem; padding-top: 4px; }
  .schedule-title-bar { font-size: 0.8rem; padding: 0.3rem 0.5rem; }
  .btn-add { font-size: 0.8rem; padding: 0.5rem; }
  .entry-panel .field input { font-size: 0.8rem; padding: 0.4rem 0.5rem; }
  .day-check { font-size: 0.7rem; padding: 1px 5px; }
  .footer-actions .btn { font-size: 0.7rem; padding: 0.25rem 0.7rem; }
  .beginner-tip { font-size: 0.7rem; }
  .site-footer { font-size: 0.65rem; }
  .custom-notif-box { padding: 1.2rem 1rem; }
  .custom-notif-box .notif-msg { font-size: 0.9rem; }
  .gif-popup-box { max-width: 250px; }
}
@media print {
  .toolbar, .entry-panel, .footer-actions, .site-footer, .beginner-tip, .image-options { display: none !important; }
  .container { box-shadow: none; border: 1px solid #ddd; }
  body { background: white; padding: 0.2rem; }
}
